Pittvandewitt / Wavelet

A quick rundown on each feature and its settings
https://pittvandewitt.github.io/Wavelet/
655 stars 35 forks source link

pm grant DUMP does not work #82

Closed rcdailey closed 2 years ago

rcdailey commented 3 years ago

Following the instructions to enable enhanced mode, I ran the following command:

OnePlus7Pro:/ $ pm grant com.pittvandewitt.wavelet android.permission.DUMP

I got the following exception:

Exception occurred while executing 'grant':
java.lang.SecurityException: Package com.pittvandewitt.wavelet has not requested permission android.permission.DUMP
        at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:446)
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1477)
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1430)
        at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2295)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:250)
        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:22322)
        at android.os.Binder.shellCommand(Binder.java:940)
        at android.os.Binder.onTransact(Binder.java:824)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4644)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4515)
        at android.os.Binder.execTransactInternal(Binder.java:1170)
        at android.os.Binder.execTransact(Binder.java:1134)

I googled this and apparently you need to request DUMP in AndroidManifest.xml or otherwise you can't give permission. I'm not 100% sure if that's the root cause here.

I'm running a OnePlus 7 Pro using Android 11.

frosty5689 commented 3 years ago

You need to join the Beta program on Google Play Store to get the latest version that requests for the new DUMP permission and supports the new Enhanced Session Detection mode.

rcdailey commented 3 years ago

I will try that. If that works, that should be documented as step number 1 in the instructions I linked.

rcdailey commented 3 years ago

I can confirm beta enrollment fixed the issue. I'll leave this issue open in hopes that we can at least address missing documentation. Thank you for the help.

Pittvandewitt commented 3 years ago

This is only an issue for people using outdated builds. Joining the beta program is not needed anymore.

frosty5689 commented 3 years ago

Was a new official version pushed today? When I installed Wavelet this morning it was still on the March version

Pittvandewitt commented 3 years ago

That is correct. Version 20.06 went live about 6 hours ago.

frosty5689 commented 3 years ago

I left the beta program and installed the new official version. I noticed even after granting both permissions detection of music apps is still iffy, especially for ones that doesn't broadcast sessions correctly. A reboot fixed it nicely. Maybe it should be in a troubleshooting tip? This applied to Plexamp and Youtube Music as well as SoundCloud. Spotify was the only one that worked without reboot (if all the apps had been open before granting permissions)

WROIATE commented 2 years ago

Excuse, I got the same problem (maybe?) I using One Plus 9R and my android version is 12. What can I do to solve this? Sorry, it's my fault to not switch Disable Permission Monitoring on

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:2186)
        at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2214)
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1470)
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1452)
        at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:378)
        at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2419)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:260)
        at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
        at android.os.ShellCommand.exec(ShellCommand.java:38)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:25787)
        at android.os.Binder.shellCommand(Binder.java:970)
        at android.os.Binder.onTransact(Binder.java:854)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8879)
        at android.os.Binder.execTransactInternal(Binder.java:1226)
        at android.os.Binder.execTransact(Binder.java:1163)
jaum20 commented 2 years ago

I still have this problem. I'm using Miui 12.5.7

msaini28r commented 2 years ago

Using Miui 12.5.3 and I joined the beta tester till some of the features are not working problem, Being a developer I believe the last experience was better when I don't have to connect the computer and move to beta. Hope you can eliminate those things soon !!

SentryGA commented 2 years ago

Maybe this stackoverflow might help for MIUI.

Mikealittlebird commented 1 month ago

on some model the Disable Permission Monitoring option are name as "disable child process restrictions" you need to enable it before toggle the usb debug (if you already turn them on. you can just turn it off and on again.).