通过设备管理员权限而不是通过生根访问 Android iptables

Accessing Android iptables through Device Administrator Rights not via rooting

我想编写一个应用程序来管理 Android iptables(类似于 DroidWall)而无需对设备进行 root。在这种情况下,我必须为我的应用提供什么样的 "device administrator rights"?

例如,以下资源文件赋予我的应用程序删除、修改或读取根目录中除系统之外的任何内容的权限:

<device-admin xmlns:android="http: //schemas.android.com/apk/res/android">
  <uses-policies>
    <wipe-data />
  </uses-policies>
</device-admin>

我必须编写什么样的资源文件才能使我的应用程序有权更改 Android iptables?

What kind of "device administrator rights" I have to give to my app in this case?

设备管理系统中没有此权限。

the following resource file gives my app the right for deleting, modifying or reading anything in the root directory except system

不符合 the documentation。它只允许您在 DevicePolicyManager 实例上调用 wipeData()。如果您有证据表明该领域的文档不正确,我很乐意看到该证据的 link。