C:\Users++++\Desktop> java -jar pepk.jar --keystore=android.keystore --alias=androidkey --output=output.zip --include-cert --rsa-aes-encryption --encryption-key-path=private_key.pem
Enter password for store 'android.keystore':
Enter password for key 'androidkey':
Error: Unable to export or encrypt the private key
java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/OAEPWithSHA1AndMGF1Padding
at java.base/javax.crypto.Cipher.getInstance(Cipher.java:574)
at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.encryptPrivateKeyWithCkmRsaAesKeyWrapEncryption(ExportEncryptedPrivateKeyTool.java:284)
at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.run(ExportEncryptedPrivateKeyTool.java:213)
at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.main(ExportEncryptedPrivateKeyTool.java:165)
I use JDK 21
I changed the name of the .pem file to private_key.pem
I have JRE installed, but no Android SDK.
I am trying to sign an app that i have last updated in 2018
I find out that when i localize the java.exe and run it, the program flashes just quickly and closes itself.
What can i do?
You released an AI2 app on the Play Store in 2018, right?
You have saved the keystore with which the app was signed and have access to it, right?
You now have built a new version of your app (from 2018) in 2024 with the same AI2 account, without having changed the keystore in the meantime. Correct?
Have you created the new version (update) as an APK (or an AAB) file?
Then you tried to publish this app (APK) on Play Store?
If so, what exactly is the problem / what error messages appear (screenshots)?
Long story short, if the app was built with AI2 and you haven't changed the keystore, you can still publish the new update as an APK. There should then be no problems with the keystore (especially if you have not activated Google App signing). I've been doing this with all of my apps in the Play Store for more than 10 years.
You released an AI2 app on the Play Store in 2018, right? yes
You have saved the keystore with which the app was signed and have access to it, right? Yes, but i am trying to sign while using a newly exported keystore. Should i not?
You now have built a new version of your app (from 2018) in 2024 with the same AI2 account, without having changed the keystore in the meantime. Correct? I have an old Keystore, backed in one of my ald folder for the APP. Maybe it was the very last Keystore i expored back then. But then i made in reality not modification on my app, i just wanted to export a new version and upload it on G-Play, because they are telling me, the API level to too old. I dont think i changed the keystore on MIT-AI.
Have you created the new version (update) as an APK (or an AAB) file? Both
G-Playstore tells me for .aab file i have to sign it, and for the new .apk file: it says the fingerprint of the signing certificate is not the same (so how do i get the old fingerprint?)
Then you tried to publish this app (APK) on Play Store? Yes, for the new apk. fingerprint is not the same playstore says, and i am having trouble signing the keystore file to upload the new aab file.
If so, what exactly is the problem / what error messages appear (screenshots)?
I am now trying to sign the aab file to upload and i get the error above on the terminal.
Why do i get that error? It has nothing to do with a keystore i suppose?
Since you haven't updated your app since 2018, it is no longer available in the Play Store for newer Android versions (> API 27 or 28 / Android 8 or 9). The easiest way is to create a new app with a slightly different package name and then publish it in the Play Store.
Of course, you then need to create an AAB and upload it to the Play Developer console and publish it.