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
Related
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
Question about generating API Keys for Android in React Native.
I'm referencing these:
https://developers.google.com/maps/documentation/android-api/signup#release-cert
https://facebook.github.io/react-native/docs/signed-apk-android.html
https://github.com/lelandrichardson/react-native-maps/blob/master/docs/installation.md
What I'm wondering is, is how do I setup a debug API key for android if I'm NOT running on an emulator? I know I can use this command
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
if I want to create a debug.keystore that the emulator can look at, but how does this work for when I want to compile, build an apk, and run on my device? Do I have to set a pointer to it in gradle.properties? Does React Native know to look in that folder for the debug.keystore, and incorporate it into the apk? I'm not really sure how these things work.
cd android/app/
run:
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
Well turns out i just needed to rerun react-native run-android, didn't get my latest change in.
From the looks of it, by default android's settings will look at ~/.android for the debug keystore.
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.
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 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