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

Warning

4.0 requires a modern-API framework. This build uses the modern Xposed API (libxposed, minApiVersion=101 / targetApiVersion=102), which only the LSPosed 2.x forks implement. Mainline LSPosed 1.9.x will not load it — the module will simply do nothing there. Stay on 3.1 if you are on 1.9.x.

Upgrading also resets your settings: a modern module gets no world-readable preference redirect, so 3.x toggles usually cannot be read and you start from the defaults (everything on, as shipped). Your scope is preserved.

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.

Since 4.0 the settings are brokered by the framework itself (remote preferences) instead of a world-readable file, so a toggle applies live to every already-hooked process — no reboot. A reboot (or force-stop) is still needed after a scope change, because that is when hooks get installed. The app also shows you its actual LSPosed scope, which the legacy API could not report.

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 — installed from onSystemServerStarting for System Framework and onPackageReady for apps — 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 / 公司门户)加入作用域。

Warning

4.0 需要支持新版 Xposed API 的框架(libxposed,minApiVersion=101 / targetApiVersion=102),目前只有 LSPosed 2.x 分支 实现。原版 LSPosed 1.9.x 无法加载此版本,模块将不会生效;若仍在使用 1.9.x,请继续使用 3.1。 升级后设置会被重置(新版模块没有全局可读的配置重定向),恢复为默认值(全部开启); 作用域会保留

Releases

4.0

Stable

9/6/2026, 1:22:06 PM

Migrated to the modern Xposed API (libxposed).

Requires an LSPosed 2.x fork implementing modern API 101+ (minApiVersion=101 / targetApiVersion=102). Mainline LSPosed 1.9.x will not load this build — stay on 3.1 there.

  • Entry points now declared in META-INF/xposed/; onSystemServerStarting + onPackageReady replace handleLoadPackage.
  • Settings moved off XSharedPreferences to framework remote preferences: toggles apply live, no reboot. The app can now read and show its own LSPosed scope.
  • Outlook enrollment-gate hooks install only in Outlook's process.
  • Your scope is preserved on upgrade; 3.x settings are not — you start from defaults (everything on).
  • minSdk 21 -> 26.

Full changelog: https://assets.lsposed.org/raw/Bouteillepleine/FuckDevicePolicy/main/CHANGELOG.md?sign=abf9985286f8466d18127aa0d806dd12&t=6a03bf00

Assets

1

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