DuckPolicy

An LSPosed / Xposed module that makes apps see no device-policy restrictions on your own device. It hooks the client-side DevicePolicyManager and UserManager restriction checks and returns the "no restriction" answer — per category, behind a master toggle.

v3 is a full Kotlin rewrite and fork of liyafe1997/FuckDevicePolicy. The original neutralises UserManager policies (e.g. work-profile / Intune device-wide restrictions); this rewrite generalises that into a per-category UI spanning DevicePolicyManager and UserManager.

Source, issues & builds: https://github.com/Bouteillepleine/FuckDevicePolicy

DuckPolicy v3 UI

Features

  • Master toggle + per-category switches, with All / None quick actions.
  • 13 categories:
    • Camera block — report the camera as not disabled
    • Screenshot / screen-record block — allow screen capture
    • Device admin & owner checks — look unmanaged (no admin / owner / managed profile)
    • Password & PIN policy — drop length, complexity, expiry and wipe rules
    • Lock-screen feature limits — re-enable camera, notifications, etc. on keyguard
    • Storage-encryption enforcement — report encryption as not required
    • Managed app configuration — return empty app-restriction bundles
    • User restrictions (DISALLOW_*) — clear them, incl. UserManager.hasUserRestriction
    • Auto-lock timeout — remove the forced maximum time-to-lock
    • Kiosk / lock-task mode — report lock-task as permitted / unrestricted
    • Allowed IMEs & accessibility — remove input-method / accessibility allow-lists
    • Misc — auto-time, cross-profile, Bluetooth and other smaller restrictions
    • Outlook enrollment gate (new in 3.1) — hooks Outlook's own private DevicePolicy class (requiresDeviceManagement / isPolicyApplied) so it skips the "your organization requires device management" enrollment screen. Different layer than the rows above (Outlook's own gate, not the framework or Intune MAM SDK); only installs when scoped into com.microsoft.office.outlook.
  • Material You dynamic colours (Android 12+) and an adaptive icon.
  • Small: R8 + resource shrinking, ~1.8 MB.

Install & scope

  1. Install and enable DuckPolicy in LSPosed.
  2. Set the module scope:
    • System Framework (android) for the broadest, system-wide effect — the recommended default for work-profile / user-restriction cases.
    • or specific target app(s) whose policy view you want to change.
  3. Reboot (or force-stop the scoped processes) to apply.

Important

Do not scope the MDM app itself (e.g. Microsoft Intune / Company Portal) or Microsoft Authenticator — hooking those can expose Xposed/root to detection. Outlook is different and included in the default scope: it has no meaningful Xposed/root detection, only its own enrollment-gate check, which the Outlook enrollment gate category neutralises. It does not touch Intune MAM app-protection restrictions (screenshot block, copy/paste, PIN) inside Outlook — those are enforced independently and need a separate hook.

Settings are shared cross-process via XSharedPreferences, so enable the module and reboot once before relying on the toggles — a freshly-installed, not-yet-hooked app can't read them until then.

To see which restrictions are actually applied on your device: adb shell dumpsys device_policy (look under userRestrictions:).

How it works (and its limits)

The hooks patch the client-side DevicePolicyManager / UserManager wrappers inside each scoped process, changing what an app (or the framework) sees when it queries policy. They do not rewrite what system_server actually enforces underneath. Intended for your own device.

Credits


简体中文

该模块可以让 App 在你自己的设备上看到「没有任何设备策略限制」。它挂钩客户端的 DevicePolicyManagerUserManager 的限制检查,按类别返回「无限制」的结果,并带有一个总开关。 这些策略一般由「设备管理员」App 或「工作配置文件」设置(例如 Microsoft Intune), 即使在工作配置文件里设置、但会影响到整个安卓(你的个人空间)的全局策略也在覆盖范围内。

注意:挂钩改变的是各进程中客户端所「看到」的策略,并不会改变 system_server 底层实际执行的策略。 请勿将 MDM App 本身(如 Intune / 公司门户)加入作用域。

Releases

3.0

Stable

7/1/2026, 11:57:12 PM

v3.0 — full Kotlin rewrite

A ground-up rewrite (fork of liyafe1997/FuckDevicePolicy) that turns the module
from a single UserManager patch into a per-category DevicePolicyManager +
UserManager bypass with a real UI.

Highlights

  • New Material You UI: master toggle, per-category switches, All / None quick actions.
  • Coverage expanded from UserManager-only to 12 categories across
    DevicePolicyManager AND UserManager:
    camera block · screenshot/screen-record block · device admin & owner checks ·
    password & PIN policy · lock-screen (keyguard) feature limits ·
    storage-encryption enforcement · managed app configuration ·
    user restrictions (DISALLOW_*, incl. UserManager.hasUserRestriction) ·
    auto-lock timeout · kiosk / lock-task mode · permitted IMEs & accessibility ·
    misc (auto-time, cross-profile, Bluetooth …).
  • Settings shared cross-process via XSharedPreferences (per-hook try/catch,
    hook-once-per-process).
  • Material You dynamic colours (Android 12+) and a new adaptive icon.
  • Signed release, R8 + resource shrinking (~1.8 MB).

Scope

  • Recommended: System Framework (android) for system-wide effect.
  • Do NOT scope the MDM app itself (Intune / Company Portal).
  • Enable + reboot once before relying on the toggles (cross-process prefs).

Notes

  • Client-side hooks change what apps/framework SEE, not what system_server
    enforces. For your own device.

Assets

1

9/25/2025, 8:54:43 PM

Bypass Intune Restrictions

This module can let you make some user restriction policies (set by Device Admin App or Work Profile, e.g. Microsoft Intune) nonfunctional. Especially some device-wide policies, even it is in the Work Profile but affected the outside whole android environment(Your Personal Profile).

简体中文 (Simplified Chinese) 该模块可以让一些Android的用户限制策略失效,这些策略一般由“设备管理员”App设置,或者“工作配置文件”。比如Microsoft Intune(又叫“公司门户”)就是用来干这事的。特别是一些全局策略,即使是在工作配置文件里面设置的,但是会影响到外面的整个安卓(你的个人空间,即安卓的主环境)

494123554-e94cf8e6-b228-413a-98b6-0ae6de232326

https://github.com/Xposed-Modules-Repo/com.strawing.duckdevicepolicy

Full Changelog: https://github.com/Xposed-Modules-Repo/com.strawing.duckdevicepolicy/commits/2-2.0

Assets

1