ObliviOS Developer portal Project site

Home / Decisions / ADR-056

Confirm both of ADR-055's deferred build-verification items for real, and land Tasks 4-6 of 9 of the Duress decoy user switch plan.

Accepted, recorded 27 August 2026.

Decision
ADR-056
Date
2026-08-27
Status
AcceptedAccepted
Part
Duress Unlock
Mentions
ADR-055

1Decision

Confirm both of ADR-055's deferred build-verification items for real, and land Tasks 4-6 of 9 of the Duress decoy user switch plan (DecoyProfileHelper, its wiring into doVerifyCredentialInner, and the set-decoy-profile/clear-decoy-profile shell command) under the same local-first discipline — completing the mechanism's real code, Tasks 1-6 of 9.

2Why and evidence

Task 2's own build (launched before Task 3 landed) finished for real: #### build completed successfully (01:51:36) ####, confirming 0001-0003 compile. Tasks 4-6 were then authored the same local-first way (disposable worktrees seeded from the real branch HEAD at each step) and landed in order via git am --3way, applied cleanly each time — real remote commits 10f858743765 (Task 4), ed256ec87fb1 (Task 5), 41aeb66e0893 (Task 6).

A second, consolidated build was launched only after all three landed (never mid-application, per ADR-055's rule): #### build completed successfully (01:29:45) ####, confirming 0001-0007 — all of Tasks 1-6 — compile together.

Task 4's implementation was reviewed before landing and found to diverge from the plan's literal sample code in two places, both verified against real source rather than accepted on the plan's authority: checkWritePermission() was added to the two new Binder-exposed methods (grep across the real LockSettingsService.java found every sibling @Override already calls it — e.g.

setDuressCredentials at line 4494 — the plan's own sample omitted it, a real gap in the plan text, not a stylistic addition); and a guard rejecting decoyUserId == UserHandle.USER_SYSTEM was added to setDecoyProfile, closing a real unbounded-recursion path the design's stated recursion-prevention rule ("the hook fires only for userId == UserHandle.USER_SYSTEM... so it correctly does not fire again for the decoy user's own check") only holds if decoyUserId is never itself USER_SYSTEM — an assumption the original design left unenforced.

Separately, a review of Task 6's initial draft (prepared by a different subagent, in parallel, while Task 4 was pending landing) found it had placed LockSettingsShellCommand.java at the wrong relative path in its disposable worktree (repo root instead of services/core/java/com/android/server/locksettings/), which would have produced a patch git am could not correctly apply to the real tree — caught and fixed before the patch was generated for real.

3Consequences

All of Tasks 1-6 are exported in aegisos-platform/credential/duress-unlock-decoy/patches/frameworks-base/0001-0007, real branch SHAs cited throughout (not disposable-worktree SHAs, per ADR-055's rule), and confirmed compiling together by two independent real builds. The mechanism is code-complete: a registered decoy credential typed at the primary keyguard now silently switches to the decoy user at cost symmetric with the no-decoy case — but this is compile-time verification only. No emulator or physical device has exercised the real match/decoy-match/wrong-PIN/wipe-PIN sequence yet.

4Review when

Tasks 7-9 (emulator validation, physical lynx hardware validation and latency measurement, recording findings) remain not started — do not treat the mechanism as working until Task 7's real emulator evidence exists. If a future patch review finds the plan's own sample code diverges from real source again (as Task 4's did twice), treat that as a standing signal to verify every plan-supplied code sample against real source before transcribing it, not just when line numbers look stale.

Read from docs/governance/decision-log.md, entry ADR-056.