植根于Galaxy S8的设备所有者 [英] Device Owner on rooted Galaxy S8

查看:143
本文介绍了植根于Galaxy S8的设备所有者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图将内置的演示应用提升为我的 root S8上的Device Owner,并一直遇到问题.

I have been trying to elevate an internal Demo App to Device Owner on my rooted S8 and keep having problems.

我尝试过的方法:

1) NFC设置(如此处所述)

将NFC与Android Bean一起使用来设置设备所有者时,S8会显示由于设备的安全准则而无法创建工作配置文件"-错误

When using NFC with Android Bean to set the Device Owner the S8 shows a "Cannot create working profile due to the security guidelines of your device"-error

2) Adb设置(从控制台):

使用

dpm set-device-owner my/app/namespace/.DeviceAdmin

在Windows控制台中,出现以下错误

in a windows console I get the following error

java.lang.SecurityException: Neither user 2000 nor current process has com.samsung.android.knox.permission.KNOX_PROXY_ADMIN_INTERNAL.,com.sec.enterprise.permission.MDM_PROXY_ADMIN_INTERNAL
        at android.os.Parcel.readException(Parcel.java:1693)
        at android.os.Parcel.readException(Parcel.java:1646)
        at android.app.admin.IDevicePolicyManager$Stub$Proxy.setActiveAdmin(IDevicePolicyManager.java:5825)
        at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:145)
        at com.android.commands.dpm.Dpm.onRun(Dpm.java:96)
        at com.android.internal.os.BaseCommand.run(BaseCommand.java:51)
        at com.android.commands.dpm.Dpm.main(Dpm.java:41)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:307)

向清单中添加缺少的权限并没有什么改变.

Adding the missing permissions to my manifest did not change anything.

3)手动创建xml文件(如在这种情况下,我可以在正确的文件夹中创建xml,但是当我重新启动手机时,该文件将被删除并且我的应用未注册为设备所有者.

In this case I can create the xml in the right folder, but when I restart the phone the file gets deleted and my app is not registered as Device Owner

我还有其他方法可以尝试吗?还是有人知道问题出在哪里吗?

Are there any more ways I could try or does anyone know where the problem is?

推荐答案

从您尝试过的示例中,您似乎正在尝试获取设备所有者特权,而不是设备管理员:

From the examples you have tried it seems you are trying to get Device Owner privilege, and not Device Admin:

  • 设备管理员(在Android 2.2中引入)有限的管理功能,并且可以由用户授予请求它的任何应用
  • 设备所有者(在Android 5.0中引入)提供了完整的管理功能,但只能在设备设置过程中被授予一个应用,因此您需要先将设备恢复出厂设置.
  • Device Admin (introduced in Android 2.2) gives limited management capabilities and can be granted by the user to any app that requests it,
  • Device Owner (introduced in Android 5.0) gives full management capabilities but can only be granted to one app, during device setup, so you need to factory reset the device before.

如果您要实施Device Admin,可以遵循此指南.

If you want to implement Device Admin, you can follow this guide.

如果您想实现设备所有者,则可以

If you want to implement Device Owner, you can either

  • use the Android Management API which is simple but you might be missing some advanced features,
  • or build your own Device Policy Controler app and setup the device using one of the available provisioning methods (QR code, NFC, Managed Google Play Accounts, etc), which is significantly more complicated but you'll have access to all DevicePolicyManager APIs.

这篇关于植根于Galaxy S8的设备所有者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