AutoTools is another popular plugin for Tasker made by Joao Dias – the developer behind all AutoApps. It is a swiss knife to android settings and options.  With the latest iteration of the plugin, some of the actions available previously in Secure Settings have been made possible, even for users without the root. If you were unlucky with Secure Settings, or didn’t find a run shell action  matching your needs (you can see over 40 of them in this article).

This article aims to show you how to use AutoTools in Tasker. I will be going over each available action and give you the best overview of it, so you could use it in your own creations.

AutoTools – Conditions

While an event condition is available, I was unable to populate any of the variables associated with it on Android Nougat.

AutoTools – Actions

Action Report

Reports to the Action Wait that the task has been completed, therefore previously stopped Action Wait in another task can continue.

Action Wait

Stops the task from  being completed, Tasker will wait for the Report action to respond before the task is completed. If you wish to run another Task  mid the current one, simply add this action, and Action Report at the end of the task you wish to run. (credit Ratchet_Guy r/Tasker)

Arrays

(Android N/Android MM/Android L)

This action allows you to play with the arrays. Input  allows you to add new arrays or create the new ones. The default array format is  array_name1()|array_name2()|array_name3()  and  the values of each array are separated by default by comma:  value1,value2,value3. It is possible to read arrays as CSV files where each line is a new array with a comma separated values and you can read arrays directly from a file.

The output contains the arrays after the data has been processed or manipulated. A number of arrays will be the same as in input, and you can also name it differently if needed.

Sorting allows you to set a specific order  for your arrays.

Adding/removing values from the arrays can be done by push and pop actions. You can specify what elements can be added or removed and you can set the position which gets pushed or popped.

Merging allows you to combine the data from arrays together.  Elements from array 1 are merged with elements from array 2 while keeping their position in the array.

Filtering allows us to use one of the arrays as a filter (unique), specify a filter manually, or create a RegEx rule (filter) or compare the array to the previous version and retains the new elements only (keep only new).

If you wish to know more about arrays this video will help you.

Badges

You can now set, read and respond to badges displayed on top of an icon. These are iPhone alike values of numbers of new notifications. Not all launchers allow for this and Nova and Lightning launchers are not supported.

Read – will let you get the value of the last seen badge value. (applied by Autotools)
Write – will let you write the value to the icon
Condition – you will be able to respond to the value if it reaches a certain value and run  associated task

Chrome Custom Tabs

(Android N/Android MM/Android L)

Screenshot_20160907-111550Do you remember the search results window that is opened when you  google for something in Google Now? It is not a fully loaded chrome window, but a custom one. This action opens one for you and allows you to customise the tab itself. you can set a colour and custom buttons that will be available at the bottom of the web page. You can also assign custom menu items to the 3 dot menu in the corner and take the advantage  of full AutoApps action system. The task can continue or wait for the tab to be closed.

Connectivity

(Android N/Android MM/Android L)

Screenshot_20160907-110210Another useful action in AutoTools. You can test the connectivity between the device and: Internet, Bluetooth, WIFI, Network and USB. Action will return a set of local variables that can be used later on in the task. Additional  filters are available to check for the specific devices. Action currently reports an error on MM and L devices when checking for signal strength. Json Action should be used to parse the WIFI and BT and Signal Strength info into a more usable form.

Dialog

(Android N/Android MM/Android L)

This slideshow requires JavaScript.

This action will display an overlay notification which will in many cases request user interaction. There is an entire list of dialogs you can create. User input will be stored in a local variable  – and available to be used later in that task. With each action – you get additional options to customise the look, add icons or custom actions. The dialogs include: notifications, with buttons, colour picker, date picker,  progress bar, map image, fingerprint scan, text input. Each one has associated options to customise the actions and behaviours. I don’t believe Android L has fingerprint support.

Flashlight

(Android N/Android MM/Android L)

Screenshot_20160907-101828This is pretty straightforward – take the control of your flashlight. Apart from toggle behaviour, you get an access to create a flashing pattern. These are stored in a variable and contain the time in milliseconds of ON/OFF states separated by a comma. The option is available on devices with Android Marshmallow or higher.

Gestures Screen

(Android N/Android MM/Android L)

Screenshot_20160907-135702Use gestures on screen and move objects around executing AutoApps commands. You can create this way simple interfaces that would issue commands and activate tasks created in Tasker.

Json Read

(Android N/Android MM/Android L)

Screenshot_20160907-134535This action allows you to obtain the Json formatted data and manipulate its content. Available actions allow for sorting, mathematical operations and filtering. Example of how you can use the data is available in a very good write-up on Reddit by Ratchet_Guy

