Skip to main content

Device Admin Lock

The Device Administrator permission serves as CommitT’s primary self-defense protocol. In a high-stakes commitment model, a common loophole is uninstallation or clearing data during moments of high stress. The Device Admin Lock makes these actions impossible without completing active task conditions.

Why it is Required

When registered as a Device Administrator, the application acts as a system manager. The operating system blocks:
  • Uninstallation: The standard “Uninstall” option is grayed out in settings.
  • Force Stopping: The “Force Stop” button in application settings is disabled.
  • Clear Data: The system prevents wiping the local SQLite database.

Native Implementation

The native module registers the BlockerDeviceAdminReceiver subclass of DeviceAdminReceiver. The active status is audited using DevicePolicyManager:

OEM Settings Deep-Linking

Redirecting users to the Device Admin settings panel varies drastically across different Android distributions due to custom vendor skins (e.g. Samsung OneUI, Xiaomi MIUI, OnePlus OxygenOS). To ensure a seamless user experience, the native module utilizes custom skin routing:

OEM Fallback Matrix

  1. Samsung (OneUI): Direct component dispatch to com.android.settings.DeviceAdminSettings.
  2. Standard Android / Other OEMs: Fallback route to Settings.ACTION_SECURITY_SETTINGS (Security & Privacy settings page), where users can find the “Device admin apps” sub-menu.