当前位置: 首页 > 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.zskr.cn/news/26634.html

相关文章:

  • 电脑黑屏只剩鼠标-解决方案 - 教程
  • leetcode448. 找到所有数组中消失的数字
  • 揭开 C++ vector 底层面纱:从三指针模型到手写完整实现 - 指南
  • Java中的注释
  • 2025年栏杆护栏厂家权威推荐榜:不锈钢栏杆、桥梁防撞护栏、河道景观护栏专业制造商精选
  • Day1标签语法
  • home-assistant-Concepts and terminology概念和术语
  • 2025年定型机厂家推荐排行榜,拉幅定型机,门富士定型机,节能定型机,余热回收,废气回收,烟气回收,智能排风,双层定型机公司推荐
  • 有关K8s calico IPIP模式的一些疑惑和思考
  • UMDF驱动开发入门:创建虚拟设备,从安装到I/O交互全解析
  • 从零开始,搭建自己的AI平台写小说
  • 2025年AI优化公司电话推荐:十家可验证服务商沟通备忘
  • 2025深圳离婚律所电话推荐:家理律所福田诺德中心25楼
  • 2025年深圳离婚律所电话推荐:家理福田诺德中心婚姻家事专线
  • 生日
  • 2025年润滑油厂家权威推荐榜:工业润滑油,汽车润滑油,发动机润滑油,甲醇发动机润滑油,全合成润滑油,长效发动机润滑油品牌深度解析
  • 2025固定资产管理系统电话推荐:公贝资产全周期管理方案
  • 如果使用 vxe-table 实现全键盘操作,按键切换复选框单选框的选中状态
  • 2025年上海装修公司电话推荐:极家与俞润本土双选参考
  • 2025年激光切割机厂家电话推荐:济南邦德激光4009917771技术对接通道.
  • 各项任务完成时间统计
  • 【往届已检索!稳定检索】2025年第二届人工智能、数字媒体技术与交互设计国际学术会议(ICADI 2025)
  • 2025 年螺旋地桩源头厂家最新推荐排行榜:聚焦热镀锌光伏大棚等领域,精选优质企业保障供应与品质光伏/大棚/预埋/ 定做/钢管螺旋地桩厂家推荐
  • 交互题
  • 尝试理解FunctionalInterface
  • 2025 年防淹门源头厂家最新推荐排行榜权威发布,含地铁 / 防洪 / 地下通道专用款,15 项专利 + 央视报道品牌领衔
  • 一文带你掌握Visual Studio中集成的git功能
  • iOS 混淆实战 多工具组合完成 IPA 混淆、加固与工程化落地(iOS混淆|IPA加固|无源码混淆|Ipa Guard|Swift Shield)
  • 构筑平安工地新防线:国标GB28181算法算力平台EasyGBS的平安工地解决方案
  • 服务器运维(一)linux进程指令大全——东方仙盟筑基期 - 指南