How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?

Solution 1:

With JDK 1.7 installed, keytool always outputs by default SHA1 fingerprint, not MD5. you can get the MD5 Certificate by adding -v option.

use the following code:-

C:\Program Files\Java\jdk1.7.0\bin>keytool -v -list -alias
androiddebugkey -keystore debug.keystore -storepass android -keypass android

it will output MD5 certificate as well.

Solution 2:

To get MD5 value and SHA1...etc fallow this below:

Before this dont forget to copy the debug.keystore to a folder Androidkeystore like that created in C drive.

C:\Program Files\Java\jdk1.7.0_05\bin>keytool -v -list -keystore C:\Androidkeyst
ore\debug.keystore

it asks here.. Enter keystore password: android

enter you got here MD5 & SHA1..etc

Keystore type: JKS
Keystore provider: SUN

Your keystore contains ? entry

Alias name: androiddebugkey
Creation date: ?? ???, ????
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[?]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 67b6344b
Valid from: Mon Jun 18 20:33:56 IST 2012 until: Wed Jun 11 20:33:56 IST 2042
Certificate fingerprints:
         MD5:  C2:61:51:3E:BC:C8:0C:DB:75:B6:E7:C4:90:AD:91:39
         SHA1: CD:5E:8A:0F:4E:0F:2E:FD:92:5E:5E:4R:CF:F8:44:33:2C:8C:B8:97
         SHA256: B5:BF:75:60:DB:62:09:49:F1:38:CH:49:18:22:18:95:03:C9:5C:14:F6:
B0:F4:21:D2:19:B8:FF:38:D2:B9:FD
         Signature algorithm name: SHA256withRSA

NOTE: if there are any spaces in the directory path you MUST enclose it in quotes. e.g. use this format:

-keystore "C:\Users\Your Name\.android\debug.keystore"

Solution 3:

If you are using jdk 7:

Use -v option.