MDPC
v7.3.0Screenshots
(6)About Application
MrRare2's DPC app based on OwnDroid.
This uses Android's Device Policy Manager.
This is mostly only used for MrRare2 but you can use it as well if you want.
Features
- Disable camera
- Disable screen capture
- Disable status bar
- Master volume mute
- Common Criteria mode
- Hardware monitor (temperatures, fan speeds)
- Reboot device
- Change time / time zone
- Lots of policies (permission, MTE, Nearby streaming, FRP)
- Lock task mode
- Security logging
- Network (VPN always on, private DNS, WiFi)
- Network logging
- User restrictions (change wifi state, change location state, block factory resetting via settings, etc..)
- App block install / uninstall / hide / suspend
- Manage users
- Reset password
- Set timeout
- Configure keyboard features
- App lock/hide
- Themes (Material Design 3 + Dynamic Color)
Working modes
- Root
- Shizuku
- Dhizuku
- ADB ->
dpm set-device-owner dev.mr2.dpc/.Receiver
Provisioning errors
Existing accounts
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device
Solution
- Freeze those apps with accounts using Hail.
- Or uninstall them
Existing users
java.lang.IllegalStateException: Not allowed to set the device owner because there are already several users on the device
Solution
[!note] Some systems have a feature like "App cloning" or "Kids Space" which are usually just users.
- Remove those users (secondary users, guest accounts, etc...)
API
You can check the receiver file for the intent extras to sends as well as the arguments
Intent based
Sending via shell
am broadcast -n dev.mr2.dpc/.ApiReceiver -a dev.mr2.dpc.api.ACTION_NAME --es key ...
Sending via code
Java
Intent intent = new Intent("dev.mr2.dpc.api.ACTION_NAME"); intent.setClassName("dev.mr2.dpc", "dev.mr2.dpc.ApiReceiver"); intent.putExtra("key", "..."); sendBroadcast(intent);
Kotlin
val intent = Intent("dev.mr2.dpc.api.ACTION_NAME").apply { setClassName("dev.mr2.dpc", "dev.mr2.dpc.ApiReceiver") putExtra("key", "...") } sendBroadcast(intent)
TCP (advanced)
Send a raw TCP response to localhost at the port defined in the app with a base64 encoded AES-GCM 256-bit JSON request, with the key being the SHA-512 of the API key using only the first 32 bytes, under the spec of IV + ciphertext + tag. Decoding is the opposite way: base64 decode -> AES decrypt with key -> parse JSON. It also uses the same spec.
[!WARNING] Only use the TCP API at your own risk! The developers are not responsible for any type of damage this usage may cause, as with the usage of the app itself.
Build
Termux
- Install deps
pkg update && pkg upgrade -y && pkg install -y gradle kotlin openjdk-17 aapt2 apksigner wgettermux-setup-storage
- Install Android SDK tools (here)
gradle buildorgradle assembleReleasecp app/build/outputs/apk/release/app-release.apk /sdcard/MDPC.apk
Build errors
AAPT2
variant #1
AAPT2 aapt2-* Daemon #0: Daemon startup failed
Solution
Append this into ~/.gradle/gradle.properties:
android.aapt2FromMavenOverride=/data/data/com.termux/files/usr/bin/aapt2
And try again
variant #2
ERROR: AAPT: error: failed to load include path /data/data/com.termux/files/home/apps/sdk/platforms/android-*/android.jar. (target sdk >= 35)
Solution
As of now there has no official solution for this issue (as seen here) but you can try replacing the aapt2 binary on $PREFIX/bin with some pre built binaries like this one but I take no responsibility on these unofficial aapt2 builds, use at your own risk!.
Linux
./gradlew buildor./gradlew assembleRelease
Windows
./gradle.bat buildor./gradle.bat assembleRelease
License
Copyright (C) 2024 BinTianqi
Copyright (C) 2025 MrRare2
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Release Notes & Changelog
Full Changelog: https://github.com/MrRare2/MDPC/compare/v7.2.1...v7.3.0
match with upstream: app groups more TCP API stuff deprecated GET commands in the intent API managed configurations fixes Dhizuku lock task support and more...
Declared Android Permissions
23 totalShizuku API Permissions
This application connects to the Shizuku service to execute system-level operations with ADB elevated privileges.
Standard Android Permissions
Specifications
Install via ShizuStore to enable automatic updates and silent installations using Shizuku.
More in Device owner (DPM)
Other applications in this category
Dhizuku
iamr0s
Shizuku-inspired app that allows sharing DeviceOwner permissions to third-party apps
harbor
Stem0794
Work-profile manager with optional Shizuku tools for automation