[ROOT][PIE] Night Light for XZ Premium (and many others)

SGH-i200

Senior Member
Aug 31, 2009
1,039
241
93
Here's the original file - keep in mind that the ambient display might not work as designed. But feel free to play around.
I replace the nightLight.apk in the overlay directory by this apk, but after a restart no 'Ambient Display' was available in the Settings app. Only the 'Night Light' feature as before.
 

Sebi673

Senior Member
Oct 11, 2013
381
139
0
29
Bucharest
I replace the nightLight.apk in the overlay directory by this apk, but after a restart no 'Ambient Display' was available in the Settings app. Only the 'Night Light' feature as before.
As far as i recall it doesn't have a toggle but you will sure notice that the screen turns on on notifications - it's a bit buggy and I only needed the night light.

Try the mods on this thread https://forum.xda-developers.com/cr...mes-apps/9-0-enable-night-light-tile-t3868086

I didn't test the ambient display because it's a LCD panel and I only wanted the night light.
Cheers,
 

SGH-i200

Senior Member
Aug 31, 2009
1,039
241
93
Created a Magisk Module for this. You can attach it to the original post if you like to :)
Thank you!

What does the first of theses two line listed in config.sh do?
set_perm_recursive $MODPATH 0 0 0755 0644
set_perm_recursive $MODPATH/system/vendor/overlay/nightLight.apk 0 0 0644
Edit: You should add this module to the Magisk module catalog! ?
 

Attachments

Last edited:

alagga

Senior Member
Nov 27, 2012
306
133
63
Thank you!

What does the first of theses two line listed in config.sh do?


Edit: You should add this module to the Magisk module catalog! ?
The first is the Default Permission and the second sets the Permission for the nightlight.apk correctly.

There are some requirements (as github repo etc) to upload Modules to the repo, I don't think I'll fulfill them. But shouldn't be a Problem to download here :)
 
  • Like
Reactions: Sebi673

espoice

Member
Nov 3, 2013
17
13
0
Hey thanks for the mod! I'm using rooted oreo, flashed with magisk and it works fine. BTW I've noticed that turning off night light leaves a sort of amberish tint on the screen, which I have to remove by restoring white balance on display settings. Is this a common behaveiour? It happens with Invert Colors tile too.
 

Sebi673

Senior Member
Oct 11, 2013
381
139
0
29
Bucharest
Hey thanks for the mod! I'm using rooted oreo, flashed with magisk and it works fine. BTW I've noticed that turning off night light leaves a sort of amberish tint on the screen, which I have to remove by restoring white balance on display settings. Is this a common behaveiour? It happens with Invert Colors tile too.
Hi,

On oreo, there's a simple adb line to enable night light. it's already baked into the system. Pie needs a helping hand.