Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Changelog

QuitLock was built in milestones. Each entry says what it added; the reasons for choices along the way are in Decisions, and what is still unchecked in Open items. The full record is in the git history.

21. Browsers (2026-12-05)

Issue #15: Samsung Internet came with the phone and ran unfiltered, since browsers installed before arming were left alone and only Chrome was configured.

  • A browser table (Browsers.kt, mirrored in desktop/core/src/browsers.rs): Chrome verified; Chrome Beta, Dev and Canary, Edge, Brave and Vivaldi candidates; Samsung Internet, Firefox, Tor, Opera, Opera GX and others unsupported, each with the reason. A new guide page, Browsers, lists what each honours and how to test one.
  • Every verified and candidate browser gets the browser settings, installed or not. Candidates are exempt from the browser rule in dev and tester builds only, until a phone test verifies them.
  • Browsers in the arming baseline are judged too: an unsupported one is suspended unless on browser_allowlist, on already-armed phones as well.
  • A release build arms with any managed browser installed, not only Chrome.
  • Setup warns about browsers that will be suspended (Finding::UnmanagedBrowsers, never a blocker) and asks you to save their data first: a tick box in the desktop app, a question in quitlock setup.
  • The phone names why a known browser is unsupported; the computer warns when browser_allowlist names one, and the change list says “browser” instead of “Chrome”.

20. Review fixes (2026-12-04)

A review of the whole repository, asked for by the owner.

  • A partner’s phone PIN can no longer be cleared without a partner key. With a partner known only by a phone PIN, phone_secret_allow for the partner (approved with that PIN on the phone) cleared it, which ended partner mode at once, with no owner signature and no delay. The phone now refuses it unless there is exactly one partner key; one shared vector added.
  • Damaged storage that lost every owner key no longer hides Pair a new key: Leave or recover shows it while QuitLock is device owner. The re-pair dialogs say the real wait (72 hours or more when armed with a partner or damaged settings; at once otherwise), on Recovery too.
  • The self-check runs each check on its own, so one that throws can no longer skip turning USB debugging off or rescheduling the periodic check. “Automatic time was off (re-applied)” is no longer said while it is still off.
  • Arming holds the bundle processor’s lock, so a change judged while the phone was not armed cannot be applied at once to a phone that has just armed.
  • Reading damaged settings no longer fails on a full disk; the reading stands and is made again next time.
  • The Leave or recover screen no longer reads the phone’s state over and over while it is open (or left in the background).
  • The tamper watch is taken down after it reports, instead of leaving its observer, receivers and thread running.
  • An update is no longer lost when the app’s process dies between writing it and installing it: the installer session is kept on disk, and the next start installs it (or says why it could not).
  • A torn last line in the event log (a power cut during a write) no longer starts the numbering again at 0.
  • History names a waiting change dropped by a re-pair (“a new key was paired”) instead of showing re_pair.
  • Builds other than the tester build no longer make or read tester-code.txt.
  • One damaged key file no longer hides every key on the computer. A key write cut short (a crash, a full disk) left a half file that made key list, key picking and the desktop app fail, or show no keys at all and refuse every name. A failed write now removes what it wrote; unreadable key files are left out, and both programs name them.
  • Files replaced in place (config pull, partner sign, quitlock.toml) are flushed before the swap, a .partial left by an interrupted run no longer blocks the next, and Windows says when the file is open in another program.
  • The desktop app keeps no copies of PINs, passwords or recovery phrases in its fields’ undo history, and the three typed check words are wiped like the rest. It warns when it cannot find the folder for keys.
  • Windows: the desktop app no longer opens a console window for every adb call; if its window cannot open (no OpenGL 2, as in some virtual machines and Remote Desktop), it says so in a message box instead of doing nothing; the file browser lists drives without touching each one, so an offline network drive no longer freezes it. config edit passes EDITOR to cmd correctly, and waits when Notepad returns before the file is edited. The recovery phrase check clears the screen on every console. Setup no longer says an armed phone talks over USB without USB debugging on Windows, where only adb works.
  • An adb call can no longer hang past its time limit waiting for output held open by an adb server it started.
  • Bundles as files with no connection at all. exit request, config push and update take --device-id with --to-file, and then write the signed file without connecting; before, every command but enrol connected first, so --to-file did not help when no connection worked. Leave or recover now always shows the phone’s device ID.
  • CLI fixes: the “Approving it” instructions after a change that waits for a partner were never shown (they looked for partner_key, which the phone no longer sends); --draft --to-file on a partnered phone sent the change and wrote no file; enrolling again with --partner or --rule on a phone that already has your key said it worked and set neither, and now says how to; --transport help said the accessory comes first. An empty GH_TOKEN no longer hides GITHUB_TOKEN.
  • Partner approvals: a partner key being added now reads as needing a partner’s approval (the new partner’s own, and on a phone with partners, theirs), in partner review and the desktop app.
  • Desktop app: Save it for my partners to sign checks the DNS filter first, as sending does; a failed read of a waiting change can be tried again; after a setup that failed, the phone can be given back to the Phone page, and Connect elsewhere no longer uses the phone while setup has it; closing the window waits at most 2 seconds for the connection; a Disconnect pressed just before a retry is no longer lost; a waiting rule change is named.
  • The desktop programs read config entries as the phone does (its whitespace, and lengths in UTF-16 units), so the phone can never hold a config they cannot read; oversized bundles and frames are errors, not crashes.
  • Checks: CI runs on pushes to dev too, builds the tester APK, uses the release workflow’s Rust toolchain and pins third-party actions to commits. The check that a release APK has no dev-only code could pass when it found some (a pipe under pipefail); it now reads the code whole, and checks tester APKs too. The release workflow checks the certificate hash in the Windows programs as well. The book check fails on a page missing from the summary.
  • Docs: --to-file and --device-id; the desktop app in the overview, releases and installing; several partners and the real button names in the desktop and phone app guides; Recovery in the phone app guide; the DNS filter check as network use; the USB accessory recorded as working on the S20 FE with an armed tester build; protocol pages without the old section numbers, with sixteen signatures and connection protocol 2; testing commands that can be pasted together.

