I use Trigger to change bunches of settings based on NFC tags that I have at work, at home and in my bedroom at night. At night, I like to turn on Do Not Disturb mode, but I can't find a way to set it with Trigger. Or with Tasker, for that matter. Does any automation app have the capability to set Do Not Disturb? Or maybe is there even a widget out there to let me toggle it? The best I've found is the standard setting widget that takes me to that screen and lets me toggle the setting.
flu13 said:
I use Trigger to change bunches of settings based on NFC tags that I have at work, at home and in my bedroom at night. At night, I like to turn on Do Not Disturb mode, but I can't find a way to set it with Trigger. Or with Tasker, for that matter. Does any automation app have the capability to set Do Not Disturb? Or maybe is there even a widget out there to let me toggle it? The best I've found is the standard setting widget that takes me to that screen and lets me toggle the setting.
Click to expand...
Click to collapse
Tasker - > Audio - > interrupt mode.
Hope that helps. ?
First time I use the export, this is my task to put the interrupt mode on priority:
<TaskerData sr="" dvi="1" tv="4.6u3m">
<Task sr="task5">
<cdate>1429166028966</cdate>
<edate>1430311638274</edate>
<id>5</id>
<nme>+Interrupt</nme>
<pri>10</pri>
<Action sr="act0" ve="7">
<code>312</code>
<Int sr="arg0" val="1"/>
</Action>
<Action sr="act1" ve="7">
<code>548</code>
<Str sr="arg0" ve="3">Interrupt</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
</Task>
</TaskerData>
I have another one to restore the previous mode, and I trigger it when I'm connect to my Work Network
Awesome. Thank you so much. I would have never made that connection.
Related
what apps allow you to set a by program, or by time custom profile for brightness on your phone?
Hello,
I would like to implement the following useful function on my A700 (rooted, Stock ROM):
When neither headphones nor bluetooth are on, Dolby Mobile should be activated automatically (because I need it only on when using the internal speakers).
When either headphones or bluetooth are activated, Dolby Mobile should be set to "OFF" automatically.
I searched the A700 for config files, no success.
Then I thought: There must be a way to simulate - via script - the ticking of the "Dolby Mobile" checkbox in the settings of the tablet.
Because, when the checkbox is ticked, either some config file must be altered or an intent must be sent to some app. Right??
Up to now I couldn't find anything, it's frustrating!
I decompiled the "Settings.apk" in the hope to find informations. In the AndroidManifest.xml there are these lines:
Code:
<activity android:label="@string/acer_dolby_setting" android:name="Settings$AcerDolby" android:clearTaskOnLaunch="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.AcerDolby" />
<meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID" android:resource="@id/dolby_settings" />
</activity>
Is it possible to do what I want to do, or is it principally impossible in Android??
I could launch the Dolby Mobile settings section via script by calling "com.android.settings.Settings$AcerDolby", but how do I make the Settings app tick the checkbox (and do that without showing the Settings UI)?
Best Wishes,
Hasenbein
Hi,
Is there any way to control Xperia J Screen Brightness control? It does not have Ambient Air Sensor, So we have to only control the brightness manually.
I tried to control the brightness with Smart Connect Application at Different Time intervals, say Morning 8:00 -> 25%, At 12:00 Noon -> 50%, At 8:00 PM -> 10%.
Smart Connect says that the actions are initiated at the above time intervals and when I check in Settings --> Display --> Brightness, the slider moves according to the settings as set by Smart Connect, but the actual brightness remains the same (i.e if I had set it to 10% manually, it will remain at 10% throughout the day irrespective the settings setted by Smart Connect Application as above at different time. If I set it to 50%, it will remain at 50% and so on.)
I tried 2-3 another brightness control apps but same result.
This is the script i use to disable cores with tasker when the screen is off to save battery.
also we can create profiles per-application to alter the clock.
required:
-rooted phone
-tasker
create a new profile -> event -> display ->Display Off
then
new activity -> code - >execute shell
paste this code
Code:
stop mpdecision
echo "0" > /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu2/online
echo "0" > /sys/devices/system/cpu/cpu3/online
echo "0" > /sys/devices/system/cpu/cpu4/online
echo "0" > /sys/devices/system/cpu/cpu5/online
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu7/online
and check "use root"
then enable it. this will shut down cores 1-7 and leave online only core 0 (arm a-53 low consumption) when the scren goes off.
create a new profile -> event -> display ->Display On
then
new activity -> code - >execute shell
Code:
stop mpdecision
echo "1" > /sys/devices/system/cpu/cpu1/online
echo "1" > /sys/devices/system/cpu/cpu2/online
echo "1" > /sys/devices/system/cpu/cpu3/online
echo "1" > /sys/devices/system/cpu/cpu4/online
echo "1" > /sys/devices/system/cpu/cpu5/online
echo "1" > /sys/devices/system/cpu/cpu6/online
echo "1" > /sys/devices/system/cpu/cpu7/online
and check "use root"
then enable it. this will bring the cores back online when the screen is on.
I also created the same profile with the same activity but for "Display Unlocked", just to double check the trigger to bring the cores back is there.
----
Please note you can create profiles for every application or event,
just remember every application profile needs an ENTER activity (for example to enable the cores, and to spice up the frequency or governor) and an EXIT activity (for example to disable some cores again, and lower the frequencies)
you create an activity to change the frequency and governor from
Code:
activity -> click on the "+" button -> give it a name -> click on the "+" button again -> System -> CPU
here you create a new action for every core from 0 to 7 (governor, frequency min and max)
for example this activity named "MAX FREQ" brings all the cores online and sticks the cores to full frequency, for benchmarking for example! (save in an .xml file, than import in tasker by longpress the "activity" tab)
Code:
<TaskerData sr="" dvi="1" tv="4.7u3m">
<Task sr="task16">
<cdate>1446844849087</cdate>
<edate>1446945784323</edate>
<id>16</id>
<nme>MAX FREQ</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">stop mpdecision
echo "1" > /sys/devices/system/cpu/cpu4/online
echo "1" > /sys/devices/system/cpu/cpu5/online
echo "1" > /sys/devices/system/cpu/cpu6/online
echo "1" > /sys/devices/system/cpu/cpu7/online
echo "1" > /sys/devices/system/cpu/cpu1/online
echo "1" > /sys/devices/system/cpu/cpu2/online
echo "1" > /sys/devices/system/cpu/cpu3/online</Str>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>915</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act2" ve="7">
<code>915</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1555200"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act3" ve="7">
<code>915</code>
<Int sr="arg0" val="2"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1555200"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act4" ve="7">
<code>915</code>
<Int sr="arg0" val="3"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1555200"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act5" ve="7">
<code>915</code>
<Int sr="arg0" val="4"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act6" ve="7">
<code>915</code>
<Int sr="arg0" val="5"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act7" ve="7">
<code>915</code>
<Int sr="arg0" val="6"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act8" ve="7">
<code>915</code>
<Int sr="arg0" val="7"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
</Task>
</TaskerData>
for example to push the core to full power when running antutu
Code:
create a new profile -> event -> Application -> Antutu
then assign MAX FREQ as enter activity.
then you have to assign an exit activity when antutu is closed, for example the following RELAXED can be used:
this one brings the core back to normal scaling, interactive governor, but keeps the cores 6 and 7 disabled (essentially behaves like an hexa core snapdragon 808 in this state)
Code:
<TaskerData sr="" dvi="1" tv="4.7u3m">
<Task sr="task6">
<cdate>1446835385548</cdate>
<edate>1446946130520</edate>
<id>6</id>
<nme>RELAXED</nme>
<Action sr="act0" ve="7">
<code>915</code>
<Int sr="arg0" val="3"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act1" ve="7">
<code>915</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act2" ve="7">
<code>915</code>
<Int sr="arg0" val="2"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act3" ve="7">
<code>915</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act4" ve="7">
<code>915</code>
<Int sr="arg0" val="5"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act5" ve="7">
<code>915</code>
<Int sr="arg0" val="4"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act6" ve="7">
<code>915</code>
<Int sr="arg0" val="6"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act7" ve="7">
<code>915</code>
<Int sr="arg0" val="7"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act8" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">stop mpdecision
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu7/online</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>
</Task>
</TaskerData>
you can have 2 or 3 activities for different level of performance and assign them to several applications.
with the same method you can also go on full battery saving when below a certain battery percent, and everything you can imagine.
Attachment: a set of profiles to disable 7 cores when screen is off, enable only 6 when normal use and enable all 8 when web browsing.
Provided as is, just for example and to make you play around without writing code...
View attachment profiles.zip
nasone32 said:
This is the script i use to disable cores with tasker when the screen is off to save battery.
also we can create profiles per-application to alter the clock.
required:
-rooted phone
-tasker
create a new profile -> event -> display ->Display Off
then
new activity -> code - >execute shell
paste this code
Code:
stop mpdecision
echo "0" > /sys/devices/system/cpu/cpu1/online
echo "0" > /sys/devices/system/cpu/cpu2/online
echo "0" > /sys/devices/system/cpu/cpu3/online
echo "0" > /sys/devices/system/cpu/cpu4/online
echo "0" > /sys/devices/system/cpu/cpu5/online
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu7/online
and check "use root"
then enable it. this will shut down cores 1-7 and leave online only core 0 (arm a-53 low consumption) when the scren goes off.
create a new profile -> event -> display ->Display On
then
new activity -> code - >execute shell
Code:
stop mpdecision
echo "1" > /sys/devices/system/cpu/cpu1/online
echo "1" > /sys/devices/system/cpu/cpu2/online
echo "1" > /sys/devices/system/cpu/cpu3/online
echo "1" > /sys/devices/system/cpu/cpu4/online
echo "1" > /sys/devices/system/cpu/cpu5/online
echo "1" > /sys/devices/system/cpu/cpu6/online
echo "1" > /sys/devices/system/cpu/cpu7/online
and check "use root"
then enable it. this will bring the cores back online when the screen is on.
I also created the same profile with the same activity but for "Display Unlocked", just to double check the trigger to bring the cores back is there.
----
Please note you can create profiles for every application or event,
just remember every application profile needs an ENTER activity (for example to enable the cores, and to spice up the frequency or governor) and an EXIT activity (for example to disable some cores again, and lower the frequencies)
you create an activity to change the frequency and governor from
Code:
activity -> click on the "+" button -> give it a name -> click on the "+" button again -> System -> CPU
here you create a new action for every core from 0 to 7 (governor, frequency min and max)
for example this activity named "MAX FREQ" brings all the cores online and sticks the cores to full frequency, for benchmarking for example! (save in an .xml file, than import in tasker by longpress the "activity" tab)
Code:
<TaskerData sr="" dvi="1" tv="4.7u3m">
<Task sr="task16">
<cdate>1446844849087</cdate>
<edate>1446945784323</edate>
<id>16</id>
<nme>MAX FREQ</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">stop mpdecision
echo "1" > /sys/devices/system/cpu/cpu4/online
echo "1" > /sys/devices/system/cpu/cpu5/online
echo "1" > /sys/devices/system/cpu/cpu6/online
echo "1" > /sys/devices/system/cpu/cpu7/online
echo "1" > /sys/devices/system/cpu/cpu1/online
echo "1" > /sys/devices/system/cpu/cpu2/online
echo "1" > /sys/devices/system/cpu/cpu3/online</Str>
<Int sr="arg1" val="1"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act1" ve="7">
<code>915</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act2" ve="7">
<code>915</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1555200"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act3" ve="7">
<code>915</code>
<Int sr="arg0" val="2"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1555200"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act4" ve="7">
<code>915</code>
<Int sr="arg0" val="3"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1555200"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act5" ve="7">
<code>915</code>
<Int sr="arg0" val="4"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act6" ve="7">
<code>915</code>
<Int sr="arg0" val="5"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act7" ve="7">
<code>915</code>
<Int sr="arg0" val="6"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act8" ve="7">
<code>915</code>
<Int sr="arg0" val="7"/>
<Str sr="arg1" ve="3">performance</Str>
<Int sr="arg2" val="1958400"/>
<Int sr="arg3" val="1958400"/>
</Action>
</Task>
</TaskerData>
for example to push the core to full power when running antutu
Code:
create a new profile -> event -> Application -> Antutu
then assign MAX FREQ as enter activity.
then you have to assign an exit activity when antutu is closed, for example the following RELAXED can be used:
this one brings the core back to normal scaling, interactive governor, but keeps the cores 6 and 7 disabled (essentially behaves like an hexa core snapdragon 808 in this state)
Code:
<TaskerData sr="" dvi="1" tv="4.7u3m">
<Task sr="task6">
<cdate>1446835385548</cdate>
<edate>1446946130520</edate>
<id>6</id>
<nme>RELAXED</nme>
<Action sr="act0" ve="7">
<code>915</code>
<Int sr="arg0" val="3"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act1" ve="7">
<code>915</code>
<Int sr="arg0" val="1"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act2" ve="7">
<code>915</code>
<Int sr="arg0" val="2"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act3" ve="7">
<code>915</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1555200"/>
</Action>
<Action sr="act4" ve="7">
<code>915</code>
<Int sr="arg0" val="5"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act5" ve="7">
<code>915</code>
<Int sr="arg0" val="4"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act6" ve="7">
<code>915</code>
<Int sr="arg0" val="6"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act7" ve="7">
<code>915</code>
<Int sr="arg0" val="7"/>
<Str sr="arg1" ve="3">interactive</Str>
<Int sr="arg2" val="384000"/>
<Int sr="arg3" val="1958400"/>
</Action>
<Action sr="act8" ve="7">
<code>123</code>
<Str sr="arg0" ve="3">stop mpdecision
echo "0" > /sys/devices/system/cpu/cpu6/online
echo "0" > /sys/devices/system/cpu/cpu7/online</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>
</Task>
</TaskerData>
you can have 2 or 3 activities for different level of performance and assign them to several applications.
with the same method you can also go on full battery saving when below a certain battery percent, and everything you can imagine.
Click to expand...
Click to collapse
Great data. Can you display results??
Thanks
Enviado desde mi LG-H955 mediante Tapatalk
Please can you share results ?
Sent from my LG-H950 using Tapatalk
Attached to the first post, now a set of profiles to disable 7 cores when screen is off, enable only 6 when normal use (like a snapdragon 808 of g4) and enable all 8 when web browsing. Just as an example.
What kind of results would you like to see?
It is similar to what you can achieve using the xposed module "performance profiles". Except it could not capture the screen off and unlock on my phone so battery was poor. So i had to write this.
Also with tasker you can set different performace profiles when battery goes under a certain percent, or when you leave home, or when you go at work etc. (Basically for evey event)
I am also testing how to hook into gpu performance, looks like it is working but im still testing that.
nasone32 said:
Attached to the first post, now a set of profiles to disable 7 cores when screen is off, enable only 6 when normal use (like a snapdragon 808 of g4) and enable all 8 when web browsing. Just as an example.
What kind of results would you like to see?
It is similar to what you can achieve using the xposed module "performance profiles". Except it could not capture the screen off and unlock on my phone so battery was poor. So i had to write this.
Also with tasker you can set different performace profiles when battery goes under a certain percent, or when you leave home, or when you go at work etc. (Basically for evey event)
I am also testing how to hook into gpu performance, looks like it is working but im still testing that.
Click to expand...
Click to collapse
For results, I'd love to see your battery usage graphs. I have xposed installed, with Battery Saver enabled only at 15% and BT, GPS disabled unless I drive. Usually I keep data on, and would spend the whole day(light web browsing, messaging thru facebook and text) from around 8 am to 4-5 pm , at which point my phone would range around 30-40% left, more often lower 30s if there's traffic (more time spent in the car). Then at home, if I play around with it some more (music, youtube, quick farmville) on WiFi the phone usually gets to 15% after an hour.
I do plug my phone in while I'm driving since GPS + data + screen on max brightness means a 2 hour battery life at best. While plugged in (not QC) the phone battery diminishes only very slightly, around -5% every 45 mins.
And I'm new to Tasker, so just checking. I wanna test Tasker and your profiles out too, but was wondering; if I enable these profiles, and later uninstall Tasker, would the phone still follow these profiles? If not, I'll have some testing done myself.
Moving from the OG HTC One, after 2 years I'm really spoiled by its battery life. Really hoping the Flex 2 could last just as long if not better.
Mr User said:
For results, I'd love to see your battery usage graphs. I have xposed installed, with Battery Saver enabled only at 15% and BT, GPS disabled unless I drive. Usually I keep data on, and would spend the whole day(light web browsing, messaging thru facebook and text) from around 8 am to 4-5 pm , at which point my phone would range around 30-40% left, more often lower 30s if there's traffic (more time spent in the car). Then at home, if I play around with it some more (music, youtube, quick farmville) on WiFi the phone usually gets to 15% after an hour.
I do plug my phone in while I'm driving since GPS + data + screen on max brightness means a 2 hour battery life at best. While plugged in (not QC) the phone battery diminishes only very slightly, around -5% every 45 mins.
And I'm new to Tasker, so just checking. I wanna test Tasker and your profiles out too, but was wondering; if I enable these profiles, and later uninstall Tasker, would the phone still follow these profiles? If not, I'll have some testing done myself.
Moving from the OG HTC One, after 2 years I'm really spoiled by its battery life. Really hoping the Flex 2 could last just as long if not better.
Click to expand...
Click to collapse
@Mr User: It won't work anymore if you uninstall Tasker ofcourse.
I used something very similar on my nexus 5 for a while.
Combined with amplify and greenify my nexus 5 lasted half a day longer.
Shame i dropped it... but now i have the g flex 2 and that just last me half a day longer then even the "improved" nexus 5 did.
Plus i havn't rooted it yet, cause i don't feel the need to.
Anyway, qudos to OP for sharing this.
WittePens said:
@Mr User: It won't work anymore if you uninstall Tasker ofcourse.
I used something very similar on my nexus 5 for a while.
Combined with amplify and greenify my nexus 5 lasted half a day longer.
Shame i dropped it... but now i have the g flex 2 and that just last me half a day longer then even the "improved" nexus 5 did.
Plus i havn't rooted it yet, cause i don't feel the need to.
Anyway, qudos to OP for sharing this.
Click to expand...
Click to collapse
How long does your G Flex 2 last?
A full day and a half.
Verstuurd vanaf mijn LG-H959 met Tapatalk
Thanks for posting this. How do you utilize the profile zip in tasker?
Unizip in a folder then from Tasker:
Longpress on the "profiles" tab -> import
Activate tasker by longpressing the tasker icon in the upper left
Activate the profiles, then menu (3 dots above)--> exit
it should ask to save, say yes.
You can confirm the profiles are working with cpu-z. Just lock the screen, unlock (to generate the first "screen on" event) and in cpuz you should see core7 and core8 disabled.
Also i did an interesting test, during normal usage the 4 a53 cores (low consumption, core 0 to 4) are more than enough.
I have LP 5.1.1 v15c and i have no lag at all. Partially debloated and with custom thermal profile.
REMINDER: i noticed tasker can not capture the event for 64 bit antutu, i have workarounds in mind, for now i'll live without that.
Here is the code to manage the gpu. Min power consumption
Code:
echo powersave > /sys/class/kgsl/kgsl-3d0/devfreq/governor
echo 190000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
echo 190000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
Stick to max frequency
Code:
echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
echo 600000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
echo 600000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
And revert back to normal
Code:
echo msm-adreno-tz > /sys/class/kgsl/kgsl-3d0/devfreq/governor
echo 190000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
echo 600000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
There are several governors available for the gpu:
spdm_bw_hyp bw_hwmon bw_vbif gpubw_mon msm-adreno-tz cpufreq userspace powersave performance simple_ondemand
@Mr User
Sorry i don't have a typical usage pattern yet,. I just bought the phone and i'm still playing around a lot with it, so i can't make a real comparison, you should try it by yourself. My old phone was a 2 years old htc one m7 too! And the battery lasts quite a bit in comparison. You can't harm your phone, if you disable or remove tasker everything will be back to normal
I ran into a few problems using your profiles
1. Had to disable screen off profile because it was lagging a lot every time I tried to unlock the phone
2. everytime i enabled the big cores I had some strange wifi and mobile Internet problem it kept turning wifi en mobile off and on and was unusable (maybe it's a problem with the other apps but am not sure?)
tried your profiles for a few days, thanks for the tip
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ShadowRii said:
I ran into a few problems using your profiles
1. Had to disable screen off profile because it was lagging a lot every time I tried to unlock the phone
2. everytime i enabled the big cores I had some strange wifi and mobile Internet problem it kept turning wifi en mobile off and on and was unusable (maybe it's a problem with the other apps but am not sure?)
tried your profiles for a few days, thanks for the tip
Click to expand...
Click to collapse
How is your battery life feedback??
Sent from my LG-H950 using Tapatalk
Thanks for posting, excited to make use of this as I'm always looking for more tasker profiles. It's an addiction.
abhishek.banerjee said:
How is your battery life feedback??
Sent from my LG-H950 using Tapatalk
Click to expand...
Click to collapse
it's OK I don't see a massive change can get easly trough the day, I also disabled the screen off profile cause it made my phone slow, buggy and some times even unusable
Verstuurd vanaf mijn LG-H955 met Tapatalk
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:
Code:
<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
Best adaway app I have ever used! Simple and effective! Works amazingly well! Congratulations to the Dev!! And thank you for sharing this amazing app with us! :laugh:
Can you post some screenshots of the QS tile, and the Profile in Tasker?
MishaalRahman said:
Can you post some screenshots of the QS tile, and the Profile in Tasker?
Click to expand...
Click to collapse
Done
Perhaps, you can make hide option for the icon.
I have a Pixel 2XL, stock Android 8.1 Feb, Magisk 15.4. I do have AdAway installed + enabled and I have systemless hosts enabled in the settings of Magisk Manager.
I imported the AdBlocker task via your xml to my Tasker. Tapped the check mark of the task configuration screen, got the "Applied" toast msg. And yet, I don't see an AdBlocker QS tile in the QS edit panel.
I went to the AdBlocker task configuration page again and tapped the run ( |> ) button at bottom left. The task ran, I got the "AdBlocker enabled" toast. I get "Disabled" in AdAway app. I tap the run button again, I get the "AdBlocker disabled" toast. AdAway still says "Disabled".
And still no AdBlocker QS tile in the QS edit panel.
I'm guessing I'm doing something wrong. Could you please let me know what?
bagarwa said:
I have a Pixel 2XL, stock Android 8.1 Feb, Magisk 15.4. I do have AdAway installed + enabled and I have systemless hosts enabled in the settings of Magisk Manager.
I imported the AdBlocker task via your xml to my Tasker. Tapped the check mark of the task configuration screen, got the "Applied" toast msg. And yet, I don't see an AdBlocker QS tile in the QS edit panel.
I went to the AdBlocker task configuration page again and tapped the run ( |> ) button at bottom left. The task ran, I got the "AdBlocker enabled" toast. I get "Disabled" in AdAway app. I tap the run button again, I get the "AdBlocker disabled" toast. AdAway still says "Disabled".
And still no AdBlocker QS tile in the QS edit panel.
I'm guessing I'm doing something wrong. Could you please let me know what?
Click to expand...
Click to collapse
Drag the first Unset Tasker tile up to the active QS tiles section. This works independent of AdAway so don't expect the status to toggle back to enabled in AdAway when the tile activates AdBlocking. I found that I had to close and reopen chrome to test that the ad blocking was indeed turned off (probably because of caching). And then again after turning it back on. It works a treat. Now to decide if I want to give up AdAway webserver functionality and use this tile as my Adblock solution as a daily driver.
Soryy i did not get the process. Could anybody pls provide Steps to implement?
@mkhcb this is brilliant. I've always wanted an AdAway toggle and this is the next best thing Maybe even better!
I copied line 11 and inserted it as new line 22 to make the disable action collapse the quick settings panel too. I hope you'll consider adding to your version here too.
Thanks again!
bagarwa said:
I have a Pixel 2XL, stock Android 8.1 Feb, Magisk 15.4. I do have AdAway installed + enabled and I have systemless hosts enabled in the settings of Magisk Manager.
I imported the AdBlocker task via your xml to my Tasker. Tapped the check mark of the task configuration screen, got the "Applied" toast msg. And yet, I don't see an AdBlocker QS tile in the QS edit panel.
I went to the AdBlocker task configuration page again and tapped the run ( |> ) button at bottom left. The task ran, I got the "AdBlocker enabled" toast. I get "Disabled" in AdAway app. I tap the run button again, I get the "AdBlocker disabled" toast. AdAway still says "Disabled".
And still no AdBlocker QS tile in the QS edit panel.
I'm guessing I'm doing something wrong. Could you please let me know what?
Click to expand...
Click to collapse
Go to Tasker settings/preferences> Action> make sure #2 says AdBlocker
nadeem_naddy said:
Soryy i did not get the process. Could anybody pls provide Steps to implement?
Click to expand...
Click to collapse
Do you own a copy of Tasker?
buffal0b1ll said:
@mkhcb this is brilliant. I've always wanted an AdAway toggle and this is the next best thing Maybe even better!
I copied line 11 and inserted it as new line 22 to make the disable action collapse the quick settings panel too. I hope you'll consider adding to your version here too.
Thanks again!
Click to expand...
Click to collapse
Thanks for picking that up! Away from my computer now but, I'll eventually update the main post.
@mkhcb
After re-enable adblocking, the ads still exist, do I need to reboot it? To completely enable adblocking?
Edit :
I need to download host from adaway again to make it full working , no need to reboot.
Thanks dev,
I hope next update will let the toggle seamlessly change the adblocking. Without even touching adaway again, :good:
Thanks for the idea. I have actually want to do this already for a long time. But always forgot it when I have leisure time to do it. Since I rarely need to disable the adblock.
I just take a peek at your xml. I have already my own concept actually. I simply create another non blocking hosts file and rename it to "hosts.clean". Then query the size of current hosts file using du command. If it is bigger than 100 bytes (true, which means adblocking), rename the current hosts file to "hosts.block". Then rename "hosts.clean" to hosts. Thus replacing the hosts with non-blocking one. Give toast that adblock has been disabled.
False branch will reverse it, rename hosts to "hosts.clean" and "hosts.block" to hosts, enabling the ad blocking. Toast adblock has been enabled.
It is so fast, just realize we don't even need to flush the dns cache. I don't redownload the hosts file, as I don't update the hosts file too frequently. Future expansion, probably I will make timeout for reverting back to hosts file. Example only disable the adblock for 15 minutes and reverting back after timeout. But it is good for now.
The core concept only require 5 elements in Automagic.
mkhcb said:
Done
Click to expand...
Click to collapse
Good job :good:
Can you please share your wallpaper??
No QS button is shown on my Xperia Z3 (LP 5.0.1) when using the APK. I saw the toast when launching the app but nothing else.
Many thanks for your efforts
Can someone teach me how to import settings + tutorials on YouTube? I am very new to using tasker ... ?????
(Asus ZF2, ZE551ML, Custom ROM RR Nougat V7.1.2, Root SU V2.82 / No Magisk).
https://www.dropbox.com/s/7vifdssfh6xxow0/Screenshot_20180215-154755.png?dl=0
https://www.dropbox.com/s/d09ib0nlljuzlap/Screenshot_20180215-154820.png?dl=0
https://www.dropbox.com/s/qcvorun1i9t1khe/Screenshot_20180215-145236.png?dl=0
Really cool task, I didn't even KNOW Tasker had its own programmable Quick Setting Tiles. I just added a proper icon cause i'm anal and a date check so I didn't have to download the hosts files every time.
ainurrofiq said:
@mkhcb
After re-enable adblocking, the ads still exist, do I need to reboot it? To completely enable adblocking?
Edit :
I need to download host from adaway again to make it full working , no need to reboot.
Thanks dev,
I hope next update will let the toggle seamlessly change the adblocking. Without even touching adaway again, :good:
Click to expand...
Click to collapse
You don't need AdAway anymore. Just close and open your browser if you still see ads after enabling. They're being cached. AdAway does this too.
buffal0b1ll said:
You don't need AdAway anymore. Just close and open your browser if you still see ads after enabling. They're being cached. AdAway does this too.
Click to expand...
Click to collapse
So, if I don't need adaway anymore. what host is used by your apps? Or first install adaway, tick systemless host on magisk manager, and download the host. Reboot. Install your apps. And forget about adaway? Is this what you mean?