Build, Sign, and Distribute
Distributing your Android application through app stores is completely separate from how ZKite is installed via pip. Your end users install a native Android package (.apk or .aab)—they do not need Python or pip on their devices.
1. Generate a Permanent Signing Key
Section titled “1. Generate a Permanent Signing Key”For apps released to testers or app stores, generate a permanent signing key:
zkite keygen --out my_release_key --cn "MyCompany Android Release"This generates:
my_release_key.pem(Combined private key and certificate used by ZKite)my_release_key.p12(Standard PKCS#12 keystore)
2. Building Release Artifacts
Section titled “2. Building Release Artifacts”Standalone APK (Direct Sideloading / Direct Download)
Section titled “Standalone APK (Direct Sideloading / Direct Download)”For direct user installation or testing on physical phones:
zkite build apk \ --abi arm64-v8a \ --keystore /path/to/my_release_key.pem \ --out dist/Android App Bundle (Google Play Store)
Section titled “Android App Bundle (Google Play Store)”Google Play and modern app stores require an Android App Bundle (.aab). Pass all target architectures so the store can generate optimized split APKs:
zkite build aab \ --abi arm64-v8a \ --abi x86_64 \ --keystore /path/to/my_release_key.pem \ --out dist/3. Shipping Updates
Section titled “3. Shipping Updates”When releasing a new version of an existing application:
- Keep
packageidentical inpyproject.toml(e.g.com.company.app). - Increment
version_code(e.g. from100to101). Android will reject any install where the version code is lower than or equal to the existing installation. - Update
versionstring (e.g."1.1.0"). - Sign with the exact same key: Android cryptographically checks that the update signature matches the installed signature.
