Map API Key for Windows 7 - android

I'm trying to generate and MD5 certificate for my Map API Key for Debugging, the problem is, when I type this :
$ keytool -list -alias alias_name -keystore my-release-key.keystore
into the Command prompt, it says '$'is not recognized as an internal or external command, operable command or batch file.
Is this because I'm using Windows 7?
Also, there are no explicit instructions on the Dev guide for generating API Key on Windows 7.

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.

Related

i get "bash: keytool: command not found." when Obtaining Google Map Key on linux fedora

i would like to use Google maps in my android application, and i knew that firstly i have to Obtain Google Map Key
I'm using Linux fedora OS and i typed this in my terminal
[dinareda#localhost ~]$ keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android
But I get:
bash: key tool: command not found...
Any help please?
keytool is part of JRE, search for it in JRE/JDK directory or simply locate keytool

API Generation error

I am trying to generate an android key for API access. The problem is that I can't. When following the standard pattern for SHA-1 fingerprint generation from the command prompt this error pops up simultaneously ... Any ideas on what this might be ??? I did read other posts but was not of much help.
keytool error: java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
I did what had to be done, pointed the path to the JDK bin file where both the key tool and the jarsigner are .... and also followed the standard command line
keytool -exportcert -alias androiddebugkey -keystore {path-to-debug-or-production-keystore} -list -v
also
keytool -list -v -alias androiddebugkey -keystore <path_to_debug_keystore>debug.keystore -storepass android -keypass android
I think your, problem is here
keytool -v -list -keystore C:\Users\username\.android\debug.keystore
You have to give your keystore.exe location dont use dirtectly {path-to-debug-or-production-keystore}

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

As I want to use Google maps in my application, I need the debug certificates' MD5 fingerprint. I tried following.:
(Here I copied the debug.keystore file from C:\Documents and Settings\Administrator.android in bin folder)
C:\Program Files\Java\jdk1.7.0\bin>keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android
But got the following results:
androiddebugkey, May 27, 2011, PrivateKeyEntry,Certificate fingerprint (SHA1): "some code"
However that is not working to get MAP API key. Is SHA1 is same as MD5?
What should I do to get the MD5 certificate?
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.
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"
Hello in the year 2021.
The keytool of JDK 8 and newer does not print MD5 anymore, even if you try the standard suggestion to add the "-v" option to the "keygen -list" command.
I guess MD5 is no more considered secure enough and has been removed.
At the same time there are still places like Amazon "Security Profile Management" for LWA etc. requiring you to submit the MD5 signature of your certificate.
Here is a command which will deliver it (use the password "android" for the Android Studio keystore):
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | \
openssl dgst -md5
And if you want to have colon character inbetween, then add the following "sed" command:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | \
openssl dgst -md5 | \
sed 's/[a-fA-F0-9][a-fA-F0-9]/&:/g; s/:$//'
The above command works on Linux, macOS and even Windows (in git bash):
If you are using jdk 7:
Use -v option.
The easiest way to get SHA 1,MD 5 is to click on Gradle in the upper hand right side near the corner of the screen of Android Studio. Then click on the name of the app(e.g android123(root): it should appear like this). After that, you will find a subfolder named android and clicking on it go for the signingReport.It should run in the console and should show you the SHA 1,MD 5. Hope it helps.
add -v
right after keytool and before -list
keytool -v -list
copy ' debug.keystore ' file to c:\ or Some folder
you try going
c:\Program Files\Java\jdk1.6.25\bin folder
and input
c:\Program Files\Java\jdk1.6.25\bin>keytool -list -keystore c:\debug.keystore
password is 'android'
The -v flag gives the SHA1 certification as well. Without that flag you only get the MD5 fingerprint.
I have solved the problem in Windows 8 by opening the Command Prompt (Admin), then type:
C:\Program Files (x86)\Java\jre7\bin>keytool -v -list -keystore C:\<Your Path>\<Your Keystore>
After that, simply go to https://code.google.com/apis/console/
As they changed to a new interface, you have to go to the APIs & auth tab on the left side, then go to Registered Apps, select your existing API key to replace it or create a new one, using the SHA1 code generated previously.
That's how I got it working.
It's not true that JDK 1.7 keytool ALWAYS return SHA1 fingerprint. Look there to solve the problem instead of downgrade your JDK: http://code.google.com/p/android/issues/detail?id=19035#makechanges
Simply export your project using your keystore in eclipse and in the last step you will get both SHA-1 and MD-5..
Look at this question for more details.

problem in cmd prompt for getting MD5 fingerprint in android

Having overcome my earlier problem, I am still having difficulty generating an MD5 fingerprint for Android from the command line. Can anybody tell me what I'm doing wrong?
Command line:
C:\Program Files\Java\jdk1.6.0\bin>keytool.exe -list -alias androiddebugkey -keystore C:\Documents and Settings\Saurabh.android\debug.keystore -storepass android -keypass android
Error:
**Illegal option: -key
Try keytool -help**
It's probably that you mistyped the path. I guess your command should look like
C:\Program Files\Java\jdk1.6.0\bin>keytool.exe -list -alias androiddebugkey -keystore "C:\Documents and Settings\Saurabh\.android\debug.keystore" -storepass android -keypass android
The difference is in the slash before .android\debug.keystore and the quotes around the path containing spaces.
Same problem. I couldn't get MD5 key in JDK1.7 (Keytool on JDK 1.7 always return SHA1 key) . I removed JDK 1.7 then installed JDK 1.6, the problem wasn't exist any more.

Googlemaps API: problems getting my key

i am doing a debug key and i can't. Im stuck here:
"Once you have located the keystore, use this Keytool command to get the MD5 fingerprint of the debug certificate:
$ keytool -list -alias androiddebugkey \
-keystore .keystore \
-storepass android -keypass android"
i located my keystore, but i dont know how to put that order.... i think that order is for linux, and i am using windows XP Professional
can someone help me plz?
Get rid of the backslashes. Those, in Linux and OS X, denote line continuations.
So, in Windows, if you are in the directory containing your debug keystore, you should be able to run:
keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android

Categories

Resources