You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ dpm remove-active-admin com.afwsamples.testdpc/.DeviceAdminReceiver
Exception occurred while executing 'remove-active-admin':
java.lang.SecurityException: Attempt to remove non-test admin ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.DeviceAdminReceiver} 0
at com.android.server.devicepolicy.DevicePolicyManagerService.lambda$forceRemoveActiveAdmin$10$com-android-server-devicepolicy-DevicePolicyManagerService(DevicePolicyManagerService.java:3593)
at com.android.server.devicepolicy.DevicePolicyManagerService$$ExternalSyntheticLambda132.runOrThrow(Unknown Source:6)
at android.os.Binder.withCleanCallingIdentity(Binder.java:427)
at com.android.server.devicepolicy.DevicePolicyManagerService$Injector.binderWithCleanCallingIdentity(DevicePolicyManagerService.java:1581)
at com.android.server.devicepolicy.DevicePolicyManagerService.forceRemoveActiveAdmin(DevicePolicyManagerService.java:3589)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runRemoveActiveAdmin(DevicePolicyManagerServiceShellCommand.java:280)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:93)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:9900)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6054)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
$ dpm set-device-owner com.afwsamples.testdpc/.DeviceAdminReceiver
Exception occurred while executing 'set-device-owner':
java.lang.IllegalStateException: Trying to set the device owner, but the user already has a profile owner.
at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9560)
at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8393)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:259)
at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:89)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.devicepolicy.DevicePolicyManagerService.onShellCommand(DevicePolicyManagerService.java:9900)
at android.os.Binder.shellCommand(Binder.java:1054)
at android.os.Binder.onTransact(Binder.java:882)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6054)
at android.os.Binder.execTransactInternal(Binder.java:1290)
at android.os.Binder.execTransact(Binder.java:1249)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: