testsAndMisc/docs/superpowers/evidence/lyricanki-focus-whitelist-2026-08-22.json
Krzysztof kuhy Rudnicki 98ca3ac56a Whitelist com.kuhy.lyricanki in focus mode
Focus Owner hides every package absent from the allowlist, so a newly
installed lyricanki was installed=true but hidden=true: absent from the
launcher and from `pm list packages`, and `am start` reported the activity
did not exist even though dumpsys listed its MAIN/LAUNCHER filter. Nothing
about the app itself was wrong.

policy.json is regenerated from config.sh by python_pkg.focus_policy, never
hand-edited.

Also drops com.android.launcher3 and com.android.camera2 from
SYSTEM_NEVER_DISABLE. That list is prefix-matched and both are strict
supersets of entries already in it, so coverage is byte-identical; this
keeps config.sh under the 250-line cap without weakening the policy.
com.android.settings stays: its only shorter match is com.android.se, an
accidental substring rather than intent.

Verified on the phone: signer matched so the Device Owner upgraded in
place, dpm still reports DeviceOwner, lyricanki flipped to hidden=false,
and workout_app + the dialer are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAEChhK3sWGxd6ucsUQmcT
2026-08-22 16:26:52 +02:00

46 lines
3.1 KiB
JSON

{
"intent": "Let a newly installed lyricanki appear on the phone. Focus Owner hides every package absent from the allowlist, so lyricanki installed as installed=true hidden=true: missing from the launcher and from `pm list packages`, and `am start` reported the activity did not exist even though dumpsys listed its MAIN/LAUNCHER filter.",
"scope": [
"phone_focus_mode/config.sh - add com.kuhy.lyricanki to WHITELIST",
"focus_owner/assets/policy.json - regenerated, never hand-edited",
"Non-goal: night curfew. lyricanki is a day-list app only.",
"Non-goal: any change to enforcement logic."
],
"changes": [
"Added com.kuhy.lyricanki to the 'kuhy's own apps' block of WHITELIST, alphabetically.",
"Regenerated policy.json via `python3 -m python_pkg.focus_policy --redact-home`; the diff is the single added entry in allowed_packages.",
"Dropped com.android.launcher3 and com.android.camera2 from SYSTEM_NEVER_DISABLE. Both are strict supersets of entries already present (com.android.launcher, com.android.camera) and that list is prefix-matched, so coverage is unchanged; this kept config.sh under the 250-line cap without weakening the policy. com.android.settings was NOT removed: its only shorter match is com.android.se, an accidental substring rather than intent."
],
"verification": [
{
"command": "python3 -c \"json ... never_disable_prefixes coverage check\"",
"result": "pass",
"evidence": "launcher3 covered: True, camera2 covered: True, settings covered: True - prefix semantics identical before and after the two removals."
},
{
"command": "bash ~/.claude/scripts/phone_deploy.sh ~/testsAndMisc/focus_owner --release",
"result": "pass",
"evidence": "release signer 9dcc2e6c...f846 matched the installed APK's signer, so `adb install -r` was an in-place upgrade with no uninstall. 'Success'."
},
{
"command": "adb shell dpm list-owners",
"result": "pass",
"evidence": "User 0: admin=com.kuhy.focus_owner/.FocusDeviceAdminReceiver,DeviceOwner - Device Owner survived the upgrade."
},
{
"command": "adb shell dumpsys package <pkg> | grep hidden",
"result": "pass",
"evidence": "com.kuhy.lyricanki hidden=false (was true). Regression spot-checks: com.kuhy.workout_app hidden=false, org.fossify.phone hidden=false."
}
],
"risks": [
"Reinstalling the Device Owner app is unrecoverable if the signature ever differs: DO cannot be re-provisioned on an unrooted Pixel without a factory reset. Mitigated by comparing the keystore's SHA-256 against the installed APK's before building, and by pulling the live versionCode 2 APK as a rollback artifact first.",
"A misparsed allowlist could hide the dialer or launcher. Checked explicitly after install rather than assuming."
],
"rollback": [
"adb install -r <scratchpad>/focus_owner-installed-vc2.apk (pulled from the device before the upgrade; same signer, so it reinstalls in place).",
"git revert the config.sh + policy.json commit and regenerate.",
"After rollback confirm: dpm list-owners still reports DeviceOwner, and org.fossify.phone is hidden=false."
]
}