How to grant permission for application which is downloaded from play store? How to grant permission for application which is downloaded from play store? shell shell

How to grant permission for application which is downloaded from play store?


There is not a workaround. android.permission.Dump is protected by system, signature, and development permission protection levels. Line 1993 of the source shows you this. If your APK is signed with the framework cert, is in the priv-app directory, or debuggable (see below) you can use the pm service to grant the permission, but otherwise the code specifically prevents what you're asking for (line 2624 of source).

Debuggable APKs can be created through setting the debuggable attribute on a buildType via build.gradle. Sample Android DSL:

android {    ...    buildTypes {        debug {            debuggable true            ...        }        quality_assurance {            debuggable true        }    ...}