r/AndroidQuestions • • 12h ago

Please help me be able to use device owner

I'm trying to use an app that uses device owner permissions but again and again, it fails, I remove all accounts and users from my device, I even removed admin apps and it still didn't work, also I don't have any device owner apps and my bootloader is unlocked but I'm not rooted and I don't have a custom os. Please help.

1 Upvotes

6 comments sorted by

2

u/kschang 11h ago

How about some details?

1

u/pwpiop 11h ago

What kind of details?

1

u/ohmegatchi 11h ago

*The phone model and Android version *The error prompt *The command you tried/guide you used

1

u/pwpiop 10h ago

The phone model is a Samsung galaxy tab A8 (2021) , the command was: adb shell dpm set-device-owner io.github.warleysr.dechainer/.DechainerDeviceAdminReceiver (the app used shizuku to run it) and the exact message was: Exception occurred while executing 'set-device-owner': java.lang.RuntimeException: Can't set package ComponentInfo{io.github.warleysr.dechainer/io.github.warleysr.dechainer.DechainerDeviceAdminReceiver} as device owner. at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.runSetDeviceOwner(DevicePolicyManagerServiceShellCommand.java:259) at com.android.server.devicepolicy.DevicePolicyManagerServiceShellCommand.onCommand(DevicePolicyManagerServiceShellCommand.java:87) 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:12362) at android.os.Binder.shellCommand(Binder.java:1104) at android.os.Binder.onTransact(Binder.java:914) at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:7088) at android.os.Binder.execTransactInternal(Binder.java:1380) at android.os.Binder.execTransact(Binder.java:1311)

3

u/kschang 7h ago

You need to run this Unchainer right after a factory reset. Once you've setup a normal user it's too late.

1

u/DutchOfBurdock 4h ago

This. Skip setup, sideload app, grant device owner, add accounts.