Creating an Android Keystore File

Create a Keystore file to sign your Android app with

C
Written by Customer Success
Updated over a week ago

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 keytool. Otherwise, you can dowload here for your machine.

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.

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 choosing 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.

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.

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 choosing 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.

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 in accordingly. Now your Android app will have your unique signature!

Did this answer your question?