Device Owner on rooted Galaxy S8

Viewed 1050

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

Ways I have tried:

1) NFC provisioning (as explained here )

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 provisioning (from console):

When using

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

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) Create xml-file manually (as explained here )

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?

2 Answers
Related