yashsingh1/xdaforums huggingface dataset:
[Treble-Enabled Device Development A/AB ROMS] mrassol:
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
[Treble-Enabled Device Development A/AB ROMS] 独影阑珊:
When I try to open it as a regular app , my phone display it can not open .I am sure it be pushed to /vendor/overlay .,and I have run the commed and rebooted system at least 5 times.but it still useless.(I am sorry my English is poor.)
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
You are running phhusson's AOSP Treble ROM, correct? What device?
[Treble-Enabled Device Development A/AB ROMS] 独影阑珊:
Yes,My device is Honor V9.
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Ah, okay. That is the Honor 8 Pro's Chinese version. Have you tried this ROM? https://xdaforums.com/honor-8-pro/development/rom-t3714728 I was told by the dev that he included these features by default. You flash it the same way with phhusson's ROM.
[Treble-Enabled Device Development A/AB ROMS] 独影阑珊:
Thanks,I will try it.:)
[Treble-Enabled Device Development A/AB ROMS] etern1ty:
Took me a while to get it to work on my mate 10 pro, then realised I had to manually set the permissions on the folder, and file for it to work. Great job!

Is there a way I could edit the minimum and maximum brightness it reaches?

Thanks again :)
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Ah, I forgot about that. I believe the folder permissions are 755 and the APK should be 644, correct? As for setting the brightness, do you want to increase the minimum and lower the maximum of the adaptive brightness?
[Treble-Enabled Device Development A/AB ROMS] etern1ty:
Yeah, that sounds right :) I just matched the other folders and APKs. I was hoping to decrease the minimum (so it's darker), I don't notice a big effect on my mate 10 pro.

Is there a guide for going about this? I'm interested to learn how to make these sorts of modifications myself.

Cheers
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Decompile my overlay. Look in /res/values/arrays.xml. Look at "config_autoBrightnessLcdBacklightValues" array and change the first item, <item>6</item> to <item>1</item>. Build the APK, sign it, and then push.
[Treble-Enabled Device Development A/AB ROMS] NoMercyWWE:
Not working tried 2 different apks and can only get night light, nothing else, doesn't matter which profile I choose
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
I have updated the framework overlay with new features. See OP for release notes.
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
You shouldn't be enabling any of the overlays in Settings --> Display. You shouldn't have to enable anything at all.
[Treble-Enabled Device Development A/AB ROMS] albertobom:
No file to download.
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Fixed
[Treble-Enabled Device Development A/AB ROMS] Nexus lover:
Works on a Honor View 10 with Treble-Phh

This works hassle-free on my Honor View 10 with Treble-Phh ROM, thanks!

I assume at least the command has to be repeated after every upgrade/system flash?
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Well, the overlay resides in /vendor, so flashing a new system image won't override it. As for the command, I'm not sure. I don't think you'll have to re-run it, so you'll have to verify that once that actually happens.
[Treble-Enabled Device Development A/AB ROMS] DeeZZ_NuuZZ:
After I flashed back emui it was still enabled, had the aod option in display instead of the usual setting. So yea even a few flash of system.img and even go to another rom will keep it :P
[Treble-Enabled Device Development A/AB ROMS] Nexus lover:
Remove procedure?

Just in case: what would be the proper removal procedure, especially for the command?
[Treble-Enabled Device Development A/AB ROMS] DeeZZ_NuuZZ:
use a file manager with root access and just remove it there. if you have twrp you can use its built in file manager too
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Just remove the file using a root enabled file explorer. No need to run any shell commands (though you can use a shell command to remove the file too.)
[Treble-Enabled Device Development A/AB ROMS] Nexus lover:
The command doesn't have to be undone?
[Treble-Enabled Device Development A/AB ROMS] DeeZZ_NuuZZ:
nope, if you flash a completely new/different system.img, it is enough if you remove the overlay in /vendor.
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Correction: the overlay is only removed if you flash a different vendor image. The overlay resides in /vendor/overlay, not /system.
[Treble-Enabled Device Development A/AB ROMS] DeeZZ_NuuZZ:
yea I now, but I meant if you flash another system.img and just remove the overlay, it won't harm anything and won't break anything. I did it and everything the overlay changed was removed/back to stock
[Treble-Enabled Device Development A/AB ROMS] 4RK4N:
doesnt seem to work correctly for me either. or i did smth wrong. honor 9 lite with the phh treble rom (gapps+su a-only variant).

copied overlay to /vendor/overlay (had to creat the folder)

set permissions folder 755 overlay.apk 644

ran command: output looked as if it worked.

can select overlays in display settings. without any selected nothing is differnt. with nightlight overlay selected i have a option for night light but enebling it and changing the slider does nothing. the other 2 overlays do nothing either.

what could i have done wrong?

UPDATE:

I got it working.

first i needed root which i thought any "adb shell <command here>" would have, it didnt. also /vendor needs to be remounted as read-write. so i did:

adb shell
su
mount -o rw,remount /system (though that isnt neccessary i think)
mount -o rw,remount /vendor (got /vendor/overlay read-only file-system error without it)
command from OP

after a reboot everything works.

nightmode overlay is still selected in settings -> display but thats unimportant i think.

nightmode works, ambient display works (not using it) and adaptive brightness works as well. nice work. maybe change OP with su and mount commands.
[Treble-Enabled Device Development A/AB ROMS] AravindhStanley:
Does treble rom have any bugs on honor 9 lite? Can you tell me your experience?
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Updated overlay is attached here with support for Always on Display (please use your best judgment and do not install this on a device with an LCD screen). THIS ONLY WORKS ON ANDROID 8.1 OREO!!!!

Install as usual and run the same command.
[Treble-Enabled Device Development A/AB ROMS] skiely666:
Hello, I'm just wondering does the always on display work like on the pixel 2? I know there is a substratum overlay for always on display but it doesn't work very well on OG pixel XL stock 8.1. is it possible to use this method on OG pixel XL?

Thanks
[Treble-Enabled Device Development A/AB ROMS] ngoralph:
if i want to downgrade to 8.0 would i need to remove this overlay first before downgrading?
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Yes, it will work better than the Substratum overlay. Yes, this should work on the OG Pixel XL (though I should probably strip all of the other stuff out first).

I am not sure what would happen. I suspect you should be fine, though.
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
Don't override the original framework overlay. Lots of very important Pixel stuff in there.
[Treble-Enabled Device Development A/AB ROMS] skiely666:
Yeah I was thinking that. So if I merge your code into the original framework overlay, in theory I could have pixel 2 always on display on my pixel XL?

Is this possible?
[Treble-Enabled Device Development A/AB ROMS] MishaalRahman:
It's really just one line you would need to add. You can decompile my overlay and change the package name so it won't interfere with the existing framework overlay.
[Treble-Enabled Device Development A/AB ROMS] giovanni_97:
You give me comand exactly?
[Treble-Enabled Device Development A/AB ROMS] The3File:
It's in op.
[Treble-Enabled Device Development A/AB ROMS] rufik:
[MENTION=7050182]MishaalRahman[/MENTION] How did you get config_autoBrightnessLevels and config_autoBrightnessLcdBacklightValues arrays from stock huawei's rom? I can't decompile it because apktool complains about some errors (known problem: https://github.com/iBotPeaches/Apktool/issues/1521).

What is max value for config_autoBrightnessLevels?

I'd like to tune levels because yours are not really fluent for me / too bright.
[Treble-Enabled Device Development A/AB ROMS] phhusson:
IIRC, if you look at the apktool code, you'll see there is an argument to the function "failIfSomething", just set that to false, and you'll be able to decompile (this breaks recompilation obviously though)
[Treble-Enabled Device Development A/AB ROMS] rufik:
Do you mean "--keep-broken-res" switch? Thanks, it worked ;)
[Treble-Enabled Device Development A/AB ROMS] rufik:
autobrightness levels - optimized

I've modified yours overlay on term of autobrightness - much more levels with different curve (low backlight at start, then goes to higher values for bright env), see attached pics.

Installation - just replace MishaalRahman's apk.
[Treble-Enabled Device Development A/AB ROMS] pchatzop:
I would like to build a vendor overlay for org.lineageos.platform-res . I tried modifying your overlay to fit the needed values, but i had no luck. Can someone point me in the right direction to build my own overlays?
[Treble-Enabled Device Development A/AB ROMS] mchtt:
Not working.
[Treble-Enabled Device Development A/AB ROMS] AndroidNazi:
I enabled this overlay (although it was hard because mounting vendor as r/w on my phone causes Android to freeze) and always on display shows up in settings but it doesn't do anything
[Treble-Enabled Device Development A/AB ROMS] sebx_g1:
The same situation on Moto Z Play and AEX rom - ambient display don't work with wave hands-on notification . But

Always ON

dispaly work :cyclops: and also new events are shown once on screen .

Is this a way to enable NFC via overlay if phone supports it ?
[Treble-Enabled Device Development A/AB ROMS] AndroidNazi:
NFC and camera don't work on the GSIs because of the way TeamMex implemented treble. I would have stayed on aex if it weren't for the camera not working
[Treble-Enabled Device Development A/AB ROMS] osk4rin:
I running a treble Rom, but Nigh tlight, Auto-Brightness, Ambient Display are not enabled.

What is the proper way to install via Es file Root explorer and Terminal Emulator?

I always get an error when I tried to enable the overlay, it might be the code.
[Treble-Enabled Device Development A/AB ROMS] sebx_g1:
Maybe he could fix it in future. However his first treble builds had on GSI worked NFC and camera i think [emoji848]

Wysłane z mojego XT1635-02 przy użyciu Tapatalka
[Treble-Enabled Device Development A/AB ROMS] VincentJoshuaET:
Is that the overlay with AoD? Can you make a version without it? Thanks!
[Treble-Enabled Device Development A/AB ROMS] luckydeveloper:
This instruction actually for LineageOS 15.1?
[Treble-Enabled Device Development A/AB ROMS] rufik:
I'm sorry, I don't use it anymore.
[Treble-Enabled Device Development A/AB ROMS] miqdad2018:
thanks
[Treble-Enabled Device Development A/AB ROMS] unan21:
How to add dt2w in overlay?
[Treble-Enabled Device Development A/AB ROMS] Shished:
Can you make a version with more brightness level and without always on display?
[Treble-Enabled Device Development A/AB ROMS] frandavid100:
I'm extremely interested in double tap to wake too.
[Treble-Enabled Device Development A/AB ROMS] josdehaes:
was only interested in auto brightness (or any brightness control at all), working perfectly on P20 pro, thx!!

I did have to chmod the apk to 644 before it would work though.
[Treble-Enabled Device Development A/AB ROMS] Flyskea:
How do you slove the notch problem
[Treble-Enabled Device Development A/AB ROMS] josdehaes:
Can not be solved with Oreo ROM. That's just something you need to deal with for now. No big problem.
[Treble-Enabled Device Development A/AB ROMS] calebj:
This works for lift-to-wake, but when it's set to always on, waking it up results in a black screen and I have to fiddle with the power button or reboot to get a working UI back. Tested on my SM-G9650 (G9650ZCU2ARF4 baseband) using phhusson's Lineage 15.1 GSI and the official RR 8.1.0 GSI.
[Treble-Enabled Device Development A/AB ROMS] eDooM85:
Awesome work, got it working on mi Xiaomi Mi Mix 2S with latest Resurection Remix GSI (08/18/2018)
[Treble-Enabled Device Development A/AB ROMS] Baron1971:
Hello,

one Question. When i enter this:

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

I get an error Message, that vendor/overlay is read only. How can i solve this? My Phone is a Mi A1.
[Treble-Enabled Device Development A/AB ROMS] josdehaes:
su

mount -o remount,rw /vendor
[Treble-Enabled Device Development A/AB ROMS] Baron1971:
I applied the Patch, but after reboot, there is no dark Theme. Any Tipps?

I use the RR 6.1 GSI Image on a MI A1. Befor i installed the RR 6.1 AIO, and thats work without Issues.
[Treble-Enabled Device Development A/AB ROMS] Genkzsz11:
in PE P not working?
[Treble-Enabled Device Development A/AB ROMS] kAs1m:
For everyone that can't get it to work in a way that describet in first post, try to run this script on any terminal emulator app:

1. put this lines in a text file and rename it to <any name>.sh

#!/bin/sh
mount -o rw,remount /vendor; cp -rf framework-res__auto_generated_rro.apk /vendor/overlay/; chmod 755 /vendor/overlay/framework-res__auto_generated_rro.apk; chown root:shell /vendor/overlay/framework-res__auto_generated_rro.apk; 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; mount -o ro,remount /vendor

2. place this file and framework-res__auto_generated_rro.apk in a root of sdcard

3. open terminal app, and run this commands

su
cd /sdcard
sh <anyname>.sh

5. reboot

PS

I'm using Pixel Experience 9.0 GSI on Le max 2
[Treble-Enabled Device Development A/AB ROMS] mnd123:
Is it possible to toggle AoD in the settings or somewhere else? I don't need AoD function also, but would like to have more brightness levels.
[Treble-Enabled Device Development A/AB ROMS] Theo1218:
I get only read message on terminal how can i fix this?
[Treble-Enabled Device Development A/AB ROMS] SH1M4BD3:
Thankyou so much you save my eyes OP, Benzo+Poco work like a charm...

i did it my way incase someone interested and lazzy enough to type move/copy the apk from filemanager TWRP ,make sure you already mount the vendor, put at the same folder as OP mention it above, then select the apk and choose chmod7XX, rebooot and profit..
[Treble-Enabled Device Development A/AB ROMS] silyong:
is this tutorial work in resurrection remix treble? and hoe to root resurrection remix treble tnx i have the official resurrection remix by mracar correcr mi if im wrong ..the hieght of the notch diaplay is not equal and icons in round corners some are hidden and not displying well ..is this the right fix?
[Treble-Enabled Device Development A/AB ROMS] silyong:
is this rom of from dev mracar?
[Treble-Enabled Device Development A/AB ROMS] alessio89g:
Need I to install Substratum anyway?
[Treble-Enabled Device Development A/AB ROMS] oo0:
[MENTION=7050182]MishaalRahman[/MENTION]

thanks for the patch, trying it with

FLOUNDER RESURRECTION REMIX v6.0.0 [8.1.0]

but LiveDisplay still not working. It is in the menu, but does nothing on switch.

Please advise
[Treble-Enabled Device Development A/AB ROMS] that_same_guy:
I tested the updated apk on Phh-treble rom 9.0 Note9 N960F/D. worked like a charm. thank you [MENTION=7050182]MishaalRahman[/MENTION]
[Treble-Enabled Device Development A/AB ROMS] tombassi:
working fine in MM3 havoc gsi latest.
[Treble-Enabled Device Development A/AB ROMS] :
Working on aosip pie gsi!
[Treble-Enabled Device Development A/AB ROMS] PianoMonkey:
Tested on Havoc2.0 (Android 9), the auto brightness adjusts very slowly (like 1 second between each "tick" of brightness/darkness)

Edit:

Tested on AICP-M Oreo and I get the same issue (slow auto brightness adjustments)
[Treble-Enabled Device Development A/AB ROMS] Miustone:
Can someone explain Me how this framework-res__auto_generated_rro.apk editing works? Just simple apk editing? I wonder since i play around with advanced Device Functions (Adding them) and i've seen something like that for the axon 7 which added these Things:

-fix Battery stats problems

-fix DT2W

-fix autobrightness and add axon7 values

-add axon7 power profil

-Sets Doze Component;

-Sets Doze After screen off;

-Configs autopowermodes (doze related);

-dual band wifi support

-VoLTE available when the gsi support it

-WFC over IMS

Is this really possible?

Thanks in advance for explaing that to me!
[Treble-Enabled Device Development A/AB ROMS] cd492:
Is it possible to decrease the brightness of the ambient display somehow? It's at 100% and not only too bright it consumes a lot of battery at this level as well.
[Treble-Enabled Device Development A/AB ROMS] dmilz:
Thank you, works perfectly.

Just moved apk to Vendor/Overlay as you said and put permission CHMOD 0644 in twrp without root
[Treble-Enabled Device Development A/AB ROMS] requiiiem:
Can any of these be modified to work on pie? In previous builds it worked on pie, but now no longer.
[Treble-Enabled Device Development A/AB ROMS] satheesh1998:
It says read only system... can't execute the command...what i have to do.help me please
[Treble-Enabled Device Development A/AB ROMS] Xyam:
First of all make sure you have root. Then in the terminal, type:

su

mount -o rw,remount /vendor
[Treble-Enabled Device Development A/AB ROMS] shaulreznik:
Thanks a lot! Lenovo K5 Play, AOSP 9.0, worked like a charm.
[Treble-Enabled Device Development A/AB ROMS] malfatti:
Hello! I installed this on my Moto E5 Nora XT1944-4 running AOSP 9.

- Night light was already working, and still works :)

