fix(android): bound helper output and verify installed artifacts

TH
3m ago
+936-408

Summary

Bound Android helper XML, verify installed helper APK bytes before reuse, and reject untrusted higher versions. Document clipping and refuse fill success or text reads when the value is incomplete. This is the Android layer of the Daybreak remediation stack, based on #5244.

Before / after

  • Before: A modified installed APK could pass a cached admission. After: Each admission checks installed version and digest; mismatched bytes trigger repair.
  • Before: A newer untrusted APK could pass by version alone. After: Admission fails with android_helper_newer_untrusted.
  • Before: A partial XML text value could appear complete. After: The helper marks or omits clipped text, and the host refuses fill success and text reads on clipped values.

Validation

Head: 114df0fb63. Repo guidance is 39,840 bytes; the text-read candidate lookup is extracted to meet complexity limits. The focused text-read file passed 6/6; the prior fill-verification file passed 14/14 after removing virtual clock advancement around real helper I/O. Review feedback added explicit budget reserves and tests for admission, deadlines, and diagnostic redaction. Docs record the deliberate per-command APK pull because metadata cannot prove installed bytes. New-head CI and native Java tests are pending. No live Android run was made because device ownership could not be established. Signing rotation remains in #5260.