Keystore Lost in Android

Today we discuss above android Keystore or JKS (Java KeyStore)file. This is a general question, Every  Android Developer should know about. What is a Keystore file, and what is it used for? Use the Android Keystore provider to let an individual app store its own credentials that only the app itself can access. This provides a way for apps to manage credentials that are usable only by itself while providing the security with This method requires no user interaction to select the credentials KeyStore a digital certificate or an identity certificate contains the public key of a public/private key pair, as well as some other metadata identifying the owner of the key (for example, name and location). The owner of the certificate holds the corresponding private key. A public-key certificate is used to sign an APK before deployment to services like the Google Play Store.  Signing the APK in this fashion allows Google to provide a high level of certainty that future updates to your APK of the same app come from you and not some malicious third party.

Read more: KeyStore 

Create a Keystore File in Android Studio :

>Enter Studio Master Password (You can RESET if you don’t know) > OK. (same time)
  1. Click Build (ALT+B) > Generate Signed APK…
  2. Click Create new..(ALT+C)
  3. Browse Key store path (SHIFT+ENTER) > Select Path > Enter name > OK.
  4. Fill the detail about your .jks/Keystore file.
  5. Next.
  6. Your file.
  7. Enter Studio Master Password (You can RESET if you don’t know) > OK.
Keystore file lost android:

The Keystore file is an Important file for Your app which sign with Keystore file and On play Store. So  KeyStore file should be stored in a safe place like –

  • Local machine
  • Locked on-site server (varying ACLs)
  • Cloud machine (varying ACLs)
  • Dedicated secrets management services
  • (git) repository
  • Drive or on Mail

if you lost your Keystore then you can’t be able to update your app on play store. So you Should store your Keystore file on any safe server or git. After May 2017 Google play store add a new feature on Play store and It’s Good News For Android Developers. From this feature, Developer can update their app or Apk who lost a KeyStore file. you need to enable google play app signing on play store console.

Manage your app signing keys

 and need to Contact with play store Developer Support. they will help you.

Chat or contact

 and fill the form and select (Need help with an issue)> then check

 >Please check here if you have a Keystore related issue(Select)

 >Please specify:

  • I lost my key (Select)
    1. Give feedback or describe your issue *
    2. And click Submit  Button.
  • Then you get an email from Google Play Developer Support
    there you get some instructions like this
    Here’s how to generate and register a new upload key:
    1. Follow the instructions in the Android Studio Help Center to generate a new key.                                                                                                     It must be different from any previous keys. Alternatively, you can use the following                                         command line to generate a new key:
  • keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
    1. This key must be a 2048 bit RSA key and have 25-year validity.
    2. Export the certificate for that key to PEM format:
  • keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
    1. Reply to this email and attach the upload_certificate.pem file.
  • You should follow the instruction and send  upload_certificate.pem file to                                                                                                             Google Play Developer Support they will reset your Keystore file and it
    takes 2-3 days. After that, you can Update Your app or Apk on play store
    there you get some instructions like this