- Adaptative brightness is working (that's what I was going for :D );

- "Lift to ambient display" works, but not so reliably (~50% of the times I tried);

- I see no option to not disable wifi during sleep.

Thanks a lot!!

This was great, thank you! This assures that the partition is mounted rw, copy the file, fix permissions, activate the overlay and remount the partition ro. Could this maybe be put in the OP?

Hey! I also would like more light levels. Does this package includes Always On Display? If yes, can we have a version of it that does not, so we can install it on our non-amoled devices? Thanks! :)
[Treble-Enabled Device Development A/AB ROMS] Beetle84:
[MENTION=7050182]MishaalRahman[/MENTION] THANK YOU!! I am currently using a moto g7 power. Among the issues that this device has with GSI's, auto-brightness being broken is no longer one of them. Cheers mate :highfive: :good:
[Treble-Enabled Device Development A/AB ROMS] Halwer:
Thank you guys so much for your work here, especially MishaalRahman and kAs1m! I successfully implemented the auto brightness feautre in HAVOC OS V2.9 arm64-aonly on Lenovo S5 Pro. I only had to use kAs1m's command with MishaalRahman's .apk.

---------- Post added at 21:32 ---------- Previous post was at 21:30 ----------

Sadly it is not working on my device (Lenovo S5 Pro - HAVOC OS V2.9 arm64-aonly)
[Treble-Enabled Device Development A/AB ROMS] Miustone:
Hey, is the Name the Point of the Placement? Could we take a Framework overlay and rename it to fit? Or how does it works?
[Treble-Enabled Device Development A/AB ROMS] Robot Ross:
Hey!

