Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb connection over tcp not working now

Tags:

android

tcp

adb

I was trying to use adb over TCP/IP. I have followed these steps

adb tcpip 5555  adb connect 194.68.0.100:5555 

I have used my device for 2 days and now I am unable to connect to my IP address like when I do

adb tcpip 5555 

it doesn't respond anything. Anyone knows what could be the scenario.

like image 616
Sunny Avatar asked Sep 21 '13 07:09

Sunny


People also ask

Why adb connect not working?

Failed ADB connections usually have one root cause: bad Android USB drivers that load in place of the right ones. Windows doesn't make it easy to remove the wrong drivers, unfortunately. But before attempting to troubleshoot an ADB connection, first enable USB debugging on your phone if it's not on already.

Does adb use TCP?

When the server starts, it binds to local TCP port 5037 and listens for commands sent from adb clients—all adb clients use port 5037 to communicate with the adb server. As shown, the emulator connected to adb on port 5555 is the same as the emulator whose console listens on port 5554.

How do I connect to my device using adb?

Try following these instructions: 1) Open the command prompt and navigate to your sdk/platform-tools/ folder. 2) Type adb tcpip 5555 with your device plugged in. 3) Type adb connect <your device ip address>:5555.

How do I enable ADB logcat on my Device?

Try following these instructions: 1) Open the command prompt and navigate to your sdk/platform-tools/ folder. 2) Type adb tcpip 5555 with your device plugged in. 3) Type adb connect <your device ip address>:5555. 4) At this point you unplug your device and type adb logcat.

How to stop a running ADB server?

Bookmark this question. Show activity on this post. Show activity on this post. I just use "adb disconnect" and it worked fine for me. See the photo below: Show activity on this post. To kill the server currently running you need to type: adb kill-server in command prompt. This should stop the instance of a running server.

How to enable ADB debugging on Android devices?

You can try to turn on Allow ADB debugging in charge only mode and turn off Always prompt when connecting to USB. It should fix the problem. Here is the reference for the solution. Show activity on this post. First of all connect your device with cable (usb debbuging) click on allow on phone if it asks about debugging Done! Problem Solved


2 Answers

This answer is late, but hopefully it helps others.

I have had the same experience of not being able to connect. Rebooting phone and PC does not help. I found the fix at: http://developer.android.com/tools/help/adb.html at the bottom of the page.

Basically you follow these steps:

  1. Connect phone with usb cable to PC.
  2. Issue command: adb usb
  3. Issue command: adb tcpip 5555
  4. Issue command: adb connect xxx.xxx.xxx.xxx

Where xxx.xxx.xxx.xxx is your phone's IP address.

like image 77
Michael Avatar answered Oct 10 '22 19:10

Michael


Try to do port forwarding,

adb forward tcp:<PC port> tcp:<device port>. 

like:

adb forward tcp:5555 tcp:5555. 

sounds like 5555 port is captured so use other one. As I know 7612 is empty

[Edit]

C:\Users\m>adb forward tcp:7612 tcp:7612  C:\Users\m>adb tcpip 7612 restarting in TCP mode port: 7612  C:\Users\m>adb connect 192.168.1.12 connected to 192.168.1.12:7612 

Be sure that you connect to the right IP address. (You can download Network Info 2 to check your IP)

like image 39
Maxim Shoustin Avatar answered Oct 10 '22 19:10

Maxim Shoustin