查看两台鸿蒙设备的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
切换成wifi调试,将以下命令依次输入
adb -s MVT5T1970300ABCD tcpip 55555 restarting in TCP mode port: 55555 adb -s FRU6R2011500QWER tcpip 55556 restarting in TCP mode port: 55556
依次进入每台鸿蒙设备看一下上面的ip地址
依次连接两台鸿蒙设备
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
使用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
作者:人工智能姬
想了解更多内容,请访问51CTO和华为合作共建的鸿蒙社区:https://harmonyos.51cto.com