Somehow I managed to save the wrong keystore for my Android app that I developed using Xamarin and already published. When I wanted to upload an update to the Google Play Store with the keystore that I thought was the right keystore, the SHA certificate did not match.
Luckily I was registered for Google Play App Signing so they were able to reset the Upload Key for me. In order to reset the upload key I:
1.(dont know if i had to do this to generate new upload key) Generated a new archive and new keystore for the Android project in Xamarin and exported the APK to a folder. In that folder i ran the command lines in the next steps:
2.Generated a new upload key using the command line: keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
3.Exported the certificate for that key to a *.pem file: keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
4.Sent the *.pem to Google Play Developer Support.**
Note: to be able to use the keytool command in Windows 10 command prompt, I searched and opened Environmental Variables, found PATH under User Variables, right clicked and Edit, and added new path of location where keytool.exe is located: C:\Program Files\Java\jre1.8.0_191\bin
Now that I have a *.pem file and *.jks file, how do I create the new APK file for my Xamarin Android project that will serve as an update, signed with the new upload key in Visual Studio/Xamarin?
Another alternate way is :
1) Generate new key using command promt:
keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
2) From app signing select the import option and import the created key path.
3) create the build and submit to play store.
I'll tell you what happened when I lost my upload key.
It was when i was just a beginner and I had no idea if keeping the signing key was that important. anyway, i lost it.
I requested a new upload key by going to : PlayConsoleSupport
filled the necessary fields.
did

it took a day or two for them to reply with the complete but, confusing instructions for creating another upload key and sending them the .PEM file as I was a beginner.
I did as they said in the email created another keystore.
saved it in C:users/****/uploadkey.jks [important]
opened cmd and wrote the command that i recieved in the email, i don't remember it.
and that gave me certificate.pem
I replied to that email and attached certificate.pem
after a couple of days, i recieved an email that my upload key was activated and that i have to sign every future update with the upload key that i sent them the certificate.pem of.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With