1
Declined

Tasker manifest needs to request permission to change runtime permissions of other apps

Tasker manifest needs to request permission to change runtime permissions of other apps. 

I need to be able to grant or revoke the permissions for other apps.  A lot of times, an app works great when I want it run in the forground, but is a bit obnoxious when running in the background.  I may be okay with background app accessing the internet, but don't want it getting GPS location while in the background, only when active in the foreground. 
Tasker could easily handle the context, but cannot do the action of preventing the app from location services.  Not unless it could revoke or grant runtime permissions.

adb shell pm grant net.dinglisch.android.taskerm android.permission.GRANT_RUNTIME_PERMISSIONS

Operation not allowed: java.lang.SecurityException: Package net.dinglisch.android.taskerm has not requested permission android.permission.GRANT_RUNTIME_PERMISSIONS

(same for REVOKE_RUNTIME_PERMISSIONS)

5 replies

How exactly are you trying to grant the permission via shell command?

A

I've tried Tasker's Run Code and Secure Settings Run Command

pm revoke com.app.name android.permission.ACCESS_FINE_LOCATION

which results in the following output

Neither user 10133 nor current process has android.permission.REVOKE_RUNTIME_PERMISSIONS.

And it seems that since Tasker and Secure Settings DO NOT have this permissions requests, REVOKE|GRANT_RUNTIME_PERMISSIONS, in its manifests... I cannot add the permission using ADB.

I ran dumpsys on Tasker to confirm this.

I tried but unfortunately if Tasker has that permission in the manifest, this happens:

adb shell pm grant net.dinglisch.android.taskerm android.permission.GRANT_RUNTIME_PERMISSIONS
Operation not allowed: java.lang.SecurityException: Permission android.permission.GRANT_RUNTIME_PERMISSIONS is not a changeable permission type
A

Bummer.  So what options do I have with an unrooted 5X using Tasker?

Can I pause, suspend, disable the target app?  The kill app action only seems to stop the running process, but the running service of the app just starts back up again. Can I detect when an app is getting location data?  I see the "location" icon in the bar when this happens, but would like Tasker to kill or disable the app when triggered by this.

Thanks.

Without root you don't have any options unfortunately, sorry!

L

you need to use securetask plugin to do it