[Android] Command to Check the Contents of a Keystore File

Tadashi Shigeoka ·  Fri, June 14, 2013

Here’s a command to check the contents of a keystore file used for signing Android app builds.

Android
keytool -v -list -keystore  my-app.keystore

The command execution result looks like this:

Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: com.my-app
Creation date: Dec 10, 2012
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: O=example.com, C=JP
Issuer: O=example.com, C=JP
Serial number: 12b3389e
Valid from: Mon Nov 26 18:38:38 JST 2012 until: Fri Nov 20 18:38:38 JST 2037
Certificate fingerprints:
   MD5:  17:74:53:02:57:DB:80:62:4A:A6:D9:5F:6B:8D:AC:F2
   SHA1: 12:F5:85:20:58:C6:5E:45:FF:03:AB:74:8F:20:D9:89:86:D5:3F:25
   Signature algorithm name: SHA1withRSA
   Version: 3


*******************************************
*******************************************

If you experience character encoding issues, you can set the character encoding before running the keytool command:

export _JAVA_OPTIONS='-Dfile.encoding=UTF-8'

This might help avoid character encoding problems.

Reference Information

That’s all from the Gemba.