iamr0s / Dhizuku

A Android Application for share DeviceOwner
GNU General Public License v3.0
1.36k stars 50 forks source link

Device admin activated, but need device owner #36

Open ashpro1212 opened 1 year ago

ashpro1212 commented 1 year ago

Hello there im new to these things and also kinda a newbie to github so sorry if idk what im talking about when i try to use Dhizuku with shizuku i keep running into Device admin activated, but need device owner. "ConsoleError(code=1, read=, error=java.lang.RuntimeException: Can't set package ComponentInfo{com.rosan.dhizuku/com.rosan.dhizuku.server.DhizukuDAReceiver} as device owner. at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:204) at com.android.commands.dpm.Dpm.onRun(Dpm.java:115) at com.android.internal.os.BaseCommand.run(BaseCommand.java:56) at com.android.commands.dpm.Dpm.main(Dpm.java:41) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)"

ashpro1212 commented 1 year ago

There are more. "ConsoleError(code=1, read=, error=java.lang.RuntimeException: Can't set package ComponentInfo{com.rosan.dhizuku/com.rosan.dhizuku.server.DhizukuDAReceiver} as device owner. at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:204) at com.android.commands.dpm.Dpm.onRun(Dpm.java:115) at com.android.internal.os.BaseCommand.run(BaseCommand.java:56) 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:339) ) at f5.s.g(SourceFile:296) at s5.a.u(Unknown Source:8) at g6.g0.run(Unknown Source:102) at kotlinx.coroutines.internal.e.run(Unknown Source:11) at kotlinx.coroutines.scheduling.i.run(Unknown Source:2) at kotlinx.coroutines.scheduling.a.run(SourceFile:77)"

fu8765 commented 11 months ago

@ashpro1212 have you tried these https://github.com/iamr0s/Dhizuku/discussions/19

bkosse commented 9 months ago

I did do everything mentioned here #19 , but no luck.

  1. Setup Shizuku (successful)
  2. Installed Accounts app (successful)
  3. Installed Hail app (successful)
  4. Listed all accounts using Accounts app, copy to clipboard (successful)
  5. Past all accounts in Hail app (successful)
  6. Freeze all apps using method Shizuku - Disable (successful)
  7. Run Dhizuku activation using Activation by Shizuku (not successful)

I still get the message "Not allowed to set the device owner because there are already some accounts on the device."

I also added my password manager to the list in Hail, because it was not listed by Accounts.

catmeowjiao commented 7 months ago

I'm the same way

catmeowjiao commented 7 months ago
 adb shell dpm set-device-owner com.rosan.dhizuku/.server.DhizukuDAReceiver
java.lang.RuntimeException: Can't set package ComponentInfo{com.rosan.dhizuku/com.rosan.dhizuku.server.DhizukuDAReceiver} as device owner.
    at com.android.commands.dpm.Dpm.runSetDeviceOwner(Dpm.java:149)
    at com.android.commands.dpm.Dpm.onRun(Dpm.java:96)
    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:285)
DARK7BEAST commented 7 months ago

i too follow each step. and getting same error

incapdns commented 5 months ago

I even tried to format my phone without success.

puppykickr commented 2 months ago

i am having the same issue...

ConsoleError(code=255, read=, error= Exception occurred while executing 'set-device-owner': java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device. at com.android.server.devicepolicy.DevicePolicyManagerService.enforceCanSetDeviceOwnerLocked(DevicePolicyManagerService.java:9766) at com.android.server.devicepolicy.DevicePolicyManagerService.setDeviceOwner(DevicePolicyManagerService.java:8703) 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:10085) at android.os.Binder.shellCommand(Binder.java:958) at android.os.Binder.onTransact(Binder.java:842) at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6983) at android.os.Binder.execTransactInternal(Binder.java:1197) at android.os.Binder.execTransact(Binder.java:1151) ) at f5.s.g(SourceFile:296) at s5.a.u(Unknown Source:8) at g6.g0.run(Unknown Source:102) at kotlinx.coroutines.internal.e.run(Unknown Source:11) at kotlinx.coroutines.scheduling.i.run(Unknown Source:2) at kotlinx.coroutines.scheduling.a.run(SourceFile:77)

elderwolf123 commented 1 month ago

Same here, I even tried to disable every app outside Shizuku and Dhizuku but it didn't make a difference

771SAINI commented 1 week ago

Tried disabling permission monitoring in Developer options ? It should work