ADB via Wi-Fi disconnects when I connect USB accessory

2

I'm using ADB over Wi-Fi to work with USB (Android Open Accessory) accessories. For some tests it is necessary to disconnect and reconnect the USB cable to the mobile phone. Whenever I connect the USB accessory to the mobile phone, the ADB switches off and I have to turn the ADB on again; even though it is connected to the ADB over Wi-Fi rather than cable.

The command used is $ adb connect 194.2.2.51:5555; adb -s 194.2.2.51:5555 logcat -v threadtime MinhaApp:V *:S .

How to make the ADB connected via Wi-Fi not disconnect when connecting / disconnecting USB devices?

    
asked by anonymous 30.09.2014 / 16:04

1 answer

1

This happens because when you connect the USB cable, the device will detect the USB again and activate it as the adb port automatically. for this not happen you need to force the device to use TCP / IP, but for this the device must have root access. You can create your own script, or you can use some app already ready for this.

how-can-i-connect-to -android-with-adb-over-tcp

I hope I have helped

    
08.10.2014 / 15:46