drmrbrewer
drmrbrewer

Reputation: 13009

Android Studio backup of keystore

Since losing the signing key for your app is pretty dire, it's obviously recommended to keep it safe and to back it up.

The docs in this respect are a little confusing (for me at least), referring to an "app signing key" and a "keystore" as if these are separate things, and need to be managed and backed up separately. Isn't the "app signing key" part of or defined in the "keystore", not different from it?

Anyway, just to be sure that I'm backing up all that I need, so that if my hard drive were ever trashed, or even when I'm just setting up a new workstation and want to recreate my IDE, is it fair to say that (so far as the app signing key is concerned) the only thing I need to back up is the single .jks file which is referred to in the storeFile part my build.gradle here:

signingConfigs {
    development {
        keyAlias 'MyKeyAlias'
        keyPassword 'mykeypassword'
        storeFile file('C:/Users/MyName/my-android-keystores/my-android-keystore.jks')
        storePassword 'mystorepassword'
    }
}
defaultConfig {
    signingConfig signingConfigs.development
}

Upvotes: 3

Views: 1765

Answers (2)

Xenolion
Xenolion

Reputation: 12725

Keystore as a the name suggests it is a store that may contain many keys probably for many apps but it also related to your developing environment too.

But if you are worried about securing your keys consider Using NEW Google Play App Signing as shown from this link from the official source.

Because your app signing key is used to verify your identity as a developer and to ensure seamless and secure updates for your users, managing your key and keeping it secure are very important, both for you and for your users. You can choose either to opt in to use Google Play App Signing to securely manage and store your app signing key using Google's infrastructure or to manage and secure your own keystore and app signing key

Using Google Play App Signing It reduces worries because it will keep your Keys and you will have the Upload Key which is relatively easy to recover in case something goes bad this is a quote from the same link as above.

When using Google Play App Signing, you will use two keys: the app signing key and the upload key. Google manages and protects the app signing key for you, and you keep the upload key and use it to sign your apps for upload to the Google Play Store.

You should consider visiting the link again for more information on protecting your apps keys.

Upvotes: 2

CommonsWare
CommonsWare

Reputation: 1006829

Isn't the "app signing key" part of or defined in the "keystore", not different from it?

Yes, a signing key is in a keystore.

the only thing I need to back up is the single .jks file which is referred to in the storeFile part my build.gradle here

You also need the build.gradle file itself or something else that has your passwords (e.g., a password safe).

Upvotes: 2

Related Questions