Home / Engineering notes / Duress Unlock
Duress Unlock Engineering Notes
Durable AOSP/SystemUI framework mechanics learned from real hardware and emulator work on Duress Unlock.
1Purpose and status
Durable AOSP/SystemUI framework mechanics learned from real hardware and emulator work on Duress Unlock — distinct from docs/security/threat-model.md (the requirements) and docs/governance/decision-log.md (accepted decisions). This doc is where "how the OS actually behaves toward a non-current or backgrounded user, discovered the hard way" lives, so the next person touching a multi-user-aware surface doesn't have to re-derive it from source. Add to it whenever a future session finds another real-hardware-only or emulator-only OS behavior of this kind.
2Telecom routes calls to the foreground user, not the SIM owner
Android's Telecom framework routes a managed incoming call's notification and UI to the current foreground user, not the SIM-owning user, in a multi-user configuration — confirmed via a real adb emu gsm call test where a call registered to user 0's PhoneAccount posted its CallStyle notification under the active (different) user instead. A telecom-managed call can therefore never itself land on a backgrounded user to begin with; only a self-managed (VoIP-style) call could target one, and testing that requires writing new test code, not shell commands (ADR-058).
3SystemUI's own floating windows render under user 0, not the current user
SystemUI's floating windows (dialogs, the power menu) render under user 0's window/Binder context regardless of which user is actually current — confirmed via dumpsys window's mCurrentFocus on real hardware (Window{... u0 Select user} while mFocusedApp correctly showed a different current user's launcher). Any decoy-aware / identity-filtering logic that keys off UserHandle.getCallingUserId() will silently never apply to these surfaces; key off the device's actual current user (UserManagerService's own getCurrentUserId()) instead. A previously "hardware-confirmed" fix for one such surface (the QS user-switcher dialog, ADR-060/063) turned out to have never actually worked because of exactly this gap (ADR-066) — a passing hardware test for one SystemUI-hosted dialog does not generalize to every other one; check each surface's own window ownership, don't assume from a sibling's result.
4Synthetic taps are unreliable against this build's Compose-based SystemUI in a headless emulator
adb input tap/touchscreen swipe against this build's Compose-based SystemUI QS panel proved unreliable in a headless (-no-window) emulator session: correct element bounds/resource-ids confirmed via uiautomator dump, taps landed on the right coordinates, yet no resulting dialog opened — reproduced on two different buttons, ruling out a single-element fluke. screencap/exec-out screencap also returned solid-black images throughout the same session despite dumpsys power/dumpsys display reporting the display genuinely ON/Awake. Root cause not identified.
uiautomator dump's XML view-hierarchy dump remained reliable for reading on-screen text/state throughout this same session (it caught the real PIN bouncer and its exact button bounds when screencap could not show them) and is the fallback to reach for first the moment screencap output looks suspiciously uniform, before spending further tool calls retrying taps against a screen you can't actually see. Treat compile-time build verification as sufficient for a fix's correctness in this kind of environment, and defer real dynamic re-validation to physical hardware or a differently-configured emulator, rather than burning many tool calls chasing an unreliable headless-emulator input path.
5Squashing the decoy patch series (2026-09-25, ADR-098)
The oblivios-platform/credential/duress-unlock-decoy package went from 107 patches to 13 (frameworks-base 93 → 10, Settings 10 → 2, Multiuser 4 → 1). The old → new map and the verification tree hashes live in that package's SOURCE.md; this note records the method and what to watch for if the series is squashed or re-exported again.
Method, in order:
- Seed a disposable local repo (
oblivios-platform/.worktrees/squash-*) from the real base with a read-onlygit archiveover SSH. Do not touch the build server's live tree. git am --3waythe existing package patches (forframeworks-base, theduress-unlock-dummypatches first). A clean apply already proves the package matches the base.- Compare every touched file against the build-server branch tip. The package carries the ADR-093
AegisOS→SovereignOSrename and the server branch does not, so normalize both sides before comparing. Without that, 32 of 48frameworks/basefiles look different and it reads as a broken base. - Squash by cherry-pick per contiguous group and compare the final tree hash with the unsquashed tree. One group (
0028) was moved behind0029-0035; the tree comparison is what makes that safe. - Export with
git format-patch, then re-apply the exported files from scratch and compare tree hashes again. The check after the squash step is not the check of the shipped files.
Mistakes made while doing it, so they are not repeated:
git archive <rev> --with an empty path list archives the whole tree, not nothing. An empty file list came from asedusing|both as the delimiter and as alternation, and the result was a 3.3 GB seed instead of 48 files. Check the list is non-empty before using it.sshinside awhile readloop swallows the loop's stdin. The first fidelity run "checked" 1 file and reported no diffs. Usessh -n, and print the count checked next to the result.git diff base HEADon a branch namedbasewhileHEADis that branch compares a ref with itself. Use the base commit hash.- In zsh an unquoted
$Gholdinggit -c a=b -c c=dis not word-split, so$G am ...failed with "command not found" and the script still printed a tree hash. Read the tree hash together with the number of commits it has.
This is a source-tree-identity result only. The squashed form was not built or run on a device, and the build-server branch was not rewritten (its SHAs differ from anything the package records).
Squashed again on 2026-10-13 (ADR-163), 12 → 5 for frameworks-base and 4 → 2 for Settings, with the other packages outside datamap in the same pass. The method above held, with these additions:
- The base is the parent of the first landed commit of the series on the server (
git logon the branch), not the base aSOURCE.mdor README names: the README ofduress-unlock-dummystill names the pre-rebase hashes, which no longer exist as the parent. - Only contiguous ranges can be joined by tree: a patch cannot move behind a later one unless the files are disjoint, which the tree comparison shows.
- The exported files were applied once more from the final worktree against the old series taken from
main, not only inside the squash script. - A series long enough for the narrative to outgrow the provenance moves the narrative to
HISTORY.mdof the package;SOURCE.mdkeeps the map, the commits and the apply steps.
Squashed a third time on 2026-11-15 (ADR-234): decoy frameworks-base 53 → 7, grab-detection 12 → 2, linkability 10 → 4. The method held, with these additions:
- Neighbouring patches join by tree identity, and so do patches of a series that were landed interleaved with other concerns when the files are disjoint (
linkability: Clipboard0002and0007, Vibrator0004,0008,0009). The equal tree hash of the old and the new series is the proof; grouping by concern gives the reviewer one patch per concern. - Three checks, all three: equal tree hash of the old and the new series from scratch, the blob of every file that only this series changes equals the build server branch tip, and the new files apply with plain
git amon a tree that holds theframeworks-baseseries of the other packages. A first run claimed success on a base that did not match the server (three pre-image blobs differed); the blob comparison with the branch tip is what found it. - The series are exported at different upstream generations. A new file must also apply to the base revision its
SOURCE.mdnames, read file by file withssh -n ... git show <rev>:<file>into a scratch directory (read-only, the live tree untouched).privacy/compartments-profiles0011fails on the base of2026110200: its pre-image ofLoadedApk.javaexpects the import list of an older upstream, so that series is not squashed until it is re-exported. - The old and new series stay in the disposable worktree
oblivios-platform/.worktrees/squash-2611(branchessquash-oldandsquash-new), which theSOURCE.mdof the packages name. - Series outside
frameworks-basehave no seed on the workstation: read the files at the documented base from the build server, build a scratch git repository, apply the old series, group, compare trees.
6Verifying a credential from an app: the wipe hook and decoy routing (2026-10-07, ADR-145)
LockSettingsService.doVerifyCredential calls doVerifyCredentialInner and then DuressPasswordHelper.onVerifyCredentialResult with the result. Inside the inner method, when the primary credential of the system user does not match, DecoyProfileHelper.maybeRouteToDecoy may replace the response with the decoy's matched response; the wipe hook then sees a match and returns, so a decoy PIN equal to the wipe PIN means the wipe never runs.
Rules that follow:
- An app must never pass a typed or candidate PIN to
checkCredential. A failed check runs the wipe hook and the decoy routing on it. A candidate that equals the wipe PIN would wipe the phone and one that equals a decoy PIN would switch the user. UseLockPatternUtils.isDuressWipeCredential(ownerCredential, candidate), which only compares and needs the owner credential. setLockCredential(new, saved, userId)checkssavedthroughSyntheticPasswordManager.unlockLskfBasedProtectordirectly, not throughdoVerifyCredential, so a wrongsavedcredential runs neither the wipe hook nor the routing. It still reaches Gatekeeper and Weaver for that user, so several wrong values can throttle that user for a while.- The registration is stored under
decoy_profile_statein lock settings storage with no read accessor. An app finds the decoy from the user list: the decoy type allows one user, andgetAliveUsers()excludes a user being removed. - With Auto confirm unlock on, SystemUI submits at the owner's PIN length and hides Enter (
AuthenticationInteractor.shouldSkipAuthenticationAttempt), so a decoy PIN of another length can never be submitted whole. The set-up screen refuses it. ExtSettingControllerHelper.getGlobalSettingAvailabilityisAVAILABLEonly for the system user, which hides a Settings row and its search entry in a decoy session.- A new user unlocks its storage at its first start with no credential; a user that already has a credential stays locked at its first start. The set-up therefore starts the decoy, sets the PIN, then stops it with delayed locking.
Device findings of 2026-10-07 on lynx (rows DUR-003 to DUR-013):
- The Auto confirm unlock switch is available only with a PIN of at least six digits (
AutoPinConfirmPreferenceController,MIN_AUTO_PIN_REQUIREMENT_LENGTH), so with a shorter PIN it is absent from the screen lock page and from Settings search. - Auto confirm unlock is stored per user. The decoy user does not have it, so the decoy session's lock screen asks for Enter while the owner's does not. The owner also reports different notifications in the decoy session (not read). Both make the decoy differ from the owner's session.
- A decoy takes about 4 s from creation to being stopped, with the screen on or off. The success toast is lost when the screen is off. User ids are never reused: removing and setting up again gives 11, 12, 13 and so on.
- Testing a cut-short set-up needs a watcher that reacts to any new non-owner user, not to a fixed id. Starting the two activities as a decoy user from the shell needs
adb root, because they are not exported.
7The decoy user keeps running after the return (2026-10-23, ADR-194)
ReturnToRealUserHelper.performRealUserSwitch only calls switchToUserSilently(0); nothing stops the decoy after the return. Stock UserController.stopUserOnSwitchIfEnforced would, but it is off unless fw.stop_bg_users_on_switch is 1, setStopUserOnSwitch was called or config_multiuserDelayUserDataLocking is true. The property stops every secondary user, not only the decoy; ADR-238 (Proposed, 2026-11-16) moves the rule into stopUserOnSwitchIfEnforced for the decoy user type and drops the property, so a later build script must not require fw.stop_bg_users_on_switch=1 as the scripts up to 2026111501 do. On stallion the decoy stayed RUNNING_UNLOCKED 19 hours with 8 processes (602 MB RSS) and every broadcast (Settings battery usage every 4 to 19 minutes, gms, media on a USB event) started processes in it (MEM-021). Check after any Duress test: am get-started-user-state <decoy> must say User is not started; am stop-user -w -f <decoy> ends it and is safe. The stop does not lock the decoy's storage (delayed locking, see "Decoy start, memory and unlock timing" below), so the next lock-time warm start brings it up fully unlocked; only the first entry after a reboot meets a decoy whose storage is locked.
8The decoy credential follows the lock type (2026-11-02, ADR-210)
- The decoy credential has the type of the screen lock.
SyntheticPasswordManagerlogsCredential type mismatchand rejects a typed credential whose type differs from the stored one (around line 1729)[verified-in-source], and the keyguard types the lock's own type, so a PIN decoy under a password lock, or the reverse, never matches. A PIN pad cannot type a password either. - Nothing in
frameworks/baseneeds the type:DecoyProfileHelper.maybeRouteToDecoyverifies the typed credential against the decoy user whatever its type, andDuressPasswordHelper.isDuressCredentialacceptsCREDENTIAL_TYPE_PINandCREDENTIAL_TYPE_PASSWORD[verified-in-source]. All PIN-only assumptions of ADR-145 sat in the two Settings activities (isPin()on the main screen,createPinon the set-up screen). - A lock type that changes after the set-up leaves a decoy that never matches, with no sign at the bouncer. Settings reads
getCredentialTypeForUserof the decoy to say so on the main screen, and Change types the current value as the type the decoy still has. Nothing prevents the lock change itself. - Settings has no host-side type-check (SettingsLib does not link outside the module build), so the change is checked only by the module build and rows
DUR-014toDUR-018.
9A finger as the decoy credential (2026-11-04, ADR-217)
- A finger carries no credential, and the decoy's storage opens only with a credential or a token (
unlockUserWithTokenends in the sameonCredentialVerified). The decoy credential is therefore kept for the finger: wrapped withSyntheticPasswordCrypto.encrypt(sp.deriveDecoyFingerKey(), "decoy-finger-wrap", plain)inLockSettingsStorage(decoy_finger_state,version:fingerId:base64) and unwrapped into system_server memory in the success branch ofdoVerifyCredentialInnerfor the real owner[verified-in-source: DecoyFingerHelper, LockSettingsService]. - Dead end, escrow token:
LockSettingsService.activateEscrowTokensruns on every credential verification and callsdisableEscrowTokenOnNonManagedDevicesIfNeeded, which callsmSpManager.destroyEscrowData(userId)for a user that is not managed, supervised, automotive or test-only. The decoy would lose its escrow data at its first verification, before a token could be added[verified-in-source: LockSettingsService.java, around 3955-3995 and 4274-4315]. - Dead end, a keystore key bound to biometric authentication: using it needs the real user's hardware token in the keystore (
addAuthToken), which authorises every auth-bound key of the real user for the validity window. - A fingerprint enrolled for the real user also authenticates an app's
BiometricPrompt(AuthenticationClient.isBiometricPrompt()), whereBiometricServiceadds the token to the keystore. The duress finger is therefore refused whenever the owner is not the keyguard. - The interception point is
AuthenticationClient.onAuthenticated(the matchedIdentifiercarriesgetBiometricId()), beforeaddAuthToken.KeyguardUpdateMonitor.mFingerprintAuthenticationCallbackdrops the finger id andonFingerprintAuthenticatedalready trusts and reports the unlock, so SystemUI is too late. KeyguardUpdateMonitor.handleFingerprintAuthenticatedreturns early when the success is for a user other thanmSelectedUserInteractor.getSelectedUserId()and still sets the fingerprint state to stopped. A routed match is therefore delivered as a success forUserHandle.USER_NULLwith no identifier and no token: the real lock screen is not dismissed, trusted or reported, and nothing of the real session shows while the switch runs[verified-in-source]; the SystemUI side of the null identifier is[assumption](DUR-020).LockscreenCredentialkeeps the low byte of every char (charsToBytesTruncating), so a stored credential is turned back into chars withISO_8859_1; decoding as UTF-8 corrupts every byte above 0x7F[verified-in-source]. Found by the own read of the diff, not by a test.- A biometric allowance is not
STRONG_AUTH_NOT_REQUIRED:StrongAuthTracker.isBiometricAllowedForUseralso letsSOME_AUTH_REQUIRED_AFTER_USER_REQUEST,..._TRUSTAGENT_EXPIREDand..._ADAPTIVE_AUTH_REQUESTthrough. The policy takes the tracker's answer, so an ordinary finger and the duress finger behave alike. - Host checks that exist for classes the module build cannot be run on: the pure
DecoyFingerPolicy,DecoyFingerCodecandDuressUnlockFingerFlowrun withjavacand JUnit 4 on the JVM, and a parse-only pass over every other changed file (com.sun.source.util.JavacTask.parse(), which reports syntax errors and ignores missing Android symbols) catches editing mistakes until the first module build. Neither is a type-check. Since 2026-11-14tools/build/typecheck-duress-frameworks.sh <worktree> <base commit>is one: it runsjavacon the changed non-test Java files of the series on the build server against the classes of the last build, runs the base versions as a control, and fails only on errors the series adds (TC_PROBE=1andTC_PROBE=2plant an error in the services and the SystemUI tree to show the check detects one). The jars lack a few classes, so a handful of errors exist in both runs; Changed Kotlin files of SystemUI are compiled withkotlincthe same way (TC_PROBE=3plants an error there); tests are outside it. Two causes found while building it:javacstops before it attributes method bodies as soon as one import is missing, so every run needs-XDshould-stop.ifError=FLOW(without it the planted errors were not found); thekotlinc/classpath.rspof the module is stale (September) and lacks the framework and the coroutines, so Kotlin uses thejavacclasspath of the module pluskotlin-stdlib.jarand-jvm-target 21. The classpaths exceed the length of one argument and go through@argfiles.
10Decoy start, memory and unlock timing (2026-11-10, ADR-222)
Measured on lynx 2026110502 (userdebug) with logcat buffers of 64 MiB, the device charging at 3-4% battery, so the numbers locate causes and are not DUR-019 results. Source read at the public GrapheneOS tag 2026110200 (frameworks/base ad133394d443) with the package series applied.
- The decoy's storage stays open after the stop on the return from the decoy, not after the stop at an owner unlock (corrected 2026-11-12, ADR-228). The decoy user type sets
setAllowStoppingUserWithDelayedLocking(true)(frameworks-base/0001,UserTypeFactory), so the stop that ADR-194 causes (stopUsersLU(..., allowDelayedLocking=true)) does not lock its credential-encrypted storage (UserController.canDelayDataLockingForUser); a lock-time warm start after that stop unlocks the decoy at once, without its credential[measured on 2026110502: uc_start_user_internal 11 then ssm_user_unlocked 11 1.1 s later]. The stop ofmaybeStopUnusedWarmDecoyat an owner unlock (frameworks-base/0015, in the images since2026111101) is a plainstopUserWithCallback: vold logsEvicted fscrypt key0.2 s after it, and the next lock-time start staysRUNNING_LOCKED(Not unlocking CE storage ... because user is secured) until the decoy credential is verified. OnlyActivityManagerService.stopUserWithDelayedLockingkeeps the key[measured 2026-11-12]. - A decoy unlocked in the background gets
BOOT_COMPLETED, and the broadcast queue starts one boot receiver about every 0.45 s for 14 s: 38 decoy processes and 2.0 GB PSS with the device locked[measured: dumpsys meminfo per u11 process]. Under secure app spawning (exec spawning,persist.security.exec_spawnempty, the GrapheneOS default) each process holds 46 to 91 MB PSS, of which about 24 MB is its own.art mmap. The launcher alone is 56 MB; it is bound at 0.37 s after the start (NotificationListener), long before the boot receivers.frameworks-base/0014holdsBOOT_COMPLETEDback until the decoy is in the foreground. maybeStopUnusedWarmDecoyran only after the owner's credential matched; after a finger unlock the decoy kept running with all its processes beside the owner's session[measured].frameworks-base/0015stops it at every keyguard unlock in the owner's session.- The
FallbackHomeroute[verified-in-source]. If the decoy is not yetRUNNING_UNLOCKEDwhen the switch starts (not running, or still booting from the warm start),UserManagerInternal.isUserUnlockingOrUnlockedis false, the package manager resolves only direct-boot-aware home activities and the switch starts Settings'FallbackHome(Launcher3 is not direct-boot aware). A foreground user steps fromRUNNING_LOCKEDto unlocked only inUserController.finishUserSwitch, whichActivityTaskSupervisor.activityIdleInternalcalls once the first activity of the new user goes idle;FallbackHomethen finishes onACTION_USER_UNLOCKED(retrying every 500 ms until a real home resolves) and shows "Phone is starting..." afterconfig_progressTimeoutFallbackHome(2000 ms). The decoy launcher then starts cold. In a running decoy the unlock happens inside the credential check instead (LockSettingsService.unlockUserwaits up to 15 s), which is why the warm path never showsFallbackHome. Not reproduced in the five duress unlocks of 2026-11-10;frameworks-base/0015closes it by unlocking the decoy before the switch. - Stage times from the start of the credential check (
Verifying primary lockscreen credential for user 0) to the start of the keyguard exit (STARTED ... from=PRIMARY_BOUNCER, to=GONE) and its end:- 1
Ordinary unlock (owner home already drawn)
- Exit starts
- 0.25 s
- Exit ends
- 0.80 s
- 2
Duress, decoy unlocked and launcher process running
- Exit starts
- 0.72 s
- Exit ends
- 1.24 s
- Decoy home drawn
- 0.52 s
- 3
Duress, decoy launcher process cold (started 3 s before)
- Exit starts
- 2.22 s
- Exit ends
- 2.75 s
- Decoy home drawn
- 1.82 s
- 4
Duress, first credential after boot, decoy
RUNNING_LOCKED- Exit starts
- 1.43 s
- Exit ends
- 1.96 s
- Decoy home drawn
- 3.57 s
The owner's own first unlock after a boot passed through
FallbackHomeand took 4.5 s, so a first-after-boot duress unlock is compared with a first-after-boot ordinary one. - Where the warm duress path loses time against an ordinary unlock: the second credential check (about 50 ms); the user switch, whose largest part is
ssm.SwitchUser(165 ms:UiModeManagerService41,HealthConnectManagerService33,NotificationManagerService29,ContextHubSystemService16 ms) and the wallpaper observer (59 ms); SystemUI handlesonUserSwitchComplete85 ms after system_server dispatched it; and the bouncer's pre-hide animation (about 217 ms,KeyguardViewMediator.startPreHideAnimation), which an ordinary unlock starts right after the credential (keyguardDone) but the duress path only afteronUserSwitchComplete. The decoy launcher draws at 0.52 s, 380 ms after its activity starts in a warm process. - For the pre-hide change of ADR-222
[verified-in-source: KeyguardViewMediator]:keyguardDonePending(targetUserId)returns at once unless the target is already the selected user, so it cannot start the animation atonBeforeUserSwitching;tryKeyguardDonegoes away only whenmHideAnimationRunis set andmHideAnimationRunningis clear;OnHideAnimationFinishedcallsresetStateLockedwhen its user is not the selected one. An early start therefore has to be a presentation-only call ofstartPreHideAnimationwhose callback clearsmHideAnimationRunningwithout callingtryKeyguardDone, gated onmAuthorizedSwitchDismissPending; the dismissal itself stays where it is. In the duress run of 2026-11-10 SystemUI never rankeyguardDonefor user 0 on the routed OK. - A cold launcher costs 1.5 to 2.3 s more, about 1.5 s of it before the app's own code runs: the exec-spawned process initialises the runtime itself (
ZygotePreload,ZygoteInitin its own log). Forking it from the zygote would regress secure app spawning, so the launcher has to be running before the duress credential is typed.
11Duress unlock time and visual parity measured on 2026111101 (2026-11-12, ADR-228)
Logcat of 18 unlocks and a rolling screen recording on lynx 2026111101 (userdebug, the phone charging over USB at 89%, so the numbers are DUR-019 evidence with that caveat). Design and plan: 2026-11-12-duress-unlock-timing-design.md.
- Stage times. Credential check (
Verifying primary lockscreen credential for user 0) to the end of the keyguard exit (FINISHED ... from=PRIMARY_BOUNCER, to=GONE): ordinary, 10 runs, 0.77 to 0.79 s (the exit starts at 0.24 to 0.26 s). Duress, 8 runs: 2.57, 2.75 and 2.96 s with a cold launcher, 1.30 to 1.50 s with a running launcher. A duress unlock isVerifying ... user 0thenVerifying ... user 1225 to 50 ms later, thenstartUser-12-fg; the return from the decoy isVerifying ... user 12thenstartUser-0-fg.tools/duress-timing-probe/stages.pyreads both from a logcat file. - Why the common case is cold. Owner unlock:
User 12 state changed from RUNNING_UNLOCKED to STOPPING, vold evicts the decoy's CE key (Files still open after removing key), at the next lockstartUser-12-bg-start-mode-2brings it toRUNNING_LOCKEDwith two processes (systemui,hbmsvmanager).0014defersBOOT_COMPLETED, and the launcher was only ever started by the binding of itsNotificationListeneronce the decoy was unlocked, so nothing starts it now. At the duress credentialInstalled CE key for user 12comes 0.36 s after the check, the launcher process startsfor top-activityat 0.54 s andDisplayedfollows +2.9 to 3.0 s later. The decoy never lands onFallbackHomein this path: it is unlocked before the switch. - A locked decoy resolves only
FallbackHome.cmd package query-activities --brief --user <decoy> -a android.intent.action.MAIN -c android.intent.category.HOMElistscom.android.settings/.FallbackHomealone, so Launcher3 is not direct-boot aware[measured]. The command has no--flagsoption. - Process start while the user is locked
[verified-in-source, the first 60 lines of ProcessList.startProcessLocked only]: no unlock check before the process record is made; the component-level checks sit elsewhere.ActivityManagerInternal.startProcesstakes(processName, info, knownToBeDead, isTop, hostingType, hostingName, isPcc, callerUid, callerProcessName). Spikeframeworks-base/0021uses it; whether the launcher survives a locked user is not known. - What the screen shows (video segment frames read one by one). Cold duress unlock: the bouncer, then 3 s of a black screen, first without and then with the navigation handle, no movement, then the decoy status bar and the home at +3.1 s. Warm duress unlock: the bouncer, then about 0.6 s of one flat pale mauve fill (mean luminance 140 falling to 115, only the navigation handle), then the dark decoy home; its cause is not known (a layer of the keyguard, the launcher's starting window and the wallpaper window that is rebound at the switch are the candidates:
WINDOW DIED ... ImageWallpaper,reportEngineShown: shouldWait=true). Return to the real session: bouncer over the blurred wallpaper, the wallpaper, the home, smooth, 0.9 s after the check. The decoy home is black with six icons, the owner's home a red wallpaper. - Stalls at screen wake. SystemUI (the process of user 0) logs
Choreographer: Skipped 46 to 94 frames0.3 to 1.6 s afterWaking up from Dozingin 11 of 11 wakes, in the real session too; after a wake the bouncer sometimes shows without its wallpaper. Whether this is stock behaviour is not known. The return to the real session stalled the decoy launcher for 74 frames and system_server for 40 once (16:51:08). - Differences between the owner and the decoy (
settings --user N list):screen_brightness6 against 9,screen_off_timeout1800000 against 30000,accelerometer_rotation1 against 0,lockscreen_show_controls,lockscreen_show_wallet,lock_screen_show_qr_code_scanner,sysui_qs_tiles(the decoy has nocelland nocasttile), the volumes and the sounds.DisplayPowerControllerlogsSwitching user newUserId=... newBrightness=...with the target user's own value at every switch.0018to0020copy the screen and lock-screen keys at the lock. - Dead ends and quirks of the capture. perfetto:
lynxhas no tracefs (/sys/kernel/tracingis empty); each ftrace source (sched, atrace categories) returned about 1 KB in 3 s and logcat saidData source id=9 not found; a config must be given on standard input (perfetto --txt -c -), a file in/data/local/tmpis refused; the trigger stop worked (trigger_perfetto, the session ended after an acknowledgement timeout of 5 s).screenrecordexits at once withUNASSIGNED_LAYER_STACK(exit 218) while the screen is off (mWakefulness=Dozing), so a loop retries inside oneadb shellevery 0.2 s; the bouncer is readable in the recording (no secure-window blanking); toyboxxargshas no-r. A segment starts at the epoch second in its file name plus about 0.3 s. The laptop has noffmpeg: in the browser panerequestVideoFrameCallbackdelivers 0 frames (a background tab, and also a foreground one, 2026-11-13). Seeking (currentTime, wait forseeked, draw to a canvas, read the mean luminance) works only when the server answers byte ranges: Python'shttp.serverdoes not, the video is then not seekable (seekableis empty) and every seek draws frame 0, which gave a contact sheet of identical frames. A server with206 Partial ContentandAccept-Ranges: bytesfixes it. To read every frame, play at 0.1 to 0.25 speed and pollgetVideoPlaybackQuality().totalVideoFrameson a timer (a detachedvideoelement needs to be in the DOM). Thescreenrecordof the phone and the log do not line up to better than about 1 s; a video of the phone from a second phone (30 fps) read frame by frame showed the stages the owner saw.dumpsys SurfaceFlingersampled in a loop on the phone gives about 10 samples a second of 82 KB. - Reviews. The automated security review of
0017to0020found three things that are fixed in0019and0020(the copy at the switch was on the critical path; acustom(tile names an app; a prefix check passes by spelling) and one that the owner decided (a resident decoy key, ADR-228).
- Cold duress unlock, traced waits (
lynx2026111201, 2026-11-13, ADR-229). The cold unlock was five serial waits; the reference ordinary unlock has none of them. From the credential check (Verifying primary lockscreen credential for user 0, T0): the decoy credential verifies at T0+0.09 s and its CE key is installed at T0+0.16 s (fscrypt_unlock_ce_storage 12), butLockSettingsService.unlockUserwaits on a latch (15 s at most) for the end of the decoy's unlock, so the credential response and the switch wait until T0+0.49 s (ssm.UnlockedUser-12). The switch itself dispatchesonUserSwitchingto SystemUI at T0+0.81 s.UserTrackerImplruns its switch observer on SysUiBg; the log line isUser switch slowed down by observer #2 UserTrackerImpl: result took 1367 msandLooper: Slow dispatch took 1594ms SysUiBg ... SecurityControllerImpl. Cause:SecurityControllerImplreceivesACTION_USER_UNLOCKEDfor the decoy and runsKeyChain.bindAsUseron the same SysUiBg thread; the decoy's KeyChain process is started cold (Start proc ... com.android.keychain/u12s1000, created 1.1 s later because the zygote serves the other processes the decoy starts). A warm switch has no such start and the observer takes 77 to 96 ms. The home of the decoy starts inside the user switch transition (START u12 ... QuickstepLauncher, transition 100):WindowManagerService.startUserSwitchTransitioncollects it andFinish Transition (#100): ... ready=34ms sent=719msshows the wait for the launcher's first draw (Displayed ... for user 12: +750ms). The exit is requested only afteronUserSwitchComplete(T0+2.1 s):KeyguardViewMediator.handleUserSwitchCompleteposts the dismissal. The keyguard going-away (transition 102) is then held 787 ms (sent=787.631ms):ThemeOverlayController.onUserChangedfor user 12 logsFailed to parse THEME_CUSTOMIZATION_OVERLAY_PACKAGES(notheme_stylein the decoy's setting), applies new dynamic colour overlays (AppCompatResourceOverlayPolicy ... result: true, threecom.android.systemui-{neutral,accent,dynamic}.frroswapped) and the launcher activity is relaunched (Schedule relaunch activity, a secondLauncher.onCreate); the transition waits for that draw. While transitions 100 and 102 wait,Transition.javashows a screenshot of the display (transition snapshot: Display{#0 ...}, 0.56 s and 0.72 s in the layer samples), the flat white fill of the video. The display configuration changed at the switch (PerDisplayTaskbarResource: ... configDiff={CONFIG_UI_MODE}): the owner hadui_night_mode=2, the decoy none. The ordinary unlock: layers wallpaper, status bar, bouncer, launcher; the launcher layer joins under the bouncer at the credential check and the bouncer layer leaves 0.46 s later; going-away sent 25.6 ms after ready;playCannedUnlockAnimation, surfaceBehindEntryAnimator#start(447 ms); the duress exit ran the branchauthorized switch dismiss, a cut, so the icons appear at once. How to read it:adb logcat -v threadtimeinto a file during the round andtools/duress-timing-probe/stages.pyon it;tools/duress-timing-probe/layers.sh <label> <seconds>on the phone andtools/duress-timing-probe/layerseq.py <dir> <from> <to>for the layers between two times (the phone's local time; the logcat buffer of the start ofadb logcatholds the earlier unlocks too). The notification card of the stage: the screenrecord of a cold duress unlock shows one card (a system notification,USB debugging connected) for 3 frames at the start ofBouncerToGone;BouncerToGoneFlows ... shadeNotifAlpha=0.49803922is logged in all 13 unlocks of the day, ordinary ones included; it is a start state of the notification scrim (used only with the shade expanded or left open), not the alpha of the stack (corrected 2026-11-14; the cause is given below). The owner's report that cards freeze mid-screen was not seen in that evidence. Cause (2026-11-14, from the source and these logs): the stack's alpha is raised to 1 byonFinishofPrimaryBouncerToGoneTransitionViewModel#notificationAlpha(and the alternate bouncer twin) when the 500 ms transition ends; the shade alpha takes over only when the status bar state is SHADE, which follows the window manager's exit. A going-away held for longer than 500 ms (transition 102, 787 ms) leaves the stack visible over the stage until then.0032keeps it at 0 for an authorized switch (AuthorizedSwitchExit). The owner (2026-11-14): it happens to all notifications; the USB debugging card was the only one on the screen. The fix acts on the whole stack. It is not measured:DUR-042is the row. - Finding what betrays the decoy.
adb shell "settings --user 0 list system"and... --user 12 list secure(andglobal, which is shared) sorted into two files and compared key by key list every value the owner has and the decoy lacks or differs in. On2026111201the differences that can be seen or heard at the switch wereui_night_mode, the theme setting, the volumes (volume_music,volume_system,volume_voice, the per-device variants),mode_ringer_streams_affected,peak_refresh_rate,show_touchesand the wallpaper (/data/system/users/12has nowallpaper,wallpaper_orig; the owner's directory has them). Identifiers and accounts differ by design and are not copied (android_id, the Bluetooth address, the autofill and credential services, tone URIs with per-user media ids). - Reading the new path on the image (
lynx2026111401,0033,0034). On a debuggable build the linesExit held,Exit released after N ms(ActivityTaskManagerService),Home start deferred,Home start after the deferral(WindowManagerService) andonBeforeUserSwitching, exit requested at the start of the switch(KeyguardViewMediator) mark the hold and the release of the exit, the deferred home and the start of the exit; the stage times oftools/duress-timing-probe/stages.pystay the main reading. They are gated onBuild.IS_DEBUGGABLE: an automated review found that a line that exists only for an authorized switch shows on a user build that one ran.[estimated 2026-11-14, measured later the same day]From the traced stage times the cold path was estimated at about 0.8 to 0.9 s against 0.77 to 0.82 s for the ordinary unlock; the measurement on the device gave 0.83 and 0.85 s for the duress unlock (DUR-019). - The disposable repository is sparse. A file outside the sparse set is brought in with
git sparse-checkout add /<path>(the leading slash selects one file; a path without it is read as a directory pattern with a warning) and committed withgit add --sparse. Serena'ssearch_for_patternfinds nothing inside the ignored.worktreesdirectory: read the file withread_file, or withsed -nover ssh on the build tree; its default multiline mode lets.*run across lines, so a line pattern needsmultiline=false. - Disposable repository against the build server's tree. The disposable repository (
oblivios-platform/.worktrees/<task>) is a partial, sparse clone of GrapheneOSframeworks/basewhose base is the pre-rename twin of the build server's branch: the same commit subjects, the same code, but "FreeholdOS" comments and identifiers where the server has "ObliviOS" (git hash-objectof the same file differs). A patch made on that base conflicts at every changed comment. The working route:git fetch ssh://<build host>/<path of frameworks/base> <branch>(read-only on the server),git checkout -b <task> FETCH_HEAD, thengit cherry-pickof the commits; andgit sparse-checkout add /<path>for every file to edit. Compare the blobs of the files to patch between the server and the worktree before writing (git hash-object <file>on both). - Host checks without an Android build. A JVM-only class and its JUnit test:
javac -d <out> -cp junit-4.13.2.jar: hamcrest-core-1.3.jar <class> <test>thenjava -cp <out>:<jars> org.junit.runner.JUnitCore <test class>; the jars are in the Gradle cache (<home>/.gradle/caches/modules-2/files-2.1/), JDK 21. A mutation (the key removed from the list) must fail a test. For the Android-dependent files only syntax can be checked:javac -proc:none <file>and keep the errors that matchexpected|illegal start|reached end of file|not a statement|unclosed(unresolved symbols are expected). A compile against the tree happens in the build. - Wallpaper copy that never finished (
frameworks-base/0035, measured 2026-11-14).WallpaperManagerServicefinishes a static set (the crop, the metadata, the binding) in aFileObserverthat onlyswitchUserandonUnlockUserstart.WallpaperManager#setStreamfor a user that is neither the current nor an unlocked one (the decoy while the owner is on screen) wrote onlywallpaper_orig:/data/system/users/12/wallpaper_info.xmlstayed at 759 bytes withbindSource UNKNOWNand no crop, and0025counted the copy as done until the next boot, so the decoy's home and lock screen were black and its theme colours had no wallpaper.0035copies the five files (wallpaper_orig,wallpaper,wallpaper_lock_orig,wallpaper_lock,wallpaper_info.xmllast) inDecoyWallpaperFiles, size and modification time deciding, a temporary file moved over the target. Read back withadb shell ls -la --full-time /data/system/users/12/(a crop of the owner's size,wallpaper_info.xmlof 8127 bytes) andadb shell dumpsys wallpaper(mBindSource=SET_STATICfor both users). Bringing an observer to the decoy instead would bind the decoy's wallpaper service while it is locked (about 240 MB of its SystemUI), which the owner rules out. - The decoy killed during the exit of the switch back (
0036).UserController#stopPreviousUserPackagesIfEnabledis stockstopPreviousUserApps:am_kill ... stop user 12 due to early stop user packagesremoved the decoy launcher 0.18 s into the return, while the keyguard exit animated over it.0036makesisEarlyPackageKillEnabledForUserSwitchfalse for a decoy-type outgoing user; the stop of the switch ends the decoy about 1.6 s after the return. - What stays black or moves wrongly after
0035and0036(30 fps frames,layers.sh, logcat, 2026-11-14). (1) Fast path: the exit ends at 0.85 s, the decoy launcher drawsDisplayed ... +711 msafter its start, and until a window of the decoy exists no wallpaper target exists, so WindowManager hides the wallpaper layer (wm_wallpaper_surface [0,0,null], only StatusBar and ScreenDecor in the layers): about 0.8 s of black, icons on black for 0.25 s, then the decoy wallpaper pops in. The first duress after a boot (exit 1.21 s) shows no gap: the gap is the launch time minus the exit time. (2) Stock exit (oblivios_duress_fast0): the exit starts when the switch completes (about 0.75 s) and ends at 1.27 to 1.37 s; atransition snapshot: Displaylayer is alone on screen for 0.45 s; the keyguard's wallpaper card slides up over black (the owner's "25% up"), 0.15 s of black with one notification card on a single frame, then the canned wallpaper fade-in (KeyguardUnlockAnimationController#fadeInWallpaper) with the home. The real animations play, but with nothing behind the keyguard when it moves. (3) Return: pad over the decoy wallpaper, wallpaper only, a flat blue-grey fill of 0.2 s, the wallpaper as a card over the top 75% with a blue-grey band over the bottom 25% for 0.25 s, a dark fill of 0.15 s, then the owner's home fades in; the log hasCombining appDied into #78 ... from kgGoAwayand the owner's launcher draws its first frame about 0.75 s after the switch. (4) The notification card appears in both directions, less often. - The decoy's styling (open). The owner's
com.android.launcher3.prefs.xmlholdsicon_theme_idmono-icons:with-theme(themed icons),icon_shape_modelsquare,pref_workspace_items_label_hiddenandpref_add_icon_to_home; the decoy's file has none, so its apps show default icons. The Launcher keeps them in credential-encrypted storage, evicted while the device is locked, so the lock-time copy cannot reach them: the copy has to run after the decoy's unlock and before the home start, and the lock-time launcher warm start (0021) must go, or the launcher has read its prefs before the copy. The file cannot be edited from system_server (mode 660, no DAC override): the copy goes through the launcher's provider, see "Round of 2026-11-15" below (ADR-231). The palette comes from the wallpaper colours at run time (theme_customization_overlay_packagesis equal for both users:color_sourcehome_wallpaper,TONAL_SPOT,color_both, no colour values);ThemeOverlayControllerruns in the system user's SystemUI. At the check both users showed the samecom.android.systemui:accentand:neutraloverlay values (cmd overlay dump --user N <overlay>) anddumpsys wallpaperprintedisColorExtracted=falsefor both, so whether the decoy's palette ever differs from the owner's is not shown yet. - Module build and push, instead of an image (the owner's yes to
adb disable-verityand module pushes, 2026-11-14).tools/build/modbuild-lynx.shbuildsservicesandSystemUIin 14 minutes (400 steps) with the environment of the image script, detached withnohup ... & disown. The outputs areout-lynx/target/product/lynx/system/framework/services.jarandoat/arm64/services.{art,odex,vdex}(and the SystemUI apk with itsoat). On the phone:adb root,adb disable-verity(printsenabling overlayfsandReboot the device),adb reboot,adb root,adb remount(Remount succeeded),adb pushof the jar to/system/framework/and of the threeoatfiles to/system/framework/oat/arm64/,chmod 644,restorecon -R,adb reboot; comparesha256sumof the jar on both sides. The stale.fsv_metafiles of the image'soatwere not rejected. Afastboot flashallrestores the partitions. Landing a patch on the build tree for it needs its own yes (owner-working-rules.md). - Reading frames and probes without
ffmpeg(lessons of 2026-11-14). The offset of aflight-sr.shsegment from its file name is off by up to a second: align by events instead: the mean luminance per 0.1 s, classed as black, dark, mid and home, gives the runs (screen off, pad, scrim, home), then contact sheets at 30 fps with 54 by 120 px frames, 8 per row (the pane screenshot is about 450 px wide). A luminance threshold on the standard deviation misses a flat fill that carries the white navigation pill; look at the frames. Apkill -f '<pattern>'whose pattern occurs in its own command line kills the calling shell (exit 144): kill by pid fromps -eo pid,cmd | grep -E '[p]attern', on the phone fromps -A -o PID,PPID,ARGS, the loop shell before itsscreenrecordchild.
12Round of 2026-11-15 (module builds on lynx 2026111401, ADR-231)
- A module build replaces
services.jarandSystemUI, neverframework.jar(incident, 02:37). Two abstract methods added toActivityManagerInternal(core/java/android/app/, compiled intoframework.jar) were in the pushedservices.jarand not in the phone'sframework.jar: the duress PIN, typed by the owner on the boot lock screen, ended system_server (FATAL EXCEPTION IN SYSTEM PROCESS: DecoyLauncherLook,NoSuchMethodError: No virtual method onDecoyLookApplied()V in class Landroid/app/ActivityManagerInternal; ... (declaration ... appears in /system/framework/framework.jar)) and the phone went to the boot animation. The type-check (typecheck-duress-frameworks.sh) compiles against the new sources and cannot see it. Rule: state shared between services is a static inservices.jar(DecoyLookGate,DecoyWallpaperHold), and before a module buildgit diff --stat <head of the flashed image> HEAD -- coreon the build tree must print nothing (f26cefc13b00for2026111401). A thread of the decoy code also catchesRuntimeExceptionnow, so a failure of the look can no longer end system_server. The duress PIN works on the boot lock screen: the decoy is unlocked and entered before the owner's first unlock. - The decoy's launcher look goes through the provider, and what the provider returns (verified on the phone, root, 2026-11-15).
content query --user N --uri content://com.android.launcher3.grid_control/icon_themed(alsoworkspace_items_label_hidden,shape_options) andcontent update ... --uri .../icon_themed --bind boolean_value:b:true,.../shape --bind shape_key:s:square,.../set_workspace_items_label_hidden --bind boolean_value:b:true: the decoy'scom.android.launcher3.prefs.xmlthen holdsicon_theme_idmono-icons:with-theme,icon_shape_modelsquare,pref_workspace_items_label_hiddentrue. The prefs file is-rw-rw---- u12_a163,privapp_data_file, and system_server runs withCapEff 0000001a06887c20(noCAP_DAC_OVERRIDE), althoughsystem_server.teallowsapp_data_file_type:file { getattr read write append map }: SELinux allows it, DAC does not. A Boolean in a provider'sMatrixCursor(is_defaultofshape_options) reaches the caller as the string "true";getIntof it is 0. Every call of system_server into the provider logsOutgoing transactions from this process must be FLAG_ONEWAYwith a stack: a warning, the call is processed (GridCustomizationsProvider: query: path=/icon_themedfollowed in the decoy's launcher process). - The theme colours of the decoy (measured 2026-11-15).
theme_customization_overlay_packagesandwallpaper_info.xml(8127 bytes, with colour values) are equal for both users, and yet the accent overlay of the decoy is the default blue:ThemeOverlayControllerkeepsmCurrentColorsper user and fills it only fromonColorsChanged, which the wallpaper service does not send for colours it already holds.reevaluateSystemThemeat the switch finds no entry for the decoy,mainColorisColor.TRANSPARENT. The log shows the accent overlay file replaced at each switch in both directions (com.android.systemui-accent-TDkM.frrofor the owner, another one at the switch to the decoy and another at the return), and the replacement is the configuration change after which SystemUI redraws its windows.dumpsys wallpaperprintsisColorExtracted=falsefor both users after a boot, so it is no indicator. - What is on screen during a duress exit, and why it is random (30 fps frames,
layers.sh1454 samples, protolog, 2026-11-15). The going-away transition of a duress unlock isOPEN f=0x100with one change,IS_WALLPAPER leash=WallpaperWindowToken; that of an ordinary unlock isTO_BACK f=0x104with the home task (SHOW_WALLPAPER) andDefaultTaskDisplayArea. Frames of the first duress unlock after the first module build: the pad over the wallpaper, two frames of the pad over black (the wallpaper service of the other user is bound; in the layer samples theWallpaper BBQ wrapperlayer is absent for 0.10 to 0.16 s in 5 of 7 switches), three frames of a wallpaper card over the top 63% with black below (the engine surface is 1006x1506 px,onSurfaceChanged ... 2, 1006, 1506at every relayout, 36 times in the run, and shows at native size until the window manager applies its scale), a dim wallpaper without icons for 0.4 to 0.65 s, then the home with the colour back. One unlock of four had the card, one of three had the wallpaper absent for 0.38 s after the exit. Protolog (cmd protolog_configuration logcat enable WM_DEBUG_WALLPAPER WM_DEBUG_WINDOW_TRANSITIONS; the oldwm logging enable-textis deprecated and does nothing):viewroot_draw_event: [VRI[SwitchStage],Canceling draw. cancelDueToSync=true]at 03:55:45.793,wm_wallpaper_surface: [0,0,Window{SwitchStage}]at .794,Hiding wallpaper WallpaperWindowToken{showWhenLocked=true} from Window{SwitchStage} ... WindowStateAnimator.prepareSurfaceLocked:416at 46.127,New wallpaper target: Window{...QuickstepLauncher}at 46.139,Displayed ... QuickstepLauncher for user 12: +423msat 46.156.WindowStateAnimator#prepareSurfaceLockedhides a window that is notisOnScreen()and callshideWallpapers. A transparent window that asks for the wallpaper is therefore a fragile target;0042and0043guard both. - First stage windows, what failed (frames of 04:27 on the third module build). The stage drew a black middle with the wallpaper only in the strip of the status bar:
getBitmapAsUser(userId, true, FLAG_LOCK, true)returned the empty default image (the engine calls it with the source flag of the home,FLAG_SYSTEM), and the window kept the default inset of the status bar (setFitInsetsTypes(0)and the cutout mode fix it). With the wallpaper held visible and no cover, the card of the engine surface stayed on screen for more than 2 s (bands of luminance 79, 108, 47, 0 for 2 s) until the home drew, so the stage has to stay until the home has drawn. The first signal to the stage, a counter in the secure settings, was refused by the automated security review (ADR-231) and replaced by a broadcast withsetPackageand a receiver registered withRECEIVER_NOT_EXPORTED. - Stage times,
stages.py(credential check to the end of the keyguard exit), module builds of 2026-11-15. Ordinary unlocks 0.77 to 0.81 s. Duress: 1.18, 0.97, 0.85, 0.92, 1.15 s (first build, one proof first); 1.17, 0.92, 0.85, 0.89 and 0.93, 0.90, 0.94 s (next two); 1.31 (first after a boot), 1.09, 1.09 s (stage with the bitmap). Returns 0.88 to 1.06 s. The decoy home draws about 0.9 to 1.0 s after the check (Displayed +240 to +423 msafter its start at 0.4 to 0.55 s). - Capture and tools (lessons). The recording of
screenrecordis black for the whole frame while the secure PIN pad is up in an ordinary unlock, so the ordinary exit cannot be read from it (the owner's second-phone video can).busybox httpd -f -p 127.0.0.1:8765 -h <dir>answers byte ranges, so the browser pane can seek the video; the page runs the canvas reads; a script over the whole segment times out after 45 s ofjavascript_tool: start it and read its result from a window variable.adb pulltakes no-q.git sparse-checkout add <path>in the disposable repository removes uncommitted new files outside the set from disk (the commits survive): re-add them withgit sparse-checkout add.git add --sparseis needed for a new file outside the set. A preflight must not containgit am: a patch that applies is applied, andgit am --abortafter success does nothing. - State left (2026-11-15, not a snapshot of a later day). The phone runs a module build (the
services.jarof the first module build of the day and theSystemUI.apkof patch0049, see "Second module round" below), not an image; verity is disabled andadbdruns as root; the decoy's launcher prefs hold the owner's look. The build tree holds patches0046to0049on top of0045. The measurements of0049are not made: the third run was armed and closed before the owner did it.modbuild-lynx.shis not deployed on the build server's tool path; a copy was run from its scratch directory.
13Second module round of 2026-11-15 (0046 to 0049, ADR-232)
- Black after the stage: the stage lived and died with the shade (measured, layer samples). On the build of
0045three of five duress unlocks showed 0.6 s of black after the stage picture; the others did not. In every unlock theSwitchStagelayer was "hidden by parent or layer flag" in the sample in which theNotificationShadelayer left, 0.45 to 0.55 s after the stage was added; the layer hierarchy listed the stage under the shade. Atransition snapshot: Displaylayer then covered the screen for 0.4 to 0.6 s until the launcher: it shows the stage picture when the snapshot was taken while the stage was up, and black when it was taken after. A stage in a window token of its own (0046) gave no black frame in four unlocks. Not proven: whether the stage was a child of the shade window or hidden by policy. How to read it:layers.shsamples every 0.1 s (2400 files in 240 s on a phone under load),layerseq.pylists the layer sequence, and in a sample file theLayer [id] <name>block saysvisibleorinvisible reason=.... - The background zoomed in when the stage gave way (measured, frames). The owner saw it. The stage picture scaled by 1.10 about the centre equals the home wallpaper (mean absolute error 7.1 unscaled, 1.2 scaled, nothing shifted). Cause:
WallpaperController#zoomOutToScaleislerp(min, max, 1 - zoomOut)(resourcesconfig_wallpaperMinScaleandconfig_wallpaperMaxScale), SystemUI sends zoomOut from the blur ratio of the shade (NotificationShadeDepthController# onZoomOutChanged, 1 with the pad up, 0 when it is gone), and the stage drew the wallpaper at zoomOut 1. After0047the best scale is 1.00 with a normalised error of 0.01 to 0.08 in four unlocks (compare after dividing each frame by its mean: the scrim dims the picture). The method: the browser pane draws frames to a 54 by 120 canvas, grey values, a search over scale and shift. - The pad and the dim were cut after 0.2 s (logcat). "Keyguard exit without a corresponding app to show" came 17 ms after
handleStartKeyguardExitAnimation(the "remote animation disabled" branch ofKeyguardViewMediator, no app behind the keyguard), the shade layer was gone 0.2 s into the 0.5 s of the bouncer to gone transition and the blur stopped at 66. An ordinary unlock, for comparison:keyguardDone0.03 s after the check, the pre-hide animation (OnHideAnimationFinished, the pad's own disappear animation) 0.2 s, going-away at 0.23 to 0.25 s, the surface animation of the home about 0.43 s, the transition started to finished 0.55 s, the shade layer invisible at 0.5 to 0.55 s. A duress unlock: before-switch callback 0.07 to 0.1 s after the check,keyguardDonePending0.10 s, going-away 0.31 to 0.42 s, so the pad flight starts 0.07 to 0.12 s later than the ordinary one (the decoy credential check). Blur samples: ordinary 89 until 0.28 s, 74 at 0.36, 29 at 0.44, gone at 0.56; duress 89 until 0.36 s, 73 at 0.51, 22 at 0.61, gone at 0.67. - A hold that delays the whole exit made the home late (measured).
0048heldhideandonKeyguardExitFinishedfor 450 ms.onKeyguardExitFinishedcarriessetShowingLocked(false)and soupdateActivityLockScreenState(false, ...), the call that tells the window manager the keyguard is gone; with it held, the incoming home could not draw behind the keyguard's views: the decoy home was displayed 1.29 to 1.48 s after the check against 1.06 s on average on the build of0045. The owner reported it ("it takes longer before I see the apps"). Mean luminance per frame of a duress unlock showed the flash the owner reported: 48 to 72 over 6 frames while the pad leaves, a drop to 45, a plateau of 51 to 76 percent of the final 86 that differed per unlock, then a jump to full when the shade went; the hide had come 37 ms before the transition finished (0.525 s from the going-away), so the scrim was frozen at the brightness of that moment.0049tells the window manager at once, holds 500 ms and fades the root view of the shade out in 250 ms; a hold of 320 ms was written, type-checked and then replaced before it was built, because it ends before the transition. - An automated security review of the commits (2026-11-15) found two real risks, both closed. The early call to the window manager leaves it believing the keyguard is gone while SystemUI still shows it when the exit does not finish (the phone is locked again within 0.8 s, another switch starts, the exit or the fade is canceled):
restoreWmKeyguardShownAfterHeldExittells the window manager that the keyguard is shown again and restores the alpha of the shade on every such path. - The screen recording cannot show the pad. The whole frame is black while the secure pad is up, so the pad flight and the dim of an ordinary unlock are not readable from it; the four ordinary unlocks of the run landed on a dark app (mean luminance 27 against 86 for the home), so they were no reference for the decoy home either. The reference is a video of the phone from a second phone, an ordinary unlock from the home screen, a duress unlock and a return.
- Working commands and lessons of the round. A module build of
SystemUIandservicestakes 13 to 15 minutes incremental;format-patch <sha> --stdoutpiped intossh <build host> 'cd <frameworks/base> && git am --3way'lands a commit (comparegit hash-object <file>on both sides first, andgit diff --stat <flashed head> HEAD -- coremust print nothing); the script is copied withscp, not piped fromcat(the hook refuses a native read of a repository file); a running build is stopped bykillof the pids ofsoong_ui,ninjaand the script, read frompsfirst, and its log then saysGot signal: terminated. Proof of a push:sha256sumof the apk, theodexand thevdexon both sides and the start time of thesystemuiprocess after the reboot. A probe commit that plants a type error needsgit revert --no-edit HEADto undo (the flag-qafter the commit name is refused); check that the tree equals the fix commit afterwards. The Bash hook resolves a$VARIABLEin a path as a relative path of the session directory and blocks it: write the absolute path out.busybox httpdserves.mp4astext/htmlunless it is started with-c <conf>holding.mp4:video/mp4(see the probe README). Aps | grep -E '[x]'inside a command that also contains the text of the pattern matches the shell itself and kills it (exit 144): kill in a call of its own. Killing the host side offlight-sr.shleaves its loop running on the phone: kill itsshthere. - Defect of
flight-sr.sh(fixed).head -n -12, the cleanup of old segments, is refused by the phone'shead(head: -n < 0), so segments of earlier runs were never removed; the cleanup usessort -r | tail -n +13now.