Skip to content

Instantly share code, notes, and snippets.

@aidenkeating
Created February 15, 2017 14:37
Show Gist options
  • Select an option

  • Save aidenkeating/e2190999cc3d4b6d9913cc542f3e914e to your computer and use it in GitHub Desktop.

Select an option

Save aidenkeating/e2190999cc3d4b6d9913cc542f3e914e to your computer and use it in GitHub Desktop.
How to create Android distribution certificate

How to create Android distribution certificate

Use keytool to create a signing key:

keytool -genkey -v -keystore redhat.keystore -alias rhmap -keyalg RSA -keysize 2048 -validity 10000

Export the java keystore key intp pkcs#12 format:

keytool -importkeystore -srckeystore redhat.keystore -destkeystore rhmap.p12 -deststoretype PKCS12 -srcalias rhmap

Extract the Distribution Certificate:

openssl pkcs12 -in rhmap.p12 -nokeys -out rhmap-cert.pem

Extract the Private Key

openssl pkcs12 -in rhmap.p12 -nodes -nocerts -out rhmap-key.pem
  1. Private Key = rhmap-key.pem
  2. Certificate = rhmap-cert.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment