user2730285
user2730285

Reputation: 33

ADB over TCP - Devices are connected and online but installing shows Error: Device not found

Good day,

I've been using a VMWare android machine and installing .apks on it but after my computer was unexpectedly shut down and tried to re-install a package I've been having the following problem:

$ adb -s 192.168.1.2 install 'myapp.apk'
error: device not found
- waiting for device -

However I was able to connect the VM using adb connect 192.168.1.2 which is the ip currently assigned on the android, (seen it on ctrl+f1 netcfg) and then shows:

connected to 192.168.1.2:5555

$ adb devices
List of devices attached 
emulator-5554   offline
192.168.1.2:5555    device

so it appears to be online.

Troubleshooting steps taken before posting:

Kindly assist with situation or post links of another issue related to mine that I probably did not find (sorry for that..)

Thanks!

Edit: I'm using Fedora as OS, Eclipse for developing

Upvotes: 1

Views: 3132

Answers (1)

Chris Stratton
Chris Stratton

Reputation: 40397

When using an ADB tcp target, the device name specified in the -s parameter must include not only the IP address but the port as well, for example:

adb -s 192.168.1.2:5555 install 'myapp.apk'

(As the android emulator actually talks over TCP behind it's "emulator-####" name, one can test this by connecting to an emulator at the loopback address using the control port plus one, ie, "emulator-5554" can also be reached as a vanilla tcp target via adb connect 127.0.0.1:5555 and then you can install on it with adb -s 127:0.0.1:5555 install whatever)

Upvotes: 6

Related Questions