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?
One additional note (learned the hard way): You should not have your company VPN-connection active at the same time...
For PC users:
Step 1:
You have to enable Developer options in your Android phone.
You can enable Developer options using this way.
• Open Settings> About> Software Information> More.
• Then tap “Build number” seven times to enable Developer options.
• Go back to Settings menu and now you'll be able to see “Developer options” there.
• Tap it and turn on USB Debugging from the menu on the next screen.
Step 2:
Open cmd and type adb.
if you find that adb is not valid command then you have to add a path to the environment variable.
•First go to you SDK installed folder
Follow this path and this path is just for an example. D:\softwares\Development\Andoird\SDK\sdk\platform-tools\; D:\softwares\Development\Andoird\SDK\sdk\tools;
• Now search on windows system advanced setting
•
Open the Environment variable.
then open path and paste the following path this is an example.
You SDK path is different from mine please use yours. D:\softwares\Development\Andoird\SDK\sdk\platform-tools\;
D:\softwares\Development\Andoird\SDK\sdk\tools;
Step 3:
Open cmd and type adb. if you still see that adb is not valid command then your path has not set properly follow above steps.
Now you can connect your android phone to PC.
Open cmd and type adb devices and you can see your device. Find you phone ip address.
Type:- adb tcpip 5555
Get the IP address of your phone
Now,
Now run your android project and if not see you device then type again adb connect IP address of your phone
For Linux and MAC User:
Step 1: open terminal and install adb using
sudo apt-get install android-tools-adb android-tools-fastboot
Connect your phone via USB cable to PC. Type following command in terminal
Using adb, connect your android phone ip address.
Remove your phone.
You Need to do following things:
If you want to easily connect your device to run, debug or deploy your Android apps over WiFi you can use an open source IntelliJ Plugin I've developed. Here is the code and here the plugin ready to be used.
The usage is quite simple. Here you have a gif:
Here's an extension to Brian's answer using Bluetooth:
On Linux, use Blueman to share PC internet with your device via Bluetooth:
Use the Bluetooth network for ADB commands:
Once done to return to USB mode:
Note: Bluetooth 3.0 and 4.0 can go up to 24 Mbit/s.
I needed to get both USB and TCPIP working for ADB (don't ask), so I did the following (using directions others have posted from xda-developers)
Using
adb shell
: