Optional ยท Power Feature

Warden Mode

OS-level enforcement, summoned once, honored by Android itself.

Most blockers are apps asking other apps to behave. Warden Mode promotes Focus Pocus to Android's device owner โ€” the same management role IT departments use for company phones โ€” so blocking is enforced by the operating system, and the blocker itself can't be uninstalled on impulse.

One-time setup, ~10 minutes Needs a computer with adb No root, fully reversible
The Problem

Why the Warden exists

Every app blocker on Android โ€” Focus Pocus included โ€” normally works the same way: an accessibility service watches which app is in the foreground and steps in when a blocked one appears. It works well. But it has two honest weaknesses.

The race

The blocked app opens first, then the blocker redirects you away. It's one app policing another โ€” it nearly always wins, but you may still glimpse a split-second flash of your feed, and "nearly always" is a promise, not a law.

The loophole

Any blocker can be uninstalled in under a minute. When the craving argues louder than the plan, the whole setup is only as strong as your weakest moment. Future-you knows exactly where the exit is.

Warden Mode closes both โ€” by handing enforcement to the operating system itself.

The Powers

What changes when the Warden watches

Apps are suspended, not just watched

During a focus session, every blocked app is suspended: its launcher icon greys out, and tapping it gets a system notice instead of the app. It never launches, so there's nothing to race. Banish (blacklist) enchantments suspend the listed apps; Shield (whitelist) enchantments suspend everything launchable outside the list.

The blocker can't be removed

While Focus Pocus holds device-owner status, Android refuses to uninstall it โ€” from the launcher, from Settings, from the Play Store. Undoing your setup takes a deliberate ritual, not a weak moment.

Breaks behave

Starting a break lifts every suspension instantly; ending it brings them back. Dispel the session and everything returns to normal. The Warden enforces the spell โ€” it doesn't change what the spell says.

Earned unlocks are honored

Satisfied a Conditional Unlock by putting in your productive time? Apps freed by it aren't suspended. And your launcher, keyboard, and core system apps are never touched โ€” nor is Focus Pocus itself.

The division of labor

Warden Mode doesn't replace the accessibility service โ€” it takes over the one job where OS-level muscle matters and layers on top of the rest.

What Enforced by How
App blocking during sessions The Warden OS-level suspension โ€” greyed icons, refused launches. The accessibility service stays on as a fallback layer.
Uninstalling Focus Pocus The Warden Blocked entirely while Warden Mode is active.
Wards โ€” daily & session time limits Accessibility service Usage tracking, cooldowns, and escalating friction.
Pacts (blocked by default) Accessibility service The pact screen, anti-reflex pause, and seals.
Session & break timers Background service Wall-clock timestamps, so timers end on time even after reboots.
Under the Hood

The technicalities

Device owner, in plain terms

"Device owner" is Android's highest device-management role, built for company-managed phones and part of Android since Lollipop. A device can have exactly one owner, and Android only grants the role on a device with no signed-in accounts and no extra users โ€” which is why setup involves a computer and a one-time adb command rather than a friendly toggle. That awkwardness is deliberate, and it's Android's doing: a role this powerful shouldn't be grantable by a tap.

It is not root. Nothing is flashed, patched, or modified โ€” it's a standard, supported Android mechanism, and removing it returns the phone to exactly how it was.

Exactly two powers used

Device owners can do a lot. Focus Pocus registers FocusDeviceAdminReceiver as its admin component and uses the role for precisely two things:

  • DevicePolicyManager.setPackagesSuspended() โ€” suspends blocked apps for the duration of a session. This is the same system mechanism Android's own Digital Wellbeing uses to pause apps.
  • DevicePolicyManager.setUninstallBlocked() โ€” pins Focus Pocus itself in place. Device-owner apps can't be uninstalled anyway; the explicit flag covers the edge cases.
  • No remote administration, no policy pushes, no monitoring, no data access. There is no server side to Warden Mode at all โ€” every decision is made on your phone, by code you can read.

A reconciling loop, not a switch

Focus Pocus continuously computes the set of packages that should be suspended right now โ€” session active? on a break? which enchantments are cast? any conditional unlocks satisfied? โ€” minus the permanent exemptions (itself, launchers, keyboards, system UI). That desired set is diffed against what's actually applied on every session transition and once a minute from the background service.

Because the sync is an idempotent diff, the system converges to the correct state after anything: a crash, a reboot, even installing a new app mid-session โ€” with auto-banish on, a freshly installed distraction greys out within the minute.

The Warden answers to you alone

Warden Mode adds no data collection and phones home to no one. The entire enforcement layer is open source โ€” read it in DeviceOwnerManager.kt โ€” and the privacy policy covers it explicitly.

What you'll need

  • Android 10 or newer โ€” the app's minimum requirement anyway.
  • A computer with adb (the Android debug tool) and a USB cable.
  • USB debugging enabled in Developer options.
  • Zero accounts on the phone during provisioning โ€” every account can be re-added the moment setup is done.
  • No extra users or work profiles at provisioning time.
  • Already-managed devices won't qualify โ€” a phone with a work profile, corporate MDM, or another device owner can't take a second one.
  • No root required โ€” and none used.
