hdc_std
std
2023-09-11 14:19:50 时间
hdc_std
简介
HDC(OpenHarmony Device Connector) 是为开发人员提供的用于设备连接调试的命令行工具,pc端开发机使用命令行工具hdc_std(为方便起见,下文统称hdc),该工具需支持部署在Windows/Linux/Mac等系统上与OpenHarmony设备(或模拟器)进行连接调试通信。PC端hdc工具需要针对以上开发机操作系统平台分别发布相应的版本,设备端hdc daemon需跟随设备镜像发布包括对模拟器进行支持。下文将介绍hdc的常用命令及使用举例。
架构
hdc主要有三部分组成:
- hdc client部分:运行于开发机上的客户端,用户可以在开发机命令终端(windows cmd/linux shell)下请求执行相应的hdc命令,运行于开发机器,其它的终端调试IDE也包含hdc client。
- hdc server部分:作为后台进程也运行于开发机器,server管理client和设备端daemon之间通信包括连接的复用、数据通信包的收发,以及个别本地命令的直接处理。
- hdc daemon部分:daemon部署于OpenHarmony设备端作为守护进程来按需运行,负责处理来自client端的请求。
命令帮助
#cmd操作rk3568板子
将板子上的文件复制到本地:
打开cmd,查看该目录下的文件(进入命令行交互模式):
C:\Users\xxx>hdc_std shell
#cd data/log/faultlog/temp/
再打开一个cmd,查看帮助:
C:\Users\xxx>hdc_std --help
复制cppcrash-2069-1501925953621文件到C:\Users\xxx\Documents\Downloads\
C:\Users\xxx>hdc_std file recv -z /data/log/faultlog/temp/cppcrash-2069-1501925953621 C:\Users\xxx\Documents\Downloads\
从设备中拉取文件(参照上一条)
hdc_std file recv /data/local/tmp/a.txt ./a.txt
查看板子进程:
C:\Users\xxx>hdc_std shell
#top
查看设备连接信息
hdc_std list targets
往设备中推送文件
hdc_std file send E:\a.txt /data/local/tmp/a.txt
安装应用
hdc_std install E:\***.hap
查看日志
hdc_std hilog
TCP网络连接
hdc_std tconn 192.168.0.100:10178
相关文章
- 高德地图引入库错误std::string::find_first_of(char const*, unsigned long, unsigned long) const"
- Qt选择文件对话框-中文路径-转std::string
- std::map常用方法
- C++引入名字空间(namespace)意义何在?为什么using namespace std会成为常用语句?
- qt中提示:c ++ terminate called after throwing an instance of ‘std::bad_alloc‘ what(): std::bad_alloc错误
- std::string::append函数使用方法
- 进行编译时提示'error: unrecognized command line option "-std=gnu11"'如何处理?
- std::uniform_real_distribution的一个bug引发的服务器崩溃
- std::bind(一):包装普通函数
- c++ std string replaceAll函数
- c++ 如何获取多线程的返回值?(std::thread ,std::async)
- C++中,如何在标准库的std::string和常用库(Qt,VC等)的QString之间进行选择?
- C++ std::thread join() 与 detach 的理解
- C++ printf with std::string
- C++11 std::function和std::bind绑定器