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

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,408
7,669
253
23
Salford, Greater Manchester, UK
quinny898.co.uk
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.

 

Attachments

DanGLES3

Senior Member
Nov 11, 2017
730
719
93
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
 

Attachments

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,408
7,669
253
23
Salford, Greater Manchester, UK
quinny898.co.uk
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
Agreed, maybe it'll come with the often-teased Xposed style injections one day
 
  • Like
Reactions: DanGLES3

GeneFitz23

Member
Aug 29, 2013
48
20
28
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
Thank you!
 

ontwykende

Senior Member
Feb 25, 2017
64
14
8
Thank you very much for this.
Is there any shortcut for notification bar for fast on/off ?
And can I use Taskrer sehell command to Toggle AOD on/off (for example when "do not disturbe mode is on" or when I put phone to pocket). Something like options that existed in Exposed AOD Mod?
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,408
7,669
253
23
Salford, Greater Manchester, UK
quinny898.co.uk
Thank you very much for this.
Is there any shortcut for notification bar for fast on/off ?
And can I use Taskrer sehell command to Toggle AOD on/off (for example when "do not disturbe mode is on" or when I put phone to pocket). Something like options that existed in Exposed AOD Mod?
It turns off automatically when it's in your pocket, but for DnD you probably would need to find the setting that controls it and toggle that
 

Alecjasonn

Senior Member
Jul 6, 2015
87
11
28
For some reason this doesn't work for me. It just restarts the SystemUI and the option still force closes when I go to it in the settings, just as before.
 
Jan 23, 2021
4
0
11
Nah mine works as intended I dunno honestly that's what I'm tryna figure out is magisk needed for certain versions of the 7t because I can go into settings and extra the only thing I noticed that does not function as should is the ambient light
 

vtec303

Senior Member
Sep 19, 2007
1,397
439
113
Manchester
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
Thanks a bunch! Much much easier.
 

ontwykende

Senior Member
Feb 25, 2017
64
14
8
Nah mine works as intended I dunno honestly that's what I'm tryna figure out is magisk needed for certain versions of the 7t because I can go into settings and extra the only thing I noticed that does not function as should is the ambient light
I am on international version O2_BETA_01 and in my case I needed to unveil "when to show" option in display-ambient display, by using shell command /script from here.
 

ontwykende

Senior Member
Feb 25, 2017
64
14
8
I still didn't find out how to turn it on/off from tasker... only to use shell command from first post?
is there any other shell command just to turn AOD on/off and not to hide options from display/settings ?
 
Last edited:

lil_kujo

Senior Member
Oct 29, 2015
709
392
93
I still didn't find out how to turn it on/off from tasker... only to use shell command from first post?
is there any other shell command just to turn AOD on/off and not to hide options from display/settings ?
Your right it does work excellent made a script from FKM to trigger both upon reboot. Thank
With FKM script manager you don't need to use a terminal you can run right from that app
 

ontwykende

Senior Member
Feb 25, 2017
64
14
8
Your right it does work excellent made a script from FKM to trigger both upon reboot. Thank
With FKM script manager you don't need to use a terminal you can run right from that app
what I would like is to turn the AOD on or off with the shell command from Tasker ... For example, the AOD can only be ON when I have a new notification OR it can be completely Off when the "Do not disturb mode" is on (I already have task to turn Do not disturbe mode ih house (wifi zone) during night).