Android ADB-over-WiFi still disconnects when a USB cable is connected (?!?)

I am working on a USB based project, so I use ADB via WiFi TCP / IP. It works great, and frankly, this ability to debug a wireless connection is one of the coolest stunts in development I've used for many years. Really, really cool.

I am working on various intentions related to USB connections and disconnections. I found that at any time when the physical status of the USB cable changes - whether it is connected or not - the wireless ADB connection is lost. I can restore it and resume debugging through DDMS, but by that time a lot of processor time had passed. This makes it impossible to debug USB connection events.

I don’t understand why ADB will still take measures regarding USB events when it connects via TCP / IP (via Wi-Fi, no less). I do not see the details of the ADB configuration? How do you tell ADB to ignore USB because it does not work on USB anyway?

Thanks!

+4
source share
1 answer

I had the same problem and I think she managed to solve it using "Cancel USB debugging authorization"

Then I connected via usb and allowed my PC

Then restart adb in tcpip mode and connect to my device.

It stayed connected when I disconnected the USB cable.

Hope this helps.

+4
source

All Articles