Alex Rivera | Logout

Android Host Mode USB debugging

Asked 2012-12-03T14:06:15.713
8

I am developing an application where my android phone connects to a USB accessory. However, when the accessory is connected is there any easy way to debug the application?

Can we use a micro usb hub or similar device?

Edit
Report

1 Answer

14

When debugging applications that use USB accessory or host features, you most likely will have USB hardware connected to your Android-powered device. This will prevent you from having an adb connection to the Android-powered device via USB. You can still access adb over a network connection. To enable adb over a network connection:

  1. Connect the Android-powered device via USB to your computer.
  2. From your SDK platform-tools/ directory, enter adb tcpip 5555 at the command prompt.
  3. Enter adb connect <device-ip-address>:5555 You should now be connected to the Android- powered device and can issue the usual adb commands like adb logcat.
  4. To set your device to listen on USB, enter adb usb.

source: Android developer site

answered 2012-12-03T14:10:18.827

Your Answer