激活 Device Owner 的常见报错与解决
激活 Device Owner 的错误绝大多数来自 Android 安全模型的硬约束或 ROM 厂商的额外限制。OwnDroid README 的 FAQ 里列了最常见的几种,这里把它们集中整理成一张速查表。
速查表
| 报错信息 | 根因 | 解决方案 |
|---|---|---|
| Not allowed to set the device owner because there are already some accounts | 设备上有 Google/Xiaomi/OPPO/Samsung 等账号 | 全部删除,或先冻结这些账号的 App |
| Not allowed to set the device owner because there are already several users | 设备上有次要用户/工作资料/私密空间/应用分身 | 全部删除,或恢复出厂设置 |
| Trying to set the device owner, but device owner is already set | 设备已有另一个 Device Owner | 先 Deactivate 或恢复出厂设置 |
| SecurityException: Neither user 2000 has MANAGE_DEVICE_ADMINS | MIUI/HyperOS 权限缺失 | 开发者选项开「USB调试(安全设置)」或 Root |
| IllegalStateException: Unexpected @ProvisioningPreCondition | ColorOS 白名单限制 | 下载 OwnDroid testkey 版本 |
| user limit reached | Samsung 多用户锁定 | 恢复出厂设置 + Root 尝试 |
| 其他 | 见下文各条 | — |
下面每条有更详细的说明。