当前位置: 首页 > news >正文

鸿蒙hdc命令【杭州多测师】

 

1、查看版本
hdc -v

2、查看连接设备
hdc list targets

3、安装应用
hdc app install .\phone-launcher-default-signed.hap
// 覆盖安装
hdc app install -r .\phone-launcher-default-signed.hap

// 安装、更新,多HAP可以指定多个文件路径
hdc install C:\entry.hap C:\feature.hap
// 执行结果
install bundle successfully.

// 先执行hdc shell才能使用bm工具
hdc shell
// 安装、更新,多HAP可以指定多个文件路径
bm install -p /data/app/entry.hap /data/app/feature.hap
// 执行结果
install bundle successfully.

4、卸载应用
hdc app uninstall com.ohos.myapplication


// 卸载
bm uninstall -n com.example.myapplication
// 执行结果
uninstall bundle successfully.


// 卸载
hdc uninstall com.example.myapplication
// 执行结果
uninstall bundle successfully.

5、发送文件
hdc file send .\Laucher.hap system/app/com.ohos.launcher/Launcher.hap


6、接收文件
hdc file recv system/app/com.ohos.launcher/Launcher.hap D:\OpenHarmony\


7、查看日志
hdc hilog

8、获取UUID
hdc shell bm get --udid

9、杀掉hdc进程,类似adb kill-server
hdc kill


10、重启hdc
hdc start -r

11、重启设备
hdc shell reboot


12、启动Ability
hdc shell aa start -b 包名 -a Ability名称

hdc shell aa start -b ohos.samples.FormApplication -a ohos.samples.FormApplication.MainAbility


13、多设备操作
hdc list targets 查看设备后
hdc -t 设备 shell
hdc -t 7001005458323933328a250f004e3900 shell

14、清除应用缓存
hdc shell bm clean -n ohos.samples.FormApplication -c

15、清除应用数据
hdc shell bm clean -n ohos.samples.FormApplication -d

16、hdc shell bm 其他操作
禁止应用,应用在桌面消失
 hdc shell bm disable -n ohos.samples.FormApplication
 
允许应用,应用在桌面显示
 hdc shell bm enable -n ohos.samples.FormApplication

查看应用配置信息
hdc shell bm dump -n ohos.samples.FormApplication
 
  help         list available commands
  install      install a bundle with options
  uninstall    uninstall a bundle with options
  dump         dump the bundle info
  clean        clean the bundle data
  enable       enable the bundle
  disable      disable the bundle
  get          obtain device udid
  getrm        obtain the value of isRemovable by given bundle name and module name
  setrm        set module isRemovable by given bundle name and module name


17、hdc shell aa 其他操作
强制退出应用
hdc shell aa force-stop ohos.samples.FormApplication

查看当前任务栈的ability 信息
hdc shell aa dump -l


hdc shell aa 其他操作

  help                        list available commands
  start                       start ability with options
  stop-service                stop service with options
  dump                        dump the ability info
  force-stop <bundle-name>    force stop the process with bundle name
  test                        start the test framework with options
  ApplicationNotRespondin     Pass in pid with options
  block-ability <ability-record-id>       block ability with ability record id
  block-ams-service                       block ams service
  block-app-service                       block app service


18、hdc 其他操作
hdc discover
hdc tconn
hdc bugreport
hdc jpid
hdc keygen FILE

http://www.jsqmd.com/news/18751/

相关文章:

  • 电脑黑屏只剩鼠标-解决方案 - 教程
  • 如何将海量纸质表格一键数字化?表格识别技术给出答案
  • 10.21 NOIP 模拟赛 T1. 小 h 学步
  • 深入解析:【Linux】生产者消费者模型
  • 湖南新建高速项目的“神经网络”是如何搭建的?——揭秘80公里高速的收费、通信、监控一体化系统
  • 深入解析:大数据Spark(六十六):Transformation转换算子sample、sortBy和sortByKey
  • 完整教程:web前端团队开发code review方案最佳实践
  • 实用指南:免费html网页模板 html5网站模板 静态网页模板
  • 最大值的不同统计方法
  • 加密货币如何改变金融诈骗的游戏规则
  • leetcode448. 找到所有数组中消失的数字
  • 远程服务器显示pyQt界面
  • 揭开 C++ vector 底层面纱:从三指针模型到手写完整实现 - 指南
  • java的字符和字符串
  • python_日志记录-loguru
  • 软工第三次作业--结对作业
  • 原来用聊天记录就可以创造数字分身!WeClone项目在Lab4AI平台上的复现
  • Day1HTML的基本骨架
  • 结对项目作业
  • C语言项目开发常用目录结构 - Invinc
  • RNDIS让Air8000的USB上网更智能、更快速!
  • 如果k8s有三个calico节点A,B,C 使用bgp模式的话是如何进行BGP对等会话的
  • 2025年栏杆护栏厂家权威推荐榜:不锈钢栏杆、桥梁防撞护栏、河道景观护栏专业制造商精选
  • Day1标签语法
  • home-assistant-Concepts and terminology概念和术语
  • 2025年印染水洗机厂家权威推荐榜:高效水洗设备与环保节能技术深度解析,专业水洗机厂家精选
  • 2025年定型机厂家推荐排行榜,拉幅定型机,门富士定型机,节能定型机,余热回收,废气回收,烟气回收,智能排风,双层定型机公司推荐
  • 华容道 BFS DFS C++ Python 短程序
  • home-assistant-Onboarding Home Assistant(入职家庭助理)
  • 有关K8s calico IPIP模式的一些疑惑和思考