- Decision
- ADR-042
- Date
- 2026-08-21
- Status
- AcceptedAccepted
- Part
- Duress Unlock
- Mentions
- ADR-039
- Mentioned by
- ADR-053
1Decision
Amend ADR-039's decoy-profile architecture (docs/superpowers/specs/2026-08-21-duress-decoy-user-switch-design.md): the decoy is a new AegisOS-defined FLAG_FULL user type (USER_TYPE_FULL_AEGISOS_DECOY) with delayed locking explicitly opted in, switched into via a new dialog-free ActivityManagerInternal path — not the USER_TYPE_PROFILE_PRIVATE-based profile ADR-039 originally specified.
2Why and evidence
Real source verification on the build server found ADR-039's original choice cannot work: UserTypeFactory.getDefaultTypeProfilePrivate() sets FLAG_PROFILE, and UserController.switchUser() requires FLAG_FULL (or a switchable headless system user) via doesUserSupportSwitchTo() — a Private-Space-type profile fails this by construction, not a bug.
Private Space's own defaults (setCredentialShareableWithParent(true), setStartWithParent(true)) are also the wrong shape for a decoy, which needs an independent credential and zero indication a parent identity exists.
Further findings: the public switchUser() path is asynchronous and by default shows a real "Switching users..." dialog (mUserSwitchUiEnabled, fixed at boot) — incompatible with a silent unlock; AOSP's own internal UserController.sendStartUserSwitchFgMessage is dialog-free and reused instead; USER_TYPE_FULL_SECONDARY does not get allowStoppingUserWithDelayedLocking for free (confirmed false by default, same as the device-wide config_multiuserDelayUserDataLocking override) and must explicitly opt in the same way Private Space does, or the design's core fast-PIN-to-landing-latency requirement would be silently defeated.
Everything else in the 2026-08-15 design (ADR-039) — the keyguard hook insertion point, wipe-PIN coexistence, setup-flow re-authentication requirement, corrupted-routing-state fail-closed rule — carries over unchanged.
3Consequences
Owner-approved 2026-08-21. No code has landed from this ADR alone. The follow-up implementation plan (docs/superpowers/plans/2026-08-21-duress-decoy-user-switch.md, 9 tasks: new user type, dialog-free silent switch, routing-state storage, DecoyProfileHelper keyguard hook, wiring into doVerifyCredentialInner, setup-flow shell command, emulator validation, physical lynx hardware validation and latency measurement, findings) is written but not yet executed.
4Review when
Revisit if implementation finds the delayed-locking opt-in does not achieve fast PIN-to-landing latency on physical hardware (Task 8), if the freeze (stopUserWithDelayedLocking)/silent-switch sequence proves unsafe or racy in practice, or if switchToUserSilently's bypass of switchUser()'s dialog/profile-type gating is later found to skip a safety check that mattered.
Read from docs/governance/decision-log.md, entry ADR-042.