Skip to content

v1.0.0

Choose a tag to compare

@shell-ninja shell-ninja released this 28 Sep 16:43
· 23 commits to main since this release

What is this

Blocker is an Android app I built for myself to get off distracting websites, short-form video, and adult content — without being able to wriggle out of it on a bad day.

Everything runs on the phone. There are no servers, no accounts, no telemetry, and no subscription. It works through Android's Accessibility Service, which lets it watch what's on the screen without reading anything into a file or sending it anywhere.


What it blocks

Websites and keywords — Any browser address bar is checked as you type. If you try to open a blocked site, the tab redirects to Google and a small popup tells you why. The same keyword check runs across every app's visible text, so it catches content inside apps too, not only in browsers. Browsers with address-bar coverage: Chrome, Edge, Brave, Firefox, Opera, Samsung Internet, DuckDuckGo, Vivaldi, Kiwi.

Short-form video — YouTube Shorts, Instagram Reels, and Facebook Reels are detected by their screen layout and closed.

Specific apps — You can block any installed app outright. Trying to open it sends you back to the home screen.

Adult domains — The built-in block list ships with 9,355 domains, 60 keywords, and 4 TLDs.


How the lock works

The whole point is that you can't just turn it off the moment you want to. Any change that weakens protection — disabling it, shortening the delay timer, adding a whitelist entry, removing an app block — goes into a pending state and only takes effect after a delay you set yourself (1–30 days, default 24 hours). Changes that make blocking stricter take effect immediately.

Uninstalling the app while protection is on is also blocked via Device Administrator.

The debug build shortens every "day" to one minute so you can test the locking behaviour without actually waiting.


Focus mode

Focus mode locks you to a small list of essential apps (up to five) for a set amount of time. Everything else — including Blocker's own other tabs — gets kicked out. You can set a one-off countdown, recurring daily schedules, or both. Ending focus early or loosening the allowed-apps list goes through the same delay timer as everything else.


Whitelist and scan exemptions

If a legitimate word is getting caught — "adulthood," "sex education," a security app whose own UI mentions blocked terms — you can whitelist a phrase or exempt a specific app from screen scanning. Adding either one requires the delay timer while protection is on.


Files in this release

File What it is
Blocker-release-1.0.0.apk The real build. Timers run for real (1–30 days). Install this for daily use.
Blocker-release-debug-1.0.0.apk Same code, but every "day" is compressed to 1 minute. Use this to test the lock behaviour before committing to the release build.

Install the debug build first. Run through everything in the GUIDE (especially the timer and focus mode tests). When you're satisfied, install the release build over it — your settings carry over.

There is no back door in the release build. That's intentional. Only install it once you're ready.


Permissions the app asks for

  • Accessibility Service — watches the active window and visible text on screen. Nothing is stored or sent.
  • Display over other apps — used only to show the brief "blocked" notification banner (5 seconds, then it disappears).
  • Device Administrator — prevents uninstalling the app while protection is active.
  • Usage access — lets the app know which app is currently in the foreground, used for app blocking and focus mode.

Password fields are never read. Screen content is checked locally and never leaves the device.


Permissions the app does NOT have

No internet permission. No access to contacts, camera, microphone, location, storage, or any other sensitive API. The APK is self-contained.


Building it yourself

The source is included in the repo. If you're on Linux:

git clone https://github.com/shell-ninja/Blocker-App
cd Blocker-App
./build_apk.sh release

The script checks and installs its own dependencies (Java 17, Node, Android SDK). On a fresh machine the first run takes 20–45 minutes and downloads roughly 3–5 GB. Rebuilds after that take a minute or two. See GUIDE.md for the full walkthrough.


Known limits

  • Android only. Tested on Android 12–14.
  • Screen monitoring only reads text Android exposes through accessibility APIs — not text inside images, video frames, or apps that draw their own canvas (most games, banking apps).
  • The Device Administrator API cannot fully veto its own deactivation once a user reaches the confirmation dialog. This is a known Android limitation across all apps using this API. Device Owner mode would prevent it but isn't available to a normally installed app.
  • Some OEM battery optimisations (Xiaomi, Oppo, Samsung) kill background services. Fix: Settings → Battery → Blocker → Unrestricted.

Changelog (v1.0.0)

This is the first public release. The main things that landed in this build:

  • Multiple named daily schedules in focus mode, each with its own 12-hour clock-dial picker and on/off switch
  • Delay timer now applies to whitelist additions and scan exemptions, not only to protection on/off
  • Device admin screen is now blocked directly by activity class, not by on-screen text, making it harder to reach the deactivation dialog
  • Launcher and system UI fully excluded from screen scanning — this was the main cause of false positives showing "blocked" for words appearing in home screen widgets
  • Repeat-popup loop fixed: a short cooldown per app prevents a static piece of blocked text from continuously re-triggering the overlay
  • Screen monitoring is always on — the setting toggle for it is removed since it's not optional
  • "adult" removed from the keyword list — it was matching "adulthood," "adult education," and similar
  • Focus mode countdown no longer drifts after timer changes; the screen polls every 2 seconds while focus is active
  • Confirmation dialogs use the app's own theme instead of the system's grey dialog
  • App icon is no longer masked or reshaped by the adaptive icon layer
  • Version number shown at the bottom of Settings (Blocker 1.0.0 (build N))

Important

Google Play Store might not let you to install the apk. Just disable it for a while, install the apk and enable Google Play Store again.