views:

4260

answers:

6

I am attempting to debug an application on a Motorola Droid but I am having some difficulty connecting to the device via USB. My development server is a Windows 7 64bit VM running in HyperV and so I cannot connect directly via USB in the guest or from the host. I installed a couple of different USB over TCP solutions but the connection appears to have issues since the adb monitor reports "devicemonitor failed to start monitoring" repeatedly. I was wondering if there is a way to connect directly from the client on the development machine to the daemon on the device using the network instead of the usb connection or possibly other viable options?

+1  A: 

from adb --help

connect <host>:<port>         - connect to a device via TCP/IP

Thats a command line option by the way.

You should try connecting the phone to your wifi, and then get its IP from your router, its not going to work on the cell network

The port is 5554

Nathan
I had tried that with 5555-5558 and now 5554 and it it does not work for some reason.Basically from a command line:adb kill-serveradb connect 10.10.10.100:5554with the result being * daemon not running. starting it now ** daemon started successfully *unable to connect to 10.10.10.100:5554I can ping the ip of the device from the dev workstation. When the output states "daemon started successfully" shouldn't it be referring to the daemon on the device? Is it attempting to use the emulator possibly? How do I ensure/validate the daemon is running on the device? thanks
A: 

I ended up getting the Eltima USB to Ethernet software working after finally giving up on the possibility of a direct to device connection over TCP. I have pretty much decided that it is not possible to connect to a device across the network only an emulator. If anyone finds out differently please update this post. thanks

This is not really solution, and proposed solution above (with setprop service.adb.tcp.port) works for me and should work for you also.
dpavlin
A: 

Have you found anything? Basically, how to start the adb daemon on the phone without a USB connection ?

Michael
A: 

I do not know how to connect the device without any USB connection at all, but if you manage to connect it maybe at another computer you can switch the adbd to TCP mode by issuing

adb tcpip <port>

from a terminal and connect to your device over wifi from any PC on the network by:

adb connect <ip>:<port>

Maybe it is also possible to switch to TCP mode from a terminal on the device.

Christoph
+4  A: 

According to a post on xda-developers, you can enable ADB over WiFi from the device with the commands

setprop service.adb.tcp.port 5555
stop adbd
start adbd

And you can disable it and return ADB to listening on USB with

setprop service.adb.tcp.port -1
stop adbd
start adbd

If you have USB access already, it is even easier to switch to using WiFi. From a command line on the computer that has the device connected via USB, issue the commands

adb tcpip 5555
adb connect 192.168.0.101:5555

To tell the ADB daemon return to listening over USB

adb usb

There are also several apps on the Android Market that automate this process.

Brian
A: 

this is really simple.

1st make sure you are rooted. download a terminal emulator from market. (there are lots that are free) make sure that your android is connected to your wifi and get the wifi ip address. open the terminal program and type:

su

setprop service.adb.tcp.port 5555

stop adbd

start adbd

now go to your computer (assuming that you are using windows) create a shortcut on the desktop for "cmd.exe" (without the quotations).

right click on the cmd shortcut and choose "Run as Administrator"

change to your android-sdk-windows\tools folder

type:

adb connect wifi.ip.address:5555 (example: adb connect 192.168.0.105:5555)

adb should now say that you are connected. note: if you are too fast to give the connect command it may fail. so try at least 2 times 5 seconds apart before you say this doesn't work.

norman