testsAndMisc/docs/superpowers/specs/2026-05-01-phone-focus-recovery-design.md
Krzysztof kuhy Rudnicki 346eb1f00b Bring every markdown file under the cap
Twelve prose violations to zero. Eight files split into per-topic
subdirectories with the original left as an index; both SKILL.md files
keep their frontmatter so discovery still works, with detail moved to
references/.

Deleted docs/cleanup-2026-05/ (7 files) and linux_configuration/docs/
VERIFICATION.md on the user's ruling: unreferenced records of finished
work whose rules are now enforced by the polling, shellcheck and shfmt
hooks. PACMAN_WRAPPER_SECURITY.md was split instead - unlike those, it
documents live guarantees.

Every split verified by a sorted diff against HEAD: zero content lines
lost, only the new headings and index links added.

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

52 lines
2.1 KiB
Markdown

---
post_title: "Phone focus recovery design"
author1: "GitHub Copilot"
post_slug: "phone-focus-recovery-design"
microsoft_alias: "copilot"
featured_image: ""
categories:
- "Documentation"
tags:
- "android"
- "adb"
- "backup"
- "shell"
ai_note: "AI-assisted design document"
summary: "Design for a rooted-Android recovery, backup, monitoring, and one-command orchestration workflow built on phone_focus_mode."
post_date: "2026-05-01"
---
## Goal
Create a repeatable rooted-Android management workflow that can:
- restore a freshly formatted phone to the previously hardened state
- back up important phone state whenever the phone appears on this PC
- monitor security and device-health drift over time
- expose one highly visible entrypoint at `scripts/run_all/run_phone.sh`
The design must build on the existing `phone_focus_mode/` deployment system
instead of replacing it with a second parallel toolchain.
## Existing foundation
The existing `phone_focus_mode/` implementation already provides the core
security stack:
- `deploy.sh` deploys the focus scripts and companion app over ADB
- `focus_daemon.sh` enforces location-based focus restrictions
- `hosts_enforcer.sh` protects `/system/etc/hosts`
- `dns_enforcer.sh` forces DNS behavior that respects the hosts file
- `launcher_enforcer.sh` keeps the approved launcher installed and pinned
- `magisk_service.sh` restores the protections automatically on boot
The new workflow should reuse these assets rather than re-implement them.
Split into one file per area to stay under the 250-line cap.
- [Approved user experience, file layout and backup storage](2026-05-01-phone-focus-recovery/01-experience-and-layout.md)
- [Command modes, repair policy and device detection](2026-05-01-phone-focus-recovery/02-commands-and-repair.md)
- [Monitoring scope and the report contract](2026-05-01-phone-focus-recovery/03-monitoring.md)
- [Restore priority, backup policy and documentation requirements](2026-05-01-phone-focus-recovery/04-restore-and-policy.md)
- [Automation safety rules, testing expectations and non-goals](2026-05-01-phone-focus-recovery/05-safety-and-testing.md)