[ROOT/Magisk] Enable Always on Ambient Display on Oxygen OS 11 Beta 1

Search This thread

ontwykende

Senior Member
Feb 25, 2017
79
18
Thank you @Quinny899 for this work that allows us to have AOD.
After following the installation process, I have no problem.
AOD works very well.
I programmed it from 6:45am to 10:30pm and it disconnects when I switch to DND mode at night.
How you manage to have it when you switch DND ?
Or you just manage to be in the same time as DND ?
Because for me DND switch just when I am at home wifi during night, but if I am in the same time out of home, DND is off because I use phone regulary. Some times I have to go out during night and then DND automaticly switch off for me, does your setting of AOD folow DND or it is just time schedule???
 

philos64

Senior Member
May 27, 2010
3,495
3,221
Somewhere in Brittany
How you manage to have it when you switch DND ?
Or you just manage to be in the same time as DND ?
Because for me DND switch just when I am at home wifi during night, but if I am in the same time out of home, DND is off because I use phone regulary. Some times I have to go out during night and then DND automaticly switch off for me, does your setting of AOD folow DND or it is just time schedule???
Hi,
As you can see from the screenshots, I set AOD to run from 6:45am to 10:15pm.
Then I switch to DND and Airplane mode until my morning alarm.
As for DND, I can very well use it during the day (during meetings) and AOD still works. I didn't do anything special, just followed the process written by @Quinny899, using Terminal Emulator to enter the command lines.
 

Attachments

  • Screenshot_20210125-123703.jpg
    Screenshot_20210125-123703.jpg
    210.7 KB · Views: 136
  • Screenshot_20210125-123746.jpg
    Screenshot_20210125-123746.jpg
    135.6 KB · Views: 136

ontwykende

Senior Member
Feb 25, 2017
79
18
Hi,
As you can see from the screenshots, I set AOD to run from 6:45am to 10:15pm.
Then I switch to DND and Airplane mode until my morning alarm.
As for DND, I can very well use it during the day (during meetings) and AOD still works. I didn't do anything special, just followed the process written by @Quinny899, using Terminal Emulator to enter the command lines.
I understand, but it's nor what I looking for. I looking for shell comand to be used in tasker, so AOD can follow DND.
But I am realy thankful for this as it is.
 

rapdes

Senior Member
Dec 4, 2008
362
90
Since this needs to be reactivated after every boot will I have to reset all the settings everytime as well or will it retain the previous setting? for instance I have it set for a scheduled time.
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
Since this needs to be reactivated after every boot will I have to reset all the settings everytime as well or will it retain the previous setting? for instance I have it set for a scheduled time.