19. Several partners and their rule (2026-12-03)

Asked for by the owner, for a church youth group with two leaders as partners for each member (Decisions).

  • Up to ten partners per phone, each with a key of their own. Enrolment takes partner_keys; another partner joins in person or by invite as the first did, approved by the partners already there, and waits out the delay. A partner phone PIN or password stays possible with one partner only.
  • The partners’ rule: how many partners, with the member, a loosening change needs (then the delay); how many make it apply at once; and how many may tighten without the member. The default is partner mode as before. A weaker rule always waits; a damaged one reads as the strictest. Invariant 1 is amended to allow at once, off by default.
  • Protocol: a rule bundle; partner_remove names a key; 16 signatures per envelope; status reports partner_keys, rule, and for a waiting change approved_partners and partners_needed; the log has partner_key_ids, a rule entry and at_once. 28 new shared vectors, run by both the phone and the desktop.
  • Phone: People lists every partner and says the rule in words; Add another partner; the waiting change says how many partners still need to approve.
  • CLI: quitlock partner list, quitlock partner rule, partner remove --partner; --partner (repeatable) and --rule when enrolling.
  • Desktop app: People lists every partner with Remove… for each, says the rule in words and edits it; wherever enough partners could make a change apply at once, Save it for my partners to sign writes the signed file for them first, since sending starts the delay.

18. The desktop app does the rest (2026-12-03)

  • Partners in the desktop app. Found by the owner: the app held the phone’s connection, so a partner could not run quitlock partner join beside it, and the app itself had no way to add a partner. A new People page joins as the partner in person (with a key on that computer, or a new one), writes an invite, joins from one and accepts the reply, removes the partner, adds and removes owner keys, and clears a forgotten phone PIN or password (The desktop app). The phone’s own partner messages now mention the app.
  • Keys in the desktop app: make, restore, show a recovery phrase again, save a copy and import one. Making a key is one widget, shared by Set up, People and joining, and refuses a taken name before anything is typed.
  • Request exit on the Phone page, signed or to approve on the phone; Send a change from a file in Approvals, for a change the partner approved and sent back, which before could only be sent with the CLI.
  • The file browser takes a typed folder and, on Windows, every drive.
  • Fixes: the Settings page lost what was being typed into a list’s field at every read of the phone (every 5 seconds); a bug in a job or while reading the phone ended the connection’s thread and left the window waiting for ever (now it is reported and the connection made again); a background task that stopped on a bug left a spinner for ever; several fields had no name for screen readers.
  • Tests that drive the window: egui_kittest clicks and types through making a key and checking its phrase, restoring one, setup’s first step, showing a phrase, joining from an invite, joining in person, request exit, a refresh while typing, and copying a key out and in; and draws every page in both themes, which fails on a character missing from the fonts or a field with no name.

