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

浪尽此生 提交于 2020-01-08 17:20:11

问题


I develop on my tablet using android studio. The tablet is connected to the computer by wifi using

adb connect <ip_andress>:5555

My application contains listeners for USB devices attached/detached. But unfourtunately, when I connect/disconnect usb device to/from the tablet, the adb connection is getting killed, and I can no longer see the device under "adb devices".


回答1:


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.



来源:https://stackoverflow.com/questions/40105706/adb-connection-by-wifi-getting-killed-when-a-new-usb-attached-detached

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!