How to grant permission to the application that is downloaded from the playback store?

I already know that google rejected this dump permission, except for system applications from version 4.1 and later.

But still, I can provide this dump permission using the following command for debugged applications.

:

adb shell pm grant "com.packageName" android.permission.DUMP

But I can’t do the same for applications downloaded from the play store,

:

adb shell pm grant "com.playStoreApp" android.permission.DUMP

mistake:

Operation not allowed: java.lang.SecurityException: Package com.playStoreApp did not request android.permission.DUMP permission

Are there any hacks or work to grant permissions for applications in the play store?

Thanks in advance.

+7
android shell permissions adb dumpsys
source share
1 answer

There is no workaround. android.permission.Dump is protected by system protection levels, signatures, and development permissions. Line 1993 source shows you this. If your APK is signed with a framework certificate, located in the priv-app directory, or debugged (see below), you can use the pm service to provide permission, but otherwise the code specifically prevents what you request (line 2624 source ).

You can create debug APKs by setting the debug attribute in buildType via build.gradle. Android DSL Example:

android { ... buildTypes { debug { debuggable true ... } quality_assurance { debuggable true } ... } 
+2
source share

All Articles