I wanted a minimal phone that's actually hard to undo on a bad day. Screen-time apps can be switched off in two taps, so I asked Claude Code if we could build something stronger. I don't write Kotlin; I mostly described what I wanted in chat and tested on the phone.
What it built, in one long session:
- A Kotlin launcher that provisions itself as Android Device Owner, so it can really hide apps and lock settings (factory reset, safe mode, clock, VPN, USB debugging, third-party keyboards)
- A setup wizard: pick your apps once, everything else disappears
- Its own browser with domain + path rules (block youtube.com/shorts, keep YouTube), plus an accessibility service that closes Shorts inside the YouTube app
- A local DNS-only VPN so blocked sites fail in every app
- "Retype to unlock": tightening is instant, loosening means typing a few paragraphs by hand (paste rejected), optional delay
- English , search, pages, reorder
The parts I found most interesting:
- It set up the Android SDK and an emulator by itself, then walked the wizard with adb, took screenshots, and checked its own UI before touching my real phone.
- On the real phone it hit things the emulator didn't have: Android refuses device owner while ANY account exists, including hidden ones (Instagram, Reddit re-adding itself). It backed up those apps, removed them while keeping their data, set the owner, then restored them.
- I asked for a security audit. It spawned a separate reviewer that got only the code, not its own conclusions. The reviewer found real holes, e.g. "install a third-party launcher from the Play Store and it's never hidden", and "with USB debugging on, one adb command removes the device owner". Those got fixed and retested. Later the emulator locked itself out of adb, which showed the USB-debugging fix works :)
- When it broke something (a Samsung diagnostics app crash-looping after being hidden, my phone falling back to the stock launcher during an update), it read logcat, found the cause and fixed it.
- It even vastly improved my battery life
Repo (MIT): https://github.com/galion96/focus
Security map: docs/SECURITY_RAKE.md
Happy to answer questions about the workflow.