3

In Huawei App Gallery I have to update an existing aab application. Site redirects me to App signing page and there are steps that I have to follow in order to sign the app successfully. These are the steps provided:

  1. Obtain the pepk.jar file from the Internet or another legitimate source.
  2. Export and encrypt your private key and public key certificate into a ZIP file. Parameters in bold must be replaced as needed. Then, enter your data storage location and key password as prompted. java -jar pepk.jar --keystore test.jks --alias test --output=output.zip --encryptionkey=<some_encryption_key> --include-cert
  3. Upload the ZIP file containing the private key and public key certificate. (The ZIP file contains only certificate.pem and encryptedPrivateKey.)

Now I have 2 problems.

First one is, when I run the code in 2nd step in CMD. I get include-cert flag is not provided error. However when I write --include-cert=certificate.pem or --include-cert certificate.pem it says flag is unrecognized.

Second one is, I put certificate.pem and private key to folder and then turn it into ZIP. But when I click on submit it gives me Make sure the package contains only the certificate.pem and encryptedPrivateKey files error. Is not encryptedPrivateKey is the file that is exported by AndroidStudio when you generate an app bundle or Apk into the same location with .pepk extension?

I don't know what am I missing in order to sign my application. Any help would be appreciated, thanks in advance

Tenesuzun
  • 93
  • 1
  • 9

2 Answers2

3

If "No value provided for flag: include-cert" is displayed, the pepk.jar file is incorrect. You need to replace it with a correct one.

https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-appsigning-faq-0000001052944432

Tenesuzun
  • 93
  • 1
  • 9
1

I get include-cert flag is not provided error. However when I write --include-cert=certificate.pem or --include-cert certificate.pem it says flag is unrecognized.

It is recommended that you do not change the command and follow the commands in the document.

You could click here to try out.

And this is the App Signing Operation Guide video for reference.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • Thank you for your reply but the problem still occurs. I have required files ready but when I try to create the ZIP file in CMD it still gives me Error saying "No value provided for flag include-cert". I could not find solution or other questions related to include-cert flag. – Tenesuzun Dec 31 '21 at 06:13
  • 1
    Finally managed to find the problem. Turns out the pepk.jar file is incorrect so it is needed to be changed with a correct one. https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-appsigning-faq-0000001052944432 – Tenesuzun Dec 31 '21 at 07:14