当使用 ADB 通过 WiFi 连接到我的手机时,我发出了命令adb connect <ip address>
,但是通常需要 3 到 10 次尝试才能使命令生效,为什么?
下面显示了一个典型的会话,我在每个命令运行之间没有任何改变,但最终它神奇地起作用。一旦它开始工作,它就会继续工作。
我的手机上已转发端口 5555 并启用了无线 ADB。
gavin@gavin-Inspiron-N5010 ~ $ adb devices
List of devices attached
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
unable to connect to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
connected to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb devices
List of devices attached
192.168.0.8:5555 device
gavin@gavin-Inspiron-N5010 ~ $ adb disconnect 192.168.0.8
gavin@gavin-Inspiron-N5010 ~ $ adb devices
List of devices attached
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
connected to 192.168.0.8:5555
gavin@gavin-Inspiron-N5010 ~ $ adb disconnect 192.168.0.8
gavin@gavin-Inspiron-N5010 ~ $ adb connect 192.168.0.8
connected to 192.168.0.8:5555