fix(android): rotate helper signing identity

Closed
TH
19h ago
+598-250

Closed as superseded by #5341 on the 0.22 remediation line. Continue review and implementation there. Historical validation below remains attributed to its original commits; closure does not claim the replacements are merge-ready.

Summary

Rotate Android snapshot and IME helper package identities and remove the committed signing key. Local and PR builds use supplied or disposable keys. Nightly, stable, and helper asset publishing remain paused until an isolated signer produces and verifies both release APKs, checksums, and manifests with a stable external key.

Preserve the keyboard during legacy-to-v2 IME recovery. Doctor detects an orphaned legacy helper. Invalid saved keyboards emit a diagnostic and actionable guidance. Snapshot test probes use their fixture's package identity.

Before / after

  • With the retired helper active and no owning session, doctor reported the normal keyboard; it now reports an orphan and a safe restore command.
  • A stale helper restore target produced a generic close failure; it now records a warning and explains manual recovery.
  • The scoped snapshot fixture reported the retired package and attempted an install; it now reports the rotated package and captures normally.

Validation

c4af41b73a passed merge-tree. Hosted checks pending.

All 31 hosted checks passed at eea4c26ae8. On a fresh Android 16 emulator, the active base-built legacy helper had Gboard recorded as its previous IME. The head-built v2 helper entered and read back Unicode text in smoke:form-input. After session close, doctor and Android settings both confirmed the exact original Gboard component, and the restore record cleared. The run used disposable signing keys and a temporary runner patch to target the emulator and assert the exact component.

Merge requires both production-signed helpers with the expected certificate, matching manifests, and checksums.