I am following this tutorial here:
http://www.vogella.com/articles/AndroidGoogleMaps/article.html
On my mac and am not sure how to accomplish this step to get my sha-1:
Update:
I realized I already have a key cause I build and sign my project. Trying to get the SHA-1 is proving difficult with the terminal on my mac:
Mikes-MacBook-Air:beerPortfolio Mike$ keytool -list -v -alias androiddebugkey \ -keystore bp_key.keystore \ -storepass android -keypass android
keytool error: java.lang.RuntimeException: Usage error, -keystore is not a legal command
java.lang.RuntimeException: Usage error, -keystore is not a legal command
at sun.security.tools.KeyTool.parseArgs(KeyTool.java:375)
at sun.security.tools.KeyTool.run(KeyTool.java:171)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
Mikes-MacBook-Air:beerPortfolio Mike$
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
The above command worked for me. You can change your keystore path if it is in another location.
Here is the Link
Related
Need google+ sign in for my phonegap application for that I want to generate Certificate SHA-1.I run
keytool -exportcert -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore
the command to generate Android Signing Certificate SHA-1, but it gave an error
Keystore file does not exist: /root/.android/debug.keystore
so I search for that file using find ~ -name "debug.keystore" but my search result is empty.
I also tried below command
keytool -genkey -alias myKey -keystore store.jks
keytool -selfcert -alias myKey -keystore store.jks
but i didn't found Android Signing Certificate SHA-1
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Try this command. Your debug keystore is always present in /home/<username>/.android and ~ is just a shorthand for /home/<username>.
If your SDK is installed properly, there should be no issues in running that command. Otherwise, we'll need some more information to find and fix the issue.
If PhoneGap/Meteor has its own set of android bundles, you might want to try something on these lines
keytool -list -v -keystore ~/.meteor/android_bundle/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
You don't have to use the debug certificate, just create a new certificate by following this tutorial and use it to sign your debug and release versions of the app.
I am trying to add google authentication feature in my android app and for that I need to get the Android Signing certificate SHA-1. The official tutorial says to use the below command to get the SHA-1 hash value .
In release mode
keytool -exportcert -list -v \-alias <your-key-name> -keystore <path-to-production-keystore>
debug mode
keytool -exportcert -list -v \-alias androiddebugkey -keystore ~/.android/debug.keystore
Now I am confused with what is this production-keystore and debug.keystore and how to get the path to production-keystore? Explanations are appreciated.
Please use below command for linux, if you don't have keystore file:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Production keystore will generate when you are creating signed APK file.
Refer below link for information:
http://developer.android.com/tools/publishing/app-signing.html
Stumble upon this but I was using Windows. I got my answer hoping to help other Windows user who came to this post.
keytool -list -v -alias androiddebugkey -keystore C:\Users\<name>\.android\debug.keystore
How do I Authenticating Your Client correctly with google?
I'm following this tutorial
https://developers.google.com/android/guides/client-auth
I copy this text into my command prompt -
keytool -exportcert -list -v \
-alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore
I get this message back "-alias is not recognized as an internal or external command, operable program or batch file."
What am doing wrong?
The copied command shouldn't contain the backslash after -v and it must be placed in one single line, like this:
keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Besides you have to change the %USERPROFILE% location in the command to the path where the .android directory located. (Maybe it is here: C:\User\YourUserName\ , but you have to check it if it's there)
set your cmd path to jdk then run this cmd
WINDOWS
keytool -list -v -keystore %USERPROFILE%/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
MAC/LINUX
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
I think the end goal is to generate the SHA1 key.
Best Alternative is to follow following steps:
In Android Studio, click on gradle on the right side panel.
And then navigate to app > Tasks > android > signingReport.
Double clicking it will generate the SHA1 key.
best way to get your SHAI is
keytool -list -v -keystore "C:\Users\username\ .android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
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}
hi when i try to run this command bin/keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android
i got the error java.lang.Exception Keystore file doesnot exist :debug.keyStore
actually i am trying to get googlemaps key for android never used keytool command.
can any one help how to remove this error
The problem is that the keytool does not know where to look for the keystore file.
If you're on Windows 7 / Vista, try:
keytool -list -alias androiddebugkey -keystore c:\users\your-user-name\.android\debug.keystore -storepass android -keypass android
(replace your-user-name with your actual user name)
For Windows XP, try:
keytool -list -alias androiddebugkey -keystore c:\documents and settings\your-user-name\.android\debug.keystore -storepass android -keypass android
If V2 map to generate SHA key use this command. use for releasing key means for testing.
C:\Program Files\Java\jdk1.6.0_20\bin>keytool.exe -list -v -alias androiddebugkey -keystore C:\Users\DON\.android\debug.keystore -storepass android -keypass android
Don is usersystem name
If you want app live means for development.
eclipse->Window ->Preferences ->Android ->Build -> now you get the sha key
Finally i solve the problem and the correct working script / Command is below:
Please note the double quotes where they are placed please use as it is as this is the correct method. and off course please change the user name and as for the different versions of windows you people will have to change it accordingly. Please feel free to ask if you people have any questions.
C:\Program Files\Java\jdk1.6.0_25\bin>keytool -list -alias androiddebugkey -keys
tore "c:\documents and settings\user\.android\debug.keystore" -storepass android
-keypass android