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

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.

Important

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.

Save your browser data too. Browsers QuitLock cannot filter, such as Samsung Internet, Firefox or Opera, cannot be opened once the phone is armed (Browsers). Their data is not deleted, but export any bookmarks, passwords or other data you want from them first. Removing accounts for setup can also stop their sync. Setup names the ones it finds: the desktop app asks you to tick that you have saved what you want, and quitlock setup asks before going on.

In the desktop app

Open the desktop app and choose Set up: the same steps as below, one page each. The rest of this page describes quitlock setup; what it says about the phone applies to both.

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.

  1. What to do: set up your phone, join as someone’s partner, or only check a phone (which changes nothing).
  2. 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.
  3. 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.
  4. The app: the latest release from GitHub, or an APK you downloaded.
  5. 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.toml before anything is done to the phone, so they are not lost if setup stops. See Config for what each one means.
  6. 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. It also names browsers that will be suspended once armed, as a warning that does not stop setup. 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 a supported browser installed (Chrome; see Browsers).
  • Other browsers, including the one that came with the phone (such as Samsung Internet), are suspended once armed unless you add them to browser_allowlist. An allowed one is filtered by DNS only.
  • Then: Everyday use.