I have installed a clipboard manager, Clip Stack on my Android 11 phone. When the app is opened, the developer helpfully gives the message that background clipboard access has been blocked by Android 10 but he has found a workaround and to run the following ADB commands:
adb -d shell appops set com.catchingnow.tinyclipboardmanager SYSTEM_ALERT_WINDOW allow; adb -d shell pm grant com.catchingnow.tinyclipboardmanager android.permission.READ_LOGS; adb shell am force-stop com.catchingnow.tinyclipboardmanager;
I don't want to install Android Studio. I tried the following:
- Enabled Developer Options on my phone and turned on USB debugging and Allow screen overlaps on settings
- On my computer installed minimal_adb_fastboot_v1.4.3
- Connected my phone to my computer via usb
- Clicked on the desktop shortcut for Minimal ADB and Fastboot to open a cmd window
- Ran
adb -d shell appops set com.catchingnow.tinyclipboardmanager SYSTEM_ALERT_WINDOW allow;
The daemon started. - Ran
adb -d shell pm grant com.catchingnow.tinyclipboardmanager android.permission.READ_LOGS;
It gave error:
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:2028)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2056)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1463)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1444)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2300)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:251)
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:22307)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4687)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4471)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
How can I proceed?