清泛IT社区

标题: hdc 安装测试.hap程序 [打印本页]

作者: App Inventor 2     时间: 2026-02-26 22:41
标题: hdc 安装测试.hap程序
hdc list targets
127.0.0.1:5555

qpzhou@qpzhous-Mac-mini toolchains % ./hdc install ~/oh/entry-default-unsigned.hap
[Info]App install path:/Users/qpzhou/oh/entry-default-unsigned.hap msg:install bundle successfully.
AppMod finish

基本原理和安卓 adb 几乎完全一致。不光是这里,Arkts 编程背后,多处有安卓的身影!


作者: App Inventor 2     时间: 2026-03-25 19:50
./hdc shell hilog | grep -i "AICompanion\|crash\|fatal\|SIGNAL"
./hdc shell hilog | grep -i 'scheme\|crash\|fatal\|signal'
./hdc shell hilog | grep -iE "SchemeKit|schemekit|DfxFault"./hdc hilog | grep -E "SchemeKit|schemekit|FATAL|signal|SIGSEGV|CRASH"

作者: App Inventor 2     时间: 2026-05-05 00:10
code:9568322
signature verification failed due to not trusted app source


类型        用途        是否允许 hdc 安装
AGC debug 签名        开发调试        ✅ 允许
release(正式证书)        上架分发        ❌ 不允许直装
作者: App Inventor 2     时间: 2026-05-05 01:14
手动注册设备 + 下载调试 Profile
  1. hdc shell bm get -u 拿 UDID
  2. AGC 添加设备 → 下载调试用 .cer + .p7b
  3. 用调试证书签名安装

AGC debug证书、指定设备发布证书 都需要绑定设备。
有且只有正式应用市场发布的证书不需要绑定设备。

作者: App Inventor 2     时间: 2026-05-05 01:46
debug 签名也必须是AGC 的调试证书。

新的权限问题:

\toolchains>hdc install entry-default-signed-debug.hap
[Info]App install path:D:\oh\command-line-tools\sdk\default\openharmony\toolchains\entry-default-signed-debug.hap msg:error: failed to install bundle. code:9568289 error: install failed due to grant request permissions failed. PermissionName: ohos.permission.READ_CONTACTS
AppMod finish

module.json5 中去掉上面不必要的权限点即可。
也可在证书中添加这个权限。

作者: App Inventor 2     时间: 2026-05-05 07:51
debug签名  vs  指定设备发布签名

1. Debug 签名(调试签名)
这是给开发阶段用的。
特点:
适合:

2. 指定设备发布签名(Release for specified devices)
这个更像安卓的“内部测试包”或 iOS 的 Ad Hoc。
特点:
适合:






欢迎光临 清泛IT社区 (https://bbs.tsingfun.com/) Powered by Discuz! X3.3