use tasker to set accessibility settings for other apps

2,375 views
Skip to first unread message

r.t.a.j....@gmail.com

unread,
Mar 25, 2017, 4:10:44 PM3/25/17
to Tasker

My apps "lastpass" and "kaspersky" often are not enabled on my android S3. I would like to use Tasker to change the accessibility settings of these apps to "enabled". 
But I can't figure out how to do this. Any advice?
Ideally, I would like tasker to check the settings for these apps every few hours and then set them to enabled if they are not.

John Doe

unread,
Mar 26, 2017, 2:46:06 AM3/26/17
to Tasker
s3? Android version?

r.t.a.j....@gmail.com

unread,
Mar 26, 2017, 9:37:47 AM3/26/17
to Tasker

Hey John, that is Galaxy S3, Android, version 6.0.1

John Doe

unread,
Mar 26, 2017, 9:42:01 AM3/26/17
to Tasker
You can use securetask plugin to enable and disable accessibility services writing on the setting enabled_accessibiluty_services it's a comma separated list of values. Simply read the value when everything is ok (jiut one time) saving the result in a global variable and then write the value any time you want to restore the services.

r.t.a.j....@gmail.com

unread,
Mar 26, 2017, 1:05:36 PM3/26/17
to Tasker

Thanks, that sounds great. However, I have to admit I don't know how to do this. I now installed securetask on my android machine. But now what do I do? I am new to tasker, so all this still sounds Greek to me. 
Could you please guide me through the steps?

John Doe

unread,
Mar 26, 2017, 1:09:58 PM3/26/17
to Tasker
When you open the app there is a button called "how to grant the permissions". If you have root you can use a run shell action directly on the phone, otherwise you need to use adb using a connected pc. In the second case you need to download adb and the needed usb driver for your phone (if you use windows). Then you need to enalbe the developer options on the phone, enable usb debugging and then use a shell on your pc to use adb. There are several tutorials on youtube. When you did this step, then you can use the plugin action secure settings. Then you can read or write any settings. As I told you in the my previous post, you need to read the setting as I said.

Ron Parker

unread,
Dec 14, 2019, 3:06:31 PM12/14/19
to Tasker


On Sunday, March 26, 2017 at 10:09:58 AM UTC-7, John Doe wrote:
When you did this step, then you can use the plugin action secure settings. Then you can read or write any settings. As I told you in the my previous post, you need to read the setting as I said.

Can you provide an example of how this is done to set accessibility settings on for an app that keeps having this setting turned off? 

Robert Ryan

unread,
Dec 14, 2019, 3:50:59 PM12/14/19
to tas...@googlegroups.com
You need to know the name of accessibility service. Here's an example restarting Tasker's accessibility service:


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tasker/1c7a843d-1a9e-4c66-a688-364a856e4a81%40googlegroups.com.

Ron Parker

unread,
Dec 14, 2019, 4:04:07 PM12/14/19
to Tasker
Thank you for the link.  It would not import.  I did find another example here that I used as a model: https://www.reddit.com/r/tasker/comments/83lpg6/damned_accessibility_settings_on_nougat/

First, I found the package name / service name pair for Nova Launcher like this:

dumpsys package com.teslacoilsw.launcher | grep Accessibility                  <


comes back with


com.teslacoilsw.launcher/.NovaAccessibilityService


I modified the example:

SecureTask
Profile: Tasker accessibility restore (89)
Event: Settings changed [ 
    Configuration:Monitor secure enabled_accessibility_services ]