It retains the settings. The flag only controls whether it shows in the settings and actually works, the saved settings would stay even if you disabled the script (it just wouldn't show)
 

neildalal

Senior Member
Jan 16, 2014
374
137
23
Mumbai
Thank you @Quinny899 for this find.

Under ambient display, I've disabled pickup the phone and tap to show options and have enabled always on display.
Still when I'm on the always on display and i either pick up the phone or touch the screen, the ambient display shows up and my clock re-positions to the starting default location.
Is this a bug or is it intended to work this way? Just that I find this behaviour a bit frustrating.
Thank you.

Screenshot_20210128-234827.jpg
 

ontwykende

Senior Member
Feb 25, 2017
79
18
Thank you @Quinny899 for this find.

Under ambient display, I've disabled pickup the phone and tap to show options and have enabled always on display.
Still when I'm on the always on display and i either pick up the phone or touch the screen, the ambient display shows up and my clock re-positions to the starting default location.
Is this a bug or is it intended to work this way? Just that I find this behaviour a bit frustrating.
Thank you.

View attachment 5201751
Sorry, but I do not understand your question... If you set that your Ambient Display is Always-on (All day, like on screen shot above), than it's ON all time... When it's on table, or you touched it, or pick it up... It's ON Always.
And about relocation, it's burn protection and it's should move on screen.
 

neildalal

Senior Member
Jan 16, 2014
374
137
23
Mumbai
Sorry, but I do not understand your question... If you set that your Ambient Display is Always-on (All day, like on screen shot above), than it's ON all time... When it's on table, or you touched it, or pick it up... It's ON Always.
And about relocation, it's burn protection and it's should move on screen.
Sorry for not being able to explain it properly.
Yes, as you said, my display is always ON. And for burn in protection as you said my clock does move every minute.
When I switch off my screen, the always on display appears with my clock at the top default position. Then the clock starts it's journey from the top and moves slightly towards the bottom after every minute. But say when my clock has reached somewhere in the middle of the display and if I accidentally touch my phone screen or pickup my phone, then the clock again jumps to the top default position and again starts it's journey to the bottom of the display.
Technically if I have pickup and tap to show options disabled, then touching the screen or picking up the phone should not change my clocks position. What is happening here is that when the always on display is on, still touching or picking up the phone brings up the Ambient display which sets the clock again to the starting top location and then the clock starts it's journey again. So if I were to tap my phone screen once every minute, the clock would never move down and would always stay in the starting top position.
Hope I was able to explain it better this time. Please look at the 5sec video in the drive link below. Thanks.
https://drive.google.com/file/d/1Y3HcOL2rYYE0lxaJeHg4uVxlcUDv2l1j/view?usp=drivesdk
 
Last edited:

ontwykende

Senior Member
Feb 25, 2017
79
18
...So if I were to tap my phone screen once every minute, the clock would never move down and would always stay in the starting top position.
Hope I was able to explain it better this time. Please look at the 5sec video in the drive link below. Thanks.
I have fingerprint lock turn On... So when I tach my phone it's expect to be unlocked and turn on fingerprint sensor, and because location fo sensor it's move clock up... May be it's by default like that even if you didn't turn fingerprint on. But that's just my opinion, I can't claim it's right.
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
Is anyone else getting significant battery drain?
If so, have you found any way to minimise the impact?
My phone gets through the day with @50%, but with this aod that we've all waited years for my battery is flat by early evening.

Yeah it's pretty terribly optimised. Not particularly surprising as it's unfinished (and it's OnePlus).

It might be possible to repurpose the Tasker task I made a while back which did help when using an earlier version of OPAodMod before it was built into the module: https://forum.xda-developers.com/t/...ay-with-lots-of-options.4100981/post-82628479
 

ontwykende

Senior Member
Feb 25, 2017
79
18
Yeah it's pretty terribly optimised. Not particularly surprising as it's unfinished (and it's OnePlus).

It might be possible to repurpose the Tasker task I made a while back which did help when using an earlier version of OPAodMod before it was built into the module: https://forum.xda-developers.com/t/...ay-with-lots-of-options.4100981/post-82628479
It will be battery saver if we can stop AOD when there is no new unread notification and start AOD when we have unread notification by tasker... For now I find out that if I activate battery saver it will disable AOD. So I made task in tasker to activate battery saver when I am at home during night and if live house during night, battery saver is off and AOD is ON automatically again (because I actualy didn't toggle off). But I think it's inappropriate to use this as task for unread notification AOD toggle On/Off. Can we kill/start AOD process on some other way? By shell command or system setting string from tasker? Any new idea?
And what with this "horizon light"? This doesn't work for any messiging app... Textra? Viber? Signal? Telegram? Gmail? Twitter?
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,507
7,747
23
Salford, Greater Manchester, UK
quinny898.co.uk
It will be battery saver if we can stop AOD when there is no new unread notification and start AOD when we have unread notification by tasker... For now I find out that if I activate battery saver it will disable AOD. So I made task in tasker to activate battery saver when I am at home during night and if live house during night, battery saver is off and AOD is ON automatically again (because I actualy didn't toggle off). But I think it's inappropriate to use this as task for unread notification AOD toggle On/Off. Can we kill/start AOD process on some other way? By shell command or system setting string from tasker? Any new idea?
And what with this "horizon light"? This doesn't work for any messiging app... Textra? Viber? Signal? Telegram? Gmail? Twitter?

The setting you are looking for is Settings.Secure.doze_always_on.

Code:
settings put secure doze_always_on 1

will turn it on

Code:
settings put secure doze_always_on 0

will turn it off. Both of these still require the sys prop from the OP though of course. They also don't take effect immediately, you have to turn the screen on and off again manually for it to change state.
 
  • Like
Reactions: ontwykende

ontwykende

Senior Member
Feb 25, 2017
79
18
A big thank you. This is exactly what I was looking for. And actualy its work perfectly.
Using Tasker-Custom Setting-Secure-dose_always_on, I made rule to turn AOD when I have new notification and to turn it Off when notification clear. And it's work excellent... no need to manualy lock/unlock (turn on/off) screen.
With new notificstion screen is on for sec and it's enough to brin AOD On. And when you clear (read) notification/message your screen is alrady on and when you turn it off AOD is also off until some new event. I am verry happy with it now.
Thanks for string it's help me very much. Now this AOD is perfect one.
Of course, sys prop from from first message here is require... and it's make all of this posable.
I also notice that this actions don't change settings in Display-Ambient display-When to show (All day)... But it's just work as require.
 
Last edited:

rapdes

Senior Member
Dec 4, 2008
362
90
A big thank you. This is exactly what I was looking for. And actualy its work perfectly.
Using Tasker-Custom Setting-Secure-dose_always_on, I made rule to turn AOD when I have new notification and to turn it Off when notification clear. And it's work excellent... no need to manualy lock/unlock (turn on/off) screen.
With new notificstion screen is on for sec and it's enough to brin AOD On. And when you clear (read) notification/message your screen is alrady on and when you turn it off AOD is also off until some new event. I am verry happy with it now.
Thanks for string it's help me very much. Now this AOD is perfect one.
Of course, sys prop from from first message here is require... and it's make all of this posable.
I also notice that this actions don't change settings in Display-Ambient display-When to show (All day)... But it's just work as require.
Any chance of sharing your Tasker profile, I really like how you've got this setup 👍
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Contrary to what OnePlus have said, the code for the Always on Ambient Display is in the first beta of Oxygen OS 11. All you have to do is enable the feature, which is disabled in the "OPFeatures" framework. This is very simple, and can be done in two lines in a root terminal (ie. do "su" first):

    Code:
    setprop sys.aod.debug_support_always_on 1
    pkill systemui

    After you have done this, the option to enable it will appear in Settings > Display > Ambient Display > Always on ambient display.

    This doesn't survive a reboot, but you can have Magisk do it on boot for you. Only the first line is required for this (since SystemUI won't have started yet), simply drop the .sh file from the attached zip into /data/adb/service.d, set its permissions to rwxr-xr-x (chmod 755) and reboot. Please note that the zip is not flashable and cannot be used as a Magisk module. Something as simple and temporary as this (hopefully anyway, OnePlus have said this feature will come later) doesn't need a full blown Magisk module.

    8
    You can, but Magisk isn't really built for modules to do tiny things like this. One liners are what service.d scripts are for.
    I'm aware of that, i just think users would be more comfortable installing a module than moving files, i just like making things easy for people ya know

    About Service.d/Post-fs-data imo it would be cool if Magisk had a built in interface to manage/install scripts as Magisk is great for boot scripts but offers no straightforward method of installing/managing them other than making modules or manually moving files
    3
    Of course I can share.
    I also played around and did a qick setting toggles (AOD on/Off from notification bar).
    -AOD_Notification.prj.xml is project to be inport to Tasker, it contains 2 profiles - for notification On and Off and 2 tasks
    -AOD.tsk.xml is just task for qick toggle and it should be inport in tasker and selected in notification bar menu)

    AND ONE MORE TIME, big THANK YOU to Quinny899 , without you none of this would be possible.
    3
    If anyone was wondering, this also works on Stable OOS 11.0.0
    2
    Is there an Amoled protection? Meaning is the AOD clock moving a bit to avoid burnin?

    Yes. It moves all around the screen, much more than the Pixel one