I have a Pixel 4 XL (rooted), there is a way to enable High Brightness Mode when the screen is at 100% brightness and by entering the following in Terminal Emulator.
su
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
This only sticks until the screen goes off and needs to be ran again to get it on again. I'd like to make a task so that it automatically turns on when the screen is at 100% brightness but I have no idea how to do it. I've watched a few videos but I'm still not sure what to do. Thanks in advance.
Add a task and make sure to name it.
Add an action to the task code -> run shell.
On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
Tick the box for use root.
Tap the [emoji809] on the line with the "if"
On the first line put the variable %BRIGHT
Tap the center button (probably displays a ~)
Select "Maths: greater than" (will now display a > )
On the second line, enter 230 (* see further down for an explanation)
Back out of the task to save it.
Now create a profile, with the context of event -> display -> display on
Link the task you created above
What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.
On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.
If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
ktmom said:
Add a task and make sure to name it.
Add an action to the task code -> run shell.
On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode
Tick the box for use root.
Tap the [emoji809] on the line with the "if"
On the first line put the variable %BRIGHT
Tap the center button (probably displays a ~)
Select "Maths: greater than" (will now display a > )
On the second line, enter 230 (* see further down for an explanation)
Back out of the task to save it.
Now create a profile, with the context of event -> display -> display on
Link the task you created above
What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.
On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.
If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
Click to expand...
Click to collapse
Thank you very much, I'll give it a shot.
Related
Hello all XDA users! I created a project that automatically switches the clock format on your WM watchface whenever you switch between the formats on your phone via system settings.
===Prerequisites===
First and foremost, you need to install the Tasker (I used this on full version but it may work on the trial version) and have Allow External Access enabled, you can do this by doing the following:
Press the 3 dot menu
Click Preferences
Swipe over to Misc and find Allow External Access, then tap it to enable it
Done!
Then you need AutoTools by joaomgcd, you can download it here
Have USB Debugging enabled for ADB configuration for AutoTools
To Enable this, do the following:
Go to Settings
Go to About Device
Find your build number and click it several times until the phone says that you have enabled developer mode
Go into Developer Settings
Click on the tab that sets USB Debugging to enable it
Done!
Have ADB Drivers/Fastbook installed, here are two places that you can download these from but you don't have to download from these: Skipsoft, XDA
Have Installed WatchMaker Premium or Free Version
===About this Project===
What this project does is check if you have booted up your device and if so, it records the current time format your clock is set to. Then it checks if you have changed the format of your clock via broadcast intent, then it compares the previously recorded setting and the new setting, if they do not match, the task sends the new setting to WatchMaker and it changes the format on the watch to the new setting.
===Building the Project===
The first and foremost you MUST do is ensure that you have downloaded and got everything from the prerequisites. Once you have everything, follow the instructions for enabling access to system settings for AutoTools (you HAVE to do this in order for the profile to function correctly, as it needs to read the configuration for the 24hr format switch in the system settings, the profile will ONLY be looking at this setting). Once you have done these, you can move on to making the actual profiles
For the first profile, it will record the current clock format soon after the device boots up
So we must create an Event profile that will trigger soon after the phone finishes booting on, leave Invert unchecked
Now here's what you need for the actions:
Plugins -> AutoTools -> Secure Settings. Then click custom settings and do the following:
Setting Type: System
Name: time_12_24
Input Type: String
Leave Value Blank
Read Setting: Enabled
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24 (its the variable that AutoTools passes for the custom setting). This records the value we got from AutoTools and stores it in a global variable for us to use later on
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %TIME_FORMAT' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
For the second profile, it will do the actual process of sending the variables to the WatchMaker App
We're going to create a Intent Received profile that will check if the specified broadcast intent has been received. For action, put 'android.intent.action.TIME_SET' without quotes. This will check if the TIME_SET intent has been received
Now here's what you need for the actions:
Task -> If. Set the condition to %TIME_FORMAT is SET. This will check if the global variable we defined in the first profile has something in it (this is for in case that you didn't boot up your device to store the value to the global variable so Tasker does not return an error since there is no value in the variable)
Plugin -> AutoTools -> Secure Settings. Like the same as like time, we're going to be finding that system variable, time_12_24. Just do the exact same steps as listed for the last time we defined this action
Task -> If. This time, set the condition to %time_12_24 does not match (!~) to %TIME_FORMAT. This will make Tasker check if the system format variable we just grabbed in the previous action DOES NOT match the previously recorded variable from our first profile. This is necessary to check because if you have automatic update clock enabled in system settings, that TIME_SET intent gets called whenever the phone updates to the network time, and because of this, we do not want Tasker constantly nagging us that the format has been update, despite that the format is the same as before.
Plugin -> WatchMaker -> WM Send Variable. Set the variable to send to %time_12_24, which is the new format that we switched to and just checked for.
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Time Format Changed' without quotes, and for text, added 'Updated Format to %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Time Format Changed' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Task -> End If. Close that If stated that we have created so far
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This will override the previously recorded value and place the new one in its place in the variable, %TIME_FORMAT
Task -> Stop. Leave everything else blank. This will make Tasker end the task from here
Task -> Else. Leave everything else blank. This basically says that if that system format variable DOES have something in it. This is necessary to check because
OPTIONAL: Alert -> Notify Vibrate. For Title: put 'Logged Format Time' without quotes, and for text, added 'Log Format: %time_12_24' without quotes. This will notify that you have logged the format and will tell what the format is.
OPTIONAL: Task -> Wait. Set it for 10 seconds. This will make Tasker wait 10 seconds to move on to the next action
OPTIONAL: Alert -> Notify Cancel. For Title: put 'Logged Format Time' without quotes, and have Warn Not Exist checked. This will dismiss that notification we just sent 10 seconds ago
Variables -> Variable Set. Set %TIME_FORMAT to %time_12_24. This records the value we got from AutoTools and stores it in a global variable for us to use later on.
Task -> End If. Close up the main IF statement that surrounds everything.
One final thing! Make sure that your watchface in WM has this method or something similar (WITH the quotes): '{ttime_12_24}' == '24' and '{dh23z}:{dmz}' or '{dh}:{dmz} {da}'. This sets the clock format to 24hr if the tasker value is 24, and switches to 12hr if the value is 12.
Note: You DO NOT have to have items such as he notification and clock method text to display exactly as I have, as I have designed these for my convenience.
===Download===
The download files are attached below, you can import this by doing the following:
Long-press the little icon that looks like a house at the bottom of the main menu
Press Import
Locate the downloaded file
Tasker should do the rest and import the entire project and the profiles
===Final Notes===
If you have any questions or issues, please feel free to post them here! ^^
I am trying to create a simple task that will increase my phone brightness when I shake my phone.
However, I am completely lost. I was trying to follow this tutorial: https://forum.xda-developers.com/u/t...tness-t3331135 but I am having trouble. The app must have updated since mine looks completely different and I can't seem to find all those options. Any help would be appreciated. Thanks
There's nothing substantially different there from the 5.0 release of tasker.
It just creates a profile named "Toggle Brightness" with a event of a shake gesture.
Then an anonymous entry task is created. The first action in the task is an "if" statement, checks (~ means matches) the current brightness level and if already maxed (255) it runs everything inside the if statement up to the else statement. The action within the if statement simply sets the brightness level to whatever it was before out was maxed out (the %Bright variable is defined in the else part of the task).
If the condition isn't matched (brightness level is < 255) then it hops to the "else" statement. Inside that it's just recording the current value of the screen brightness (%Bright = %BRIGHT where %Bright is a user variable you are creating and %BRIGHT is a built in variable that changes when the display brightness changes. Then an action is created to max out the display brightness (Display --> Display Brightness = 255).
Lastly, the required "end if" statement is added.
Just follow the steps as outlined and it should work. For example, the step that says;
Display --> Display Brightness
means, add a task from the display grouping named Display brightness.
Where specifically are you having trouble?
ktmom said:
There's nothing substantially different there from the 5.0 release of tasker.
It just creates a profile named "Toggle Brightness" with a event of a shake gesture.
Then an anonymous entry task is created. The first action in the task is an "if" statement, checks (~ means matches) the current brightness level and if already maxed (255) it runs everything inside the if statement up to the else statement. The action within the if statement simply sets the brightness level to whatever it was before out was maxed out (the %Bright variable is defined in the else part of the task).
If the condition isn't matched (brightness level is < 255) then it hops to the "else" statement. Inside that it's just recording the current value of the screen brightness (%Bright = %BRIGHT where %Bright is a user variable you are creating and %BRIGHT is a built in variable that changes when the display brightness changes. Then an action is created to max out the display brightness (Display --> Display Brightness = 255).
Lastly, the required "end if" statement is added.
Just follow the steps as outlined and it should work. For example, the step that says;
Display --> Display Brightness
means, add a task from the display grouping named Display brightness.
Where specifically are you having trouble?
Click to expand...
Click to collapse
I guess I'm just slightly confused on how you are supposed to create a profile and also link it to a task. For example, If I try to create a new profile it asks for application, day, event, etc...
Same goes for action. I am presented with a bunch of options. Upon clicking one (i.e display brightness), I see a page like this: https://imgur.com/a/eiQTz
I guess my best bet is to try and go through the tutorial in more detail...
Do this:
Tap the on the profile screen. Now go to event -> sensor -> shake. Leave everything the way it is and tap the left facing arrow at the top.
Now it'll pop up a menu to start a new task (or select an existing task if there are any). Give the task a name and then you'll have a blank task to work with. Follow the instructions from that link to add actions to your task. Start with the if action ( -> task -> if).
When adding an action, you can always use the filter field at the bottom to search for the action you're looking for. e.g. type "if" and it will narrow the list including "if" and "endif".
Here's some help on that display brightness screen.
ktmom said:
Do this:
Tap the on the profile screen. Now go to event -> sensor -> shake. Leave everything the way it is and tap the left facing arrow at the top.
Now it'll pop up a menu to start a new task (or select an existing task if there are any). Give the task a name and then you'll have a blank task to work with. Follow the instructions from that link to add actions to your task. Start with the if action ( -> task -> if).
When adding an action, you can always use the filter field at the bottom to search for the action you're looking for. e.g. type "if" and it will narrow the list including "if" and "endif".
Click to expand...
Click to collapse
This is exactly what I needed, and the app actually is starting to make sense now. Thank you for the help, I really appreciate it. I was able to get it working
I have a shake left right task to change my brightness on my phone. I have a BT Connected profile that is set up for connection to my car's Bluetooth that turns off wifi, sets brightness, etc. Problem is if I hit a bump, my brightness changes due to the shaker profile. I've tried multiple ways of setting in my BT Connected profile to toggle the shake left right profile off when connected to my car. Is there a way to do this? If not I have to turn it on and off manually. I apologize if this has been covered somewhere else.
Thanks in advance
Make an "if" condition in your brightness task using %pactive. It should be: if %pactive doesn't match *,yourbtprofilename,*
Good luck
shaggydiamond said:
Make an "if" condition in your brightness task using %pactive. It should be: if %pactive doesn't match *,yourbtprofilename,*
Good luck
Click to expand...
Click to collapse
So this does not seem to be working correctly. I have made a "if" condition, but it either doesn't work or just breaks the shaker all together. I have moved the "if" (line 9) to any and all lines, but it still is not working correctly. For some reason I cannot submit a screen shot, even though I have been on this forum for years...
1. If V
%BRIGHT ~ 255
2. Display Brightness
Level 35
3. Display Timeout
Secs 0 Mins 1 Hours 0
4. Else
5. Variable Set
Name %Bright To %Bright
6. Display Brightness
Level 255
7. Display Timeout
Secs 0 Mins 1 Hours 0
8. End If
9. If V
%pactive !~ BT Connected Bose AE2 Soundlink
Am I missing something?
Thanks again
masked_hacker said:
So this does not seem to be working correctly. I have made a "if" condition, but it either doesn't work or just breaks the shaker all together. I have moved the "if" (line 9) to any and all lines, but it still is not working correctly. For some reason I cannot submit a screen shot, even though I have been on this forum for years...
1. If V
%BRIGHT ~ 255
2. Display Brightness
Level 35
3. Display Timeout
Secs 0 Mins 1 Hours 0
4. Else
5. Variable Set
Name %Bright To %Bright
6. Display Brightness
Level 255
7. Display Timeout
Secs 0 Mins 1 Hours 0
8. End If
9. If V
%pactive !~ BT Connected Bose AE2 Soundlink
Am I missing something?
Thanks again
Click to expand...
Click to collapse
Much better to post the actual profile when it's not working as expected. Make sure it's named - not a default name assigned by tasker. Then long press on the name to highlight the profile. Go to the 3-dot menu and select export -> Description to Clipboard.
Then you'll be able to paste it. Be aware, it easier to use pastebin.com then link to a post here. If you paste in a post here, the forum software will convert all semicolons with characters after, typically "on" and "off" to emoticons making it very hard to read.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
masked_hacker said:
So this does not seem to be working correctly. I have made a "if" condition, but it either doesn't work or just breaks the shaker all together. I have moved the "if" (line 9) to any and all lines, but it still is not working correctly. For some reason I cannot submit a screen shot, even though I have been on this forum for years...
1. If V
%BRIGHT ~ 255
2. Display Brightness
Level 35
3. Display Timeout
Secs 0 Mins 1 Hours 0
4. Else
5. Variable Set
Name %Bright To %Bright
6. Display Brightness
Level 255
7. Display Timeout
Secs 0 Mins 1 Hours 0
8. End If
9. If V
%pactive !~ BT Connected Bose AE2 Soundlink
Am I missing something?
Thanks again
Click to expand...
Click to collapse
Below 9 is where you want your task! With 9 you're saying 'if'. Task #10 and up is your consequence of that. Try a more simpler task to get to know 'if' and 'else'. Then try again with this task. Basically: 'if condition' - task - task - 'end if'. You can put more 'if conditions in between if you want.
masked_hacker said:
I have a shake left right task to change my brightness on my phone. I have a BT Connected profile that is set up for connection to my car's Bluetooth that turns off wifi, sets brightness, etc. Problem is if I hit a bump, my brightness changes due to the shaker profile. I've tried multiple ways of setting in my BT Connected profile to toggle the shake left right profile off when connected to my car. Is there a way to do this? If not I have to turn it on and off manually. I apologize if this has been covered somewhere else.
Thanks in advance
Click to expand...
Click to collapse
In your shaker profile if you have an entry task, add an if statement. In here on the variable side put %PACTIVE and use the matches symbol. Then on the right side put *name of bt profile*
Then after that task add a stop task, then end if task.
What this will do is first check if your using you bt connected profile and stop or go depending on if it's active. I hope this makes sense. If not I'll try to write it out more clearly when I get home. You may not need an entry\exit task for your profile if you only have just a group of tasks just add the if part inside one of those tasks
A main disadvantage of the OP7P is the lack of AOD and Led. The ambient display is very short, so you never know if you missed call or message.
Some AOD Apps are heavy battery consumers, or disabling face recognition unlock, OPAODmod block chrome, Plus Beat is reasonable solution, though it is not AOD.
gigiion came up with the idea to trigger the Amolad AOD app to run only if notification was missed, using Macrodroid. Here is the way I implemented his idea, using Tasker:
1. Install Always on AMOLED from google play store. Do not enable the service. For OP7P choose One UI theme.
2. Screen condition
In Tasker, make these two profiles:
- Display off > Veriable set %Screen_Locked ~ 1
- Display Unlocked > Veriable set %Screen_Locked ~ 0
In such way the native ambient display will not interrupt the AOD whet it turn the screen on.
3. Main task
If %Screen_Locked ~ 1
Veriable set %Titel1 to %NTITLE
Veriable set %Text1 to %evtprm3
Wait 15 secondes
From Amolad plugin – start amolad display if %Screen_Locked ~ 1
End if
The variables %Title1 and %Text1, can be used to track the situation that the AOD start without any known trigger. Such phenomenon can happened if WhatsApp notify “Searching for messages”.
The 15 sec delay is for the native ambient display. The double condition of Screen_locked, disable AOD if you unlocked display in this period, of just answer a call.
4. Triggers
Make profiles of event/notification, missed call, state/power/power or whatever you like, and assign to the task you just made. Name those profiles – it is necessary for next stage.
5. Toggle profiles
Make “toggle aod profiles” task:
Profile Status missed_call set toggle
Profile Status aod set toggle
etc ……..
if % PENABLED ~ *,aod,* (“aod” is name of one of the trigger profiles)
setup quick setting (number: 1st, Name: toggle aod profiles, status: inactive)
else
setup quick setting (number: 1st, Name: toggle aod profiles, status: active)
end if
I do not understand way the active/inactive are replaced.
6. Assign quick setting button
In Tasker’s main screen upper right corner three dots: Preferences/ Action tab/ quick setting tab.
Then add it in the quick setting editor.
7. Automatic toggle triggers
Clone the task you made in section 5, and change “toggle” to “on” of “off”, then you can make any profile you like to toggle the triggers.
Seems like alot of work when you can just use this mod.
https://forum.xda-developers.com/on...ice-themes-apps--mods/oxygen-aod-mod-t4023587
hallo dare said:
Seems like alot of work when you can just use this mod.
https://forum.xda-developers.com/on...ice-themes-apps--mods/oxygen-aod-mod-t4023587
Click to expand...
Click to collapse
The main reason that I didn't use it, is the long remind interval (min 15 sec) and the short display time. You can miss notifications if you don't looking into the black screen all the time. Any case I found stable AOD to be better, otherwise i could use Plus beat.
Firstly some info
Tasker app (full) v 5.15.14
Amazefit Bip U
Notify For Amazefit v 14.5.0
Problem: I was wondering on how to get Tasker to read the Amazefit Bip U battery level & then if it's below a certain level to send a notification to watch to remind me to charge it up
I know that the watch is suppose to let me know when it's below 10% but I'd like a bit of an earlier warning
I have found in the Notify for amazfit app the information for Tasker intergration & it seems that I can receive events from the App using the 'Get band battery value' action of 'com.mc.miiband.batteryStatGot' with an Extra of 'value - contains battery value (integer)'
Reading the tutorial of 'How to receive an intent' (Profiles > Event > System > Intent Received) I can do this but what's next ? - what do I put in the task?
Also what triggers the event ?
- I would prefer the 'batterystatget' to be in a Task instead & then trigger it perhaps a 'once a day' or 'every 12 hrs' to check the watch battery level
I also assume I will somehow have a value that I can look at & then decide on what to do when the value is less than 20 (BTW I know how to send a notification to the watch - already have tasks that sends 'missed text/message/ phone battery full/low already on a repeat every minute since Motorola phone doesn't do 'repeats' notifications) but whats the varible name I need to look at (it's not %BATT' as that's the phone battery level)
Any help appreciated
+1
Well - I had completely forgot about this post until I got a notification.
Anyway, I have managed to make 'something' that works despite no help from anyone & a lot of trial & error
Not sure how to post a 'tasker' profile/task here but here goes - I hope it's understandable
-----------------------------------
Start Tasker
Select [Profiles]
+ (add)
[Event]
[System]
[Intent Received]
(I renamed this as 'Band Battery Level' afterwards)
Under 'Action' type 'com.mc.miband.batteryStatGot'
'Cat': None
Scheme: blank
Mime Type: blank
Priority: Normal
Stop Event: Unticked
Go back & main screen should now show popup to select which task to assign Profile to..
[New Task]
(Call it whatever you like - I used 'Band Batt Level')
Enter the following
-------------------------
If %value eq 99 & %WCharged neq true
Flash Text Watch Charged
Variable Set Name %WCharged to True
End if
if %value < 95
Variable Clear Name %WCharged
End if
if %value < 15
Notify Configuration
Icon: Messager Icon
Icon Repeat: 1
Show a Number: OFF
Show a text: ON - ** Low Battery **
- Needs Charging --
Title: ON - * WATCH *
Vibration: ON
Number Vibration: 3
Vibration length:250
End if
---------------------------------
Here's what the Task does
If %value is equal to '99' then on my phone a pop-up flashes up stating 'Watch Charged', so that I'll know when to go & take my watch off charge & get it on my wrist
%WCharged is a flag I use to cause the popup to only show up once otherwise while the watch is @ 99% I keep getting the pop-up showing - even while its off charge. This flag is reset to false once the voltage of watch drops below 95% (%value<95)
If %value is less than 15 then tasker send a notification to the watch stating that 'Watch' (Title) has '** Low Battery ** -- Needs Charging --', while giving 3 pulses of vibration.
I guess you could add 'Flash' messages if you want pop-ups to show on your phone as well
Note that some of the Icons used in 'Notify' will not give a title, a text or even both of these - the 'Messager' Icon is one that does allow both title & Text to show on watch & the reason I used it. I do wish we could use custom icons (like a battery etc) but I guess this is a limitation of the watch
Anyway I hope this help