Debugging Android USB Host applications

By | January 22, 2013

When USB host is enabled in an Android device, it can not be connected to a PC for debugging. Another debugger solution is running ADB over WiFi.

On the Android device side, you should:

  • Connect to wireless AP
  • Enable the WiFi debugger using e.g. free adbWireless app. It will also show the IP address of the device

On the PC side, create and run this script (takes the device IP address as its only argument):

if [ -z "$1" ]; then
echo "No argument supplied"
echo "Usage: $0 <device ip>"
exit 1

sudo adb kill-server
sudo adb start-server
sudo adb connect $1
adb devices

The script should display your device:

$ ./
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to
List of devices attached    device

Leave a Reply

Your email address will not be published.