• Lv0
    粉丝0

积分1 / 贡献0

提问1答案被采纳0文章0

作者动态

    【安装失败】msg:error: failed to install bundle. error: verify signature failed.

    leon 显示全部楼层 发表于 2024-2-29 15:48:42
    1. 参照 https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/hapsigntool-guidelines.md 步骤
      1. java -jar hap-sign-tool.jar generate-keypair -keyAlias "oh-app1-key-v1" -keyAlg "ECC" -keySize "NIST-P-256" -keystoreFile "OpenHarmony.p12" -keyPwd "123456" -keystorePwd "123456"
      2. java -jar hap-sign-tool.jar generate-app-cert -keyAlias "oh-app1-key-v1" -signAlg "SHA256withECDSA" -issuer "C=CN,O=OpenHarmony,OU=OpenHarmony Team,CN= OpenHarmony Application CA" -issuerKeyAlias "openharmony application ca" -subject "C=CN,O=OpenHarmony,OU=OpenHarmony Team,CN=OpenHarmony Application Release" -keystoreFile "OpenHarmony.p12" -subCaCertFile "subCA.cer" -rootCaCertFile "rootCA.cer" -outForm "certChain" -outFile "app1.pem" -keyPwd "123456" -keystorePwd "123456" -issuerKeyPwd "123456" -validity "365"
      3. java -jar hap-sign-tool.jar sign-profile -keyAlias "openharmony application profile release" -signAlg "SHA256withECDSA" -mode "localSign" -profileCertFile "OpenHarmonyProfileRelease.pem" -inFile "UnsgnedReleasedProfileTemplate.json" -keystoreFile "OpenHarmony.p12" -outFile "app1-profile.p7b" -keyPwd "123456" -keystorePwd "123456"
      4. java -jar hap-sign-tool.jar sign-app -keyAlias "oh-app1-key-v1" -signAlg "SHA256withECDSA" -mode "localSign" -appCertFile "app1.pem" -profileFile "app1-profile.p7b" -inFile "app1-unsigned.zip" -keystoreFile "OpenHarmony.p12" -outFile "app1-signed.hap" -keyPwd "123456" -keystorePwd "123456"
    2. hdc app install app1-signed.hap 安装报错 [Info]App install path:D:\Huawei\ohos\apps\build.\about-signed_leon.hap, queuesize:0, msg:error: failed to install bundle. error: verify signature failed.

    您尚未登录,无法参与评论,登录后可以:
    参与开源共建问题交流
    认同或收藏高质量问答
    获取积分成为开源共建先驱

    精彩评论5

    论坛小助手 官方账号

    沙发 发表于 2024-3-6 14:46:57
    可否提供一下hap包或者安装日志

    mgd112

    发表于 2024-4-1 12:09  IP属地: 广东省广州市

    回复 论坛小助手: 你好,我遇到了相同的问题,求助,我的hap包可以在gitee仓库里下载:https://gitee.com/Guangdie/openharmony.git
    详细报错如下:
    DeploymentOperationFailedException: [Info]App install path:\TuanjieProjects\PastoralPeace/entry-default-signed.hap, queuesize:0, msg:error: failed to install bundle. code:9568329 error: verify signature failed.
    AppMod finish
    UnityEditor.OpenHarmony.OpenHarmonyDeploymentTargetsExtension+<>c__DisplayClass14_1.<LaunchBuildOnTarget>b__0 () (at <38ff3eadb62046499fa0e205ff1635ed>:0)
    UnityEditor.ProgressTaskManager.Run () (at <7f409071f7d348838885b60c6a676e71>:0)
    UnityEditor.OpenHarmony.OpenHarmonyDeploymentTargetsExtension.LaunchBuildOnTarget (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.BuildProperties buildProperties, UnityEditor.DeploymentTargets.DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at <38ff3eadb62046499fa0e205ff1635ed>:0)
    UnityEditor.DeploymentTargets.DeploymentTargetManager.LaunchBuildOnTarget (UnityEditor.BuildProperties buildProperties, UnityEditor.DeploymentTargets.DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at <7f409071f7d348838885b60c6a676e71>:0)
    UnityEditor.PostprocessBuildPlayer+<>c__DisplayClass22_1.<LaunchOnTargets>b__1 () (at <7f409071f7d348838885b60c6a676e71>:0)
    UnityEngine.GUIUtilityrocessEvent(Int32, IntPtr, Boolean&)

    mgd112

    发表于 2024-4-1 12:10  IP属地: 广东省广州市

    回复 论坛小助手: 遇到了相同问题,求助

    论坛小助手

    发表于 2024-4-1 16:02  IP属地: 广东省广州市

    回复 mgd112: 已经找相关领域的技术求助啦,有消息会立刻回复

    【3 条回复】

    s_hao

    板凳 发表于 2024-4-1 16:49:15

    【安装失败】msg:error: failed to install bundle. error: verify signature failed.

    是自己签名的吗,一般签名都是用ide的签名工具,是不会有这个问题的,这个问题,就在于自己用签名工具签的名,然后签名的证书里的包名还跟hap不一致,可以尝试:1.用ide签名工具,或者2.如果你是自己签名,下图的json文件需要修改与包名一致。

    20240401-164856WeLinkPC.png

    共5 条回复,点击查看

    Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

    返回顶部