1. Android
  2. Generating Keystore File

Generating Keystore File

Generating Keystore File

  1. Download and install latest JDK from here.

  2. Once JDK is installed, run keytool with the following command either through the terminal (Mac) or your command prompt (Windows):

keytool -genkeypair -dname "cn=John Doe, ou=Development, o=StackIdeas, c=US" -alias easysocial -keypass "password" -keyalg RSA -keystore /path/to/file.jks -storepass "password" -validity 20000

Important

- Please keep the generated Keystore file as you would need it when releasing new update for your app in the future.
- Please use the same password for keypass and storepass.
- Please write down keypass and storepass as these are needed later when building app.

Properties are defined as below:

dname

The distinguished name for the keystore. The following are the attributes required for dname.

  • cn = Contact Person's full name (E.g: John Doe)
  • ou = Organisation unit (E.g: Development team)
  • o = Organisation (E.g: Stack Ideas)
  • c = Country (E.g: US)

alias

Identifier of the app as a single entity inside the keystore since a keystore may contain more than one identifier.

keypass

Password to protect the alias. (Avoid using special characters)

keystore

Path where the keystore file should be generated to.

storepass

A password to protect the keystore file contents. (Avoid using special characters)

validity

Amount of days the app will be valid with the keystore.

This article is separated into multiple sections as follow: