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 64-bit VM running in Hyper-V, 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. Is there 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 another viable options?
Assume you saved adb path into your Windows environment path
Activate debug mode in Android
Connect to PC via USB
Open command prompt type:
adb tcpip 5555
Disconnect your tablet or smartphone from pc
Open command prompt type:
adb connect IPADDRESS
(IPADDRESS is the DHCP/IP address of your tablet or smartphone, which you can find by Wi-Fi -> current connected network)Now in command prompt you should see the result like: connected to xxx.xxx.xxx.xxx:5555
Use the adbwireless app to enable the phone, then use adb connect from the Windows machine to talk to it. The adbwireless app on the phone tells you how to connect to it, giving the IP address and everything.
The much less fun alternative is to connect via USB, tell the phone to use TCPIP via adb tcpip 5555, then disconnect USB, then use adb connect. This is much harder because this way you have to figure out the IP address of the phone yourself (adbwireless tells you the IP), you have to connect via USB, and you have to run adb tcpip (adbwireless takes care of that too).
So: install adbwireless on your phone. Use it. It is possible, I do it routinely on Linux and on Windows.
First you must connect your device via USB
Then connect your device to WIFI and get the IP address. While still connect via usb type this in command line or via Android Studio Terminal
You will see these messages:
Now remove the USB cable and you will still see your logcat as normal
Done. Enjoy
I did get this working. Didn't use any usb cable.
Run it. That will set ip and port; Then in dos
Connected.
adb can communicate with adb server over tcp socket. you can verify this by telnet.
generally, command has the format
%04x%s with <message.length><msg>
the following is the ruby command witch sends adb commandcmd
against tcp socketsocket
the first example sends the command
host:version
which length is 12(000c
in hex). you can enjoy more exciting command likeframebuffer:
which takes screenshot from framebuffer as you can guess from its name.As Brian said:
It works.You just need to access the android shell and type those commands...
One other (easier) solution is on the Market: adbWireless, it will automatically set your phone.
Root is required! for both...