Current Version:
v1.0.7| Platform: Android 8.0+ (API 26+) | License: Open Source
A privacy-focused, zero-telemetry Android distraction and content blocker built with Pure Kotlin, Jetpack Compose, a native C++ matching engine, and Android Accessibility Services.
Important
Recommendation: Install the Debug Version First!
We strongly recommend installing and testing the Debug version (Blocker-debug-1.0.7.apk) before installing the Release build.
- Test with 3-Second Timers: The Debug build uses short 3-second unlock delay timers, allowing you to freely explore, configure your custom blocklists, test focus schedules, and adjust settings without risk of accidentally locking yourself out.
- Upgrade When Ready: Once you have thoroughly tested the app and confirmed everything suits your exact needs, proceed to install the Release version (
Blocker-release-1.0.7.apk), which enforces real 1 to 30 day / 24-hour covenant delayed-unlock timers with strict anti-tamper security and no backdoors.
Warning
Play Protect Warning During Installation
Because Blocker is an open-source, sideloaded app that utilizes Android Accessibility Services and Device Administrator permissions for tamper resistance, Google Play Protect may warn or block installation:
- Quick Install: On the prompt, tap "More details" -> "Install anyway".
- If Blocked: Temporarily disable Play Protect during installation:
- Open Google Play Store -> tap your Profile Icon (top right) -> select Play Protect.
- Tap the Settings gear in the top right corner.
- Turn off "Scan apps with Play Protect".
- Install Blocker, then you can turn Play Protect back on once installation finishes.
Blocker runs entirely on-device: no remote DNS, no tracking servers, no telemetry, and no account required. It blocks distracting websites, full-screen short-form video players (YouTube Shorts, Instagram Reels, Facebook Reels), and adult domains across browsers and apps.
- Opt-in 10-Minute Temporary Accessibility Pause (Banking App Compatibility & Tamper Shield):
- Permission Setup Opt-In & Seamless Upgrade Migration: Added an optional toggle during initial setup ("Temporary Accessibility Pause") to allow users to enable a 10-minute accessibility pause for banking applications that flag active accessibility services. Defaults to OFF; when OFF, the feature remains completely hidden from Settings. Existing users upgrading to v1.0.7 receive an automatic one-time 3D migration prompt on HomeScreen to choose whether to enable the option or keep it permanently hidden.
- Strict 10-Minute Timer & Real-Time Countdown: In Settings, users who opted in can trigger a 10-minute temporary accessibility pause with an active countdown display.
- Uncompromising Settings & Uninstall Shield: While Accessibility is paused, a foreground guard service (
AccessibilityPauseGuardService) runs with 100ms usage tracking, completely locking access to System Settings, PackageInstaller, Google Play Store, and OEM Security apps with touch-blocking overlays and instant Home redirects. - Device Administrator Protection: Intercepts deactivation requests while paused to prevent uninstall bypasses.
- Automatic & Mandatory Re-Enable: At the exact 10-minute mark,
AccessibilityPauseExpiryReceiverautomatically restores accessibility (ifWRITE_SECURE_SETTINGSis granted) or displays a persistent, unclosable re-enable prompt until Blocker Accessibility is reconnected.
- Bulletproof OEM & Custom Home Launcher Protection (
SystemExemptions.kt&FocusEnforcer.kt):- Resolved an issue where Focus Mode app blocking incorrectly blocked OEM home launchers (including Infinix/Transsion's
com.transsion.XOSLauncher, HiOS, HyperOS, OneUI, Pixel launcher, and 3rd-party launchers like Lawnchair and Nova). - Built a centralized single-source-of-truth system exemptions engine (
SystemExemptions.isNeverBlockPackage):- Added API-33-safe
PackageManager.queryIntentActivities&resolveActivityusingResolveInfoFlags.of(PackageManager.MATCH_ALL.toLong()). - Added runtime cached per-package
CATEGORY_HOMEprobing (ConcurrentHashMap<String, Boolean>) to automatically identify any launcher installed on the device. - Normalized all package evaluations to lowercase (
Locale.ROOT) to eliminate case-sensitive comparison bugs on OEM packages (com.transsion.XOSLauncher). - Added built-in recognition for Transsion companion system services (
smartpanel,magiclauncher,desktop,zerohome,minusone,hiassistant,aivoiceassistant, etc.). - Hardened the final execution sink gate with
SystemExemptions.isNeverBlockPackage(context, pkg)to make accidental launcher blocking architecturally impossible.
- Added API-33-safe
- Eliminated stale
UsageStatsManagerfallback false blocks followingGLOBAL_ACTION_HOME:- Checks visible
TYPE_APPLICATIONwindows inAccessibilityService.windowsfor active launchers before falling back to usage stats. - Enforces a 1,200ms grace period (
lastFocusHomeKickElapsedMs) after kicking out an unallowed app so Focus Mode does not re-trigger during the Home transition animation. - Dynamic package-change
BroadcastReceiverautomatically clears probe caches and refreshes launcher definitions on package installs, updates, or removals.
- Checks visible
- Resolved an issue where Focus Mode app blocking incorrectly blocked OEM home launchers (including Infinix/Transsion's
- Litho-Aware Facebook Video & Reels Guard (Zero Newsfeed Refresh Loops):
- Overhauled Facebook distraction detection in
FacebookReelsDetector.ktusing reverse-order Litho accessibility tree traversal (childCount - 1 downTo 0, cap 350 nodes) to detect full-screen Reels and playing videos without traversing deep horizontal feed posts. - Prioritized detection pipeline:
- Facebook Stories 100% Whitelisted: Story trays and viewers (
"story","stories","'s story","add to story","your story",StoryViewer) are verified first and guaranteed uninterrupted. - Dedicated Full-Screen Reels: Verified by right-edge vertical action button stacks (
abs(dx) <= 52dp,abs(dy) >= 36dp), top overlay controls, and bottom comment bars. - Watch / Video Tabs: Verified by top-bar tab navigation in the top 24% of the screen.
- Facebook Stories 100% Whitelisted: Story trays and viewers (
- Non-looping inline pause: Pauses playing videos within the main Newsfeed without firing
GLOBAL_ACTION_BACK, completely stopping feed reload loops, screen freezes, and duplicate overlays. - Single-back and delayed escalation for dedicated full-screen video players with 1,500ms debounce and 1,300ms auto-dismissing HUD banner.
- Zero fallback to native C++ engine on Facebook packages, preventing false-positive triggers from feed timestamps and seekbars.
- Overhauled Facebook distraction detection in
- High-Craft UI Polish & Interaction Design:
- Standardized 3D card geometry across the app:
Elevated3DCardandHero3DCardupdated withRoundedCornerShape(22.dp), 1px beveled specular rim gradient, and balanced ambient/spot drop shadows (0xFF7C3AED45% /Color.Black35%). StandardizedRecessed3DWellwithRoundedCornerShape(14.dp). - Floating Cyber Bottom Dock upgraded with
Modifier.navigationBarsPadding()for edge-to-edge system navigation bars, animated tab pill width (40.dpto48.dp), and animated icon/label tint transitions (tween(180)). - Smooth Compose tab crossfades: Wrapped root navigation switcher in
Crossfade(animationSpec = tween(180))for seamless screen transitions. - Standardized
StatusPillBadgetypography with11.5.sp,FontWeight.SemiBold, subtle glowing status dot, and tabular numbers (tnum). - Refined
QuickShieldRowon the Home screen with42.dpsquircle pedestals,20.dpicons,12.dpspacing, and balanced subtitle line heights.
- Standardized 3D card geometry across the app:
- Clean Monotonic Upgrade Pipeline:
- Standardized APK deliverables:
Blocker-debug-1.0.7.apkandBlocker-release-1.0.7.apk(clean naming without-vprefix, stored inapk/for release uploads). - Monotonic
versionCodeprogression (1007140debug /1107140release,versionName = "1.0.7") ensuring smooth in-place upgrades.
- Standardized APK deliverables:
- Pomodoro Study Mode (Full Phone Lockdown): Seamlessly integrated into the Focus page with a segmented switcher.
- Customizable Cycles: Set study focus intervals (15m to 180m), rest breaks (3m to 15m), and session rounds (1 to 6).
- Aggressive Phone Lockdown: All apps, home launcher, settings, and navigation are blocked during study sessions, returning directly to the running study timer within milliseconds.
- Quick Settings & Status Bar Shield: Automatically collapses notification shade pulls (
StatusBarManager.collapsePanels()), preventing unauthorized toggling of Wi-Fi, mobile data, or airplane mode. - Complete Silencing & Do Not Disturb: Automatically activates Do Not Disturb (
INTERRUPTION_FILTER_NONE) and zeroes ringtone, media, notification, and system volume streams, cleanly restoring prior volumes upon completion. - Interactive Wi-Fi Controls: Monitor Wi-Fi status and toggle network connectivity on demand directly within Blocker without breaking lockdown.
- Display Standby Friendly: Safely turn off the screen using the physical power button; unlocking returns straight to the active timer.
- Emergency Safeguard: Dialer and emergency telecom services are explicitly whitelisted for critical safety.
- Anti-Tamper & Clock Manipulation Defense:
- Date & Time Tamper Shield: Dual-layer protection (instant window interception + continuous screen text scanner) prevents users from manipulating device date/time in Android Settings to prematurely expire delayed unlock timers.
- System Settings Guard: Strictly blocks access to Developer Options, Device Administrator settings, and App Info / Force Stop / Uninstall screens.
- Debugging Lockdown: Automatically detects and disables USB and Wireless debugging if enabled.
- Hardened Content & Distraction Shields:
- URL User-Info Domain Spoofing Defense: Hardened domain extraction parser (
hostOf) strips user credentials (user@host) and decodes percent-encoded characters, eliminating bypasses likehttps://safe.org@blocked-domain.com. - Granular Distraction Shields: Independent toggles for YouTube Shorts, Instagram Reels, and Facebook Reels without breaking main app feeds.
- Offline Content Database: Fast, local, obfuscated adult domain database with custom domain blocklists and keyword whitelisting.
- URL User-Info Domain Spoofing Defense: Hardened domain extraction parser (
- In-App Updater & Security Verification:
- Automated Update Checks: Checks for official GitHub releases on an active 2-hour cycle (with 24-hour backoff if an update is pending) with in-app changelog viewer and direct APK installer.
- Package Identity Verification: Enforces strict package name validation (
pi.packageName == rc.packageName) before invoking Android package installer on downloaded APKs. - URL Sanitization: Release links are strictly validated against official GitHub repositories.
- Automatic Storage Cleanup: Purges cached APK files immediately upon successful installation.
- Delayed Unlock Timers: Any attempt to weaken protections, unblock apps, or shorten timers requires waiting out an unbreakable delay of 24 hours to 30 days.
Blocker/
├── source/ # Source files (working directory)
│ ├── App.tsx # Main entry point and bottom tab navigation
│ ├── android/ # Native Kotlin code
│ │ ├── AccessibilityService.kt # System-wide window tracker & content interceptor
│ │ ├── BlockerNativeModule.kt # React Native bridge, delay locks & APK updater
│ │ ├── DeviceAdmin.kt # Device Administrator receiver
│ ├── src/ # React Native UI & Business logic
│ │ ├── screens/ # Screens (HomeScreen, AppBlockerScreen, BlocklistScreen, FocusScreen, SettingsScreen, UpdateModal)
│ │ ├── services/ # State management (ProtectionManager, BlocklistEngine, UpdateService)
│ │ ├── hooks/ # Reactive hooks (useProtection, useAppUpdate)
│ │ ├── native/ # TypeScript bridge definitions (BlockerNative)
│ │ └── data/ # Static data (appVersion, categories, userLists)
├── blocklists/ # Blocklist source files
│ ├── block-list.md # Obfuscated adult domain, keyword, and TLD database
│ ├── my_list.txt # Plaintext user additions (1 per line)
│ └── whitelist.txt # Plaintext whitelist entries (1 per line)
├── assets/ # App icon source artwork (app-icon-source.png)
├── build_apk.sh # Main automated build script
├── 05_install_on_phone.sh # ADB install script for connected device
├── import_lists.py # Blocklist parser & userLists generator
├── patch_android.py # Copies source into React Native project and patches Android files
├── set_version.py # Auto-increments version and build numbers
└── env.sh # Environment variables (Android SDK, Java paths)
Building Blocker requires:
- Operating System: Linux (Arch Linux recommended; Debian/Ubuntu supported with equivalent packages)
- Java Development Kit: JDK 17 (OpenJDK 17)
- Node.js: Node.js LTS (v18 or v20) and
npm - Android SDK & Build Tools:
- Android SDK Platform 34 (
platforms;android-34) - Build Tools 34.0.0 (
build-tools;34.0.0) - NDK 25.1.8937393 (
ndk;25.1.8937393) - CMake 3.22.1 (
cmake;3.22.1) - Android Command-Line Tools (
cmdline-tools;latest) - Android Platform Tools (
adb)
- Android SDK Platform 34 (
- Python: Python 3.8+ with standard library (used by build helper scripts)
- System Utilities:
git,unzip,bash
sudo pacman -S --needed jdk17-openjdk nodejs npm android-tools unzip git python
sudo archlinux-java set java-17-openjdksudo apt update
sudo apt install -y openjdk-17-jdk nodejs npm adb unzip git python3
sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/javaThe primary build pipeline is controlled by build_apk.sh.
Ensure env.sh points to your installed Android SDK and Java 17 locations:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export ANDROID_HOME="$HERE/Android/Sdk"
export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="$JAVA_HOME/bin:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH"If you do not have the Android SDK command-line tools yet, place commandlinetools-linux-*_latest.zip directly in the Blocker-App directory (or ~/Downloads). You can also place android-ndk-r25b-linux.zip and gradle-8.3-all.zip in Blocker-App to skip large downloads over the network. The build script automatically detects and sets them up.
./build_apk.sh debug- Uses 3-second delay timers for protection unlocks so you do not get locked out while testing.
- Automatically imports blocklists, increments the build number, patches Android project files, and compiles.
- Outputs the binary to:
apk/Blocker-debug-1.0.7.apk.
./build_apk.sh release- Enforces real 24-hour / 1 to 30 day delayed-unlock timers.
- Strict anti-tamper security: settings changes cannot be bypassed without waiting the full duration.
- Outputs the binaries to:
apk/Blocker-release-1.0.7.apkandapk/Blocker-debug-1.0.7.apk.
- Copy or download the compiled APK to your Android device.
- Open the file to start installation.
- If Google Play Protect blocks the install:
- Tap "More details" -> "Install anyway".
- If blocked completely, open Google Play Store -> tap your Profile (top right) -> Play Protect -> tap Settings -> temporarily turn off "Scan apps with Play Protect" while installing. You can turn it back on after installation.
All application development takes place under the source/ folder:
- UI Screens: Edit
source/src/screens/(HomeScreen.tsx,SettingsScreen.tsx,FocusScreen.tsx,UpdateModal.tsx, etc.). - Component Styling: Edit
source/src/ui.tsxfor shared components, colors, and design system. - Native Android Interception: Edit
source/android/AccessibilityService.ktto modify window state detection, URL bar checking, or anti-tamper logic. - Native Modules & Updater: Edit
source/android/BlockerNativeModule.ktto modify Kotlin methods exposed to React Native.
Important: Do not edit directly inside project/ (or $BLOCKER_DIR) - that directory is the build target. Always edit inside source/. The build script copies files from source/ into project/ (or $BLOCKER_DIR) automatically during the build process.
To manually sync changes from source/ into the build target without a full rebuild:
python3 patch_android.py ~/Blocker source- Custom Additions: Open
blocklists/my_list.txtand add one domain or keyword per line. - Whitelist Items: Open
blocklists/whitelist.txtand add entries (e.g., words likecameraoressexthat contain false-positive substrings). - After updating text lists, regenerate the TypeScript database:
python3 import_lists.py
- Replace
assets/app-icon-source.pngwith your desired PNG image (recommended 1024x1024). - Regenerate all Android mipmap icon resolutions:
python3 generate_icons.py python3 embed_icon.py
Once installed on a physical device, Blocker requires the following permissions to provide full protection:
- Accessibility Service: Required to inspect active window activities, detect open URL bars in web browsers, scan text for blocked keywords, detect short-form video players (YouTube Shorts, Reels), and enforce Study Mode phone lockdown.
- Display Over Other Apps (Overlay): Used to display the non-intrusive blocked notification banner and reminder screen.
- Usage Access (Package Usage Stats): Required to calculate daily per-app usage time and enforce daily app limits.
- Device Administrator: Prevents immediate uninstallation while Protection Mode is active.
- (Optional) Do Not Disturb (Notification Policy Access): Allows Pomodoro Study Mode to automatically suppress all notifications, alerts, and ringtones during focus sessions.
- (Optional) Write Secure Settings: Allows Blocker to automatically and instantly turn off USB & Wireless debugging if enabled (
adb shell pm grant com.blocker android.permission.WRITE_SECURE_SETTINGS).
For complete release notes, changelogs, and historical version details, see RELEASE_NOTES.md.
- Developer: Shell Ninja









