- 首先将两台鸿蒙设备插入电脑的usb上
<li><p>查看两台鸿蒙设备的deviceid</p><pre>C:\Users\Administrator>adb devices
- daemon not running; starting now at tcp:5037
- daemon started successfully
List of devices attached
FRU6R2011500QWER unauthorized
MVT5T1970300ABCD unauthorized
</pre>
</li><li><p>切换成wifi调试,将以下命令依次输入</p><pre>adb -s MVT5T1970300ABCD tcpip 55555
</pre>
restarting in TCP mode port: 55555
adb -s FRU6R2011500QWER tcpip 55556
restarting in TCP mode port: 55556
</li><li>依次进入每台鸿蒙设备看一下上面的ip地址</li><li><p>依次连接两台鸿蒙设备</p><pre>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
</pre>
</li><li><p>使用scrcpy 连接一台鸿蒙设备</p><pre>C:\Users\Administrator>scrcpy -s 192.168.0.10:55555
</pre>
INFO: scrcpy 1.17 <https://github.com/Genymobile...;
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
</li>
使用鸿蒙
- 使用鸿蒙专用deveco开发工具连接:运行
- 使用鸿蒙专用deveco开发工具连接:调试
- 结论:鸿蒙系统兼容adb wifi调试,对于想不要约束的开发者,可以使用.
作者:人工智能姬
想了解更多内容,请访问51CTO和华为合作共建的鸿蒙社区:https://harmonyos.51cto.com