When I'm ready to do a final v1 apk, I run:
keytool -genkey -v -alias TestApp2 -keyalg RSA -keysize 2048 -validity 10000 -keystore TestApp2.keystore
I copy the TestApp2.keystore file to the TestApp2/platforms/android/bin folder, where my TestApp2-debug.apk was created.
When I used jarsigner like so:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore TestApp2.keystore -keypass 6charpassword TestApp2-debug.apk TestApp2
... sometimes I get the return from terminal:
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 15088 but got 15506 bytes)
This error comes because it has already been signed. Does this mean that "cordova build android" is automatically applying the .keystore file in the TestApp2/ folder, and we no longer need to do a jarsigner after the first-time keytool has been applied? I thought we would be using jarsigner for each build, each version.
Does cordova build android recognize the version number and applies the same keytool to the same version? Not sure what's happening.