17. The desktop app (2026-12-02 to 03)

  • quitlock-gui, a desktop app for Windows and Linux (The desktop app): connect in one click (it reconnects by itself), the phone’s state with any countdown or waiting change, a settings editor with a live review of what tightens and what loosens, approvals on the phone and from a file, the history, and the five setup steps. Releases carry it for both systems.
  • One library for both programs. The CLI’s code moved into desktop/: core (quitlock-core) does every operation, cli (quitlock) and gui (quitlock-gui) only ask and show. The CLI’s commands and output are unchanged (Repository).
  • cargo-deny checks the dependencies on every push: advisories, licences, banned crates and sources (Building). Its first run moved curve25519-dalek to 5.1.0 (RUSTSEC-2026-0620, in a part QuitLock never built).
  • Smaller programs: release builds use link-time optimisation and leave out symbols.
  • The USB accessory no longer refuses a fast answer. Found by the owner on the first armed tester build: the phone often answers the sync in the same moment the computer’s write of it reports done, and the program took the not-yet-collected write for one not yet sent (“the sync was answered before it was sent”). The answer carries the sync’s fresh nonce, so the phone had read it; the program now collects the write and goes on. Never seen before because the accessory had not been used on a real phone.
  • Replugging should no longer lose the phone to adb. Found by the owner with the desktop app: after a replug, adb did not show the phone again until adb kill-server. Just after a replug the adb server lists the phone a moment late, and the program then switched the phone to the USB accessory under it. A phone with USB debugging on is now never switched while adb runs; the program waits up to 10 seconds for adb instead, and for a phone adb reports offline for a moment (Connecting).
  • The app cannot trap anyone by failing (When the app fails). Asked for by the owner after the accessory bugs: a fault in a connection now ends only that connection, crashes are recorded (no messages), and a main screen that fails or keeps crashing opens Recovery, also on the icon’s long-press, with the ways out on a screen of its own. Random and damaged input tests cover every parser and the bundle processor.
  • Re-pairing from a file. quitlock enrol --to-file --device-id <ID> makes a re-pair bundle without a connection; the phone shows its ID during a re-pair. Before, a file enrolment always carried a new device ID, which a phone that already had one refused.
  • Setup recommends the owner phone PIN, so Request exit on the phone works without the computer.
  • Desktop app: no more empty boxes. Some marks were missing from the app’s fonts; they are replaced, and a test checks every character the window can show.

16. Own domain, tester builds (2026-12-02)

  • Tester builds (scripts/build.sh apk --tester, package org.quitlock.tester): a release build in every way, signed with the local debug key, plus an override code made on the computer that built it, which removes QuitLock at once. For testing what a release does without dev-build shortcuts in the way (Building).
  • Package ID org.quitlock (dev builds org.quitlock.dev), now that the project owns quitlock.org (Decisions). A phone with an older build must remove it first; quitlock provision --check says so.
  • A security policy (SECURITY.md): report privately through GitHub’s vulnerability reporting; what counts, and what the documented limits leave out.
  • CodeQL: quitlock status was reported as logging sensitive data. It prints only which kind of phone lock each person has (PIN, password, screen lock), never the PIN itself; the helper was renamed to say so.
  • The book and README have a logo, badges, callouts for warnings and a new Tested devices page.

15. Fixes from the first phone test (2026-12-01)

