2

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:

  1. Enabled Developer Options on my phone and turned on USB debugging and Allow screen overlaps on settings
  2. On my computer installed minimal_adb_fastboot_v1.4.3
  3. Connected my phone to my computer via usb
  4. Clicked on the desktop shortcut for Minimal ADB and Fastboot to open a cmd window
  5. Ran adb -d shell appops set com.catchingnow.tinyclipboardmanager SYSTEM_ALERT_WINDOW allow; The daemon started.
  6. 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?

5
  • 1
    Regarding the error you're getting, was the workaround written in context to your exact model device? AFAIK the OEM can intervene with permission configurations so these types of workarounds usually are not one-size-fits-all. There used to be a method of "borrowing" a different user to grant permissions (like on some...
    – Arctiic
    Commented Sep 15, 2021 at 4:56
  • 1
    ...versions of FireOS, where you can "use" Facebook's user to disable OEM apps). You might want to try XDA as well, under your device's board/thread.
    – Arctiic
    Commented Sep 15, 2021 at 4:56
  • 1
    workaround for android 10, you have android 11
    – alecxs
    Commented Sep 17, 2021 at 1:06
  • I see a similar problem with Logcat Reader that worked with Android 8.0, but now fails (on another device) with Android 12. Seems Android 12 does not allow that anymore, or is there an additional setting needed?
    – U. Windl
    Commented Oct 22, 2022 at 19:17
  • See also forum.xda-developers.com/t/…
    – U. Windl
    Commented Oct 22, 2022 at 19:32

2 Answers 2

1

For Oppo Color OS 12.1 (Android 12), this worked for me:

I disabled the option "Verify apps over USB" (in German: "Über USB installierte Apps prüfen")

Developer Setting in Oppo's Color OS 12.2

After that, the command adb shell pm grant com.dp.logcatapp android.permission.READ_LOGS succeeded.

0

This worked for me on Mi 9T Pro: I needed to ACTIVATE --> below "USB Debugging" --> "USB-Debugging (Sicherheitseinstellungen) Berechtigungen … erlauben".

1
  • On MIUI13, you might also need to activate "Enable viewing attributes"
    – yc t
    Commented Sep 6 at 2:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .