anyone know how to sign .aab file using new keystore from command line? The documentation here mentions that we can use jarsigner to sign our app bundle from the command line. but I cannot find the command line? Anyone know the command line?
I got this error when uploaded my bundle to Google Play:
You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner:
I try to sign the app bundle using this command:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore xample.jks bundle.aab keystoreAlias
Thank you very much.
Probably you've already found a way to solve your problem. Nevertheless, since it may help someone in the future, I just wanted to say that I had the same problem and changing the hashing algorithm to SHA-256 helped me to overcome it.
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore xample.jks bundle.aab keystoreAlias
I had the same error for another situation (or maybe the same).
I was trying to re-package
*.aab
bundle with some changes. At first, I used a zip or jar to create an unsigned archive. After that, I signed it usingjarsigner
tool. I found that*.aab
is not an ordinary zip using bundletoolSo I used that utility to create
*.aab
, after that signed it usingjarsigner
. You need to zip the contents ofbase/*
subfolder into a separated archive.