The first armed test on a real phone (Android 13) went badly; these are the fixes. Decisions has the reasons.

  • No more sessions, and no tap. A command plugs in, connects, works and disconnects. The phone answers while it is unlocked, and says so when it is locked. Over adb the CLI wakes the app with a broadcast only the shell can send; over the USB accessory a screenless activity takes the accessory. Connection protocol 2: the phone ends a connection with a BYE that says why.
  • The CLI no longer hangs. It used to wait 5 minutes for Connect to PC. It now answers at once or says what to do: an unauthorised, offline or unpermitted phone stops setup at once, adb calls time out, and only an unlock and Android’s accessory chooser are waited for (a minute each).
  • Allow USB debugging (5 min) replaces Connect with USB debugging, for armed phones on computers without the accessory. New events debug_window_open and debug_window_close; old session entries still show.
  • Setup’s settings reach the phone, or are kept. They are saved to quitlock.toml first, sent, read back and compared. enrol and provision take --config. Running setup again on an enrolled phone sends them as a config change. An unfinished removal no longer wipes a new enrolment (new event removal_abandoned). The phone no longer shows default settings as if they were in force, and status no longer runs a self-check.
  • A short main screen. One setup stage (not set up, almost set up, not armed, armed) drives every message. The screen keeps the state, the settings once they exist, one self-check line, any countdown or approval, and the computer line; People, Checks and apps, History, and Leave or recover are now their own screens.
  • quitlock dash reconnects by itself and reads only new log entries.
  • The DNS filter host is checked before the phone uses it. Setup, config validate, config push and enrol/provision --config try it from the computer (DNS over TLS on port 853, as Android does). Before, a wrong host showed up only when arming failed.
  • quitlock config edit opens the phone’s settings in your editor and sends the change. config pull replaces an existing file after asking; it used to refuse, though setup told you to run it on the file setup wrote.
  • Tested 2026-12-01 by the owner on a Samsung Galaxy S20 FE on Android 13, with a dev build: quitlock setup from start to end, the chosen settings on the phone, arming, the policies in effect, and CLI commands over adb with nothing tapped (quitlock status answered in 0.4 seconds). Not covered there, because a dev build leaves adb on: the USB accessory and Allow USB debugging, which need a release build armed.

14. Review fixes (2026-11-18)

Fixes from a review of the whole project, safety first.

  • What the phone needs is never suspended, whatever the blocklist or install policy: core system apps (Settings, the system UI, the phone and emergency apps, the permission controller, the package installer), and the keyboard, home screen, dialer and SMS app in use when they are system apps or were there at arming. If every app in one of those roles would be suspended, the one in use is kept. The self-check names what was kept. The CLI warns when a blocklist names a well-known one.
  • Removal can no longer get stuck. Teardown tries every step even when one fails. It keeps device owner until all of them have taken, and upkeep finishes a removal left half-done. A Private DNS that will not go back to automatic no longer stops it; the screen names the host instead. After a removal that finished while the app was closed, the screen says so and offers Uninstall. New event: teardown_failed.
  • A failing step no longer stops the background check. Applying a due change, finishing a removal, the self-check and starting an update each run on their own. A failure is shown on the status screen and logged once (upkeep_error). Boot and the periodic job no longer crash the app.
  • Arming is all or nothing. If a step fails after Private DNS was set, every policy applied so far is undone, so a phone is never left restricted while it shows as not armed.
  • Damaged state no longer stops the app. The stored state is read whole, under one lock shared by every writer, and kept in two copies. If both are damaged, each unreadable value is replaced by the strict one and a partner is assumed until a new key is paired; the screen and the log say so. Teardown takes the bundle processor’s lock first, so a bundle cannot save its keys back after a removal.
  • A session that fails while opening is closed at once, rather than left open with adb on until its time limit. Closing a session turns adb off even if logging or stopping the tamper watch fails.
  • The phone no longer claims USB debugging is off when QuitLock leaves it alone. A dev build never controls adb, and neither does an unarmed phone. The arm dialog, the Computer section and the session notification said it was off outside sessions anyway. They now say what is true for that build and state.
  • Builds use --locked again in scripts/build.sh, and say how to fix a lockfile that fell behind Cargo.toml.

