adb 操作安卓手机

时间:2021-08-15 21:31:51

使用数据线连接手机和电脑,

查看设备

PS C:\Users\an> adb devices
List of devices attached
b30c960e        device

 

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

拔掉数据线,连接设备,须在同一局域网内,IP是手机的ip

PS C:\Users\an> adb connect 10.168.1.218:5555
connected to 10.168.1.218:5555

PS C:\Users\an> adb devices
List of devices attached
10.168.1.218:5555       device

 若出现Offline, 执行adb kill-server、adb start-server  重复上述步骤

PS C:\Users\an> adb devices
List of devices attached
10.168.1.218:5555       offline

PS C:\Users\an> adb kill-server
PS C:\Users\an> adb start-server