Tasker Accessibility Service caused factory reset / wipe!

247 views
Skip to first unread message

Sal Lusso

unread,
Apr 4, 2017, 1:52:23 PM4/4/17
to Tasker
Hello. I'm running Marshmallow 6.0.1 and the latest Tasker (4.9u4) on a Motorola Moto G3 (2015).

I have many profiles which are dependent on the active Application, and this doesn't work unless I enable the Tasker Accessibilty Service. This is where the problems begin, because Android warns:
"If you turn on Tasker, your device won't use your screen lock to enhance data encryption."
First, this is a huge drawback to having to activate the Tasker Accessibility Service because the FDE no longer prompts for my screen lock when booting.

Even worse though, my device was completely wiped when I tried to later disable the Tasker Accessibility Service. I disabled the service, and at the next reboot I was told there was an encryption error and the device would perform a complete factory reset!  :/

So, a suggestion/question. I have noticed that other applications (such as Twilight, Malwarebytes) use Android's "Settings -> Security -> Apps with usage access" feature to access the current application instead of requiring an accessibility service.

Could Tasker not use the "usage access" method instead of an accessibilty service to get the active application?

Thanks!

Sal Lusso

unread,
May 1, 2017, 8:13:03 AM5/1/17
to Tasker
Bump. Any possibility on this?

Pent

unread,
May 1, 2017, 11:07:36 AM5/1/17
to Tasker
It's possible in the future as an option, but currently it works fine for almost everyone
with accessibility.

The advantage of accessibility is it's event based: that means it responds immediately to changes
in app it doesn't use any power unless the activity changes

The usage based approach, Tasker would have to keep asking for the current usage stats e.g. once per second.
I didn't see any event-based interface for the usage stats API last time I looked.

Pent

Sal Lusso

unread,
May 1, 2017, 11:37:40 AM5/1/17
to Tasker
Thanks for the reply, Pent.

Is there any way around the problem I got (Marshmallow 6.0.1) that activating the Tasker Accessibility Service makes device encryption no longer prompt for screen lock when booting? Am I doing something wrong?

Pent

unread,
May 1, 2017, 12:38:06 PM5/1/17
to Tasker
Sorry, I don't know anything about it, nothing sensible I can say except that it's an
Android-internal thing.

Enabling Tasker's accessibility service does not give it monstrous powers to change
important things on your system or wipe your device.

Pent
Message has been deleted

Sal Lusso

unread,
May 1, 2017, 1:21:21 PM5/1/17
to Tasker

It's how Android implemented accessibility services, which many people think is stupid.

But it's a big deal if you're trying to encrypt your device! It means you can't use Tasker accessibility service functionality and have your device encrypted with a password.

You've never heard of this? Other apps I use have changed to use usage access instead to prevent this conflict.




http://i.imgur.com/EKlHSho.png



Scott Miller

unread,
May 1, 2017, 8:02:50 PM5/1/17
to tas...@googlegroups.com
I think you may be slightly mistaken. The problem you describe is not universal. On my Nexus 6, I have Tasker accessibility turned on, and my device is encrypted, and I use a pin lock on my device. My device came with Android 6, and now has Android 7, and I've had Tasker configured this way since the beginning. This device is not rooted. The problem you are describing may be unique to your device.

Scott

--
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+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Sal Lusso

unread,
May 1, 2017, 8:46:56 PM5/1/17
to Tasker
It's a widely documented and discussed issue with Lollipop and Marshmallow:
https://www.google.com/search?q=marshmallow+accessibility+service+encryption+OR+encrypted

You have a Nexus device? Actually, it's you who may uniquely *not* have this issue. It's documented to work OK on Nexus with FDE and accessibilty services, but not for other devices. I came across this mentioned, but couldn't say the explanation for the difference!

Scott Miller

unread,
May 2, 2017, 6:36:19 AM5/2/17
to tas...@googlegroups.com
I see. I was not aware of this hidden encryption weakness. It seems my device is a victim of it as well. But I have several apps besides Tasker that use the accessibility service for their basic functionality that I probably won't be able to avoid the problem. At least now I won't maintain a false sense of security, and I'll be evaluating each of those other apps to decide if I really need them.

Scott

--

John Doe

unread,
May 27, 2017, 6:24:37 AM5/27/17
to Tasker
You can use IntentTask to detect foreground apps without using an accessibility service

Sal Lusso

unread,
May 27, 2017, 8:07:12 AM5/27/17
to Tasker
Oh, that is a great tip!

You mean this Tasker plugin app here I think: https://play.google.com/store/apps/details?id=com.balda.intenttask&hl=en

Do you have any examples of how to use it to replace Tasker's built-in foreground app detection?

John Doe

unread,
May 27, 2017, 8:09:01 AM5/27/17
to Tasker
It's quite simple. Open the app, enable the foreground detection option, grant the usage access permission to the app. Now you need to create a state condition with the plugin, nothing more.

Ben Olson

unread,
May 27, 2017, 1:09:47 PM5/27/17
to tas...@googlegroups.com
On Mon, May 1, 2017 at 11:37 AM, Sal Lusso <sel...@gmail.com> wrote:
> Is there any way around the problem I got (Marshmallow 6.0.1) that
> activating the Tasker Accessibility Service makes device encryption no
> longer prompt for screen lock when booting? Am I doing something wrong?

This happens to me as well, however all I have to do is go back into
the android security settings, reset my pin/password and it asks me
again if I'd like to be prompted for the code at boot. I'm able to
keep using Tasker with the accessibility services and keep my
encrypted device asking me for my code.

Have you given this a try?

pure.by

unread,
Jun 1, 2017, 4:45:44 AM6/1/17
to Tasker
You don't need any apps! 
When you add any accessibility service, Android thinks you are a disabled or blind person or something, so Android automatically de-activates the "Require pattern to start device" setting to prevent blind people from accidentally not being able to start up their phone sorta thing! 

All you have to do is manually re-enable the setting again!
  1. Activate Tasker Accessibility service. 
  2. Go to Android Security settings, and manually switch "Require pattern to start device" back on.
Now you have Tasker Accessibility service AND screen pattern on boot!

It's exactly what Ben Olson said above ↑
Cheers!
Message has been deleted

Sal Lusso

unread,
Jun 11, 2017, 4:14:06 AM6/11/17
to Tasker
Ben Olson and pure.by, I'm sure what you said is valid, but forgive me that after my phone got involuntarily wiped while messing with the Tasker accessibility service, there is no way I feel like experimenting with it anymore!

However, the IntentTask plugin described above has worked like a charm for me. I installed it and replace my profile conditions to use IntentTask foreground app monitoring, and all my functionality is back without having to enable the Tasker accessibility service.

Thanks for the suggestion, John Doe!
Reply all
Reply to author
Forward
0 new messages