ObliviOS Developer portal Project site

Home / Decisions / ADR-194

The Duress decoy user is stopped when the device switches away from it, by setting the stock property fw.stop_bg_users_on_switch to 1 in…

Proposed, recorded 23 October 2026.

Decision
ADR-194
Date
2026-10-23
Status
ProposedProposed (landed on the build server 2026-10-26 as 9e39466c and built into lynx image 2026102302, flashed 2026-10-27 and the decoy not visited on it yet, not on stallion)
Part
Duress Unlock
Mentions
ADR-150, ADR-151
Mentioned by
ADR-222, ADR-238

1Decision

The Duress decoy user is stopped when the device switches away from it, by setting the stock property fw.stop_bg_users_on_switch to 1 in config/mk/google_devices/common/device-common.mk of vendor/adevtool, as the patch package memory/decoy-stop-on-switch in freeholdos-platform. No framework code changes. It is the third memory lever after ADR-150 and ADR-151 and does not touch secure app spawning, ART, the zygote, lmkd or any hardening default.

2Why and evidence

Owner instruction 2026-10-23 (chat): work the fix out, no review yet. Evidence (MEM-021): on stallion 2026101405 the decoy user was RUNNING_UNLOCKED 19 h 41 min after its last login with 8 processes and 602 MB RSS, restarted by every broadcast; stopping it raised SwapFree from 148 to 621 MB.

Cause, verified in source: ReturnToRealUserHelper.performRealUserSwitch only calls switchToUserSilently(0); stock UserController.stopUserOnSwitchIfEnforced (called from continueUserSwitch) stops the old user only if DISALLOW_RUN_IN_BACKGROUND is set, setStopUserOnSwitch was called, or fw.stop_bg_users_on_switch is 1, falling back to config_multiuserDelayUserDataLocking (false).

The system user is never stopped by it and the guest user is already stopped on switch. This restores the stated design: between uses the decoy stays stopped (2026-08-21-duress-decoy-user-switch-design.md).

3Consequences

Authored on vendor/adevtool e333ec2c, landed 2026-10-26; it applies with memory/zram-size/0003 in either order. After the stop the decoy's credential-encrypted storage is locked again (mDelayUserDataLocking is false), so the next Duress entry starts it cold, as after every reboot; its latency and landing state are not measured (MEM-021 retest). The adevtool pin of every built device needs the update described in memory/zram-size/SOURCE.md.

4Review when

A Duress entry that is visibly slower or lands differently from a warm one; any component that relies on a background user keeping running (none known); an upstream change of the property or of stopUserOnSwitchIfEnforced.

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