Is there any way to run these commands through the TWRP terminal? I've removed root from my device as part of Securize, and I don't want to reflash!

EDIT:

Got it "working", turns out you don't need the command when you copy to /vendor/overlay using the TWRP file manager.

Unfortunately the prebuilt overlay files here actually broke my screen altogether after first boot so had to uninstall.

If anyone has a compiled version for the Razer Phone 1, let me know!
[Treble-Enabled Device Development A/AB ROMS] Arsam javed:
I have installed without any error. It shows night light feature. But it messed uo with something chromium related. Google app is not searching anythimg. I tried chrome and brave same issue happen. Only Firefox works correctly. Plz provide ma a guide to fix it.

My phone is Huawei y7 prime 2018 Ldn-L21

I am using AOSP phh 10 rom
[Treble-Enabled Device Development A/AB ROMS] filipedonato:
Tutorial works in gsi android 12 AOSP. Galaxy A32 4G. Thanks!
[Treble-Enabled Device Development A/AB ROMS] quan3c10:
Hi @filipedonato, Could you please guide me how to push the overlay to vendor/overlay on Samsung device, it always show read-only permission.
[Treble-Enabled Device Development A/AB ROMS] yuernice:
将附加帧放入文件夹后，会自动消失，然后再次复制失败。你有什么指示吗

Mod translation: After putting the additional frame into the folder, it disappears automatically, and then the copy fails again. do you have any instructions
[Treble-Enabled Device Development A/AB ROMS] qtotter:
You cannot use 'mount -o rw,remount /vendor' with some devices, but here's a workaround.

Turn on Systemless hosts in Magisk, and reboot. Instead of /vendor/overlay, create /data/adb/modules/hosts/system/vendor/overlay and copy the apk there. Reboot again to make it recognized. In terminal emulator, as su, use the command below;

chcon u:object_r:vendor_overlay_file:s0 /data/adb/modules/hosts/system/vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /data/adb/modules/hosts/system/vendor/overlay/framework-res__auto_generated_rro.apk

Reboot again. It worked at least on my device. Cheers