CoreDPC Setup Guide: OS-Level Android Locking Without Root
Last Updated: November 2026 · License: Open Source (Apache 2.0)
If you have tried standard Play Store blockers, you already know how easily they break: OEM battery savers silently kill Accessibility Services, and in a weak moment anyone can Force Stop, Clear Storage, uninstall the app, or reboot into Safe Mode.
CoreDPC solves this at the operating-system level without root. Built on native Android Enterprise and TestDPC (DevicePolicyManager) APIs, CoreDPC runs as your phone's Device Owner (DO)—enforcing tamper-resistant policies that Android itself refuses to let you bypass impulsively.
- Source Code & Releases: GitLab Repository (
blockerguy/coredpc) - Latest APK & Installer Scripts: GitLab Releases
Play Store Blockers vs. CoreDPC (Device Owner)
| Bypass Attempt | Standard Play Store Blocker | CoreDPC (Device Owner) |
|---|---|---|
| Uninstall App | 2 taps in Settings | Blocked at OS level |
| Force Stop / Clear Data | Allowed in App Info | Disabled & protected |
| Kill Accessibility Service | OEM battery savers or user toggle | Restored in <5ms (via WRITE_SECURE_SETTINGS) |
| Boot into Safe Mode | Disables 3rd-party blockers | Safe Mode blocked |
| Turn Off Private DNS | Allowed in Network Settings | Locked + synchronized with Browser DoH |
| Remove Rules Impulsively | Instant delete | Asymmetric Cooldown Delay (5m–48h) |
Key Features at a Glance
1. Asymmetric Cooldown Delay Shield
- Instant Tightening: Adding blocked domains, enforcing SafeSearch, enabling DNS filtering, or increasing your delay takes effect immediately.
- Delayed Loosening: Weakening protections or lowering your delay requires waiting out your configured Cooldown Delay (
5m,15m,1h,6h,12h,24h, or48h). Once the timer finishes, you get a 30-minute confirmation window to apply the change before it expires automatically. - Two-Tier Delay Floor: Keep everyday adjustments fast (e.g.,
0mor5m) while locking critical layers (Built-in Filter Pack, Unified DNS, SafeSearch, Accessibility Guard) behind a longer minimum floor. - Optional Emergency Override: Rely purely on the cooldown timer, or set a SHA-256 hashed backup passcode stored in a time-delayed vault (such as
lockbox.pluckeye.net) or with a trusted accountability partner.
2. Unified DNS Filtering (System DoT + Browser DoH)
- Synchronizes Android System Private DNS (DNS-over-TLS across all apps) with Browser Secure DNS (DNS-over-HTTPS across Chrome, Edge, Brave, Cromite, and WebViews).
- Built-in Presets: CleanBrowsing Family, CleanBrowsing Adult, AdGuard Family, Cloudflare
1.1.1.3Family, Mullvad Family, Control D Family, or any custom resolver (such as NextDNS). - Captive Portal Sign-In Assist: Uses hardware-verified
ConnectivityManagerchecks so public Wi-Fi login pages only open when genuinely needed—and immediately re-locks DNS as soon as internet access validates.
3. 22,300+ Rule Content, Keyword & Audit Scanner
- O(1) Built-in Filter Pack: 22,300+ adult domains, performer names, web proxies, AI-NSFW tools, and anonymous social viewers—usable as URL-only blocks or on-screen keyword blocks.
- Word-Boundary Scanner: Matches on strict word boundaries with safe-dictionary filtering so normal English words and Android UI labels are not falsely blocked.
- Blocked Events Audit Log: Tap the Log button in the top Action Bar to inspect keyword, website, browser policy (
ERR_BLOCKED_BY_ADMINISTRATOR), and DNS (NXDOMAIN) blocks.
4. Browser & System WebView Hardening
- Multi-Engine SafeSearch: Enforces SafeSearch and blocks SafeSearch-Off parameters on Google, Bing, DuckDuckGo, Brave Search, Yahoo, Ecosia, and Qwant.
- Search Engine Control: Block 720+ proxy/alternative search engines or restrict search to approved engines only.
- YouTube & Incognito Locks: Enforces Moderate or Strict YouTube Restricted Mode, disables Incognito/InPrivate tabs, and blocks clearing browser history.
- Forced Edge Extensions: Silently installs and locks uBlock Origin, Plucky Lite, Blocksi, AdGuard, and BlockSite in Microsoft Edge.
- In-App WebView Protection: Injects URL blocks and SafeSearch into embedded mini-browsers or auto-closes mini-browsers inside selected apps.
5. Guardian Mode, Focus Sessions & Anti-Tamper Armor
- App Install Modes: Choose Unrestricted, Smart Mode (auto-suspends new installs after a setup window), or Block All New Installations.
- Guardian Mode: Protects companion blockers or essential tools from uninstall, Force Stop, Clear Storage, permission revocation, and battery optimization.
- Timed Kiosk, Schedules & Daily Quotas: Run recurring routines (Work, Bedtime, Study), daily per-app minute limits, or Temporary Unsuspend leases (
5m–180m). - OS Anti-Tamper: Blocks Safe Mode boot, USB/ADB debugging, Settings factory reset, network resets, hotspot/tethering edits, and sensitive Settings sub-screens (Private DNS, Developer options, Device admin apps, Proxy, IP settings, Dual apps) while keeping Wi-Fi and Bluetooth usable.
- Backup & Silent Updates: Export device-named
.jsonconfigs and receive silent background updates from GitLab Releases.
How to Install CoreDPC (3 Methods)
Method 1: Automated 1-Click Installer (No Factory Reset Needed)
The automated scripts in scripts/ handle almost everything for you: they automatically locate or download Google’s official adb Platform-Tools, fetch the latest CoreDPC APK, check for secondary users (Dual Messenger / Secure Folder), set Device Owner, and grant WRITE_SECURE_SETTINGS, GET_USAGE_STATS, and battery exemptions.
Step A: Prepare Your Phone (2 Minutes)
- Open Settings -> About phone and tap Build number 7 times to unlock Developer Options.
- Open Settings -> Developer options and turn ON USB debugging (or Wireless debugging on Android 11+ to install over Wi-Fi).
- Xiaomi / Redmi / Poco (MIUI & HyperOS) users: Inside Developer Options, also turn ON USB debugging (Security settings) and Install via USB, and turn OFF Turn on system optimization (MIUI optimization) at the bottom.
- Temporarily remove accounts under Settings -> Accounts: Android requires zero signed-in Google/OEM accounts at the exact moment Device Owner activates. (You can sign right back into all your accounts immediately after the script finishes—your apps and photos stay intact.)
Step B: Run the Installer for Your Computer
=== "Windows (Easiest — Double-Click)"
Fresh Windows PCs don't need Python or manual PATH edits—the .bat uses built-in Windows PowerShell.
1. Download `install_coredpc.bat` from the [CoreDPC Repository (`scripts/`)](https://gitlab.com/blockerguy/coredpc/-/tree/main/scripts) or [Latest Release](https://gitlab.com/blockerguy/coredpc/-/releases).
2. Plug in your phone via USB (or prepare Wireless Debugging).
3. Double-click **`install_coredpc.bat`**. *(If Windows SmartScreen appears, click **More info -> Run anyway**.)*
=== "macOS & Linux (1-Line Terminal)" Open Terminal and run:
curl -sSL https://gitlab.com/blockerguy/coredpc/-/raw/main/scripts/install_coredpc.sh -o install_coredpc.sh && chmod +x install_coredpc.sh && ./install_coredpc.sh
=== "Cross-Platform Python Wizard" If you have Python 3 installed on Windows, macOS, or Linux:
curl -sSL https://gitlab.com/blockerguy/coredpc/-/raw/main/scripts/install_coredpc.py -o install_coredpc.py && python3 install_coredpc.py
Method 2: QR Code Provisioning (Fresh or Factory-Reset Android 7.0+)
- Turn on a fresh or factory-reset Android phone and stop at the very first "Welcome / Hi there" setup screen.
- Tap any blank area of the welcome screen 6 times consecutively.
- Connect to Wi-Fi when prompted and scan the CoreDPC provisioning QR code from the GitLab README.
View Provisioning JSON Payload (for generating your own QR)
{
"android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME": "com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM": "1QzUl9NPvtSaygXhpmULonpyGlSnB8GvDiZabN41ErU=",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION": "https://gitlab.com/blockerguy/coredpc/-/releases/permalink/latest/downloads/TestDPC-Policy-Release.apk",
"android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM": "vHDrtVSLlawkCsGnCn28pZrillVMmn7JgUt4WWhseFc",
"android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED": true
}
Method 3: Manual ADB Commands (Advanced Users)
Download TestDPC-Policy-Release.apk from GitLab Releases, connect via USB (or Android 11+ Wireless Debugging), and run:
# Optional: Wireless Debugging only (Android 11+)
adb pair <PHONE_IP>:<PAIRING_PORT> <6_DIGIT_CODE>
adb connect <PHONE_IP>:<CONNECTION_PORT>
# Install, activate Device Owner, and grant armor permissions
adb install -r TestDPC-Policy-Release.apk
adb shell dpm set-device-owner com.afwsamples.testdpc/.DeviceAdminReceiver
adb shell pm grant com.afwsamples.testdpc android.permission.WRITE_SECURE_SETTINGS
adb shell appops set com.afwsamples.testdpc GET_USAGE_STATS allow
adb shell appops set com.afwsamples.testdpc ACCESS_RESTRICTED_SETTINGS allow
adb shell dumpsys deviceidle whitelist +com.afwsamples.testdpc
How to Allow Websites, Subreddits & Specific Pages
CoreDPC supports granular whitelisting without opening up the rest of the internet. Go to App Shield & Content Filtering → ✅ Allowed Websites, Pages & Ignored Words:
- Allow an entire site: Enter
wikipedia.org. - Allow one section/subreddit (while blocking the rest of the site): Enter
reddit.com/r/learnprogramming—works even whenreddit.com(or*) is blocked. - Allow one exact page or video: Paste the exact full page URL (e.g.,
youtube.com/watch?v=...) to allow just that link. - Whitelist-only mode: Enter
*under Blocked Websites, then list only your approved sites/subpages here. - Fix false-positive words: Tap Check Log → Allow in 1 tap (or add words like
ualberta.caorchicken breast), or toggle Skip Blocked-Word Checks on Allowed Pages. - Keep an app usable, block only addictive parts inside it: Go to App Shield & Trusted Apps → 🧩 Keep App Allowed, Block Parts Inside It to block specific UI tabs/buttons, Android Settings panes, or distracting subpages like
reddit.com/r/shorts.
Frequently Asked Questions
Why does the package name say com.afwsamples.testdpc?
CoreDPC is open-source (Apache 2.0) and built directly upon Google's official Android Open Source Project (AOSP) TestDPC enterprise reference sample, extended with self-control cooldowns, DNS sync, and WebView/browser hardening. Keeping the standard com.afwsamples.testdpc package name maintains compatibility with Android Enterprise provisioning flows and existing TestDPC setups.
Do I lose my data when installing via ADB?
No. When using the automated installer or manual ADB (Methods 1 & 3), you do not factory reset your phone. You only temporarily sign out of Google/OEM accounts under Settings -> Accounts during the 10-second dpm set-device-owner step, then sign back in right afterward. (Note: On some devices, secondary user profiles like Samsung Dual Messenger or Secure Folder must also be removed before Android allows Device Owner provisioning.)
How do I change rules or remove protections later?
You stay in control—you just cannot remove protections impulsively: 1. Request the change inside CoreDPC and wait out your configured Cooldown Delay (then confirm within the 30-minute window). 2. Or, if configured, use your Emergency Override Passcode (for example, retrieved from a time-delayed vault).