Export and upload your own key and certificate help

Hi, I tried uploading my game to UDP. Already have my game on google play and import the settings but need to provide some kind of key again.

No idea on how to do this. This is the steps UDP provided.

  1. Download the PEPK tool from this link.
  2. Run the following command to export and encrypt your private key and public key certificate into a ZIP file. Replace the parameters in bold with your own values. Enter your storage location and key password when prompted to do so.
    java -jar pepk.jar --keystore example.jks --alias example --output=output.zip --encryptionkey=43b13a81235055ec4f55d41ef8a58dd934857d936be037f00aa0f47d5671fcb46788cfdefba5349ac479e0539ddda576e1f7a05b33a497aea61e3e08bce5e6c1d39e930b --include-cert
    COPY
  3. Upload the ZIP file containing only the private key and public key certificate (encryptedPrivateKey and certificate.pem).

I suppose i have to use android studio? Any step by step guide is appreciated.

Updated: I already have the keystore file in my computer. Do I simply zip that file and upload it?

thanks

Solved it with this link

For artists, this is going to be somewhat difficult. I put my keystore and the PEPK in the d drive and access it through CMD.

Amazing that unity doesn’t provide step by step for it.

1 Like

We have a guide for generating app signature which you might want to have a look as well.

Detailed instructions for anyone who wants it - because the Unity guide didn’t work for me:

  • Copy & paste the code Unity gives you into Notepad.
  • Download the PEPK tool.
  • Right click on the PEPK tool and click UNBLOCK (because it was downloaded from the internet, Windows by default blocks it.)
  • Move the PEPK tool and your keystore file into a writeable area of your hard drive - My documents - is a good place.
  • Click on the PEPK tool - at the top on the ribbon there is a command - copy Path - click on that. Paste that in your notepad replacing PEPK.jar.
  • Click on your keystore file - at the top of the ribbon there is a command - copy Path - click on that. Paste that in your notepad replacing user.keystore.
  • Overtype the example (alias example) with your keystore alias.
  • Copy the start of the path name of where your PEPK tool is, replace PEPK.jar with Output.zip. Now copy and paste this over output.zip in your notepad
  • Find Java on your hard drive and go the bin directory - it should be somewhere like here: c:\program files\Java\jdk-12\bin
  • At the top of the screen where the address displays - just type over it: powershell and press enter.
  • After a second or so, Windows should open a powershell window right there for you.
  • Replace the java part in your notepad with .\java.exe
  • Now copy and paste the entire command from notepad into the powershell that was opened using ctrl c & ctrl v and press enter.
  • You will be prompted for your passwords - type that in, note that you won’t see them being typed in but they are being recorded. Just type them and press Enter.
  • If everything was done correctly, you will have an output.zip file under my documents.

The final version that you copy and paste should look something like this:

.\java.exe -jar “C:\Users\name\OneDrive\Documents\pepk.jar” --keystore=“C:\Users\name\OneDrive\Documents\yourkeystorename.keystore” --alias=yourkeystorealias --output=“C:\Users\name\OneDrive\Documents\output.zip” --encryptionkey=43b13a81235055ec4f55d41ef8a58dd934857d936be037f00aa0f47d5671fcb46788cfdefba5349ac479e0539ddda576e1f7a05b33a497aea61e3e08bce5e6c1d39e930b --include-cert

2 Likes

I tried that but the CMD doesn’t recognize java Here is the output
‘java’ is not recognized as an internal or external command,

What I should do about that?

hello from french Jeanette5.
you post help me but is there are other info to need for is ok. is very difficulte for upload app on store with UDP and sandbox. j unbelieved that !! unity team is bad :stuck_out_tongue:
my key is maked but, j try many thing…ouhhhh…most difficulte than best difficult 3d software :stuck_out_tongue:

hello, indrid,
since 1 year, are you ok for you ?
you must launch command from since repertory that jar where is ^^

Is there a solution for mac?

Ironically, it’s the only one they have their own guide for. might be a bit out of date, but it’s the only one i can find.

https://docs.unity3d.com/2021.2/Documentation/Manual/macos-building-notarization.html

Guys, where did you get encryption key from? Is it from .pem file?