Skip to content

CICD-473 · Android application signing ​

Encyclopedia · Mobile, desktop and binary distribution · All snippets

Previous · CICD-472 · Next · CICD-474

1. Where it fits ​

  • Placement CI run step or authorized lab terminal.
  • Prerequisites approved toolchains and isolated build/signing runner when credentials are required.
  • Platforms local-linux, github-actions, gitea-actions.
  • Parameters KEYSTORE_PATH, SIGNING_ALIAS.

2. Copy the snippet ​

bash
apksigner sign --ks "${KEYSTORE_PATH:?}" --ks-key-alias "${SIGNING_ALIAS:?}" --ks-pass env:KEYSTORE_PASS --out app-signed.apk app-aligned.apk
apksigner verify --print-certs app-signed.apk

3. How it works ​

apksigner signs the aligned APK using a protected keystore and named alias. The subsequent verification shows which certificate was attached to the artifact.

4. Verify the result ​

Use a protected signing job and align the APK before signing. Confirm certificate digest matches the approved release key.

Validation syntax-validated (Bash parse). Status definitions.