ObliviOS Developer portal Project site

Home / Decisions / ADR-222

The Duress decoy is warm only while the device is locked, and then holds little more than its launcher.

Proposed, recorded 10 November 2026.

Decision
ADR-222
Date
2026-11-10
Status
ProposedProposed (patches authored against the public tag 2026110200 plus the package series; landed on the build server 2026-11-11 as 788c1f1fdd6c and 02bd4ccabea5; compiled into lynx 2026111101, not flashed, not run)
Part
Duress Unlock
Mentions
ADR-088, ADR-194
Mentioned by
ADR-226, ADR-228

1Decision

The Duress decoy is warm only while the device is locked, and then holds little more than its launcher: its BOOT_COMPLETED waits until it is the foreground user (frameworks-base/0014); it is stopped at every unlock in the owner's session, a finger included, and it is unlocked before a switch to it so the switch never lands on FallbackHome (frameworks-base/0015). The keyguard part of the timing (start the bouncer's pre-hide animation when the authorized switch begins, not after onUserSwitchComplete) is designed, not implemented. Corrects ADR-194: the decoy's credential-encrypted storage is not locked again by the stop.

2Why and evidence

Owner requirement 2026-11-10: the decoy may not hold much memory and the duress unlock must take as long as an ordinary one.

Measured the same day on lynx 2026110502 (diagnostic: charging, battery 3-4%): with the device locked the decoy ran 38 processes and 2.0 GB PSS, about 30 of them started by its BOOT_COMPLETED; ordinary unlock 0.80 s, duress with the decoy launcher running 1.24 and 1.68 s, with a cold launcher 2.75 and 3.57 s; the 7 to 8 s the owner reports did not occur in five duress unlocks.

Mechanics and stage times: duress-engineering-notes.md, "Decoy start, memory and unlock timing". ADR-194 stated that the stop locks the decoy's storage again; the decoy user type allows delayed locking (frameworks-base/0001), so it stays open after the first visit and every lock-time warm start unlocks the decoy without its credential.

That open storage is kept: it is what lets the launcher run before the duress credential is typed, and the storage holds only decoy data. Rejected: forking the decoy launcher from the zygote (regresses GrapheneOS secure app spawning, which costs a cold launcher 1.5 to 2.3 s); keeping the decoy running at all times (the 2.0 GB, or 0.6 GB of MEM-021); slowing the ordinary unlock to match (ADR-088, the owner's constraint).

3Consequences

Expected to remove about 30 processes from a locked device and all decoy processes from an unlocked one [assumption]; the rest (launcher, media provider, keychain, contacts provider, print spooler, autofill renderer, SystemUI of the decoy) is measured on the device and trimmed per process.

The pre-hide change is expected to save about 0.22 s of the 0.44 s that the warm duress path is slower; the rest is the user switch itself (ssm.SwitchUser 165 ms, SystemUI's 85 ms to handle the switch completion, the decoy launcher's 380 ms to draw), and no change to it is designed. A duress unlock within about 3 s of locking still meets a cold launcher. Rows DUR-032 to DUR-034, then DUR-019.

4Review when

A duress unlock that is measurably slower than an ordinary one after both changes; a decoy process count or PSS while locked that the owner does not accept; any FallbackHome in a duress unlock; an upstream change to finishUserUnlockedCompleted, finishUserSwitch or the keyguard's pre-hide animation.

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