使用adb命令连接WiFi进行无线调试

1.用USB连接手机

2.打开命令输入

adb tcpip 5555

结果

adb tcpip 5555;restarting in TCP mode port: 5555

3.查看手机ip

adb shell ifconfig wlan0

结果

wlan0 Link encap:UNSPEC inet addr:192.168.50.141 Bcast:192.168.50.255 Mask:255.255.255.0 inet6 addr: fe80::7a62:56ff:fee5:76d0/64 Scope: Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3454241 errors:0 dropped:23 overruns:0 frame:0 TX packets:2524887 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:152319933 TX bytes:535345072

连接wifi

adb connect 192.168.50.141

结果

connected to 192.168.50.141:5555

你可能感兴趣的:(adb)