3

I try to generate a MD5 fingerprint to obtain a map api key using Java7.

I do it on the way, described at developer page

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

The problem is, I'm getting SHA1 Fingerprint and not MD5

androiddebugkey, 01.08.2011, PrivateKeyEntry, 
Certificate fingerprint (SHA1): xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

Any ideas why?

Thnak you in advance

Tima
  • 12,765
  • 23
  • 82
  • 125

2 Answers2

4

Interesting. Well, you can get the entire cert information using this command.

keytool -list -v -keystore C:\Users\username\.android\debug.keystore

You'll need to enter android as the password when prompted. That will give you everything in the keystore, which should only be one certificate rather than looking for a specific alias. It should show you both an MD5 and a SHA1 fingerprint. Give that a try and let me know.

The only thing I can think of is that jdk1.7's keytool gets information differently than jdk1.6(returns SHA1 by default?). This is just a guess and has not been verified but it is the only thing I can really think of.

Edit: It appears my guess might be correct. JDK 7 changes keytool output

Community
  • 1
  • 1
Otra
  • 8,108
  • 3
  • 34
  • 49
  • I wouldn't go with MD5withRSA, just MD5 perhaps. Failing that, I would just run the command I gave initially, it should list both of them (as well as other certificate information). – Otra Aug 04 '11 at 13:15
  • unfortunate, but what about my first command suggested? or even just throwing a -v into the original command like so `"C:\Program Files\Java\jdk1.7.0\bin\keytool" -list -v -alias androiddebugkey -keystore C:\Users\username\.android\debug.keystore -storepass android -keypass android` – Otra Aug 04 '11 at 13:22
  • adding -v helped as well. Thanks – Tima Aug 04 '11 at 13:29
  • Thanks a lot.. keytool -list -v -keystore C:\Users\username\.android\debug.keystore command helped me.. –  Sep 13 '12 at 06:33
0

Ok. I solved the problem with this answer

I changed my call to "C:\Program Files\Java\jre6\bin\keytool" and ... everything works

Community
  • 1
  • 1
Tima
  • 12,765
  • 23
  • 82
  • 125
  • I wonder if there's something about jdk1.7 that gets the finger prints differently. – Otra Aug 04 '11 at 13:02