- Decision
- ADR-229
- Date
- 2026-11-13
- Status
- ProposedProposed (owner, 2026-11-13:
/goalto bring the cold duress unlock to 0.90 s and fix every defect found, "I want it perfect"; stop asking for a build while the work is unfinished). Written and parse-checked only; the settings mirror has 16 JVM tests (4 of 4 mutations fail them); the Java files of the eight patches type-check withjavacagainst the classes of the build oflynx2026111201(2026-11-14,tools/build/typecheck-duress-frameworks.sh: no error beyond the control run on the base, and a planted error in each of the two source trees is found); the Kotlin files type-check too; the SystemUI tests are not run. Landed on the build tree and built intolynx2026111401(IMG-033, 2026-11-14, the owner's yes to the build came after every point that could be fixed with certainty was fixed): flashed by the owner on 2026-11-14 as an unsigned update and measured (IMG-033,DUR-019; ADR-230 records what the measurement left open). - Part
- Duress Unlock
- Mentions
- ADR-228, ADR-230
- Mentioned by
- ADR-228, ADR-230, ADR-231
1Decision
The Duress unlock is always cold and reaches about 0.90 s from the credential check to the end of the keyguard exit (owner, 2026-11-13, "a duress unlock is always cold, the profile is opened only when it is really needed, so it never gets the chance to be warm"), by PIN and by finger; the decoy home may load late behind an exit that looks and times like the ordinary one, and the owner's profile is mirrored to the decoy wherever a second person could see or hear a difference at the switch (owner, 2026-11-13: find these settings and fix them; fix every defect found on the way).
Ends the warm-launcher direction of ADR-228: nothing in the fix depends on the lock-time start of the decoy's launcher process (frameworks-base/0021).
The cold unlock was five serial waits (measured, see the notes): the decoy's unlock to its end before the switch (0.33 s), the user switch held by a blocking KeyChain bind of the decoy on the shared SystemUI background thread (1.37 s), the start of the decoy home inside the switch transition, held until its launcher draws (0.72 s), the exit started only when the switch completed, and the keyguard going-away held behind a relaunch of the launcher after its theme overlays changed (0.79 s).
Eight patches, numbered frameworks-base/0022 to 0029, written in the disposable repository on the build server's tree (landed on 2026-11-14 with the five later commits named below, and built into lynx 2026111401): 0022 copies ui_night_mode and the dark-theme times (the display configuration changed at the switch); 0023 binds the decoy's KeyChain on its own thread; 0024 copies the volumes, the refresh rate, the theme setting and the lock-screen and status-bar values the decoy lacked, by an allowlist; 0025 copies the owner's wallpaper to the decoy when the device locks; 0026 starts the decoy's home after the keyguard has gone away and holds the going-away until the window manager has applied the user change; 0027 requests the exit of an authorized switch right after the keyguard reset of the before-switch callback and keeps the ordinary unlock animation (the cut of the animation is removed); 0028 returns from the decoy credential check as soon as the decoy's unlock has started and starts its home 150 ms after the going-away; 0029 adds the global setting oblivios_duress_fast (0 turns 0026 to 0028 off without a build).
Rows DUR-038 to DUR-040; the timing is DUR-019.
2Why and evidence
[measured 2026-11-13, lynx 2026111201, logcat, layers.sh samples every 0.1 s and a video of the phone from a second phone] Ordinary unlock, 3 runs: 0.77 to 0.82 s, no snapshot layer, going-away sent 25 ms after ready, exit by surfaceBehindEntryAnimator (447 ms). Cold duress: 2.97 s (3.27 s in the first run of the day), warm 1.33 and 1.39 s.
In the cold run: the decoy credential verified 0.09 s after the check and its storage unlocked at 0.16 s, the unlock finished at 0.49 s (LockSettingsService.unlockUser waits up to 15 s for it); User switch slowed down by observer #2 UserTrackerImpl, 1367 ms, because SecurityControllerImpl.refreshCACerts binds the decoy's KeyChain on SysUiBg (1594 ms, Slow dispatch took 1594ms) and the observer runs on the same thread, the process created 1.1 s after its start was requested; the display configuration changed at the switch (CONFIG_UI_MODE, the owner ui_night_mode=2, the decoy none); transition 100 sent 719 ms after ready (Displayed ... for user 12: +750ms), transition 102 sent 787 ms after ready after ThemeOverlayController for user 12 changed the launcher's overlay paths and the activity was relaunched; a transition snapshot: Display layer covered the screen for 0.56 s and 0.72 s (the flat white fill of the video, 0.57 s).
The decoy differs from the owner in ui_night_mode, the theme setting, the volumes, mode_ringer_streams_affected, peak_refresh_rate, show_touches and the wallpaper. The lock-screen notification stack is drawn at shadeNotifAlpha=0.498 in every unlock of the day, ordinary ones included, and shows for 3 frames on the black stage of a duress unlock.
Source read on the build server's tree: UserController.continueStartUserInternal, WindowManagerService.moveUserToForeground and startUserSwitchTransition, ActivityTaskManagerService.keyguardGoingAway, Transition.java (the screenshot sync), AppCompatResourceOverlayPolicy, UserTrackerImpl, SecurityControllerImpl, WallpaperManagerService.setWallpaper.
3Consequences
Rejected, each with its reason: keeping or predicting a warm decoy (the owner: it is opened only when needed); the exit at USER_SWITCHING (the switch is complete 0.3 s later, so the exit ends after about 1.2 s); the exit at the credential check (it would uncover the owner's windows before the window manager has switched the user); dropping a going-away that arrives early instead of holding it (a dropped request leaves the keyguard up); a splash screen for the decoy home (it shows the launcher's icon on a flat colour, itself a tell); a placeholder window of SystemUI over the switch (a new window and lifecycle, and not needed once the home start is deferred); copying the owner's whole settings namespace by a denylist (it would copy identifiers, accounts and the media ids of tones; android_id, the Bluetooth address, the autofill and credential services, ringtones and the VPN settings are deliberately not copied); the removal of the cut is revisited if the swipe of the lock screen returns.
[assumption] A going-away of the keyguard with no activity of the incoming user shows the decoy's wallpaper and plays the exit; the going-away may merge into the user switch transition, so the home start waits 150 ms; the first switch after the wallpaper copy may still relaunch the launcher once (its overlays change once), so a measurement starts with a throwaway unlock; the wallpaper service of the decoy rebinds at the switch (a gap of about 0.13 s behind the fading bouncer); the owner's wallpaper image sits in the decoy's data.
Five commits follow in the same repository (2026-11-14), frameworks-base/0030 to 0034: 0030 posts the deferred home start after a going-away only when one is waiting, so an ordinary unlock posts nothing; 0031 copies the owner's Auto confirm unlock to the decoy at the lock when both PINs have the same known length (and switches it off when the owner's is off), so the decoy's lock screen no longer asks for Enter where the owner's submits (16 JVM tests, a mutation of the length rule fails them; type-checked like the rest); 0033 and 0034 are stage logs for the timing rows (Exit held, Exit released after N ms, Home start deferred), on debuggable builds only: 0034 gated them after an automated security review, because a log line that exists only for an authorized switch would show on a user build that one ran.
The notification card (cause read from the source and the logs of 2026-11-13, not measured after the fix): the stack's alpha is raised to 1 when the bouncer-to-gone transition ends (PrimaryBouncerToGoneTransitionViewModel#notificationAlpha, onFinish), 500 ms after SystemUI calls going-away; the held going-away of a switch (transition 102, 787 ms) starts the exit later than that, so the keyguard is still up with the stack at full alpha over the empty stage, a card for a few frames, stuck until the status bar state is SHADE.
The fix (0032) keeps the alpha at 0 at the end of that transition while AuthorizedSwitchExit is set, for an authorized switch only; the ordinary unlock is unchanged; the Kotlin files type-check and three tests were added, not run.
Not closed by these patches: the other differences of the decoy session (its notifications differ, not read), a decoy home with six icons against the owner's five, the 0.76 s before the switch is released beyond what 0028 saves, and the finger route.
Log lines that existed before and name an authorized switch or a mirror failure (Skipping keyguard for an authorized switch, the warnings of the mirror and the wallpaper copy) are on user builds too: a residual side channel, not changed here. 0021 stays in the series until the series is measured.
4Review when
DUR-019 on the built image is still above 1.0 s cold; DUR-039 shows a window of the owner; the keyguard stays up or the decoy has no home after 1.5 s; the owner sees a tell the patches did not remove; the removal of the cut brings the swipe back.
Read from docs/governance/decision-log.md, entry ADR-229.