Sign an Android application

Unity Build Automation signs your Android application during the build process. This ensures your Android application meets requirements to be installed on devices or deploy to the Google Play Store.

Android requires that all Android Package Kits (APKs) and Android App Bundles are digitally signed with a certificate before you can install them on devices or publish them. This certificate serves to identify the app's author and establish trust relationships between applications.

Create a keystore

A keystore is a binary file that contains one or more private keys. You need to create a keystore to sign your Android application.

For detailed instructions on how to create a keystore with the Unity Editor's keystore Manager, refer to Create a new keystore in the Unity manual.

Important: Store your keystore file in a secure location and remember the passwords. If you lose your keystore, you can't do the following actions:

  • Update your app on the Google Play Store.
  • Upload an app that uses the same package name.
  • Create app bundles that are signed with the same key.

Configure Unity Build Automation signing

Associate your uploaded signing credentials with your Android build target:

Note: After you configure the signing credentials, you can queue a build that signs your Android artifacts automatically.

  1. Open DevOps in the Unity Dashboard.
  2. Select Build Automation > Configurations.
  3. Select the Edit (pencil) icon for your Android build target. Or, you can create a new build target for Android.
  4. In the build target Basic settings, under Credentials, enter your Bundle ID. Your Bundle ID needs to be unique and used to identify Android apps on your device and the Google Play Store.
  5. Select the Credentials set field and select Add new provisioning credentials (for release) from the dropdown.
  6. Enter the following information:
    FieldDescription
    NameEnter a name for your credentials set.
    Keystore fileUpload your keystore file.
    Keystore passwordEnter the password assigned to the keystore file.
    Key aliasEnter the alias name you created when generating the keystore.
    Key passwordEnter the password assigned to the key.
  7. Select Save Changes to apply your changes.

Build Target Configuration - Android Signing

Note: You can select Auto-generated debug keystore (for development only) as your credentials set for development and testing. This automatically generates a debug keystore for development builds. To publish to the Google Play Store, you need to use a release keystore that you create and maintain, because you can't use the debug keystore for app distribution.