DevEco Studio下载安装:DevEco Studio
根据自己的电脑系统下载安装:
操作系统:Windows 10/11 64 位 内存:8GB 及以上 硬盘:100GB 及以上 分辨率:1280*800 像素及以上
操作系统:macOS(X86) 10.15/11/12/13 macOS(ARM) 11/12/13 内存:8GB 及以上 硬盘:100GB 及以上 分辨率:1280*800 像素及以上
需要大于等于v14.19.1版本,且小于v17.0.0,若不符合,无法继续安装SDK
在bash_profile
文件中,添加SDK的路径
export HDC_SERVER_PORT=7035
export PATH=/Users/ios/Library/Huawei/Sdk/hmscore/3.1.0/toolchains:$PATH
hdc help
[F][2024-05-31 17:13:51] uv_dlsym HdcExtHelp failed dlsym(0x7ff9020be440, HdcExtHelp): symbol not found
OpenHarmony device connector(HDC) ...
---------------------------------global commands:----------------------------------
-h/help - Print hdc help
-v/version - Print hdc version
-l 0-5 - Set runtime loglevel
-t connectkey - Use device with given connect key
checkserver - check client-server version
checkdevice - check server-daemon version
---------------------------------component commands:-------------------------------
session commands(on server):
discover - Discover devices listening on TCP via LAN broadcast
list targets [-v] - List all devices status, -v for detail
tconn key - Connect device via key, TCP use ip:port
example:192.168.0.100:10178/192.168.0.100
USB connect automatic, TCP need to connect manually
先确认手机已成功连接至电脑
hdc list targets
start server at tcp:7035
2CJ0220000003139
执行安装命令行
hdc app install -r /path/app.hap
[Info]App install path:/path/app.hap, queuesize:0, msg:install bundle successfully.
AppMod finish