Trying to update an Android app to the Google Play Store, cannot sign with original keyfile

Viewed 50

I published an app about 6 years ago (before App Bundles) and followed a process like this:

1. make keystore:
  keytool -genkey -v -keystore xxx -alias xxx -keyalg RSA -keysize 2048 -validity 10000
2. create platforms\android\ant.properties containing
  key.store="\path\to\keystore"
  key.alias=xxx
  key.store.password=xxx
  key.alias.password=xxx
3. build release apk
4. Build it with ant
  ant release
5. Sign it
  jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore xxx
6. Zip align
  zipalign -v 4 xxx -release-unsigned.apk xxx.apk

I no longer have the computer where I built it, so I started a new project in Android Studio, pasted in all the code, fixed some bugs, and am trying to release an update. However, all of my attempts to use it have failed. I do have the keystore file but all of my attempts to use it have failed.

I am using the "Generate Signed Bundle or APK" dialog wizard in Android Studio. I can successfully create an app bundle or .apk, so I know I am using the right password for the keystore.

  • APK - when I upload the .apk to Google, I get: "You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s): SHA1: 52:.... and the certificate(s) used to sign the APK you uploaded have fingerprint(s): SHA1: F7:..."

  • App Bundle - If I follow the "Use existing app signing key from Android Studio" option under Setup/App Integrity/App signing, and upload the private_key.pepk that was created when I produced the app bundle, it is rejected: "The private key doesn't match the current app certificate "

  • App Bundle 2 - If I follow the "Use existing app signing key from Java KeyStore" option, I am prompted to download pepk.jar and do this:

java -jar pepk.jar --keystore=foo.keystore --alias=foo --output=encrypted_private_key_path --encryptionkey=eb10fe8f7c7c9df715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8cef27558a3eb9d2a529a2092761fb833b656cd48b9de6a

But I am unclear on what --encryptionkey means in this context. Should I have an encryption key saved from when I initially published it? I don't recall having one, I thought the keystore and the keystore password was all I needed, and it looks that is all I saved.

0 Answers
Related