I am building an android application where I am using google login. I earlier I have generated debug sha1 certificate key and it was working fine used below code - keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Now I need to generate production. Could anyone help me to figure this out how to generate SHA1 key for production release.
Related
I want to integrate google SignIn to my android app. I have followed all the steps as per the documents. i have created a cerificate finger print through cmd using the following command.
keytool -list -keystore C:\Users\ufxyhy\.android\debug.keystore
I have entered the password when it prompted and then I got a key showing as SHA-256, and it shows as invalid fingerprint when creating OAuth client ID.
The result I am getting in cmd is follows
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
androiddebugkey, 18-May-2018, PrivateKeyEntry,
Certificate fingerprint (SHA-256):
00:00:****************:00:00:00:00:00
It shows as SHA-256, How can I create correct SHA-1 finger print for debug?
you can get SHA1 with follow command
keytool -list -v -keystore {keystore_name} -alias {alias_name}
eg:
keytool -list -v -keystore C:\Users\me\Desktop\release.jks -alias sample
you can also get it in android studio directly as in image
You need to provide default keystore password and key password which you have not provided run below code and check.
keytool -list -keystore C:\Users\ufxyhy\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android
I have run the following command to get SHA1 key, and use it in the Google Map API to generateAPI Key.
However, when I use release version of the APK, the application does not show the map
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
I dont see release.keystore in the %USERPROFILE%\.android directory
this command is just for your debug keystore, you need to do the same thing with your release Keystore
I am new to Google Play Game Services and recently managed to include it to an app. I generated a Certificate fingerprint with a terminal using this commant on MAC to test it:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
My question is, when I upload my app to my dev account, should I change the certificate from debug to release? If yes, how can I do that?
is it using the same command but instead of "debug.keystore" -> release.keystore?
Yes, you will need to change it. See that your using androiddebugkey. When you release the app you will need to sign the app and then use the same key to generate the certificate.
If you using Android Studio, you can easily create a new key store and a new key alias. (Build -> Generate Signed APK)
Generate the release Certificate:
keytool -list -v -keystore ~/MyPath/my.new.keystore -alias mynewalias -storepass keystorepassword -keypass aliaspassword
EDIT: List the certificate fingerprints (SHA1, MD5) using this command line:
keytool -v -list -keystore yourkeystore -alias youralias
I was trying to obtain my Sha1 fingerprint for release and debug. Fortunately, I was able to obtain the debug version code through
keytool -list -alias androiddebugkey -keystore C:\Users\Name.android\debug.keystore -storepass android -keypass android
I was wondering how I would get the release? I tried
keytool -list -alias androidreleasekey -keystore C:\Users\Name.android\debug.keystore -storepass android -keypass android
but unfortunately it came out as keytool error: java.lang.Exception: Alias <androidreleasekey> does not exist.
*Actually my result may have been my released key store since I already built it as released app... I'm not entirely sure though.
You need to find the location of the release keystore file and the name of the alias that you used to build your app.
To do this in Android Studio select Build > Generate Signed APK. You should see a dialog similar to below.
Get the location of the full file path for the release keystore from the Key store path. Then use this path along with the Key alias that is listed to get the SHA1 as you tried previously:
keytool -list -alias myappsalias -keystore
C:\users\dell-laptop\AndroidStudioProjects\myapp\myapp_release.keystore -storepass android -keypass android
I got the SHA-1 fingerprint from using the keytool for my application on my key that I sign the application with when I upload it to the play store.
But when I open the app on my phone for testing it says it is not the right key. ANy ideas what I could be doing wrong?
Not sure what more information i can give without giving security info for my app, so if you can help give me anymore information that I can not think of please let me help you help me.
First for the development generate a SHA-1 from debug.keystore:
Navigate to C:\Program Files\Java\jdk1.6.0\bin>..... where your bin located then execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "D
:debug.keystore" -storepass android -keypass android
or
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "C:\Documents and Settings\user1\.android\debug.keystore" -storepass android -keypass android
Now, you can get one SHA-1 certificate and generate API key from Google API console. Add this key into your manifest.xml file. remember this API key only for the development. Using this key built apk u can not publish into market.
Now, turn to make your own keystore: execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -genkey -v -keystore OWN.keystor
e -alias ALIASNAME -keyalg RSA -keysize 2048 -validity 300000
and give all the required details for this keystore. Now time to generate SHA-1 from your OWN.keystore execute below commnad
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias ALIASNAME -keystore "C:\Program Files\Java\jdk1.6.0\bin\OWN.keystore" -storepass PASSWORD -keypass KEYPASSWORD
Now, you can get one SHA-1 certificate and generate API key from Google API console. Replace this key into your manifest.xml file. Now your app is ready to publish into market.
This may helpful to you.
Have you tried to completely remove the application and then install it all over again. This key might be got cached and even if you install the application with new key.
So before you install your application with the new key, try to remove the application completely from the phone.
You can as well go over this blog post I wrote and make sure you do all the steps right in producing the key:
Google Maps API V2 Key