m0skit0
m0skit0

Reputation: 25874

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.

Upvotes: 21

Views: 57869

Answers (7)

mcdull
mcdull

Reputation: 1

I think the major issue here is if adb tcpip 5555 <-- this command is a prerequisite before running, adb connect 'ip address':5555

If the 2 commands are independent, it makes sense, otherwise it is a stupid design.

Upvotes: 0

Nokturnal
Nokturnal

Reputation: 1

After connect phone with usb, choose option at phone "charging only".

Upvotes: -2

m0skit0
m0skit0

Reputation: 25874

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.

Upvotes: 40

I also encountered this problem and tried to solve them in a week. Finally it is solved within minutes when I change the setting in my device to allow the debugging when charging. I also ensure that the allow usb debugging enabled because sometimes when you choose to allow debugging when charging, the allow usb debugging will be disabled.

after that, I try the adb tcpip 5555 again and voila!!! no more no emulators... kinda message. I then connect using adb connect 'ip address':5555 and it works like charm.

Upvotes: 1

AlaskaJohn
AlaskaJohn

Reputation: 129

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

Upvotes: 6

user3049976
user3049976

Reputation: 31

What you probably want is:

 connect <host>[:<port>]       - connect to a device via TCP/IP
                                 Port 5555 is used by default if no port number is specified.

so:

$ adb connect 192.168.1.38

Upvotes: 3

Alex P.
Alex P.

Reputation: 31716

adb usb and adb tcpip <port> commands control the transport mode of the adbd daemon running on the device. In order to change the mode the current transport has to be functional. In your case the adbd is running in USB mode - so you have to connect the USB cable in order for the mode change request to reach the deamon.

If you want to avoid having to connect USB just to enable the TCPIP transport - you can either change the default settings or switch it manually from a terminal emulator on the device itself.

Upvotes: 2

Related Questions