I have many scripts that use ADB to debug Android apps over Wi-Fi with emulators. The problem occurs when I charge my Android phone via USB from my computer: ADB sees it and sends commands to my phone instead of the emulator.
Is there a way to disconnect ADB from a phone that charges via USB? I know that I can only send commands to emulators using a switch -e, and also send them to a specific device using a switch-s. However, this is not normal for me, because I have to rewrite a lot of scripts to add more arguments if I want to implement this device selection function. I donβt need workarounds, Iβm just wondering if Google ADB forces me to debug any phone connected via USB that has USB debugging in the settings, or can I delete a specific phone with USB connected from the list of devices on the ADB side? When I start adb disconnect, the USB device remains connected.
source
share