What is production keystore in android and how can I get the path-to-production-keystore?
Asked Answered
Y

3

27

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.

Yonder answered 29/4, 2016 at 11:43 Comment(4)
did you use android studio or android eclipse??Zoosporangium
confused? developer.android.com/tools/publishing/app-signing.html you have to create production keyHerwig
@Zoosporangium i use android studioYonder
its easy to get the SHA1 fingerprint certificate in android studio...@Hiren Patel answer refer #27609942Zoosporangium
K
19

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

Katerinekates answered 29/4, 2016 at 11:52 Comment(12)
actually i want to know what is keystore file and its purpose. i wanna know that should i create a keystore for my app manually or will it be there by default?.. like thatYonder
you have to create keystore file by generating signed apk.Katerinekates
build->generate signed apk asks for key store path. what should i give there ?Yonder
In android studio, there is a Build option-->selected generate Signed APK -->you will get a dialog then enter the details to generate signed apk file, in dat dialog u also have option called keystore path, mention the path of the keystore.Katerinekates
you have to give any path like empty folder path, it may be inside of your app folder or on Desktop. There the keystore file will be saved.Katerinekates
I cant select a folder as path there. The ok button is blurredYonder
Let us continue this discussion in chat.Yonder
create new button is there na.Katerinekates
have you seen that screenshot that i shared. plz see that on chatYonder
I want to work on google sign up . so should i use debug keystore or production ?Duque
@Duque Use debug keystore.Katerinekates
@Duque I know this is an old topic, but I recently had a similar conversation with another developer. The production keystore can be misleading because the name still says, "debug.keystore". The way you know you have generated the proper keystore is by uploading your APK to google play console. Google will reject the upload, and inform you that your APK is not signed with a production keystore. Btw, just as another tip. Store this keystore someplace safe. If you lose it, you effectively lose the ability to update your app ever again.Kassia
C
2

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
Coralline answered 7/6, 2020 at 4:38 Comment(1)
Just for detailed explanation, look at this page developers.google.com/android/guides/client-authPongid
H
0

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS D:\tutorial-google> to/your/keystore/directory to/your/keystore/directory : The term 'to/your/keystore/directory' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • to/your/keystore/directory
  •   + CategoryInfo          : ObjectNotFound: (to/your/keystore/directory:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
Hilliary answered 16/4 at 13:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.