Creating a Keystore for Android Apps on Windows

If you’re building Android apps for the Android or Amazon Playstore you will need to sign your apps with a certificate. To do this, you will need a Keystore file. There are a lot of instructions on how to do this on a Mac, but if you’re on a Windows machine it’s a labyrinth of useless information.

This is a simple guide on how to create a keystore using Windows, here is what you will need:

Operating SystemWindows 10
JavaJava SDK 17 (or latest version)

Yes, you need Java so just do it.

By default, the installation will go to: C:\Program Files\Java\ (remember this)

NOTE: Open Command prompt as Administrator, not doing this will generate a permission error.

In your command prompt, navigate to the bin folder. For me, it was:

cd "c:\Program Files\Java\jdk-17\bin"

From here, you can now run the keytool application like this:

keytool -genkey -v -keystore my-release-key.keystore -alias [change this value] -keyalg RSA -keysize 2048 -validity 10000 

Set the -alias to whatever you’re going to call it. For instance it could “tonys-androidapp“.

NOTE: You can set the path where you want to store the .keystore by doing something like this

-keystore “C:\Users\Tony Perez\[Path to Keystore]\my-release-key.keystore”

It will prompt you to provide your keystore password:

Enter keystore password:
Re-enter new password:

Save this, you will need it. Fill out the rest of the information as you see fit:

What is your first and last name? Tony Perez
What is the name of your organizational unit? Engineering
What is the name of your organization? Tony Codes, LLC
What is the name of your City or Locality? Texas
What is the name of your State or Province? Texas
What is the two-letter country code for this unit? US
Is CN=Tony Perez, OU=CleanBrowsing, O=CleanBrowsing, L=Texas, ST=Texas, C=US correct? yes

That’s it, now you have a new keystore that you can use to sign your apps.


Leave a Comment