My device is a Redmi Note 10 Pro with android 12. Activated all USB debugging options on developer mode.
I tried to use the command to grant the permissions to LogcatReader, and got the exception message above.
"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(Unknown Source:97)
at android.app.ContextImpl.enforceCallingOrSelfPermission(Unknown Source:13)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(Unknown Source:49)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(Unknown Source:24)
at android.permission.PermissionManager.grantRuntimePermission(Unknown Source:6)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(Unknown Source:75)
at com.android.server.pm.PackageManagerShellCommand.onCommand(Unknown Source:955)
at com.android.modules.utils.BasicShellCommandHandler.exec(Unknown Source:27)
at android.os.ShellCommand.exec(Unknown Source:4)
at com.android.server.pm.PackageManagerService.onShellCommand(Unknown Source:20)
at android.os.Binder.shellCommand(Unknown Source:0)
at android.os.Binder.onTransact(Unknown Source:148)
at android.content.pm.IPackageManager$Stub.onTransact(Unknown Source:17)
at com.android.server.pm.PackageManagerService.onTransact(Unknown Source:0)
at android.os.Binder.execTransactInternal(Unknown Source:118)
at android.os.Binder.execTransact(Unknown Source:16)"
My device is a Redmi Note 10 Pro with android 12. Activated all USB debugging options on developer mode. I tried to use the command to grant the permissions to LogcatReader, and got the exception message above.
"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(Unknown Source:97) at android.app.ContextImpl.enforceCallingOrSelfPermission(Unknown Source:13) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(Unknown Source:49) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(Unknown Source:24) at android.permission.PermissionManager.grantRuntimePermission(Unknown Source:6) at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(Unknown Source:75) at com.android.server.pm.PackageManagerShellCommand.onCommand(Unknown Source:955) at com.android.modules.utils.BasicShellCommandHandler.exec(Unknown Source:27) at android.os.ShellCommand.exec(Unknown Source:4) at com.android.server.pm.PackageManagerService.onShellCommand(Unknown Source:20) at android.os.Binder.shellCommand(Unknown Source:0) at android.os.Binder.onTransact(Unknown Source:148) at android.content.pm.IPackageManager$Stub.onTransact(Unknown Source:17) at com.android.server.pm.PackageManagerService.onTransact(Unknown Source:0) at android.os.Binder.execTransactInternal(Unknown Source:118) at android.os.Binder.execTransact(Unknown Source:16)"