cosu
cosu copied to clipboard
Security exception when try making my app a device owner
Everything work well when I follow the guide.However when I try to build my own COSU application, CMD give me this exception after I write adb command:
adb shell dpm set-device-owner com.example.myapp/.DeviceAdminReceiver
java.lang.SecurityException: Neither user 2000 nor current process has com.sec.enterprise.permission.MDM_PROXY_ADMIN_INTERNAL.
at android.os.Parcel.readException(Parcel.java:1620)
at android.os.Parcel.readException(Parcel.java:1573)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setActiveAdmin(IDevicePolicyManager.java:4838)
at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:110)
at com.android.commands.dpm.Dpm.onRun(Dpm.java:82)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.dpm.Dpm.main(Dpm.java:38)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:257)
Actually, there is no issue. I was writing the package name incorrectly! :) but the error message seems useless
I am facing the same issue, what do you mean incorrect package name.. I provided the package correctly but still get the same error