Generating a signing key for Android apps

Before you publish a mobile app on the Google Play store the app package file (.apk) must be built with a key that is signed by Google. This helps prevent “fake” apps from popping up in the store.

On Linux and Mac OS X you can use the “keytool” command to generate a a keystore file. If you’re using Ubuntu Linux the keystore command should be installed by default. Here is an example of how to use the keytool command to generate a key for an Android app:

# keytool -genkey -v -keystore ftm-fishorsink.keystore -alias ftm-fishorsink-apk -keyalg RSA -keysize 2048 -validity 10000

That will generate a keystore file with 2048-bit RSA encryption. You will asked a bit about your organisation before the keys are generated. The validity in this case its 10000 days.

Now you can build your Android app to be published on Google Play.

It’s also possible to use openssl to generate a certificate signing request file that can be used for signing iOS apps. More about that in another post.

Add Your Heading Text Here

Share this post with your friends