Exception occurred while executing 'remove-active-admin':
java.lang.SecurityException: Attempt to remove non-test admin ComponentInfo{com.flx_apps.digitaldetox/com.flx_apps.digitaldetox.system_integration.DetoxDroidDeviceAdminReceiver} 0
at com.android.server.devicepolicy.DevicePolicyManagerService.lambda$forceRemoveActiveAdmin$9$DevicePolicyManagerService(DevicePolicyManagerService.java:3712)
at com.android.server.devicepolicy.DevicePolicyManagerService$$ExternalSyntheticLambda20.runOrThrow(Unknown Source:6)
at android.os.Binder.withCleanCallingIdentity(Binder.java:390)
at com.android.server.devicepolicy.DevicePolicyManagerService$Injector.binderWithCleanCallingIdentity(DevicePolicyManagerService.java:1554)
at com.android.server.devicepolicy.DevicePolicyManagerService.forceRemoveActiveAdmin(DevicePolicyManagerService.java:3708)
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:9845)
at android.os.Binder.shellCommand(Binder.java:950)
at android.os.Binder.onTransact(Binder.java:834)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6984)
at android.os.Binder.execTransactInternal(Binder.java:1184)
at android.os.Binder.execTransact(Binder.java:1143)
It look like the "android:testOnly" setting is not enable in the Manifest. So the app cannot be removed.
When trying to uninstall the app that was installed using the manual instruction I have an error. Command executed:
Error:
When trying to remove the active admin settings, I got this: Command executed:
Error:
It look like the "android:testOnly" setting is not enable in the Manifest. So the app cannot be removed.