DetoxDroid
DetoxDroid copied to clipboard
'Deactivate Apps' feature not working
I tried to grant device permission for 'Deactivate Apps' feature to work through root and it didn't work. (I had granted permission for Automatic Grayscale or Break infinite Scrolling through root and it did work). I tried the adb method too (It showed success but am not sure it went right because I replaced set-device-owner to set-active-admin because it was showing error cause of the presence of multiple profiles).
So please look into the configuration of 'Deactivate Apps' feature and would be great to have it fixed soon.
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device
for some custom roms (Very popular in my country),dpm set-device-owner
is unavailable.
java.lang.IllegalStateException: Not allowed to set the device owner because there are already some accounts on the device
You must remove all accounts on your phone (like whatsapp, google, etc). You don't have to delete any apps for that, just go under settings -> accounts and remove them. Make a backup just in case although it didn't delete anything for me (lineage os). Then reboot your device and retry the command and it should work.
I tried to grant device permission for 'Deactivate Apps' feature to work through root and it didn't work. (I had granted permission for Automatic Grayscale or Break infinite Scrolling through root and it did work). I tried the adb method too (It showed success but am not sure it went right because I replaced set-device-owner to set-active-admin because it was showing error cause of the presence of multiple profiles).
Same here with Lineage 18.1 on beryllium. Using DetoxDroid 1.2.2. Otherwise the App looks very promising! Thank you @flxapps!
On a Samsung (Android 12) myself and it's not working for me either (removing accounts did not help). Are there any news on this issue? Thanks for this otherwise great app!
You must remove all accounts on your phone (like whatsapp, google, etc). You don't have to delete any apps for that, just go under settings -> accounts and remove them. Make a backup just in case although it didn't delete anything for me (lineage os). Then reboot your device and retry the command and it should work.
That did nothing for me. @flxapps
On a Samsung (Android 12) myself and it's not working for me either (removing accounts did not help). Are there any news on this issue? Thanks for this otherwise great app!
Same here. S22 (Base model) might be due to permissions Samsung gives its apps. @jweickm
adb shell dpm set-device-owner com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReciever
Error: Unknown admin: ComponentInfo{com.flx_apps.digitaldetox/com.flx_apps.digitaldetox.DetoxDroidDeviceAdminReciever}
Same problem here.
- Android version: 13 (CalyxOS)
- Device: FairPhone 4
Running the command:
adb shell dpm set-device-owner --user 10 com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver
Gives me this as a result:
Exception occurred while executing 'set-device-owner': java.lang.IllegalArgumentException: Unknown admin: ComponentInfo{com.flx_apps.digitaldetox/com.flx_apps.digitaldetox.DetoxDroidDeviceAdminReceiver} at com.android.server.devicepolicy.DevicePolicyManagerService.findAdmin(DevicePolicyManagerService.java:2839) at com.android.server.devicepolicy.DevicePolicyManagerService.setActiveAdmin(DevicePolicyManagerService.java:3343) 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:9908) at android.os.Binder.shellCommand(Binder.java:1049) at android.os.Binder.onTransact(Binder.java:877) at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6054) at android.os.Binder.execTransactInternal(Binder.java:1285) at android.os.Binder.execTransact(Binder.java:1244)
When I list the current device owners I get this (via adb shell dpm list-owners):
2 owners: User 10: admin=org.calyxos.bellis/.BasicDeviceAdminReceiver,ProfileOwner User 10: admin=org.calyxos.bellis/.BasicDeviceAdminReceiver,ManagedProfileOwner(parentUserId=0)
I've also already tried removing accounts stored in system settings. Still same result
Not sure how relevant this is but I also have a work profile setup (using CalxyOS own work profile management app).
Edit: What got it working was both removing all my Accounts from settings AND deleting my work profile. After that setting the device owner worked:
Success: Device owner set to package com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver Active admin set to component com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver
This feature will always be experimental and may not work on many devices. As an alternative, DetoxDroid now also supports "soft-blocking" apps (showing a popup over the app, if it is blocked).