How To Find The Md5 Fingerprint Of My Android App
Solution 1:
You will be needing two keystores.
One for debug purpose and One for release purpose.
While you are developing your application via eclipse and debugging it on simulator or device. You will be needing debug keystores. Otherwise you will not be able to see the map. debug keystore is already present into your system.
Try finding them at
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
Open console/terminal on to the above location where debug.keystore file is present and execute
keytool -list -keystore debug.keystore
Output will be like (press simply enter when password is asked)
rohit@Desktop:~/.android$ keytool -list -keystore debug.keystore
Enter keystore password:
***************** WARNING WARNING WARNING ****************** The integrity of the information stored in your keystore *
* has NOT been verified! In order to verify its integrity, *
* you must provide your keystore password. *
***************** WARNING WARNING WARNING *****************
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
androiddebugkey, 19 Apr, 2011, PrivateKeyEntry,
Certificate fingerprint (MD5): 00:35:C2:48:65:43:CG:55:41:11:16:F1:4C:11:82:C5
rohit@Desktop:~/.android$
Copy this MD5 fingerprint value and go to
http://code.google.com/android/maps-api-signup.html
You will get Map Keys On successful signup. Put those in the MapView Element of your view.
For release
You need to generate your own keystore and need to get Map keys for the same. else you will not be able to see map on deployment of your apk onto the device.
Create a new keystore of your own and follow the same procedure for the generated keystore. Its very easy to generate keystore also. I simply export my android application via eclipse and it then do everything by itself.
Hope it helps :)
Solution 2:
http://code.google.com/android/add-ons/google-apis/mapkey.html#getfingerprint
If you follow this correctly, you should be able to get your MD5 fingerprint. There are instructions to both get your fingerprint at the time of signing as well as afterwards.
If you've signed already: You would first use your command prompt to navigate to your debug keystore in your automatically made profile android folder as described in the link. You would then paste this (without the dollar sign) and run it in your command prompt:
$ keytool -list -alias androiddebugkey -keystore <path_to_debug_keystore>.keystore \
-storepass android -keypass android
Otherwise, you can use your command prompt to navigate to your jarsigner in your Java SDK folder and use this:
$ keytool -list -alias alias_name -keystore my-release-key.keystore
After following the on prompt instructions, you should receive your MD5
Solution 3:
Anyone coming here looking for the
MD5 or SHA1 for the YouTube OAuthAPI this is the command:
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
This cmd:
keytool -exportcert -alias androiddebugkey -keystore path-to-debug-or-production-keystore -list -v
The default password for the debug.keystore is android
Taken from
Solution 4:
Wow I would have never gotten it with the answers above, had to read a book tutorial which is CLEAR finally!
The filename of the debug keystore is debug.keystore. This is the certifi cate that Eclipse uses to sign your application so that it may be run on the Android Emulator or devices. Using the debug keystore, you need to extract its MD5 fi ngerprint using the Keytool.exe application included with your JDK installation. This fi ngerprint is needed to apply for the free Google Maps key.
You can usually find the Keytool.exe in the C:\Program Files\Java\\bin folder.
Issue the following command (see Figure 9-4) to extract the MD5 fi ngerprint: keytool.exe -list -alias androiddebugkey -keystore “C:\Users\.android\debug.keystore” -storepass android -keypass android
Solution 5:
The following may be able to help you:
public String convert(String str){
String a=null;
char hexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f' };
try {
a=new String(str.getBytes("ISO8859_1"),"UTF-8");
byte[] strTemp = str.getBytes();
MessageDigest mdTemp = MessageDigest.getInstance("MD5");
mdTemp.update(strTemp);
byte[] md = mdTemp.digest();
int j = md.length;
char str1[] = newchar[j * 2];
int k = 0;
for (int i = 0; i < j; i++) {
byte b = md[i];
//System.out.println((int)b);
str1[k++] = hexDigits[b >> 4 & 0xf];
str1[k++] = hexDigits[b & 0xf];
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
returnnew String(str1);
}
Post a Comment for "How To Find The Md5 Fingerprint Of My Android App"