For maximum security and flexibility we can provide our enterprise customers unsigned versions of their Android app, so they can sign them themselves.
Prerequisites
- Enable self-signing in your dashboard
jarsigner
This is included with the Java Developer Kit (JDK), but not the Java Runtime Environment (JRE). You can easily find and install recent versions of the JDK using AdoptOpenJDKkeytool
Also included in the JDK.
Generating Keys
If you don't have any signing keys yet, you can generate them like this.
keytool -genkey -noprompt -v -keystore {key_file_name}.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 99999 -alias {key_alias} -dname "OU=IT, O={organization}" -storepass {storepass} -keypass {keypass}key_file_name
Example: key0You can use any name for the key file. Preferably only use ASCII characters and digits though to be safe.
key_alias
Example: key0You can use any alias, I usually keep it simple by naming it the same as the key file. Preferably only use ASCII characters and digits though to be safe.
organization
Example: webtoapp.designThe name of your company.
storepass
Example: LWRrjdrnXW1NSYzUDLHkaa5uCesmELEA secure password for your keystore.
keypass
Example: SYspVNgpUbintxdZrlKPx3vfYBvP7wdA secure password for your key
Signing an Unsigned App Bundle
jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore {key_file_name}.jks -keypass {keypass} -storepass {storepass} {bundle_name}.aab {key_alias}Most variables here are from the previous step.
bundle_name
Example: app-releaseThe file name of your unsigned app bundle.
Don't have your app bundle yet? Download your app bundle here
You can verify the signature with the following command. You can ignore the warning that you used a self-signed certificate.
jarsigner -verify {bundle_name}.aabUploading the App Bundle
You can just continue with the regular Google Play Store app publishing steps.
When you get to the app uploading section, just upload the app bundle you just signed.
