Android Keystore for Unreal Engine

An Android keystore lets you store cryptographic key entries for security. Android Keystore can be used to sign your apk, sign data, store certificates, and a variety of other needs.

To release your app to a marketplace, you will need to setup the keystore. All updates to the same app will require the same key used to setup. This provides a level of security and prevents others from accessing your app without permission.

note
For more information on Android Keystore System, read the Android Documentation

Setup

  1. Open your the command prompt in admin mode on your windows machine and navigate to the directory where java installed the keytool.exe file. This will depend on how your setup is.

    Example: C:\Program Files\Java\jdk-18\bin>

  2. Run the following command:

     keytool -genkey -v -keystore ExampleKey.keystore -alias MyKey -keyalg RSA -keysize 2048 -validity 10000 
    

  3. Enter a password for your key.

  4. There will additional information to complete before the keystore gets created. Continnue filling out the information and confirm at the end that your information is correct.

  5. Once your keystore is generated, you will see the following message.

Your keystore is generated and can be found in the directory you are working in.

Unreal Engine

Once your keystore is generated, you can place your key in your Unreal Project in the following location. If there isn’t already a Builds\Android Directory, you can create one to store your key in your project:

> (YourProject)\Build\Android

Now that the key is in your project folder, we will apply it to the project.

  1. Open up your project in Unreal Engine
  2. Navigate to Edit > Project Settings > Platforms > Android
  3. Locate Distribution Signing on the right hand side and expand the section. Enter the information that was used to generate and setup your keystore above, in the setup section.

    Name Description Example
    Keystore Name given to the .Keystore file ExampleKey.keystore
    Key Alias Name of the keystore file MyKey
    Keystore Password Password created to secure the key test@123
  4. Under the APK Packaging section, set the Store Version to 1 (one) if this is the first time you are uploading and setting up your project. Each time you re-cook your project and prepare to upload to the store, you will need to increase this number. Not changing this number can cause your upload to fail.

  5. From the left-hand side, locate Project > Packaging and expand the Project section.

  6. Change the Build Configuration to Shipping.
  7. Enable the following:

    [x] Full Rebuild
    [x] For Distribution

Your project should now be setup with the keystore.

Troubleshooting

For additional support, please reach out to us on our Discord.

Was this helpful?

We would love to hear your feedback, Submit a ticket in our Issue Tracker.


Report a problem with this page.