Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Already I know google denied this dump permission except system applications from version 4.1 and more.

But still I can able to grant this dump permission using following command for debuggable applications.,

command :

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

But i cannot do the same for the applications which is downloaded from play store,

command :

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

error :

Operation not allowed: java.lang.SecurityException: Package com.playStoreApp has not requested permission android.permission.DUMP

Is there is any hack or work around to grant permission for play store apps?

Thanks in advance.

like image 228
Rubanraj Ravichandran Avatar asked May 09 '15 10:05

Rubanraj Ravichandran


People also ask

How do I grant an app access to my Google account?

Go to the Security section of your Google Account. Under “Third-party apps with account access,” select Manage third-party access. Select the app or service you want to review.


1 Answers

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
        }
    ...
}
like image 75
PaulR Avatar answered Nov 07 '22 16:11

PaulR