Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set ADB in TCP/IP mode: device not found?

I've already used this commands before to set ADB to listen on TCP/IP, but this time I'm stunned. The problem is that the error it's throwing just makes no sense:

$ adb tcpip 5555
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device not found

In fact even trying to put it in USB mode doesn't work either, with same error:

$ adb usb
error: device not found

Just for the info, the adb help says that:

adb usb                      - restarts the adbd daemon listening on USB
adb tcpip <port>             - restarts the adbd daemon listening on TCP on the specified port

I've made no changes in Android SDK (no updates). Any help would be appreciated.

like image 619
m0skit0 Avatar asked Feb 15 '13 17:02

m0skit0


2 Answers

The issue was that I had to have an Android device connected (same device or another device) by USB to be able to execute

$ adb tcpip 5555
restarting in TCP mode port: 5555

Then I can just unplug this USB device and connect to the other devices on the LAN over TCP.

Just makes no sense at all.

like image 143
m0skit0 Avatar answered Sep 23 '22 13:09

m0skit0


Ensure your device is set for Debugging under Developer Tools, then on your host computer's command-line, type:

$ adb tcpip 5555                  - restarts the adbd daemon listening on TCP on the specified port (typically 5555)

restarting in TCP mode port: 5555

If you get "error: device not found", you need to temporarily connect an Android by USB cable. (This doesn't even need to be the same device, and doesn't need to remain connected)

Then, connect to the Android device by IP address. (Ensure your Android is connected to your local network then to find the IP address, click on the wifi network connection to see connection details.)

$ adb connect 192.168.0.10        - connects over network to remote device IP (replace 192.168.0.10 with your Android device's IP address)

connected to 192.168.0.10:5555

Depending on your connection, this could take a minute or so to establish the first time.

To switch back to your USB connection, type:

$ adb usb                         - restarts the adbd daemon listening on USB

Additional Notes:

  • You do not need root access for this to work.
  • You may need to open port (5555) in your firewall.
  • You can use "ping " to ensure your host can find the device on the network
like image 21
AlaskaJohn Avatar answered Sep 22 '22 13:09

AlaskaJohn