FORUMS
Remove All Ads from XDA
OnePlus 6 On Sale

[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM

616 posts
Thanks Meter: 1,032
 
By MishaalRahman, Editor in Chief on 29th January 2018, 03:30 AM
Post Reply Email Thread
Hello.

By default, phhusson's generic AOSP Treble ROM is bare bones. That means it does not include features such as Night Light, Ambient Display, or Adaptive Brightness. Luckily all you need is the right overlay and you can bring these features back.

I tested this on the Huawei Mate 10 Pro and everything seems to work save for the lift-to-wake gesture. I am not sure if a simple overlay can enable that, as I already target the right boolean value for it. As for Adaptive Brightness, the lux and corresponding backlight values were borrowed from the Huawei Mate 9's framework-res.

Update 2/19/18

With the release of phhusson's Android 8.1 Oreo Treble GSI, I thought I would take the time to update my overlay as well with a new feature: Always on Display. You can download the overlay from the attachment in this comment, and install it using the same set of instructions below (don't install the overlay attached in this post if you want AOD). Please read the warnings carefully. I accept no responsibility for anything you do with your phone.

Update 2/6/18

I have updated the attached framework overlay to include the following features:
  1. WiFi automatic wakeup
  2. Pinner service for the default camera app and critical framework files

This should work on any device that can boot phhusson's Treble ROM.

Installation Instructions
  1. Download the attached overlay
  2. With root, push the overlay to /vendor/overlay. Create the folder if it doesn't exist.
  3. Run the following command in a rooted terminal or ADB shell:
    Code:
    chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk
  4. Reboot

XDA Labs adds emojis in the command for some reason. Open this thread in a browser to get the right command.

Why do you need to run that command? Without it, the overlay won't be seen as installed and isn't enabled. I'm not sure why, but according to phhusson it's an SELinux-related issue and this command fixes that.

Enjoy!
Attached Files
File Type: apk framework-res__auto_generated_rro.apk - [Click for QR Code] (5.7 KB, 858 views)
The Following 23 Users Say Thank You to MishaalRahman For This Useful Post: [ View ] Gift MishaalRahman Ad-Free
 
 
29th January 2018, 09:56 AM |#2  
Junior Member
Thanks Meter: 2
 
More
What is the code?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180129-175534.jpg
Views:	2538
Size:	252.1 KB
ID:	4403231  
29th January 2018, 12:08 PM |#3  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by 独影阑珊

What is the code?

Code:
chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk
Code
29th January 2018, 12:57 PM |#4  
Junior Member
Thanks Meter: 2
 
More
Why?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180129-205314.png
Views:	1834
Size:	198.9 KB
ID:	4403374  
Attached Images
 
29th January 2018, 01:47 PM |#5  
Senior Member
Thanks Meter: 29
 
More
Quote:
Originally Posted by 独影阑珊

Why?

It does not work because you have included spaces in the command that are not there.
29th January 2018, 01:49 PM |#6  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by tusko5

It does not work because you have included spaces in the command that are not there.

Oh, thanks.
30th January 2018, 06:53 AM |#7  
Senior Member
Flag Rennes
Thanks Meter: 15
 
More
Hello, not working on mate 9, all commands OK - no output error (I added mount -o rw,remount /system and mount -o rw,remount /vendor) to copy your files, but even after reboot no new things

EDIT : after "installing" the app (click on it with a root explorer), all options are now visible but not working
30th January 2018, 06:59 AM |#8  
Junior Member
Thanks Meter: 0
 
More
how can i get the root access on the rom?
30th January 2018, 07:01 AM |#9  
Junior Member
Thanks Meter: 2
 
More
It is also not working on honor v9 .
30th January 2018, 04:18 PM |#10  
MishaalRahman's Avatar
OP Editor in Chief
Thanks Meter: 1,032
 
More
Quote:
Originally Posted by mrassol

Hello, not working on mate 9, all commands OK - no output error (I added mount -o rw,remount /system and mount -o rw,remount /vendor) to copy your files, but even after reboot no new things

EDIT : after "installing" the app (click on it with a root explorer), all options are now visible but not working

If you install it as a regular app, it won't work. It MUST be pushed to /vendor/overlay manually, and you MUST run that command.

Quote:
Originally Posted by javawppp

how can i get the root access on the rom?

Install phhusson's SuperUser from the Play Store.

Quote:
Originally Posted by 独影阑珊

It is also not working on honor v9 .

Did you follow the steps exactly? This can't be installed like a regular app.
30th January 2018, 04:31 PM |#11  
Senior Member
Flag Rennes
Thanks Meter: 15
 
More
you did'nt read my post

I did all you wrote (I even add mount -o rw,remount /system and mount -o rw,remount /vendor) and nothing changed
AFTER that, I install the apk from /vendor/overlay using a root explorer and now the options are visible, brightness is working (I didn't saw it first), night mode is also working, ambiant display is also working but the option to turn on phone on pickup don't work.

So my bad, I didn't test it so much
Post Reply Subscribe to Thread

Tags
huawei mate 10, huawei mate 10 pro, huawei mate 9, project treble

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes