4

I lost my android apk certificate. I formatted my mac mini and upgraded to a new MacBook Pro. Now I don't have access to the old mac. So there is no chance of retrieving the old keystore. And I am not enrolled in Google Play App Signing yet. If I enroll now, will I be able to update my app?

This is the error I get when I try update my app on play store :

You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate.

I know this is a duplicate question but I am asking it again because all the other questions are 3,4 years old. And I read somewhere that it is possible after May 2017 but I don't know how.

This is the comment I saw on quora (The link to the blog is broken):

https://www.quora.com/How-do-I-make-a-new-Certificate-Keystore-key-after-losing-the-key-of-my-Android-app

No need to Remove Your app from play Store You can Update Your app. it’s Possible now, After May 2017 you can Update your app if you lost your keystore or keystore password. Don’t lose Hope you can update your app using new Keystore file please refer this blog http://geekcodehub.com/blog/ Code Hub here i wrote how to update apk if you lost your keystore follow the step and create new keystore , I updated my app using this step. you need to enable google play app signing on play store console

Is there any chance to update my current app? Without creating new app on playstore.

Yawar Younus
  • 125
  • 1
  • 13
  • AFAIK the only way you can do it is using google play signing. and again AFAIK, you can't use google play signing if you didn't since the first release. If you find a workaround let me know since I was looking for this some days ago, but I think this is impossible, because it would be a security hole (with your login anyone could change your keystore and update your apps) – Pier Giorgio Misley Jan 19 '18 at 16:44
  • No, nothing has changed because it is an Android constraint. – Nick Fortescue Jan 19 '18 at 16:46
  • Possible duplicate of [The apk must be signed with the same certificates as the previous version](https://stackoverflow.com/questions/4843212/the-apk-must-be-signed-with-the-same-certificates-as-the-previous-version) – Nick Fortescue Jan 19 '18 at 16:47
  • As I mentioned in my question, All the other questions are atleast 3,4 years old. I was hoping maybe there is a solution now. – Yawar Younus Jan 19 '18 at 16:49
  • 1
    The Google Play Signin just saves your certificate, so if you lose your keystore you can recover it. If you're not enrolled in Google Play App Signing and lose your keystore, you'll need to publish a new app with a new package name.This link explains better https://support.google.com/googleplay/android-developer/answer/7384423?hl=en – creonilso rodrigues Jan 19 '18 at 16:52
  • Can anyone suggest me a good recovery tool (Free) for mac? In case I am able get my hands on the previous mac I had. I hope I can retrieve keystore from my old mac (I formatted the drive from disk utility). – Yawar Younus Jan 19 '18 at 19:14

2 Answers2

3

AFAIK it's not possible.

If you lose your keystore or think it may be compromised, Google Play App Signing makes it possible to request a reset to your upload key. If you're not enrolled in Google Play App Signing and lose your keystore, you'll need to publish a new app with a new package name.

Source

CoderP
  • 1,361
  • 1
  • 13
  • 19
1

Finally, I managed to retrieve the key. Here is How :

1- Download Disk Drill (Trial Version)

2- Download Hex Editor

Disk Drill shows all the files but you cannot recover without upgrading to Pro version, But don't worry there is a work around :)

Select the partition you want to recover. It will start getting a list of files which can be recovered. In the search bar write ".jks"

From the list select the .jks file which is around 2 kb. Ignore the other files. All jks file names will be like file000001.jks, file000002.jks...

In trial version you cannot recover it directly but you can view it. So, open the file you selected. Copy the Hex Code from it.

Open Hex editor, Paste the code in a new file. Save it with extension .jks

Run IDE (Visual Studio or any), Import the jks file and you are good to go.

In visual studio you can import .jks after archiving the android project. Select Ad Hoc and at the bottom there is an option to import an existing key.

I erased my drive completely from disk utilities and installed a new OS. But still I was able to recover the key. Never loose hope :)

Yawar Younus
  • 125
  • 1
  • 13