1.hdc

D:\Program Files\Huawei\SDK\toolchains

2.签名

工具:

D:\Program Files\Huawei\SDK\toolchains\lib\hapsigntoolv2.jar

签名命令:

java -jar hapsigntoolv2.jar sign -mode localjks -keystore D:\DevEcoStudioProjects\MyFinalHapTest\myfinalhaptest.p12(自己生成的) -keystorepasswd ku(秘钥密码) -privatekey myfinalhaptest(别名) -keyaliaspasswd ku(别名密码) -signAlg SHA256withECDSA -profile D:\DevEcoStudioProjects\MyFinalHapTest\myfinalhaptestDebug.p7b(自己生成的) -certpath D:\DevEcoStudioProjects\MyFinalHapTest\myfinalhaptest.cer(自己生成的) -inputFile D:\DevEcoStudioProjects\MyFinalHapTest\entry\build\outputs\hap\debug\entry-debug-rich-signed.hap(输入文件) -outputFile D:\DevEcoStudioProjects\MyFinalHapTest\entry\build\outputs\hap\debug\entry-debug-rich-signed_signed.hap(输出文件)

p7b,p12和cer生成方法

https://os.51cto.com/article/685915.html

https://www.jianshu.com/p/e989323a3db0

使用hdc安装hap的命令

hdc app install xxx.hap

hdc file send entry-debug-rich-signed.hap /sdcard/at/

hdc shell

bm install entry-debug-rich-signed.hap

获取uuid

hdc shell bm get -u

卸载

hdc shell bm uninstall com.example.harmonytest2

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