android的wifi adb连接使用

前言

有时候没法用usb-adb连接电脑使用,比如我有时候要测试U盘。

首先

电脑和Android设备需连同一wifi

连接步骤

1.使用usb数据线连接设备
2.设置wifi adb连接端口号

PS C:\Users> adb tcpip 6666
restarting in TCP mode port: 6666

3.查看此时连接设备IP

PS C:\Users> adb shell ifconfig wlan0
// 看到连接设备的ip为:192.168.111.102

4.拔掉usb数据线
5.通过IP连接adb

PS C:\Users> adb connect 192.168.111.102:6666
connected to 192.168.111.102:6666

ok,现在就可以无线调试了。

6.断开wifi调试的指令

PS C:\Users> adb disconnect 192.168.111.102:6666
disconnected 192.168.111.102:6666

猜你喜欢

转载自blog.csdn.net/Jason_Lee155/article/details/130678450