KeyStore basics

Android Applications need to be code signed to be installable on devices. The signing identities are bundled in a Java KeyStore file — typically with the extension .keystore or .jks.

Debug builds are typically code signed with an auto-generated debug KeyStore. Release builds — like the ones that eventually end up in the Play Store — must be code signed with a release KeyStore that is associated with a Developer.

Typically, your KeyStores should be checked into your source control repository. The repo’s build.gradle file references these KeyStores for each product flavor and build type.

Buddybuild auto-generates debug KeyStores for you. So you’ll typically never have to manage KeyStores yourself when deploying your app to testers.

If you already have a KeyStore that identifies you or your development team, you can upload this to buddybuild. Every subsequent build of your app uses your uploaded KeyStores.

If you want to publish your app to the Google Play store, a release KeyStore is required. If you do not already have a release KeyStore, you can generate one with the following command:

keytool -genkey -v -keystore release.keystore -storepass android \
        -alias androidreleasekey -keypass android \
        -keyalg RSA -keysize 2048 -storetype jks -validity 10000


-keystore release.keystore

Specifies the name (release.keystore) of the KeyStore.

-storepass android

Specifies the password (android) for the KeyStore.

-alias androidreleasekey

Specifies an name (androidreleasekey) for this specific key in the KeyStore.

-keypass android

Specifies the password (android) for this specific key in the KeyStore.

-keyalg RSA

Specifies the algorithm (RSA) to use when generating the key.

-keysize 2048

Specifies the size of the key in bits (2048).

-storetype jks

Specifies the type of KeyStore to produce (jks means "Java KeyStore").

-validity 10000

Specifies the number of years (10000) that this key should be valid.

To upload your own KeyStores, follow the guide here.

For more information on Android app signing, see Sign Your App in the Android Studio documentation.

results matching ""

    No results matching ""