Adb Connection by Wifi Getting Killed When a New Usb Attached/Detached

adb connection by wifi getting killed when a new USB attached/detached

It is not a adb-connection-by-wifi what gets killed. It is just that USB enumerations affect the sys.usb.* system properties which on many devices is causing restart of adbd regardless whether it's being used over USB or tcpip.

Do grep "stop adbd" /init*rc to see what I mean.

You could either comment out those stop adbd lines or just disconnect the USB cable before running your adb connect command.

ADB over WiFi connection is lost after disconnecting USB

For some reason, connecting the device in Charge only mode solved the problem. Just make sure "Allow ADB debugging in charge only mode" is enabled before connecting the device.

Other modes caused the connection to be lost, as I have tested on my device running on Android 8.0.0.

Tcpip connection established via ADB gets disconnected as soon as the USB is unplugged

For me upgrading adb version from 39 to 41 fixed the issue.
I agree it may not be a fullproof solution, but it worked for me.

Other solution which others mentioned on similar threads were

  1. migrating from usab3.0 to usb2.0 solved for someone but it didnt solve for me .
  2. changing usb mode from file transfer to charge only solved for someone but it didnt solve for me.

You can try those too if upgrading adb version doesnt work for you.

Android Studio wireless ADB error (10061)

I recently faced the same problem.
It occurs because your device and PC are connected to different Networks.



Related Topics



Leave a reply



Submit