The Summoning

Set it up in four steps

The same steps live in the app under Settings โ†’ Warden Mode, with tap-to-copy commands. Budget ten minutes the first time.

Banish your accounts โ€” temporarily

Android refuses to crown a device owner while any account is registered. Remove them all under Settings โ†’ Passwords & accounts.

Every account comes back as soon as setup is done โ€” nothing is lost. If the command in step 3 still complains about accounts, some apps register hidden ones; see troubleshooting.

Open the channel

Enable Developer options (tap Build number seven times in Settings โ†’ About phone), switch on USB debugging, and connect the phone to your computer. Confirm the handshake:

adb devices

Your phone should appear with device next to it. If it says unauthorized, accept the debugging prompt on the phone's screen.

Speak the incantation

One command grants Focus Pocus the device-owner role:

adb shell dpm set-device-owner com.infinicada.focuspocus/.FocusDeviceAdminReceiver

A successful summoning answers with:

Success: Device owner set to package com.infinicada.focuspocus

Confirm, enable, restore

Back on the phone: Settings โ†’ Warden Mode โ†’ "I ran the command โ€” check status". Once the app confirms the Warden is in place, switch on Grey Out Blocked Apps to enable OS-level suspension.

Now re-add your accounts and reinstall anything you removed. The no-accounts rule only applies at the moment of provisioning โ€” normal life resumes immediately after.

When the Ritual Fizzles

Troubleshooting

"There are already some accounts on the device"

The classic. Apps like Instagram, WhatsApp, and Signal register accounts of their own, and OEM accounts (Samsung, Xiaomi, โ€ฆ) live outside the Google list โ€” none of which appear in Settings. List everything that's really there:

adb shell dumpsys account

Each Account {name=โ€ฆ, type=โ€ฆ} line names the app that owns it in its type. Uninstall that app (or clear its storage), then check for extra users and work profiles โ€” they count too:

adb shell pm list users

Remove stragglers with adb shell pm remove-user <id>, reboot, and run the summoning command again. As a true last resort, a factory reset with every sign-in step skipped gives a guaranteed-clean slate.

Nothing is lost permanently

Once Warden Mode is active, reinstall every app and sign back in to everything. The clean-device requirement exists only at the moment the role is granted.

"No devices found" or "unauthorized"

Check the cable (some are charge-only), confirm USB debugging is on, and watch the phone's screen for the authorization prompt when you plug in. If adb is being stubborn, adb kill-server followed by adb devices forces a fresh handshake.

Building from source? Beware test-only installs

Apps deployed with Android Studio's Run button are flagged test-only, and Android deliberately allows removing a test-only device owner โ€” so uninstall protection does not hold in that setup. Install a normal build instead (./gradlew assembleDebug, then adb install app/build/outputs/apk/debug/app-debug.apk). The app detects a test-only install and shows a warning in Settings โ†’ Warden Mode. Beta builds installed from the Play Store are never test-only, so this doesn't affect testers.

The Dispelling

Turning it off

Warden Mode is a commitment, not a trap. Settings โ†’ Warden Mode โ†’ Remove Warden Mode lifts every suspension, unblocks uninstall, and hands the device-owner role back โ€” the app becomes as ordinary and uninstallable as any other.

Two things are true by design: removal is refused while a focus session is running, and system settings can't strip a device owner from the outside โ€” the only doors are the app's own removal flow or a factory reset. Getting protection back afterwards means performing the adb ritual again. That friction is the feature: quitting is always possible, but never impulsive.

Common Questions

FAQ

Is this rooting my phone?
No. Device owner is a standard, supported Android role โ€” the mechanism behind every corporate-managed phone. Nothing about the system is modified, and removing the role restores the phone to exactly its previous state.
Does this give Infinicada control over my device?
No. There is no remote administration and no server component โ€” the role is exercised entirely on-device, for exactly two purposes: suspending blocked apps and blocking the app's own uninstall. The code is open source, so you don't have to take that on faith: see DeviceOwnerManager.kt.
Will I lose my accounts or data?
No. Accounts are removed only for the moment of provisioning and re-added immediately after. App data on the device is untouched โ€” except for apps you chose to uninstall while hunting hidden accounts, which you reinstall and sign back into afterwards.
What if I genuinely need a blocked app mid-session?
The same escape hatches as always: breaks lift every suspension for their duration, and the Emergency Stop (on its weeks-long cooldown) still works. What you can't do is uninstall the blocker or strip its powers mid-session โ€” that's the point.
Why is the setup so awkward?
Because Android makes it awkward on purpose. Device owner is powerful enough that the platform only grants it over adb, on a device with no accounts โ€” so it can never be acquired sneakily. Warden Mode inherits that ceremony, and honestly, a little ceremony suits a summoning.

Ready to let the Warden hold the keys?

Warden Mode is optional โ€” everything else in Focus Pocus works without it. But if your resolve keeps losing to your reflexes, give the keys to someone who won't hand them back mid-craving.