[Android General] mkhcb:
Often times, I see myself having to disable AdAway to use a Google Shopping or a Slickdeals link. This involved a process of exiting my browser, launching AdAway, disabling AdAway, going back to the browser, opening the desired link and then re-enable AdAway through the same process of exiting the browser to open AdAway again. Surely there was a simpler method! Attached below, I have posted a Tasker xml file that adds a Quick Setting tile to your system and allows users to enable/disable their AdBlocker. This uses the same sources as AdAway, but works independent of the app. Therefore, you don't need AdAway for this to work.

I have also included a compiled APK, using Tasker's AppFactory, for you fiscal conservatives who don't want to buy Tasker.

Coming soon: A unique icon....

To note, if you are using systemless root, like MagiskSU, you must enable systemless hosts in the settings of MagiskSU/root client.

Special thanks to my telegram pals Armando and Esperanza, for their help in testing the task.

Another special thanks to Armando for the app icon.

For those afraid of the download button, a copy of the xml file can be found below:

<TaskerData sr="" dvi="1" tv="5.1m">
<Task sr="task2">
<cdate>1496603118566</cdate>
<edate>1518881841270</edate>
<id>2</id>
<nme>AdBlocker</nme>
<pri>100</pri>
<Kid sr="Kid">
<launchID>2</launchID>
<pkg>rxb.srv.ila</pkg>
<vnme>v11</vnme>
<vnum>11</vnum>
</Kid>
<Action sr="act0" ve="7">
<code>342</code>
<Int sr="arg0" val="5"/>
<Str sr="arg1" ve="3">/sdcard/AdBlocker/status/status.txt</Str>
<Str sr="arg2" ve="3">%old_status</Str>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%old_status</lhs>
<op>2</op>
<rhs>false</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act10" ve="7">
<code>512</code>
<Int sr="arg0" val="1"/>
</Action>
<Action sr="act11" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">Enabling AdBlocker</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act12" ve="7">
<code>162</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3">AdBlocker</Str>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act13" ve="7">
<code>118</code>
<Str sr="arg0" ve="3">https://adaway.org/hosts.txt</Str>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="10"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">/sdcard/AdBlocker/adaway.txt</Str>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act14" ve="7">
<code>118</code>
<Str sr="arg0" ve="3">http://winhelp2002.mvps.org/hosts.txt</Str>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="10"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">/sdcard/AdBlocker/mvps.txt</Str>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act15" ve="7">
<code>118</code>
<Str sr="arg0" ve="3">http://hosts-file.net/.%5Cad_servers.txt</Str>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="10"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">/sdcard/AdBlocker/hphosts.txt</Str>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act16" ve="7">
<code>118</code>
<Str sr="arg0" ve="3">http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext</Str>
<Str sr="arg1" ve="3"/>
<Str sr="arg2" ve="3"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Int sr="arg5" val="10"/>
<Str sr="arg6" ve="3"/>
<Str sr="arg7" ve="3">/sdcard/AdBlocker/yoyos.txt</Str>
<Int sr="arg8" val="0"/>
</Action>
<Action sr="act17" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">sort -u /sdcard/AdBlocker/*.txt > /etc/hosts</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act18" ve="7">
<code>410</code>
<Str sr="arg0" ve="3">/sdcard/AdBlocker/status/status.txt</Str>
<Str sr="arg1" ve="3">2</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act19" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">AdBlocker Enabled</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">Creating Directories</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act20" ve="7">
<code>43</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%status</lhs>
<op>2</op>
<rhs>2</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act21" ve="7">
<code>512</code>
<Int sr="arg0" val="1"/>
</Action>
<Action sr="act22" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">Disabling AdBlocker</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act23" ve="7">
<code>162</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3">AdBlocker</Str>
<Int sr="arg2" val="1"/>
</Action>
<Action sr="act24" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">truncate -s0 /etc/hosts</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act25" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">echo "127.0.0.1 localhost
::1 localhost" >> /etc/hosts</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act26" ve="7">
<code>410</code>
<Str sr="arg0" ve="3">/sdcard/AdBlocker/status/status.txt</Str>
<Str sr="arg1" ve="3">1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act27" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">AdBlocker Disabled</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act28" ve="7">
<code>38</code>
</Action>
<Action sr="act3" ve="7">
<code>409</code>
<Str sr="arg0" ve="3">/sdcard/AdBlocker</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act4" ve="7">
<code>409</code>
<Str sr="arg0" ve="3">/sdcard/AdBlocker/status</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
</Action>
<Action sr="act5" ve="7">
<code>410</code>
<Str sr="arg0" ve="3">/sdcard/AdBlocker/status/status.txt</Str>
<Str sr="arg1" ve="3">1</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>135</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3"/>
</Action>
<Action sr="act7" ve="7">
<code>43</code>
</Action>
<Action sr="act8" ve="7">
<code>417</code>
<Str sr="arg0" ve="3">/sdcard/AdBlocker/status/status.txt</Str>
<Str sr="arg1" ve="3">%status</Str>
</Action>
<Action sr="act9" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%status</lhs>
<op>2</op>
<rhs>1</rhs>
</Condition>
</ConditionList>
</Action>
<Img sr="icn" ve="2">
<uri>content://com.android.providers.downloads.documents/document/478</uri>
</Img>
</Task>
</TaskerData>

If you are using the tasker xml, please navigate to: Tasker> Preferences> Action> and add "AdBlocker" to the 2nd quick settings task.

Per request, here is a telegram group for feature discussion: http://t.me/taskerAdBlocker