ObliviOS Developer portal Project site

Home / Decisions / ADR-061

Revert Component A (the android.multiuser.credential_capture aconfig-gated keyguard-skip mechanism, ADR-060) to inert after real emulator validation found it does not…

Accepted, recorded 29 August 2026.

Decision
ADR-061
Date
2026-08-29
Status
AcceptedAccepted (the regression is confirmed closed by direct re-test; the original P0 bug is intentionally left open)
Mentions
ADR-060
Mentioned by
ADR-060, ADR-062, ADR-063, ADR-064, ADR-066, ADR-085, ADR-089, ADR-092

1Decision

Revert Component A (the android.multiuser.credential_capture aconfig-gated keyguard-skip mechanism, ADR-060) to inert after real emulator validation found it does not achieve its stated goal and introduces a genuine, previously-masked device-wide keyguard-bypass regression for ordinary (non-decoy) user switches. Keep the two unrelated, genuine bug fixes discovered along the way (release-config directory placement, a READ_ONLY-permission build requirement). Defer a safe redesign of the underlying double-PIN-prompt fix to a future session.

2Why and evidence

Real, hands-on emulator validation (uiautomator UI-tree dumps, logcat, dumpsys, and real on-screen PIN taps — not exit codes alone) found Task 2's credential_capture flag override was placed under build/release/aconfig/trunk_staging/android.multiuser/, a directory sdk_phone64_x86_64-cp2a-userdebug's real release config never reads (aconfig/cp2a/Android.bp's aconfig_value_set-platform_build_release-cp2a only globs aconfig/cp2a/*/Android.bp; confirmed lynx-cur shares the identical RELEASE_ACONFIG_VALUE_SETS chain, so the same defect would have affected physical hardware too) — the flag had zero on-device storage slot (aflags list, 3119 flags, none named credential_capture) and the plan's own P0 bug was reproduced end-to-end via real UI interaction on the "fixed" build.

Root-caused and fixed by the controller (moved the file to the already-existing aconfig/cp2a/android.multiuser/ directory, patch 0002), which surfaced a second real build-time defect (permission: READ_WRITE rejected outright because cp2a inherits RELEASE_ACONFIG_REQUIRE_ALL_READ_ONLY=true, fixed to READ_ONLY, patch 0003).

A full rebuild (Build Succeeded: 7036 steps, 87m) and fresh emulator boot confirmed the flag now genuinely has a storage slot and fires (UserController: Skipping keyguard due to skipKeyguardWhenSwitchingToUnlockedUsers, absent before this fix) — but re-testing then found two real problems, not one: (1) the original P0 bug was still not fixed — a different code path (dismissKeyguardThenExecute→PrimaryBouncerInteractor) re-shows a live bouncer, because the skip mechanism only suppresses a new forced keyguard show and does not dismiss one already showing before the switch, which is exactly the real coerced-owner scenario (the phone is already locked when the decoy PIN is typed); (2) far more seriously, with the mechanism genuinely active, switching to an ordinary PIN-protected secondary user (am switch-user) now reached a fully unlocked desktop with zero credential check performed at all — no LockSettingsService: Verifying primary lockscreen credential log line exists for that switch — a real, previously invisible, device-wide keyguard bypass that the inert flag had been masking ever since Task 2 first landed.

The owner was presented with this finding directly and explicitly chose to revert rather than attempt a same-session redesign of a live security-critical keyguard mechanism.

The revert (patch 0004 on build/release, state: ENABLED→DISABLED, keeping the correct cp2a placement and READ_ONLY permission from 0002/0003) was landed, rebuilt (Build Succeeded: 7224 steps, 1h23m), and the regression's closure was independently re-confirmed via a fresh emulator boot and the exact same non-decoy switch test: isKeyguardShowing=true again, and the LockSettingsService credential-verification log line fires again.

3Consequences

build/release patches 0002-0004 exported to patches/build-release/. frameworks/base's Task 2 resource flip (0018, config_multiuserSkipKeyguardWhenSwitchingToUnlockedUsers=true) is left in place, confirmed harmless on its own (UserController.java:542's Flags.credentialCapture() guard means the resource default is never consulted while the aconfig flag stays disabled).

Component A does not exist as working functionality in this plan's outcome: the original double-PIN annoyance that motivated it remains unfixed, as an explicit, accepted tradeoff, not an oversight. No physical device was ever touched by the mechanism's briefly-active, broken state — the entire find/fix/regress/revert cycle happened on the build server and a disposable emulator only.

4Review when

A safe fix for the double-PIN bug needs a genuine redesign — most plausibly, scoping the keyguard skip to a signal that specifically means "this switch was just decoy-routed," rather than AOSP's generic (and, per this finding, too permissive) isCeStorageUnlocked && isTrustAllowedForUser conditions — as its own future brainstorming/spec/plan cycle, not a reactive patch. Do not re-enable credential_capture for this product without that redesign and a real re-test of the exact non-decoy regression case this entry found.

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