1. Knowledge Base
  2. Developer Account Creation, Access, and Maintenance

Creating an Android Keystore File

Create a Keystore file to sign your Android app with

You will need to create a unique Keystore file to sign your Google Play apps with. You can use a single Keystore file to sign all of your Google Play apps. Although at first glance this may seem highly technical, there's no need to worry. We’ll walk you through it step by step. Note: you may need to download the keytool first, your Terminal or Command Window should prompt you with instructions on how to install Java 8 keytool. Otherwise, you can download it here for your machine.

Please note that you should retain a copy of your keystore. You should always have it in your safe keeping and possession since it is signed to your app.

How to create a Keystore file on a Mac

1. Start the Terminal application on your Mac. This can be found in Applications > Utilities > Terminal.

 

2. The Keystore file will need to be saved in a location where it is easily accessible. Let’s create a folder on your desktop to store it for simplicity’s sake. Type "cd Desktop" in your terminal and hit enter. Now type "mkdir keystore" in your terminal and hit enter. Now we will navigate into your new folder. Type "cd keystore" and hit enter. 

Screen Shot 2019-12-18 at 3.21.27 PM

 

3. Now enter the command below into your Terminal window, but replace "MY-KEYSTORE-NAME.keystore” (keep the file extension as .keystore) and "MY-KEY-ALIAS" with a name of your choice if you wish to do so.

keytool -genkey -v -keystore MY-KEYSTORE-NAME.keystore -alias MY-KEY-ALIAS -keyalg RSA -keysize 2048 -validity 10000

 

4. After entering the command above with your custom Key Alias, Terminal will prompt you with a series of questions. Please complete them and be sure to keep a good record of your Key Alias, Key Alias Password, and Keystore Password as you will need this info when you enter it into our MAZ dashboard. Key Alias Password and Keystore Password may be the same passwords.

Note: please avoid special characters in any of these values such as: " ' \ / | < > [ ] { } ~ ` : ; and spaces.

Screen Shot 2019-12-18 at 4.10.43 PM

 

5. Now we will need to extract the SHA1 fingerprint. Enter this command in your same terminal window but be sure to replace the "MY-KEYSTORE-NAME.keystore" and "MY-KEY-ALIAS" with your chosen names. 

Keytool -list -v -keystore MY-KEYSTORE-NAME.keystore -alias MY-KEY-ALIAS

 

6. After running the command above, you will be prompted for a password. Enter your password and your Terminal should output your Keystore file's information. Locate your SHA1 fingerprint and keep a good record of this also.

image

 

How to create Keystore on Windows

 

1. Open the Command Prompt. After installing the Java Keytool, enter this command:

cd "C:\Program Files\Java\jdk-14.0.2\bin"

 

This command will bring you into the directory that contains your Java Keytool and will enable you to run the 'keytool' command.

 

2. Now enter this command, but replace "MY-KEYSTORE-NAME.keystore” (keep the file extension as .keystore) and "MY-KEY-ALIAS" with a name of your choice if you wish to do so and change the keystore path to a location where you would like to save your keystore file. Typically, to save it on your desktop, the path would like something like C:\Users\[Your User Name]\Desktop\KEYSTORE.keystore.

keytool -genkey -v -keystore C:\Path\MY-KEYSTORE-NAME.keystore -alias MY-KEY-ALIAS -keyalg RSA -keysize 2048 -validity 10000

 

3. Let's move into the same directory where the keystore was saved by changing the directory, if it was saved on your desktop per the instructions above, your command will look something like this:

cd C:\Users\[Your User Name]\Desktop\

 

4. Now we will need to extract the SHA1 fingerprint. Enter this command in your same terminal window but be sure to replace the "MY-KEYSTORE-NAME.keystore" and "MY-KEY-ALIAS" with your chosen names.

Keytool -list -v -keystore MY-KEYSTORE-NAME.keystore -alias MY-KEY-ALIAS

 

5. After running the command above, you will be prompted for a password. Enter your password and your Terminal should output your Keystore file's information. Locate your SHA1 fingerprint and keep a good record of this also.

image (1)

 

Note: If this is an app update rather than a new app submission, you should provide us with your original Keystore that was previously used to publish the app on the Play Store as it is mandatory to use the same Keystore for the entire lifecycle of the app.

Uploading your Keystore file

Now that you have created your Keystore file on either Mac or Windows, you can upload your Keystore file and input the necessary information in the MAZ Dashboard. Navigate in your account to Content > Channels > Google Play (Android) Setup. Click on the One-time details for Android. Upload and enter your information accordingly. Now your Android app will have your unique signature!

 

Screen Shot 2019-12-18 at 1.03.42 PM

 

Do you want an expert's help? Contact our pro-services team at pro@mazsystems.com