此方法用于不方便使用USB线连接的时候,比如充电的时候抓取log
具体方法:
- 连接Wifi,查看wifi 地址
可以使用adb得到adb shell ifconfig wlan0 - 连接USB线
- adb tcpip <port>, listening on TCP on the specified port
不如adb tcpip 5555 - adb connect <ip>:5555
- 拔掉usb线
-
使用adb devices可以得到诸如
List of devices attached
10.81.101.128:5555 device
所以这时候就可以使用常规的adb 命令来抓log 了。