cosu icon indicating copy to clipboard operation
cosu copied to clipboard

Unexpected @ProvisioningPreCondition

Open amiyo-biswas opened this issue 6 years ago • 3 comments

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)

amiyo-biswas avatar Aug 07 '19 10:08 amiyo-biswas

Hello , I meet the same problem on a oppo euqipment also api 28. Excuse me , do you solve this problem in the end? Appreciately!

skywalkerhbz avatar Nov 08 '19 03:11 skywalkerhbz

i meet the same issue on realme c2 mobile. how to solve this issue??

VeluFi avatar Nov 29 '19 09:11 VeluFi

Hi , I meet the same problem on oppo a9 . If you solve this problem,Please tell me by [email protected] . Appreciately!

mangoid avatar Feb 20 '20 04:02 mangoid