• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to debug USB OTG application?

I am working on an Android application which talks to external device via USB. How can I debug such an app?

Is it possible for virtual device to use real USB in OTG mode and connect to external device?

How do I wire real phone for debugging? I need my PC to be USB host for USB debugging right? So if PC is connected to phone USB port is busy. Is it possible to wire real phone to be USB host for external device while having PC debugging the app?
 
The adb command has a tcpip mode. I've used it and it works, but when I plug the USB OTG device in I stop getting logcat output. Maybe I'm doing it wrong, but maybe you can figure it out.

Code:
(base) puff@rockyraccoon:~/$ adb devices
List of devices attached
015629628541c1c8    device

(base) puff@rockyraccoon:~/$ adb tcpip 5555
restarting in TCP mode port: 5555
(base) puff@rockyraccoon:~/$ adb connect 192.168.66.27
connected to 192.168.66.27:5555
(base) puff@rockyraccoon:~/$ adb devices
List of devices attached
192.168.66.27:5555    device
015629628541c1c8    device
 
Back
Top Bottom