fix(android): rotate the helper signing key to a CI-only release key

TH
7m ago
+262-96

Summary

The repository held the private key that signs Android helper APKs, so anyone could sign an APK that Android accepts as a helper update. This PR removes it. Releases are signed with a new key held only by the protected release environment. Devices with an old-key helper stay exposed until agent-device reinstalls the helper.

Merge order: #5352 on main first, then this PR. The reverse order lets a nightly publish a throwaway-signed helper.

Before / after

  • Before: every helper APK used the committed keystore.
  • After: scripts/build-android-helper.sh signs with AGENT_DEVICE_ANDROID_KEYSTORE when set. A publishing job that sets AGENT_DEVICE_ANDROID_HELPER_RELEASE=1 fails without it. Local builds use a throwaway keystore.
  • Only publishing jobs reach the secrets, and secrets: inherit is gone. The signing action loads from the workflow commit.
  • One installer serves all helpers. On an incompatible signature it uninstalls and retries once. A failed retry keeps the uninstall stderr.
  • Reinstalling the active IME helper keeps the user's keyboard as the restore target.

Validation

  • Head 5517dba034, rebased on 0.22; CI pending. Prod delta: about +135 / -80 lines.
  • Platform-android IME, release-workflow and release-assets tests pass.
  • Android 16 emulator run of the key-rotation route (Case A, Case A with a non-fallback target, Case B): all pass (run comment on this PR).
  • The helper release workflow builds only github.ref; checkout_ref is removed.
  • Maintainer steps before release: create the GitHub environment release with protection rules, and add its secrets ANDROID_HELPER_KEYSTORE_BASE64 and ANDROID_HELPER_KEYSTORE_PASSWORD.