1.首先将两台鸿蒙设备插入电脑的usb上
2.查看两台鸿蒙设备的deviceid
- C:\Users\Administrator>adb devices
- * daemon not running; starting now at tcp:5037
- * daemon started successfully
- List of devices attached
- FRU6R2011500QWER unauthorized
- MVT5T1970300ABCD unauthorized
3.切换成wifi调试,将以下命令依次输入
- adb -s MVT5T1970300ABCD tcpip 55555
- restarting in TCP mode port: 55555
- adb -s FRU6R2011500QWER tcpip 55556
- restarting in TCP mode port: 55556
4.依次进入每台鸿蒙设备看一下上面的ip地址
5.依次连接两台鸿蒙设备
- C:\Users\Administrator>adb connect 192.168.0.10:55555
- connected to 192.168.0.10:55555
- C:\Users\Administrator>adb connect 192.168.0.20:55556
- connected to 192.168.0.20:55556
- #试错,看看重复连会怎么样
- C:\Users\Administrator>adb connect 192.168.0.10:55555
- already connected to 192.168.0.10:55555
6.使用scrcpy 连接一台鸿蒙设备
- C:\Users\Administrator>scrcpy -s 192.168.0.10:55555
- INFO: scrcpy 1.17 <https://github.com/Genymobile/scrcpy>
- C:\ProgramData\chocolatey\lib\scrcpy\tools\scrcpy-server: 1 file pushed, 0 skipped. 1.0 MB/s (34930 bytes in 0.034s)
- [server] INFO: Device: HUAWEI TAS-AL00 (Android 10)
- INFO: Renderer: direct3d
- INFO: Initial texture: 1080x2336
7.使用鸿蒙专用deveco开发工具连接:运行
8.使用鸿蒙专用deveco开发工具连接:调试
9.结论:鸿蒙系统兼容adb wifi调试,对于想不要约束的开发者,可以使用.