Setting up a phone
Android lets an app become device owner, which QuitLock needs, only on a phone with no accounts and no other users or profiles (a work profile, Samsung’s Secure Folder, a guest). Setup removes users and profiles, after asking, and has you remove accounts by hand; you sign back in to your accounts afterwards.
Before you start: make sure you can sign back in to every account on the phone: its password, and a backup code or a second device for two-step verification. The contents of extra users and profiles are lost.
With quitlock setup
quitlock setup
It asks one question at a time and says what it is about to do before doing it. Menus are answered with the arrow keys and Enter (or the option’s number), yes-or-no questions with y or n; Ctrl-C or Esc stops at any question. With NO_COLOR set, or when the CLI is not in a terminal, every command asks plainly instead: numbered menus and typed answers.
- What to do: set up your phone, join as someone’s partner, or only check a phone (which changes nothing).
- Your key. Changes to the phone are signed with a key kept on your computer, locked by a PIN or a password. Choose a key you have, create one, or restore one from its recovery phrase. A new key shows its 24-word recovery phrase once; write it down. Setup then asks for three of the words to check your copy.
- The phone. Turn on USB debugging (Settings, About phone: tap Build number seven times; then Settings, System, Developer options: USB debugging) and plug the phone in. When it asks “Allow USB debugging?”, tick “Always allow from this computer”. On Linux, setup checks that you may open the phone over USB and offers the udev rule if not.
- The app: the latest release from GitHub, or an APK you downloaded.
- Settings: the recommended ones, or adjust the delay, the DNS filter, which new apps may run and the block lists. Setup checks that the DNS filter answers DNS over TLS, since arming fails if it does not. They are saved as
quitlock.tomlbefore anything is done to the phone, so they are not lost if setup stops. See Config for what each one means. - Set up the phone. QuitLock checks the phone and helps clear what stops setup, installs the app, makes it device owner and enrols your key with your settings. It then reads the settings back from the phone and checks they are the ones you chose.
If setup stops partway, run it again, or send the saved settings with quitlock enrol --config quitlock.toml. Running setup again on a phone your key is already enrolled on sends the settings as an ordinary config change: tightening applies at once; loosening waits out the delay once armed.
Nothing is enforced yet. When you are ready, open QuitLock on the phone and tap Arm. Before arming, the phone asks whether QuitLock may ignore battery optimization: allow it, so Android cannot hold back the checks that turn USB debugging off again.
By hand
quitlock key new owner # make your key; write down its recovery phrase
quitlock provision --check # what stops this phone being set up; changes nothing
quitlock provision --github # or: quitlock provision <apk>
provision --check lists what is in the way: accounts by type only (never their names), users and profiles, another device owner, an Android older than 10, and notes for Samsung, Xiaomi and OnePlus phones. provision then walks through it: it asks before removing each user or profile, opens the accounts screen for you to remove accounts, checks the APK, installs it, makes it device owner and enrols your key with the default config, or with --config <file> your own settings. If Android still refuses, the CLI says what the message means and shows Android’s own words. If you have several keys, add --key <name>.
Afterwards
- Sign back in to your accounts.
- Arm on the phone when you are ready. The phone must be online, and Chrome installed.
- Uninstall other browsers before arming, or blocklist them: apps already installed when you arm are left alone.
- Then: Everyday use.