Questions tagged [android-keystore]

The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. "Android keystore" may also refer to Android Keystore System, introduced in API level 18, which allows storing cryptographic keys securely within an app.

Android requires that all apps be digitally signed with a certificate before they can be installed. Android uses this certificate to identify the author of an app, and the certificate does not need to be signed by a certificate authority. Android apps often use self-signed certificates. The app developer holds the certificate's private key.

"Android keystore" may also refer to Android Keystore System, introduced in API level 18, which allows storing cryptographic keys securely within an app.

Useful links

882 questions
38
votes
2 answers

Is there any reason I shouldn't store my keystore in version control?

I'm using a keystore (.jks) to store the certificate I use to sign my Android applications. The Android documentation and community have impressed on me the importance of never losing this file, but I haven't found any guidance on where I should…
ZoFreX
  • 8,536
  • 4
  • 28
  • 50
35
votes
3 answers

Android 9 - KeyStore exception android.os.ServiceSpecificException

If I run this code on Android 9, I receive the follow exception: private static KeyStore.PrivateKeyEntry getPrivateKeyEntry(String alias) { try { KeyStore ks = KeyStore …
phnmnn
  • 10,564
  • 9
  • 39
  • 56
34
votes
4 answers

Android keystore password change

I would like to change the password I use in my keystore for an android app that is already available in google play and I would like to know some things before I do it: 1) If I change the keystore password, could I continue using the same keystore…
fapps
  • 1,499
  • 3
  • 13
  • 18
32
votes
9 answers

Release APK file not showing google maps

I applied the exact steps as mentioned in the google developer doc to create an example google map project and everything went fine on the emulator, but when I generated the project apk file and launched it on real device Samsung Galaxy S4 google…
user2985035
  • 509
  • 2
  • 7
  • 16
31
votes
6 answers

How can I retrieve a saved keystore password from Android Studio?

The new Android Studio allows us to save keystore passwords for later use. Where are these passwords stored on my computer (OSX), and is there a way to retrieve the saved values? EDIT I am looking for the Alias password, not the Keystore password
user2692264
  • 348
  • 1
  • 3
  • 7
28
votes
1 answer

How the Android Keystore system can be secure?

I read the Android documentation in http://developer.android.com/training/articles/keystore.html But I'm missing some details... If an application generates a Key (symmetric or asymmetric) using AndroidKeyStore. Can we extract the key from that…
Anas EL HAJJAJI
  • 1,028
  • 2
  • 10
  • 21
27
votes
16 answers

Android Studio - Keystore was tampered with, or password was incorrect

I am trying to generate a signed APK by using the built-in widget in Android Studio v1.4. However, I got this annoying error Error:Execution failed for task ':app:packageRelease'. Failed to read key cckey from store…
Lancelot
  • 1,265
  • 2
  • 16
  • 26
25
votes
10 answers

No key with alias found in keystore

Our android project consists of mobile and wear app ( wear app is under development) and we are trying to release the mobile app. When we try to generate signed apk we get this follow message : Error:Execution failed for task…
erluxman
  • 13,712
  • 15
  • 67
  • 99
25
votes
1 answer

Encryption & Decryption of username using KeyStore in Android M & older version?

i'm trying to encrypt and decrypt username in app using KeyStore, Using KeyPairGeneratorSpec to create the key in older version like 18 to 22, KeyPairGeneratorSpec as been depricated in version 23 of android M, But Android M supports…
Uday
  • 1,601
  • 2
  • 21
  • 40
23
votes
9 answers

Unable to generate new signed apk Password verification failed

I have generated an app bundle and published it in the play store successfully. Now I am trying to generate a signed apk(to test in device) and I am getting Password verification failed. I googled and tried every solutions found in stackoverflow,…
Suresh Kumar
  • 1,874
  • 3
  • 15
  • 30
23
votes
3 answers

How to create an Android keystore RSA key with infinite validity?

Here is how Google suggests creating an Android keystore: keytool -genkey -v -keystore my-release-key.keystore -alias alias_name \ -keyalg RSA -keysize 2048 -validity 10000 While 10000 days may seem like eternity, 27 years could pass quicker than…
Nicolas Raoul
  • 55,003
  • 52
  • 197
  • 338
22
votes
2 answers

How to prevent usage of leaked keystore and password?

Problem The keystore and its password are used to sign the app that is then used by Android to identify the developer. If leaked, someone could update the concerned app on our behalf. Even if the person doesn't have access to our playstore account,…
oldergod
  • 14,370
  • 7
  • 54
  • 81
22
votes
3 answers

Google maps in my app is not visible

When I launch my app I get the following error: V/GoogleSignatureVerifier(4962): com.myapp.application signature not valid. Found: V/GoogleSignatureVerifier(4962):…
Adam Varhegyi
  • 13,647
  • 32
  • 108
  • 194
22
votes
1 answer

Cannot generate key in Android keystore

We are currently experiencing an issue where sometimes when a user installes our app, the app tries to access and generate a key in the keystore but the keystore throws this exception: Caused by: java.lang.IllegalStateException: could not generate…
Fredrik Sundmyhr
  • 803
  • 6
  • 16
21
votes
3 answers

Cipher With ECB Mode Should Not Be Used

I am trying to use a Cipher with an RSA key pair along with the "AndroidKeyStore". In all of the Android documentation I can find, the examples show Cipher.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding") or…
Bryan
  • 13,244
  • 9
  • 62
  • 114
1
2
3
58 59