cosu
cosu copied to clipboard
Unexpected @ProvisioningPreCondition
I am getting Unexpected @ProvisioningPreCondition error on some devices (API 28) when set adb shell dpm set-device-owner
.
Does any guys meet this issue? Any help would be greatly appreciated.
adb shell dpm set-device-owner com.myapp/.AppAdminReceiver
Error Is
java.lang.IllegalStateException: Unexpected @ProvisioningPreCondition 99
at android.os.Parcel.createException(Parcel.java:1974)
at android.os.Parcel.readException(Parcel.java:1934)
at android.os.Parcel.readException(Parcel.java:1884)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setDeviceOwner(IDevicePolicyManager.java:5863)
at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:176)
at com.android.commands.dpm.Dpm.onRun(Dpm.java:106)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:54)
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:416)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:8007)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:7291)