[Android] Cannot connect when emulator is running

For user who dont speak german please use this part of my forum
orjan

[Android] Cannot connect when emulator is running

Beitrag von orjan »

When the emulator is running, a usb connection cannot be made.
It is probably due to the fact that when both a device is connected and the emulator is running, you have to specify to adb which one to use:
'adb -d' to use the connected device or
'adb -e' to use the emulator.

There is no risk in adding '-d' when there is no emulator running.

From the log:

Code: Alles auswählen

13:39:53.08       RunADBCommand: start-server
13:39:53.14       ADB CommandResponse: 
13:39:53.14       RunADBCommand: devices
13:39:53.28       ADB CommandResponse: List of devices attached 
emulator-5554	device
CB511H81BP	device
13:39:53.28       Run DeviceTracker
13:39:53.29       Init Tracker
13:39:53.29       RunADBCommand: forward tcp:5210 tcp:5210
13:39:53.31       Device Tracker Message: OKAY0027emulator-5554	device
CB511H81BP	device

13:39:53.43       ADB CommandResponse: 
13:39:53.43       Try connecting to 127.0.0.1...
13:39:54.05       RunADBCommand: shell am start -n com.fjsoft.myphoneexplorer.client/.MainActivity --ez adb true
13:39:54.10       ADB CommandResponse: 
13:39:54.10       Try connecting to 127.0.0.1...
13:39:55.11       SocketError: 10061 - Connection is forcefully rejected
13:39:55.11       Connect to Android failed!
FJ
Site Admin
Beiträge: 32106
Registriert: Mi 15. Feb 2006, 01:16
Wohnort: Tirol
Kontaktdaten:

Beitrag von FJ »

- close the emulator
- etablish the connection to your phone
- as soon as MPE detects a connected phone and there is only one device avaiable in MPE the DeviceID gets cached and on the next connects used
Antworten