Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect android device over adb TCP/IP

Tags:

android

tcp

adb

I'm trying to debug on an android device over wlan using adb. I'm using ubuntu and the newest version of adb. And android version is over 4.x But I fail to connect it.I tried

     ~$ adb connect 10.147.102.16
     unable to connect to 10.147.102.16:5555

    ~$ adb tcpip 5555
    error: device not found

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

    ~$ adb connect 10.147.102.16

However, I'm able to ping it.

    ~$ ping 10.147.102.16
    PING 10.147.102.16 (10.147.102.16) 56(84) bytes of data.
    64 bytes from 10.147.102.16: icmp_req=1 ttl=64 time=683 ms
    64 bytes from 10.147.102.16: icmp_req=2 ttl=64 time=508 ms
    64 bytes from 10.147.102.16: icmp_req=3 ttl=64 time=339 ms
    64 bytes from 10.147.102.16: icmp_req=4 ttl=64 time=467 ms
    64 bytes from 10.147.102.16: icmp_req=5 ttl=64 time=82.4 ms
    ^C
    --- 10.147.102.16 ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4000ms
    rtt min/avg/max/mdev = 82.452/416.321/683.404/199.953 ms

I have found some possible solutions on google, however all of them are for android phone devices and requires using the shell on the phone or modifying some files on the devices. I'm now using a television Top Box with android system. And it is not possible for me to do anything like that. Can anyone help me?

Something more, I use my own android phone as a test. The first time I use adb connect , I succeed in connecting to the phone and debug the program on it. However, after rebooting the phone, I found it impossible to connect to it again. So what's the problem of this...

=======================================

Already solved. Was specific device-related issue. Same process should work for an Android phone.

like image 456
LumiG Avatar asked May 29 '14 15:05

LumiG


2 Answers

I had the same problem with my motorola moto x device.

The solution is you need to set the TCP/IP port to 5555. Connect your device via USB and issue the command

$ adb tcpip 5555

After that remove the USB and connect the device to wifi

$ adb kill-server
$ adb connect 192.168.45.42 
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 192.168.45.42:5555
like image 196
Yougandhara Avatar answered Oct 13 '22 11:10

Yougandhara


You need to kill the adb server then restart it

I spent a day or so... finally saw a thread somewhere that said the above and it worked first time...after killing and starting: Hope that helps I had never used adb b4 doing this so I thing the server never started

To get adb.exe to talk with tablet:

1) Start AdbWireless on rooted tablet, it will tell you what to type in 2) Go to adb.exe location in WindowsExplorer, hold shift key down and right click in open part of WindowsExplorer window and select open command window. 3) Type in: adb kill-server adb start-server connect 192.168.1.294 (whatever your tablets ip address is)

should say connected...type: adb devices to see your tablet

like image 35
user4586148 Avatar answered Oct 13 '22 12:10

user4586148