Installation problem : "Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS."
Hello,
I've recently found out your app and I wanted to install it to try it.
But I have difficulties install it on my Realme X3 Super Zoom phone.
Here's the errors I got (windows via USB Debugging):
Direct installation :
Downloading and unzipping Android Platform Tools. Please wait...
Starting ADB
If your device asks you to allow USB Debugging, press "Accept".
Installing DetoxDroid on your device...
Performing Streamed Install
Success
Granting Permissions
Exception occurred while executing 'grant':
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:2073)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2101)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1468)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1449)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2341)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:261)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:23443)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4603)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4904)
at com.android.server.pm.OppoPackageManagerService.onTransact(OppoPackageManagerService.java:147)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)
Exception occurred while executing 'grant':
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:2073)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2101)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1468)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1449)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2341)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:261)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:23443)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4603)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4904)
at com.android.server.pm.OppoPackageManagerService.onTransact(OppoPackageManagerService.java:147)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)
Starting App
bash arg: -p
bash arg: com.flx_apps.digitaldetox
bash arg: 1
args: [-p, com.flx_apps.digitaldetox, 1]
arg: "-p"
arg: "com.flx_apps.digitaldetox"
arg: "1"
data="com.flx_apps.digitaldetox"
** No activities found to run, monkey aborted.
Done.
Press any key to continue . . .
Manual installation :
same problem at the step:
platform-tools\adb.exe shell pm grant com.flx_apps.digitaldetox android.permission.WRITE_SECURE_SETTINGS
Installation via F-droid:
"Failed to install due to an unknow error"
Have I done something wrong ? Do you have any ideas about this problem ?
Hello, look into the menu "Developer options" a toggle that disables permission monitoring, after that you can run the adb commant to grant the permission.
Hello, look into the menu "Developer options" a toggle that disables permission monitoring, after that you can run the adb commant to grant the permission.
Thanks for the answer, in my settings I : -activated the usb debugging -deactivated the permission monitoring -deactivated the verify apps over usb -deactivate my antivirus on my computer
I've tried to reinstall it and i get this :
Downloading and unzipping Android Platform Tools. Please wait...
Downloading latest DetoxDroid APK...
Starting ADB
If your device asks you to allow USB Debugging, press "Accept".
Installing DetoxDroid on your device...
Performing Streamed Install
Success
Granting Permissions
Exception occurred while executing 'grant':
java.lang.SecurityException: Permission android.permission.ACCESS_NOTIFICATION_POLICY requested by com.flx_apps.digitaldetox is not a changeable permission type
at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:451)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1496)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1449)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2341)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:261)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:23443)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4603)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4904)
at com.android.server.pm.OppoPackageManagerService.onTransact(OppoPackageManagerService.java:147)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)
Starting App
bash arg: -p
bash arg: com.flx_apps.digitaldetox
bash arg: 1
args: [-p, com.flx_apps.digitaldetox, 1]
arg: "-p"
arg: "com.flx_apps.digitaldetox"
arg: "1"
data="com.flx_apps.digitaldetox"
** No activities found to run, monkey aborted.
Done.
Press any key to continue . . .
After this the app seems to not be installed on my phone (I can't find the app) and I still got the "failed to install due to an unknow error" when I try to install it via F-droid.
That's really weird because I remember that I installed it once via F-droid, then I uninstall it (because I didn't had the required permissions when I opened the app so I wanted to try the installation explained in this github) and now I can't reinstall it.
Is it something linked with this first installation or something else ?
Happy new year by the way !
Hello, look into the menu "Developer options" a toggle that disables permission monitoring, after that you can run the adb commant to grant the permission.
Thank you! This worked for me on an Oppo Ax5. It was down the bottom in developer options, heading "Apps"