Json Write

(Android N/Android MM/Android L)

This action allows you to write a new set of data into a Json  data. You can append the data to existing database, or build the data base from a scratch.

LogCat

(Android N/Android MM/Android L)

Screenshot_20160907-114226Display the Android LogCat  or specific values  defined by filters or RegEx. Information is available in a local variable.

Math

(Android N/Android MM/Android L)

Screenshot_20160907-112236Set of mathematical calculations available on the set of numbers.  Numbers are separated by commas, and decimal values are entered after the . symbol. You can calculate the sum, the average, pick the biggest and the smallest value. The result is available in a local variable.

Muzei

(Android N/Android MM/Android L)

Screenshot_20160907-121650This setting requires Muzei Wallpaper app installed to work. You can use AutoTools to change the wallpapers and their schedules automatically, without creating a separate profile. Live wallpaper Musei has to be selected, and AutoTools picked as the source.

OCR

(Android N/Android MM/Android L)

Screenshot_20160907-113158If you need to read a text from an image and make it available as a string, this option will scan the image and put available words into a local array for you.

RegEx

(Android N/Android MM/Android L)

Sometimes the RegEx search replace can be lacking in functionality, this action enables advanced RegEx features like multiple capturing groups and assigning variables to your matches. Same functionality would require often complicated loops with the Tasker alone. Pretty good write up on RegEx with AutoTools is done on Reddit by Ratchet_Guy.

SSH

(Android N/Android MM/Android L)

1473244783_Screenshot_20160907-113805-picsayIf you have a need to connect to a Linux machine  you can use the SSH to execute the line of code. Configuration requires your login credentials and internet address, then the code can be executed. The return info is available through the local variable. There are also options to push the file through.

Secure Settings

(Android N/Android MM/Android L)

Screenshot_20160907-142701This is one of the newest options and comes with a warning. I’m testing this on Nougat, Lolipop and Marshmallow. Before settings can be used, a setup is required. Connect your phone to a PC via ADB and run:

adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTING
Or you can be little cheeky and run shell in tasker: (root would be best to have)
pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTING

Nougat experience:
I was not able to turn off the mobile data (toggle icon shows updated status but internet was still present) Location, Night Mode, Battery Saver, System Animations and Services worked correctly. Custom Settings are subject to the Run Shell commands limitations. For more details please see this post.

Android MM:
I was not able to turn off the mobile data (toggle icon shows updated status but internet was still present) Location, Night Mode, Battery Saver, System Animations and Services worked correctly. Custom Settings are subject to the Run Shell commands limitations. For more details please see this post.

Android L (not rooted)
I was getting errors, and I was not able to use the shell commands to grant the permissions to AutoTools

 

Sensors

(Android N/Android MM/Android L)

Screenshot_20160907-133628This action allows you to get a raw output from different sensors available on your device. The data is passed in a local variable, and you will need to check the ID of the sensor in question. Android L device I have is not rooted, and I was not able to get any values.

https://developer.android.com/reference/android/hardware/Sensor.html

Use  Constant Value as the ID number for the sensor.

System State

(Android N/Android MM/Android L)

Screenshot_20160907-132907The action allows you to determine if the music is playing or if the speaker phone is in use. The values are passed in local variables as boolean (true/false)

Text

(Android N/Android MM/Android L)

Screenshot_20160907-140412This action allows you to manipulate a text file. Operations available allow for matching the text, formatting the lines, encoding, converting and changing the words and characters. In short, if you have a block of text that needs to be formatted, and modified, this set of tools would allow you to perform a lot of operations on it.

Time

(Android N/Android MM/Android L)

Screenshot_20160907-114955A bunch of tools to format your UNIX time  to human readable format- the same one you get using the %TIMES variable. You can convert the date, time span, and add the time values to each other. Results are stored in local variables.

Toast

(Android N/Android MM/Android L)

Screenshot_20160907-115834If you even need to generate a toast, you can use this action to activate a custom made toast appear at the bottom of the screen. You can also modify where would you like the toast to appear. If using colours, note that slider on the left means toast/font colour will be completely transparent.

Vibration

(Android N/Android MM/Android L)

Screenshot_20160907-100757In similar fashion to the flashlight, you can turn on vibration motor, or create a vibration pattern of your choice. This is a very good way to create an extended notification buzzes, to make you aware of a new notification while your phone is in a pocket. Vibration pattern can be set as a local variable, which will contain the ON/OFF values in milliseconds separated by a comma.

 

[box type=”info”] AutoTools is available through the AutoApps subscription  [/box]
SHARE