HDC使用说明&实用命令介绍
HDC使用说明&实用命令介绍
一、HDC使用说明
1、hdc 配置环境变量:
右键此电脑 -> 属性 -> 高级系统设置 -> 高级 -> 环境变量,选中系统变量中的 Path 变量 -> 编辑 -> 将hdc.exe所在文件夹路径添加到Path变量并保存
现在的DevEcoStudio就集成了hdc工具,不需要单独去下载,路径在 DevEco Studio\sdk\default\openharmony\toolchains
2、查询hdc安装成功
win+r输入“cmd”打开命令调试框,输入“hdc -v”,输出版本信息表示安装成功。
二、HDC实用命令
1、hdc shell 查看设备是否root #表示已root $表示未root
2、hdc --version 查看hdc版本
3、hdc list targets 查看已连接的设备列表
4、hdc shell reboot 重启设备
5、hdc install xxx.hap 应用安装
6、hdc file send 本机电脑文件 目标设备目录 -->推送文件到目标设备
7、hdc file recv 目标设备目录内文件 本机电脑目录 -->下载目标设备的文件到本机电脑目录
8、hdc shell aa start -a EntryAbility -b 应用包名 --> 启动应用
9、hdc shell aa force-stop 应用包名 --> 停止应用
10、hdc hilog 查看日志
11、hdc shell hilog -r -->清理缓存日志
12、hdc shell bm clean -n 应用包名 -c -->清理应用缓存
13、hdc shell bm clean -n 应用包名 -d -->清理应用数据
14、hdc shell power-shell wakeup 亮屏
15、hdc shell power-shell supsend 锁屏
16、hdc shell param get const.product.software.version -->查看设备系统版本
17、hdc shell param get const.product.model -->查看设备型号
18、hdc shell param get ohos.boot.sn -->查看设备SN号
19、hdc shell param get const.product.devicetype -->查看设备类型
20、hdc shell bm dump -n 应用包名 -->查看应用配置信息
21、hdc shell bm dump -a -->查看设备上所有应用的包名
22、hdc shell ps -ef | findstr 应用包名 -->查看进程
23、hdc shell kill -9 进程id -->杀掉进程
更多推荐


所有评论(0)