OpenHarmony远程hdc

准备

1.找到Hdc工具目录

Hdc工具目录在openHarmony sdk里面

例子:
D:\Huawei\HarmonyOS_SDK\openharmony\9\toolchains
2.确定通过USB连接上了设备

通过命令查看IP地址

hdc shell ifconfig
D:\Huawei\HarmonyOS_SDK\openharmony\9\toolchains>hdc shell ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope: Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 TX bytes:0

eth0      Link encap:Ethernet  HWaddr f2:b2:4c:57:d2:a9  Driver rk_gmac-dwmac
          inet addr:192.168.3.117  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::f0b2:4cff:fe57:d2a9/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:321 errors:0 dropped:0 overruns:0 frame:0
          TX packets:277 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:110783 TX bytes:41323
          Interrupt:48

修改设备Hdc网络方式

1.优先使用网络方式连接设备
hdc tmode port 8710
2.关闭本地sever
hdc kill
3.启动远程server
hdc tconn 192.168.3.117:8710
4.使用命令
hdc shell ls -al

网络Hdc修改成USB的Hdc

hdc tmode usb

你可能感兴趣的:(鸿蒙)