Enter: Anon (103)
A1: Secure Settings [ 
    Configuration:Read secure enabled_accessibility_services 
    Timeout (Seconds):30 

A2: Stop [ 
    With Error:Off 
    Task: ] If [ %services ~ *com.teslacoilsw.launcher* ]
A3: Variable Set [ 
    Name:%services 
    To::com.teslacoilsw.launcher/.NovaAccessibilityService Recurse Variables:Off 
    Do Maths:Off 
    Append:On 

A4: Secure Settings [ 
    Configuration:Write secure enabled_accessibility_services value %services 
    Timeout (Seconds):30 ] 

Overall, basically, I read the current enabled accessibility services, and if Nova Launcher isn't there, I append Nova Launcher to the list and re-write.  Having NEVER done this before my questions are around syntax:

1. Is the package name / service name format correct?  Should it be  com.teslacoilsw.launcher/.NovaAccessibilityService or  com.teslacoilsw.launcher/ com.teslacoilsw.launcher.NovaAccessibilityService?

2. In A3,  the "::" characters need to be pre-pended to the package name / service name value?

Thank you very much for your response.

On Saturday, December 14, 2019 at 12:50:59 PM UTC-8, Robert Ryan wrote:
You need to know the name of accessibility service. Here's an example restarting Tasker's accessibility service:


On December 14, 2019 1:06:39 PM Ron Parker <swinging...@gmail.com> wrote:



On Sunday, March 26, 2017 at 10:09:58 AM UTC-7, John Doe wrote:
When you did this step, then you can use the plugin action secure settings. Then you can read or write any settings. As I told you in the my previous post, you need to read the setting as I said.

Can you provide an example of how this is done to set accessibility settings on for an app that keeps having this setting turned off? 

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tas...@googlegroups.com.

Ron Parker

unread,
Dec 14, 2019, 4:26:58 PM12/14/19
to Tasker
My bad.  I was indeed able to import the link into tasker. I see you are using the custom setting option which appears to be a WHOLE lot easier.  I think I follow this.

Thank you SO much!



On Saturday, December 14, 2019 at 12:50:59 PM UTC-8, Robert Ryan wrote:
You need to know the name of accessibility service. Here's an example restarting Tasker's accessibility service:


On December 14, 2019 1:06:39 PM Ron Parker <swinging...@gmail.com> wrote:



On Sunday, March 26, 2017 at 10:09:58 AM UTC-7, John Doe wrote:
When you did this step, then you can use the plugin action secure settings. Then you can read or write any settings. As I told you in the my previous post, you need to read the setting as I said.

Can you provide an example of how this is done to set accessibility settings on for an app that keeps having this setting turned off? 

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tas...@googlegroups.com.

Robert Ryan

unread,
Dec 14, 2019, 4:27:14 PM12/14/19
to tas...@googlegroups.com
On December 14, 2019 2:04:13 PM Ron Parker <swinging...@gmail.com> wrote:
Thank you for the link.  It would not import. 

Imports fine on my device. What Tasker version are you using?

Here is the decription:

        Restart Tasker Accessibility
        
    A1: Variable Set 
        Name: %accessibility 
        To: net.dinglisch.android.taskerm/net.dinglisch.android.taskerm.MyAccessibilityService 
        Recurse Variables: Off 
        Do Maths: Off 
        Append: Off 
        Max Rounding Digits: 0 
        
    A2: Custom Setting 
        Type: Secure 
        Name: enabled_accessibility_services 
        Use Root: Off 
        Read Setting To: %enabled_services 
        
    A3: Variable Search Replace 
        Variable: %enabled_services 
        Search: (^\Q%accessibility\E:?)|(:\Q%accessibility\E) 
        Ignore Case: Off 
        Multi-Line: Off 
        One Match Only: Off 
        Replace Matches: On 
        
    A4: Custom Setting 
        Type: Secure 
        Name: enabled_accessibility_services 
        Value: %enabled_services 
        Use Root: Off 
        
    A5: Wait 
        MS: 0 
        Seconds: 1 
        Minutes: 0 
        Hours: 0 
        Days: 0 
        
    A6: Custom Setting 
        Type: Secure 
        Name: enabled_accessibility_services 
        Value: %accessibility:%enabled_services 
        Use Root: Off 



1. Is the package name / service name format correct?  Should it be  com.teslacoilsw.launcher/.NovaAccessibilityService or  com.teslacoilsw.launcher/ com.teslacoilsw.launcher.NovaAccessibilityService?

The first one. 


2. In A3,  the "::" characters need to be pre-pended to the package name / service name value?

Just one : is needed. 


Thank you very much for your response.

Hope you get it working. Good luck. 
Reply all
Reply to author
Forward
0 new messages