wifi的adb连接在连接/断开新的USB时被杀死 [英] adb connection by wifi getting killed when a new USB attached/detached
问题描述
我使用 android studio
在平板电脑上进行开发。
平板电脑使用
I develop on my tablet using android studio
.
The tablet is connected to the computer by wifi using
adb connect< ip_andress> :: 5555
通过wifi连接到计算机
adb connect <ip_andress>:5555
我的应用程序包含已连接/已分离
的USB设备的侦听器。
,但不幸的是,当我将USB设备连接到平板电脑/从平板电脑断开连接时,adb连接被杀死了,从而导致被杀死
,而我在 adb设备。
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".
推荐答案
不是被杀死的 adb-connection-by-wifi 。只是USB枚举会影响 sys.usb。*
系统属性,这在许多设备上会导致重新启动 adbd
不管是通过 USB
还是 tcpip
使用。
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
.
执行 grep stop adbd / init * rc
来了解我的意思。
您可以注释掉那些停止adbd
线路,或者只是在运行 adb connect
命令之前断开USB电缆。
You could either comment out those stop adbd
lines or just disconnect the USB cable before running your adb connect
command.
这篇关于wifi的adb连接在连接/断开新的USB时被杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!