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. Automatic Release Signing Keys (New in 1.1.2)
Section titled “1. Automatic Release Signing Keys (New in 1.1.2)”In ZKite 1.1.2, release builds automatically manage signing identities under the ignored keystore/ directory:
# Generate the default release keypairzkite keygen --cn "My company"This generates:
keystore/release.pem(Combined private key and certificate used by ZKite)keystore/release.p12(Standard PKCS#12 keystore)
If no release key exists when running a build command, zkite build apk or zkite build aab creates the PEM/PKCS#12 pair automatically.
Key Discovery Order
Section titled “Key Discovery Order”- Explicit
--keystore PATHCLI argument keystore/release.pem(project default)- Legacy root-level
zkite-release.pem
2. Building Release Artifacts
Section titled “2. Building Release Artifacts”Both zkite build apk and zkite build aab automatically detect and reuse keystore/release.pem.
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 --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_64To sign with a key stored in an alternative location, pass --keystore:
zkite build aab --abi arm64-v8a --abi x86_64 --keystore /secure/keys/my_app.pem3. Shipping Updates
Section titled “3. Shipping Updates”When releasing a new version of an existing application:
- Keep
packageidentical inapp.json(orpyproject.tomlin legacy projects). - Increment
version_code(e.g. from1to2). Android will reject any install where the version code is lower than or equal to the existing installation. - Update
versionstring (e.g."1.2.0"). - Sign with the exact same key: Android cryptographically checks that the update signature matches the installed signature.
4. Compiled Manifest Verification & Google Play (New in 1.2.0)
Section titled “4. Compiled Manifest Verification & Google Play (New in 1.2.0)”ZKite 1.2.0 performs automated verification of the compiled binary Android manifest directly inside the final signed APK or AAB:
- Built-in Rust Manifest Validator: Analyzes
AndroidManifest.xml(for APKs) andbase/manifest/AndroidManifest.xml(for AABs) without requiring external Android SDK or Java command-line tools. - Manifest Correctness: Validates that all
<uses-permission>tags are direct children of<manifest>, verifies proper resource and namespace encoding, and rejects duplicate permission declarations. - Optional Hardware Attributes: Marks camera, autofocus, microphone, and location hardware features with
android:required="false"to prevent Google Play from filtering out devices lacking specific sensors.
Google Play Compliance Checklist
Section titled “Google Play Compliance Checklist”- Review Inferred Permissions: Inspect
app.jsonand.zkite/permissions.jsonto confirm all declared permissions match actual application usage. - Test Denial & Recoveries: Verify that denying camera, location, or microphone permissions displays a graceful in-app recovery rather than crashing.
- Data Safety & Privacy Policy: Complete Google Play’s Data Safety form and link an active Privacy Policy in the Play Console matching your actual app data collection.
- Manifest Checks vs Store Approval: Technical manifest verification prevents invalid APK/AAB packaging errors; store policy compliance remains the developer’s responsibility.
