Sunday August 25th, 2019

Google Play Console – Updating App With New Signing Key

By Ebubekir Sezer

Hello, I was published an application on the Play Store which was developed by Xamarin forms and the name of the application is Kolay Çeyiz. After a while, I was had to change my laptop and I did not know I was have to keep the the information of the application(KeyStore), so i lost the informations. I was would like to update my application in the Play Store and when i upload the apk, I got this error;

For the update my application again in the Play Store, I need to create new signing key. In the Google Play Console, I was choose the my application and then Version Management and inside of this I click Application Signing and I Request New Version Of Key. After that, I filled a form and they send me a e-mail. The e-mail may come inside 1 or 2 days.  You can reach the form here. 

In the e-mail, There were some instructions to follow and these are;

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

  • This key must be a 2048 bit RSA key and have 25-year validity.
  1. 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.

Note: For the use KeyTool, we have to add this path C:\Program Files\Java\jdk1.8.0_221\bin to the Environment Variables.

Now, I have to have 2 files. Inside of the my apk folder, Using by the Command Parameter I have to create this files keystore.jks and upload_certificate.pem.  New Signing Key created, Now we have to reply the e-mail with upload_certificate.pem.

After the my reply, They send me a new e-mail and in the email;

Our key is approved, now we just have to add this key to the our apk. Firstly, We have to find the location of the zipaling.exe. In my computer, zipalign is inside of this path C:\Program Files (x86)\Android\android-sdk\build-tools\28.0.3. Maybe in your command parameter can be recognized but in my computer it did not recognized. Thats why i have to go that folder.  In this folder, We have to add keystore.jks and apk file. After that we should write this to the command parameter;

zipalign -v -p 4 yourapplicationname.apk yourapplicationname-1.apk

After that, We have to see the yourapplicationname-1.apk, if we do not see we should run the command parameter as administrator. Then we are adding the .jks key to the apk with this;

apksigner sign –ks keystore.jks –out yourapplicationame.apk yourapplicationname-1.apk

After that command, It will be ask an password this password must be the same password when you create the keystore.jks file. After that process, we can update the application(yourapplicationame.apk).

I updated the my application after this process, I hope I helped to update your application. For the questions or comments you can reach me via e-mail or comments.