com.joaomcgd.taskerpermissions fails to set WRITE_SECURE_SETTINGS

64 views
Skip to first unread message

Soudane GMTA

unread,
Mar 26, 2023, 3:46:47 PM3/26/23
to Tasker
I am using the latest Tasker beta on my rooted Android 11 device.

And I am using com.joaomcgd.taskerpermissions on my Ubuntu 20.0.4 system. It works very well to set most Tasker permissions. However, if I select the "Tasker Settings" screen and try to enable "Write Secure Settings" (android.permission.WRITE_SECURE_SETTINGS), it generates the following error ...

Running command line Server /opt/com.joaomgcd.taskerpermissions/bin/linux/adb -s 15311FDD4001YK shell "pm grant com.joaomgcd.taskersettings android.permission.WRITE_SECURE_SETTINGS"
Command line result {
  code: 255,
  out: '',
  error: '\n' +
    "Exception occurred while executing 'grant':\n" +
    'java.lang.SecurityException: Package com.joaomgcd.taskersettings has not requested permission android.permission.WRITE_SECURE_SETTINGS\n' +
    '\tat com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:448)\n' +
    '\tat com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1457)\n' +
    '\tat com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1410)\n' +
    '\tat com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2300)\n' +
    '\tat com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:251)\n' +
    '\tat android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)\n' +
    '\tat android.os.ShellCommand.exec(ShellCommand.java:44)\n' +
    '\tat com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21815)\n' +
    '\tat android.os.Binder.shellCommand(Binder.java:929)\n' +
    '\tat android.os.Binder.onTransact(Binder.java:813)\n' +
    '\tat android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4621)\n' +
    '\tat com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4372)\n' +
    '\tat android.os.Binder.execTransactInternal(Binder.java:1159)\n' +
    '\tat android.os.Binder.execTransact(Binder.java:1123)\n'
}


Also, if I simply run the following in an "adb shell" session ...

pm grant com.joaomgcd.taskersettings android.permission.WRITE_SECURE_SETTINGS

... it also fails with the same java.lang.SecurityException

If I do su - in the adb shell and run the same pm command, it continues to fail in the same way.

Does anyone know how to get this to work?

Thank you in advance.

Soudane GMTA

unread,
Mar 26, 2023, 3:51:45 PM3/26/23
to Tasker
PS: I'm not sure, but I'm guessing that this line in the stack trace might possibly explain the problem:


Package com.joaomgcd.taskersettings has not requested permission android.permission.WRITE_SECURE_SETTINGS

Could it be that android.permission.WRITE_SECURE_SETTINGS is not present in the Tasker app's manifest?

Again, I'm running the lastest Tasker beta.

Soudane GMTA

unread,
Mar 26, 2023, 3:57:32 PM3/26/23
to Tasker
PPS: This is not an MIUI device. It's a Pixel 5, and there is no "Disable permission monitoring" within Developer Options.

Soudane GMTA

unread,
Mar 26, 2023, 4:32:31 PM3/26/23
to Tasker
PPPS: Not the "Tasker app's manifest" as I incorrectly wrote above, but rather, the "Tasker Settings app's manifest".

João Dias

unread,
Mar 27, 2023, 4:49:22 AM3/27/23
to tas...@googlegroups.com
You need to install the latest version from github so that Tasker Settings has that permission: https://github.com/joaomgcd/TaskerSettings/releases/tag/v1.5.0

Hope this helps!

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


Soudane GMTA

unread,
Mar 27, 2023, 11:00:46 AM3/27/23
to Tasker
Yes, with that new version of Tasker.Settings, WRITE_SECURE_SETTINGS is indeed now properly settable for me via com.joaomcgd.taskerpermissions

Thank you very much!
Reply all
Reply to author
Forward
0 new messages