Skip to content

Build, Sign, and Distribute

This content is for v1.1.2. Switch to the latest version for up-to-date documentation.

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:

Terminal window
# Generate the default release keypair
zkite 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.

  1. Explicit --keystore PATH CLI argument
  2. keystore/release.pem (project default)
  3. Legacy root-level zkite-release.pem

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:

Terminal window
zkite build apk --abi arm64-v8a --out dist/

Google Play and modern app stores require an Android App Bundle (.aab). Pass all target architectures so the store can generate optimized split APKs:

Terminal window
zkite build aab --abi arm64-v8a --abi x86_64

To sign with a key stored in an alternative location, pass --keystore:

Terminal window
zkite build aab --abi arm64-v8a --abi x86_64 --keystore /secure/keys/my_app.pem

When releasing a new version of an existing application:

  1. Keep package identical in app.json (or pyproject.toml in legacy projects).
  2. Increment version_code (e.g. from 1 to 2). Android will reject any install where the version code is lower than or equal to the existing installation.
  3. Update version string (e.g. "1.1.0").
  4. Sign with the exact same key: Android cryptographically checks that the update signature matches the installed signature.