Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Export and upload your own key and certificate help

Discussion in 'Unity Distribution Portal (UDP)' started by CHOO5D2, Jan 11, 2021.

  1. CHOO5D2

    CHOO5D2

    Joined:
    Jan 3, 2019
    Posts:
    29
    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
     
    Last edited: Jan 11, 2021
  2. CHOO5D2

    CHOO5D2

    Joined:
    Jan 3, 2019
    Posts:
    29
    Unity-Boon likes this.
  3. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    135
  4. Janette5

    Janette5

    Joined:
    Dec 14, 2020
    Posts:
    22
    Detailed instructions for anyone who wants it - because the Unity guide didn't work for me:

    1. Copy & paste the code Unity gives you into Notepad.
    2. Download the PEPK tool.
    3. Right click on the PEPK tool and click UNBLOCK (because it was downloaded from the internet, Windows by default blocks it.)
    4. Move the PEPK tool and your keystore file into a writeable area of your hard drive - My documents - is a good place.
    5. 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.
    6. 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.
    7. Overtype the example (alias example) with your keystore alias.
    8. 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
    9. Find Java on your hard drive and go the bin directory - it should be somewhere like here: c:\program files\Java\jdk-12\bin
    10. At the top of the screen where the address displays - just type over it: powershell and press enter.
    11. After a second or so, Windows should open a powershell window right there for you.
    12. Replace the java part in your notepad with .\java.exe
    13. Now copy and paste the entire command from notepad into the powershell that was opened using ctrl c & ctrl v and press enter.
    14. 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.
    15. 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
     
    Kapanther and olivierbb2020 like this.
  5. Indrit_Vaka

    Indrit_Vaka

    Joined:
    Jun 6, 2020
    Posts:
    4
    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?
     
  6. olivierbb2020

    olivierbb2020

    Joined:
    Feb 26, 2020
    Posts:
    3
    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 :p
    my key is maked but, j try many thing....ouhhhh...most difficulte than best difficult 3d software :p
     
  7. olivierbb2020

    olivierbb2020

    Joined:
    Feb 26, 2020
    Posts:
    3
    hello, indrid,
    since 1 year, are you ok for you ?
    you must launch command from since repertory that jar where is ^^
     
  8. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    48
    Is there a solution for mac?
     
  9. DrusycRans

    DrusycRans

    Joined:
    Sep 18, 2018
    Posts:
    1
  10. SamTyurenkov

    SamTyurenkov

    Joined:
    May 12, 2018
    Posts:
    95
    Guys, where did you get encryption key from? Is it from .pem file?