Search code examples
androidtcpipadb

Connecting android device over TCPIP


I am trying to connect my android device over tcpip and here is my experience so far:

$ ./adb tcpip
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
restarting in TCP mode port: 67

$ ./adb connect 192.168.1.250:67
unable to connect to 192.168.1.250:67:67

$ ./adb connect 192.168.1.250
unable to connect to 192.168.1.250:5555

Then I did:

$ ./adb kill-server

And then:

$ ./adb tcpip 5555
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
$ ./adb connect 192.168.1.250
connected to 192.168.1.250:5555
  1. Why was I able to connect only after doing ./adb tcpip 5555 and ?
  2. Why was I not able to connect by doing ./adb connect 192.168.1.250:67
  3. What do these messages at the o/p of ./adb tcpip mean?

    • daemon not running. starting it now on port 5037 *
    • daemon started successfully *

      restarting in TCP mode port: 67

adb kill-server is not needed. I can do:

adb tcpip 5555 which gives: restarting in TCP mode port: 5555

What does the above message mean?


Solution

  • According to a page I just read the server can only start in the ports numbered 5555 to 5585.

    "One thing to remember is that you can only choose a port number within the range of [5555...5585] (the reason being that ADB Server only works with these ports). So for instance you could do:

    adb tcpip 5555" (via http://www.chentir.com/?p=1613)