Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android Google-Maps
I need a MD5 finger print key
 
i generate the key store and all but it generate only SHA1 key...
 
how can i get a MD5 key.
Posted 16-Oct-12 2:19am
Comments
Richard MacCutchan at 16-Oct-12 7:42am
   
This question is not very clear; please try and explain your problem in more detail.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Getting the MD5 Fingerprint of Your Signing Certificate
 
For more information about using Keytool and Jarsigner to sign your application, see Signing Your Applications on the Android Developers site.
 
To register for a Maps API Key, you need to provide an MD5 fingerprint of the certificate that you will use to sign your application. Before you visit the registration page, use Keytool to generate the fingerprint of the appropriate certificate.
 
First, determine which key you will use to sign your application at release and make sure of the path to the keystore that contains it.
 
Next, run Keytool with the -list option, against the target keystore and key alias. The table below lists the options you should use.
Keytool Option Description
-list Print an MD5 fingerprint of a certificate.
-keystore <keystore-name>.keystore The name of the keystore containing the target key.
-storepass <password>
 
A password for the keystore.
 
As a security precaution, do not include this option in your command line unless you are working at a secure computer. If not supplied, Keytool prompts you to enter the password. In this way, your password is not stored in your shell history.
-alias <alias_name> The alias for the key for which to generate the MD5 certificate fingerprint.
-keypass <password>
 
The password for the key.
 
As a security precaution, do not include this option in your command line unless you are working at a secure computer. If not supplied, Keytool prompts you to enter the password. In this way, your password is not stored in your shell history.
 
Here's an example of a Keytool command that generates an MD5 certificate fingerprint for the key alias_name in the keystore my-release-key.keystore:
 
$ keytool -list -alias alias_name -keystore my-release-key.keystore
 
Keytool will prompt you to enter passwords for the keystore and key. As output of the command, Keytool prints the fingerprint to the shell. For example:
 
Certificate fingerprint (MD5): 94:1E:43:49:87:73:BB:E6:A6:88:D7:20:F1:8E:B5:98
 
Once you have the fingerprint, you can go to the Maps API registration site, described next.
Getting the MD5 Fingerprint of the SDK Debug Certificate
 
While you are developing and debugging your application, you will likely be sigining your application in debug mode — that is, the SDK build tools will automatically sign your application using the debug certificate. To let your MapView elements properly display Maps data during this period, you should obtain a temporary Maps API Key registered to the debug certificate. To do so, you first need to get the MD5 fingerprint of the debug certificate. When you are ready to release your application, you must register your release certificate with the Google Maps service and obtain a new Maps API Key. You must then change the MapView elements in your application to reference the new API key.
 
To generate an MD5 fingerprint of the debug certificate, first locate the debug keystore. By default, build tools create the debug keystore in the active AVD directory. The location of the AVD directories varies by platform:
 
Windows Vista: C:\Users\<user>\.android\debug.keystore
Windows XP: C:\Documents and Settings\<user>\.android\debug.keystore
OS X and Linux: ~/.android/debug.keystore
 
If you are using Eclipse/ADT and are unsure where the debug keystore is located, you can select Windows > Prefs > Android > Build to check the full path, which you can then paste into a file explorer to locate the directory containing the keystore.
 
Once you have located the keystore, use this Keytool command to get the MD5 fingerprint of the debug certificate:
 
$ keytool -list -alias androiddebugkey \
-keystore <path_to_debug_keystore>.keystore \
-storepass android -keypass android
 

Use JDK version 1.6 instead of 1.7 because 1.7 generates the fingerprint with SHA1 by default. or you can use (-v) option of the keytool to give you all supported algorithms output and you will find the MD5 in it. for examble : keytool -v -list -keystore [your keystore path] and then enter the password which is [android] by default (you can get the keystore path from Eclipse window>Prefs>Android>build).
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 535
1 OriginalGriff 275
2 Shweta N Mishra 244
3 Mathew Soji 225
4 BillWoodruff 220
0 OriginalGriff 6,153
1 Sergey Alexandrovich Kryukov 5,758
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,735


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 17 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100