Set Device Owner

31 Views Asked by At

I would like to set SetDeviceOwner for the SecureTask app and others. I factory reset my smartphone (Redmi11s) and didn't set up a Google account!! Uninstalled all Google applications Wifi and mobile data turned off Android Studio installed Developer options unlocked and enabled the following:

-USB Debugging

-Install via USB enabled

-USB debugging (security settings)

-Disable ADB authorization timeout

For the command adb shell dumpsys account I get the following:

User UserInfo{0:Eigentümer:c13}:
  Accounts: 0
 AccountId, Action_Type, timestamp, UID, TableName, Key
  Accounts History
  -1,action_called_account_add,2024-03-14 00:52:07,1000,accounts,0
  1,action_account_add,2024-03-14 00:53:45,10198,accounts,1
  1,action_called_account_remove,2024-03-14 00:55:21,10198,accounts,2
  1,action_account_remove,2024-03-14 00:55:21,10198,accounts,3
  -1,action_called_account_remove,2024-03-14 00:55:33,10245,accounts,4
  -1,action_called_account_add,2024-03-14 01:42:22,1000,accounts,5
Active Sessions: 0
RegisteredServicesCache: 0 services
Account visibility:

But the command adb shell dpm set-device-owner com.balda.securetask/.AdminReceiver I get the error message:

Exception occurred while executing 'set-device-owner':
java.lang.IllegalArgumentException: Unknown admin: ComponentInfo{com.balda.securetask/com.balda.securetask.MyDeviceAdminReceiver}
        at com.android.server.devicepolicy.DevicePolicyManagerService.findAdmin(DevicePolicyManagerService.java:2849)
        at com.android.server.devicepolicy.DevicePolicyManagerService.setActiveAdmin(DevicePolicyManagerService.java:3355)
        at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:256)
        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:9913)
        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)
0

There are 0 best solutions below