- Decision
- ADR-087
- Date
- 2026-09-17
- Status
- AcceptedAccepted — both defects hardware-confirmed fixed on the physical
lynx; the security review of the new bouncer-retention behaviour is source-and-artifact level, and the timing side channel remains open and unmitigated - Part
- Duress Unlock
- Mentions
- ADR-067, ADR-072, ADR-080, ADR-086
- Mentioned by
- ADR-088, ADR-089, ADR-090, ADR-268
Shown as written
This entry has 8 columns where the log has seven, because a cell holds the separator of the table or a column is missing. The cells follow in their order, under the label of their place.
1Decision
Fix the two defects ADR-086's candidate shipped to hardware: the decoy-to-owner return stranding the owner on the direct-boot placeholder (frameworks/base 0079-0080), and the duress unlock visibly swiping itself up (0081-0086). Correct two claims ADR-086 made that turned out to be wrong.
2Why and evidence
ADR-086 is corrected on two points, per this log's own rule that a decision changes only through an entry naming it. (1) ADR-086 described 0075-0076 as "hardware-confirmed" swipe elimination. That was wrong. The evidence behind it was logcat showing no user gesture was needed; it never established that no swipe was rendered, and the owner reported the device swiping itself up on the very next real trial.
(2) ADR-086 recorded the return-path grant as merely "not yet dynamically exercised". It was in fact broken: 0073-0074 removed the second credential prompt, and that prompt was the only thing that ever unlocked the returning user's CE storage, because verifyPrimaryCredentialNoRouting (0013/0014) deliberately skipped every side effect of an ordinary verification and zeroized the synthetic password.
Root-caused from the device's own event log, not inferred: uc_switch_user 0 and wm_resume_activity com.android.settings/.FallbackHome at 18:09:43, then uc_finish_user_unlocking: 0 followed by nothing — no ssm_user_unlocking, no uc_finish_user_unlocked, no USER_UNLOCKED — for 4m44s with no reboot, exactly UserController.java:1006 returning false at if (!mInjector.isCeStorageUnlocked(userId)), one line after the event it did log.
0080 applies the same onCredentialVerified side effects an ordinary verification applies, deliberately outside the mSpManager lock (matching doVerifyCredentialInner's own placement — that call makes binder calls into StorageManager and ActivityManager, and holding mSpManager across those is a system_server deadlock shape; verified at bytecode level in the shipped services.jar: monitor-exit at 003e, onCredentialVerified at 004b).
It deliberately does not mirror sendCredentialsOnUnlockIfRequired, so a profile tied to the owner's credential stays locked after a return — accepted scope limit, least privilege over parity.
The swipe took three attempts, and the two failures are recorded because they are the reusable part. Attempt 1 (0081-0082) set KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS; hardware-confirmed to change nothing, because the going-away is merged into the user-switch transition and animated by the Shell's KeyguardTransitionHandler, which dispatches on TRANSIT_FLAG_KEYGUARD_GOING_AWAY alone and contains no reference to the no-animation flag anywhere under libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/.
Attempt 2 (0083-0084) suppressed the canned unlock animation in KeyguardUnlockAnimationController#playCannedUnlockAnimation; confirmed working (surfaceBehindEntryAnimator never starts) and the swipe still survived it. Both are kept — each removes a real animation that would otherwise return — but neither was the cause.
The cause was only visible once a lossless 64MiB logcat buffer was used; the first two diagnoses were made from a default-sized buffer that was silently dropping SystemUI lines during the switch burst, which is the direct methodological reason two wrong layers were fixed first.
The real sequence: RESET, then PRIMARY_BOUNCER -> LOCKSCREEN (471ms) by FromPrimaryBouncerTransitionInteractor, then keyguardGoingAway, then LOCKSCREEN -> GONE (416ms) by FromLockscreenTransitionInteractor — the incoming user's lock screen animated in and then animated away again. An ordinary unlock on the same device, captured for comparison, goes PRIMARY_BOUNCER -> GONE in one step and never presents a lock screen.
resetStateLocked() collapsing the bouncer during the switch drops primaryBouncerShowing, and listenForPrimaryBouncerNotShowing turns exactly that into a transition to LOCKSCREEN; everything after is forced. 0086 uses resetStateLocked's existing hideBouncer parameter to leave the bouncer up for an authorized switch, keeping the state machine on the single-step path.
Confirmed on hardware after flashing: from=PRIMARY_BOUNCER, to=GONE STARTED/FINISHED, and the owner's own verdict that it works.
3Further text
The duress unlock now lands the way an ordinary unlock does, and the return path works from a fresh boot — the case that matters, since the defect only appeared when the duress PIN was the first credential entered after boot.
Security review of the new behaviour, since 0086 keeps a live bouncer across a user switch and upstream never does: the bouncer cannot render its user-switcher/avatar header on this device — config_enableBouncerUserSwitcher reads false out of the actually built SystemUI.apk for lynx (resource 0x7f050017 bool/config_enableBouncerUserSwitcher () false), and the only SystemUI overlay on the product partition does not touch it, so configureMode() can only ever select MODE_DEFAULT.
Note vendor/adevtool/config/device/common/overlay-inclusion.yml does list that key as = true, but it is adevtool's extraction inclusion list, not an applied product overlay — the built artifact settles it.
The authorization surface is unchanged: the mint lives on ActivityManagerInternal, an in-process LocalService unreachable from apps or shell and only called after a real Gatekeeper-backed credential match; the consume side is Binder-reachable but every entry point is guarded by checkHavePermission() -> ACCESS_KEYGUARD_SECURE_STORAGE (protectionLevel="signature\|setup") and fails closed on RemoteException.
0086 changes when SystemUI redeems the bouncer-skip grant, not who may. No new IPC endpoint or permission was added by 0079-0086.
The pre-switch unlock window 0080 introduces (user 0's CE opening roughly a second before the switch lands, while the decoy is still foreground) is covered at source level: 0010 gates notification suppression on isUserQuiescedForDuress(userId) at post time, a per-user check rather than per-process state, and 0011 only unquiesces once the user becomes current.
4Further text
The timing side channel is open and unmitigated, and is now the most security-relevant gap in this feature. Measured on hardware after the fix: an ordinary owner unlock is 771ms from credential-verified to home; the duress unlock is ~2050ms (438ms credential-check plus routing and mint, 493ms switch machinery, 1110ms decoy-launcher cold start, 809ms transition tail).
That gap is stopwatch-measurable by anyone who has seen the device unlock normally, which directly undermines the indistinguishability the feature exists for. Note the inverse constraint: making the duress path faster than an ordinary unlock would be an equal and opposite tell, so TO_GONE_DURATION (500ms, identical on both paths) must not be shortened.
Pre-warming the decoy launcher cannot close the gap — com.android.launcher3 is not DIRECT_BOOT_AWARE (confirmed via dumpsys package) and a warm-started decoy stays RUNNING_LOCKED until its own credential is verified, so its launcher physically cannot start before the duress PIN is typed; only the ~300-700ms overlap between CE-unlock and the switch machinery is recoverable.
The obvious implementation of that overlap was deliberately not landed: RootWindowContainer#canStartHomeOnDisplayArea has no current-user check and startHomeOnAllDisplays goes through startHomeOnTaskDisplayArea(..., onTop = true), which would bring the decoy's home forward while user 0 is still current, with only the bouncer between it and the owner's session.
Also still open, all pre-existing: 12 of Task 2's 17 pre-unlock concealment surfaces remain UNCHECKED (Findings 3, 4, 8-17), and credential_capture is untouched. An apparent six-versus-twelve contradiction between aegisos-platform's SOURCE.md ("the six UNCHECKED leak-audit items") and docs/devices/lynx-duress-decoy-prelock-audit.md ("12 remain UNCHECKED") was chased down and is not a contradiction: they count two different lists.
The six are ADR-072's own leak-audit items (Wi-Fi shared badge/dialog, uninstall dialogs, the status-bar icon, the Multiuser widget, Guardian's cross-user AppOps check, and packages-apps-settings 0007), which SOURCE.md names explicitly as "the ADR-067/ADR-080 leak-audit's own narrower items". The twelve are Task 2's pre-unlock concealment surfaces (Findings 3, 4, 8-17) out of its original seventeen.
Both counts are correct for their own list, and both lists are still open.
5Last cell
Revisit when the timing side channel is addressed — that needs its own design and an explicit owner decision, because the only mitigation that actually closes it is bringing both paths to the same observable duration, which means deliberately slowing every ordinary unlock.
Also revisit before any future session attempts to suppress a keyguard animation: check KeyguardTransitionRepository's state sequence with a resized logcat buffer first, since the window-animation and surface-behind layers underneath it are both dead ends for this class of problem.
Finally, when either UNCHECKED count is cited, name which list it belongs to — the two are independent and have been misread as contradicting each other once already, in this entry's own first draft.
Read from docs/governance/decision-log.md, entry ADR-087.