cosu icon indicating copy to clipboard operation
cosu copied to clipboard

Security exception when try making my app a device owner

Open YasserMojahed opened this issue 9 years ago • 2 comments

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)

YasserMojahed avatar Jan 31 '17 11:01 YasserMojahed

Actually, there is no issue. I was writing the package name incorrectly! :) but the error message seems useless

YasserMojahed avatar Feb 05 '17 14:02 YasserMojahed

I am facing the same issue, what do you mean incorrect package name.. I provided the package correctly but still get the same error

tejasKakunje avatar Feb 12 '19 22:02 tejasKakunje