wifi 连接 Android设备 使用adb 指令

参考链接:https://www.cnblogs.com/joekk01/p/9925440.html

 

step1:手机 usb 连接PC

adb devices查看设备是否正常连接

 

step2: 查看IP (PC和手机连接同一个wifi热点)

adb shell ifconfig wlan0;或者直接在“手机-设置”里面查看 

wifi 连接 Android设备 使用adb 指令

 

 

step3:重启tcpip,并监听5555端口 

adb tcpip 5555

 

step4:建立adb连接

断开usb连接

adb connect 192.168.. (手机ip地址)

如果出现 “missing port in specification: tcp:xx.xx.xx.xx” 的提示,在指令后面加端口的后缀

本例中:adb connect  30.17.109.169:5555

 

step5:断开adb连接

adb disconnect  30.17.109.169:5555