androidhuawei-developersandroid-app-signingapp-signing

huawei App Signing Export and upload key and certificate


I would like to upload my app to the Huawei App Gallery. I am stuck at the App Signing process.

To perform App Signing, you will need to choose one of 2 options:

  1. Let AppGallery Connect create and manage app signature for you (recommended and applicable only to new app release)
  2. Export and upload key and certificate

Unfortunately, the instructions in Huawei App Gallery tells you to Obtain the pepk.jar file from the Internet or another legitimate source. but do not provide a link from which the PEPK Tool (pepk.jar) can be downloaded.

Where can I find the "legal channels" to download the tool?

EDIT: Huawei App Gallery Instructions for reference

  1. Obtain the pepk.jar file through the Internet or other legal channels.
  2. Run the following command to 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 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
  1. Upload the ZIP file containing the private key and public key certificate. (The ZIP file contains only certificate.pem and encryptedPrivateKey.)

SECOND EDIT: Google Play PEPK
When opting in for Google Play App Signing they provide a link to: PEPK tool and PEPK tool source code.

EDIT FOR REOPENING This is a serious question. The Huawei app gallery tells you to find the pepk.jar file from somewhere. A file which should handle your signing certificates so it's pretty important this one is not tampered with. So this question is not opinion based, but rather the question is, where can we get the official pepk.jar from google.


Solution

  • • Usually, the pepk.jar file is located under the next structure directory:

    C:\Program Files\Android\Android Studio\plugins\android\lib\
    

    but you have to use the pepk.jar from Google:

    https://www.gstatic.com/play-apps-publisher-rapid/signing-tool/prod/pepk.jar

    • Use double quotes to indicate paths.

    Example to create the .zip file required for Huawei App Gallery:

    java -jar "C:\Program Files\Android\Android Studio\plugins\android\lib\pepk.jar" --keystore "C:\Data\Jorgesys_Android\KEYSTORE\gruporeformakey.jks" --alias jorgeysioana --output="C:\Data\Jorgeys_Android\KEYSTORE\app_gallery_cert.zip" --encryptionkey=012300045E224EE22B45D19B23DB91BA9F52DE0A06513E03A5821409B34976FDEED6E0A47DBA48CC249DD93734A6C5D9A0F43461F9E140F278A5D2860846C2CF5D12345 --include-cert

    Then you get as a result the .zip in the output path (--output).