13. Usability (2026-11-17)

  • CLI: quitlock setup, a guided first run (key, phone, app, a first config, provisioning), and setup --udev. A new key’s recovery phrase is checked back. Keys are unlocked before a session opens, and typos are asked again. provision gets its APK before changing the phone and enrols over adb. enrol --key is optional; several keys give a menu. “Send it?” before loosening (--yes skips). Questions in every command use arrow-key menus, yes/no toggles and hidden PIN fields that collapse to one line once answered, drawn with crossterm, which the CLI already used; a plain fallback for scripts and NO_COLOR. Clearer errors throughout; --out as an alias of --to-file; the udev rule covers Pixel phones.
  • Phone: Settings (theme, history, keep the screen on, notification settings, the protection in force, saving the history and a status report, About). Config changes proposed on the phone, and Allow for a suspended app. Developer tools in dev builds. The session notification opens the app and has Disconnect.
  • Fixes: the main screen no longer reads the phone’s state on the main thread every second; no crash when work finishes after the screen closes; rotation keeps an arm or approval in progress; buttons are disabled while a phone secret is checked; plain-language refusals; the USB accessory’s session hand-offs (a claimed session that never started, a sync sent twice, a dead CLI blocking the next one).
  • Sessions over the accessory last 15 minutes; with adb, still 5.
  • The package ID is dev.t342.quitlock, under the owner’s domain, in place of the placeholder org.quitlock.app.
  • Docs: this book replaces the build specification, the protocol specification and the docs folder; the README is short and for users.
  • Not run: the device suite and every UI check, because neither emulator image would boot on the development computer.

12. Sessions over the USB accessory (2026-11-17)

Android Open Accessory is the default session transport on Linux, with no adb; adb stays for Windows and as the fallback. A new Connect with USB debugging button turns adb on for one session. The phone’s link stays open between sessions; the CLI finds phones by their USB interfaces and nothing else. Unit-tested on both sides; not yet run on a phone.

11. Release pipeline (2026-11-16)

Signed releases from CI on version tags, SHA256SUMS, provenance attestations, scripts/verify-release.sh to rebuild a release and compare it, the README, the threat model, the uninstall guide and the manual checklist for real phones.

10. Updates, the event log, the tamper watch (2026-11-16)

The session’s tamper watch (a proxy, an install over USB, a released app, cancelled jobs, background restrictions, the battery exemption) ends a session on any of them. A foreground service keeps the app alive during a session; boot and periodic self-checks. QuitLock asks to leave battery optimization before arming.

9. People and approvals (2026-11-15)

Phone PINs and passwords for both people, on QuitLock’s own keypad; the owner may use the screen lock. Waiting changes on the phone, drafts, Request exit on the phone, three ways for a partner to join and to approve, partner_remove, phone_secret_allow, recovery phrases.

8. Partner mode (2026-11-15)

Two signatures for loosening changes, partner sign, plain-language summaries in inspect, replaces in config bundles.

7. Provisioning assistant (2026-11-15)

quitlock provision --check and provision: preflight for accounts, users, profiles and other owners, guided removal, the dpm error messages explained, manufacturer notes.

Between 6 and 7: re-pairing, history, looks (2026-11-15)

“Pair a new key” replaced the keyless exit; the signed exit works in solo mode. The event log, log pull and log verify. The app restyled with a dark theme; colour in the CLI and quitlock dash.

6. App rules (2026-11-15)

Install policies, trusted installers, block and allow lists, browser detection, suspension, a periodic job.

Between 5 and 6: builds and updates (2026-11-15)

scripts/build.sh; update bundles, checked and installed silently after the delay; quitlock update and update --github.

5. Delays (2026-11-14)

The delay engine and its clock rules, pending actions with Cancel, and the keyless exit (later replaced by re-pairing).

4. Config and enforcement (2026-11-14)

Config apply, the user restrictions, Chrome’s managed configuration, teardown, config push and config pull. The INTERNET permission was allowed for the Private DNS call.

3. Sessions and file import (2026-11-14)

Connect to PC over adb, the hello, status, send, enrol; Import bundle from file as the second transport; adb switched off outside sessions.

2. Keys and bundles (2026-11-14)

CLI keys and encrypted key files, bundle creation and signing, inspect; the Kotlin verifier passing the shared vectors.

1. Device owner (2026-11-14)

The admin receiver, device owner on an emulator, the three lifecycle states, the DNS lock, dev-build removal.

0. Scaffold (2026-11-14)

Repository, licence, CI, the protocol specification and the first shared test vectors.