STANDARD DISCLAIMER: I am not responsible for any damages caused to your phone. Use this mod at your own risk there is no warranty or guarantee.
I made a Magisk Module to fix the image retention issue on the lg v20, When I would use kernel auditor, I could never quite get 1520 on the Hue, this would bug me. The script runs on boot and then exits out of memory. Taking up no cpu power or ram in the background.
I have updated the Magisk Module to work with Magisk 20.4 or higher. Just flash on top of older versions to update.
Requirements:
Magisk v20.4 or higher
MK2000 kernel, ezV2020 Kernel or Gamma Kernel. Or any kernel with KCAL support added.
The Magisk module will change the following color values.
v2.1
Red = 240
Green = 240
Blue = 240
Minimum = 35
Saturation = 50
Hue = 1520
Value = 130
Contract = 130
v2.2
Tweaked the KCAL settings, drastically improved contrast and colors & no image retention.
Red = 250
Green = 250
Blue = 235
Minimum = 35
Saturation = 27
Hue = 1520
Value = 112
Contract = 132
Credits, A Special Thank You
@helf for the KCAL settings in v2.2 XDA
After clearing up, will they appear again (I assume so)? Just bought a second hand H990TR, it has very poor image retention issue once heated up slightly, although only permanent solution I found includes changing color accuracy, I don't really wanna make colors inaccurate because screen is amazing for 2016 phone. IDK what to do...
Once you restart your telephone the image of retention will appear again but if the script starts up automatically then it'll take about 10 to 20 minutes for it to clear up. As long as you keep your phone on and don't restart it you won't even see the image retention. As for the color it looks about the same as the original. You have to look really close to notice that the screen actually changed.
I also use Comfort View in Oreo stock 8.0 and it seems to work just fine.
Oh, so this is just another way to adjust the colors. Most already do with with a root kernel manager.
ezzony said:
Oh, so this is just another way to adjust the colors. Most already do with with a root kernel manager.
Click to expand...
Click to collapse
Exactly just like kernel auditor. If I install a new operating system I don't like messing around with kernel auditor, I just put the shell script in there and reboot, it's just faster for me.
I made a Magisk Module to fix the image retention on the Lgv20. It's ready for download don't forget to uninstall the manual install first.
Olá, você poderia fazer um para o galaxy s9 snapdragon
Orteegaone said:
Olá, você poderia fazer um para o galaxy s9 snapdragon
Click to expand...
Click to collapse
Sorry I don't have a galaxy s9.
New version v2.1
Tweaked the KCAL settings, drastically improved contrast and colors & no image retention.
Red = 250
Green = 250
Blue = 235
Minimum = 35
Saturation = 27
Hue = 1520
Value = 112
Contract = 132
update the magisk script
Thank you for your work.
Deacon75 said:
Thank you for your work.
Click to expand...
Click to collapse
Not a problem, your welcome.
Related
Hi Guys.. I've been searching for ways to change the default color of Home Button of our Ray. Been on decompiling/compiling framework, settings... but got nothing or don't know exactly what xml/smali that controls the color of the buttons. So, by doing some trials-and-errors...:crying: Maybe this time I hit it.
First of all I want to thank:
JJDOCTOR for giving the hint to enable the light of Home button.
boy*racer*- max echo value is 20000
and all of you GUYS here on xda..
So here it is, navigate to system/etc/pre_hw_config.sh using ROOT EXplorer and find these lines:
echo 1000 > $dev/red/max_current
echo 1000 > $dev/green/max_current
echo 1000 > $dev/blue/max_current
and change to anything you want, I made it to
echo 1000 > $dev/red/max_current
echo 2000 > $dev/green/max_current
echo 9000 > $dev/blue/max_current
THE HIGHER THE VALUE, THE BRIGHTER THE LED.
Save changes....
For color preferences calculations: Go here. Thanks to Xtremy.
The above is nearly ICS Blue... You can put any values you want til 20000(?) except ZERO (0). By putting zero, that color will not be used by the system notifications ( I think)...
THIS WOULD NOT MAKE ALL OF THE NOTIFICATIONS COLOR TO THE COLOR YOU HAVE SET, ONLY THE DEFAULT HOME BUTTON COLOR IS AFFECTED. Sorry if the first flash of notification is not the COLOR you desired, only the succeeding flashes... I'm not a developer, I don't know how to do this correctly.
I THINK THIS WOULD NOT WORK ON CM-BASED ROM, BECAUSE THE HOME BUTTON LIGHT IS DISABLED (automaticbrightness is already set to FALSE). If somebody can make it to work, just apply it.
SOME DEFAULT COLOR WOULD NOT BE THE CORRECT APPEARANCE AFTER CHANGING THOSE LINES.. example, Violet is not violet when you use it as message notifications, still ICS Blue(?). Just raise the values.
REBOOT IS A MUST... Hope it won't bootloop...
adulfo said:
......................but got nothing or don't know exactly what xml/smali that controls the color of the buttons..........................:
Click to expand...
Click to collapse
XML is used to create user interface and the components used in app and java is used to create executable codes that will make apps functionality.
XML and smali are created automatically in app development.Though notepad++ is best to type XML.Best and easiest way to create a xml file is just write code in notepad++ and save it with extension of .xml.If you are developing an application of android then xmls are created by software itself. You will just need to specify name and add it to project as xml file...
thank you! i was just looking for this:good:
This is a nice mod adulfo! :good:
I wrote a little tutorial for finding your color value:
Go to this Color Wizard website.
Choose the color of your choice in de color bars.
In the #box you find the hex value for your color.
For this tut i use a nice orange E45F13 hex value.
Split de value in three pieces E4 5F 13.
1st byte E4 xx xx is for the Red value. (#FF0000)
2nd byte xx 5F xx is for the Green value. (#00FF00)
3rd byte xx xx 13 is for the Blue value. (#0000FF)
Open windows calculator set it in Scientific Mode.
1) Hit F5 to select HEX.
2) Type in your first hex (if HEX is 00, decimal is 0)
3) Hit F6 to convert to decimal.
Do this for all three hex values and write down the numbers...
1st byte E4 xx xx E4=228
2nd byte xx 5F xx 5F=95
3rd byte xx xx 13 13=19
As we know "max echo value is 20000" or 255 so:
20000 / 255 X 228 (your 1st above number)= 17882 for the Red Value
20000 / 255 X 95 (your 2nd above number)= 7450 for the Green Value
20000 / 255 X 19 (your 3rd above number)= 1490 for the Blue Value
Change the values in system/etc/pre_hw_config.sh for red, green and blue save & exit, reboot!
---------- Post added at 12:48 AM ---------- Previous post was at 12:37 AM ----------
I use the Tron Legacy Cyan color: 00DFFC
1000 for the Red Value.
17490 for the Green Value.
19764 for the Blue Value.
also note:
I set the first byte for Red to zero
after reboot it went to 1000 value,
so I think 1000 is the lowest value.
Thanks mate.. To those also having problems converting those values, you can google HEX to RBG converter.
wow it is very great and i change it
works perfect
4.0.4 587
psp1987 said:
wow it is very great and i change it
works perfect
4.0.4 587
Click to expand...
Click to collapse
Would be nice if you will read my signature...
what does this change ? the light shown when the phone is switched on and had no notification ?
-Jesco- said:
what does this change ? the light shown when the phone is switched on and had no notification ?
Click to expand...
Click to collapse
This would only change the default color of your Home button ( if only it is enabled), hitting any of your physical keys.
i changed all the values to 10000, all the colors are the same but a lot brighter, default 1000 is too dim for me.
@adulfo thanks for the tip buddy, can happily report that it is also working on my ray
Sent from my ST18i using xda premium
This values as depicted on the lines itself maybe clear, raising it, means raising LED current, more current more power,more power so much brighter... If you want color other than WHITE, don't make the values nearly equal.
Xtremy said:
also note:
I set the first byte for Red to zero
after reboot it went to 1000 value,
so I think 1000 is the lowest value.
Click to expand...
Click to collapse
Zero doesn't work, i try 0001, it works.
for RED color, the value is 10000,0001,0001.
Try again to see the values on your pre_hw_config.sh if it did not changed after reboot. Then all of your notifications will turn to RED.. By setting the lowest value to 1000, still the GB colors has still a good current value.
Flashable zip for Holo style Blue
Not made by me but jjdoctor...
had this zip tho
lokenok said:
Flashable zip for Holo style Blue
Not made by me but jjdoctor...
had this zip tho
Click to expand...
Click to collapse
I think this will make all of your notifications to LIGHT BLUE?.. Correct me if I'm wrong... Doing that also.. Better to put those values on pre_hw_config.sh..
adulfo said:
Try again to see the values on your pre_hw_config.sh if it did not changed after reboot. Then all of your notifications will turn to RED.. By setting the lowest value to 1000, still the GB colors has still a good current value.
Click to expand...
Click to collapse
so is there any value that change the LED to RED but not affect to other notification color???
luckkonku said:
so is there any value that change the LED to RED but not affect to other notification color???
Click to expand...
Click to collapse
Just don't put those values on hw_config.sh, only on pre_hw_config.sh I think....
hi guys this is my first comment so, i've changed these values in pre_hw_config.sh and of course i've got the color i want (nearly ICS blue). BUT here is my problem: other notifications like charging (instead of red it's nearly pink, instead of orange it's nearly green...) not working properly. I'm using light flow led and its notifications also miss the right color. Is there a solution for this? I'm not a developer but i think the phone calculates the values of notifications by this three values and must be an algorithm for this somewhere in the phone, so maybe we can manipulate that. Tell me if I'm wrong. Sorry for my english it's not my native language.
bobo023 said:
hi guys this is my first comment so, i've changed these values in pre_hw_config.sh and of course i've got the color i want (nearly ICS blue). BUT here is my problem: other notifications like charging (instead of red it's nearly pink, instead of orange it's nearly green...) not working properly. I'm using light flow led and its notifications also miss the right color. Is there a solution for this? I'm not a developer but i think the phone calculates the values of notifications by this three values and must be an algorithm for this somewhere in the phone, so maybe we can manipulate that. Tell me if I'm wrong. Sorry for my english it's not my native language.
Click to expand...
Click to collapse
Try to raise the values of the other color, I stated that on my OP last part that if you make the other values extremes (1000 and 20000), the the colors will be affected.. If for instance, Blue will have 20000 value, the notifications color that contains blue (violet...) will have dominant blue and other colors will be suppressed, so VIOLET will turn out to be more on BLUE.
I decided to have a go with custom gamma control as many people want to use it in other kernels, not just stock and Faux's. In a nutshell, it doesn't produce the same colours as Faux's kernel or stock (with Faux's lge_gamma_control kernel module) so it's not a drop-in replacement to his solution.
The reason that it's not working is because I haven't been able to find the correllations/formulae between the colours on the screen and the variables in kernel. I'm not sure why Faux isn't able/willing to release his code, although it could be due to NDA.
Attached is the patch to enable gamma control that works with FauxClock and also a prebuilt kernel with UV enabled.
I hope that inspired devs will be more patient than I am so we can have gamma control for all .
fnf said:
I decided to have a go with custom gamma control as many people want to use it in other kernels, not just stock and Faux's. In a nutshell, it doesn't produce the same colours as Faux's kernel or stock (with Faux's lge_gamma_control kernel module) so it's not a drop-in replacement to his solution.
The reason that it's not working is because I haven't been able to find the correllations/formulae between the colours on the screen and the variables in kernel. I'm not sure why Faux isn't able/willing to release his code, although it could be due to NDA.
Attached is the patch to enable gamma control that works with FauxClock and also a prebuilt kernel with UV enabled.
I hope that inspired devs will be more patient than I am so we can have gamma control for all .
Click to expand...
Click to collapse
Thanks so much for the .patch, its much better than my half-assed attempt few weeks ago. I'm gonna try and make yours work with correct colors
Thank you again.
Thanks Franco,
I peeked into the lge_gamma_control.ko from Faux, it's doing some more calculations before storing back the values to the kernel. I don't have much experience with decompiling ARM instructions, but it doesn't look complicated. It's probably worth less than 10 lines of C code.
I updated the patch to separate the handling of kgamma_* to their own methods, as different correction coefficients apply to red, green and blue.
Of course, credits to Faux for the binary .
@fnf thanks for the patch.
As i can see we are now able to access the values from board-mako-display.c via /sys/:
Code:
static char p_gamma_r_setting[10] = {0xD0, 0x72, 0x15, 0x76, 0x00, 0x00, 0x00, 0x50, 0x30, 0x02};
static char p_gamma_g_setting[10] = {0xD2, 0x72, 0x15, 0x76, 0x00, 0x00, 0x00, 0x50, 0x30, 0x02};
static char p_gamma_b_setting[10] = {0xD4, 0x72, 0x15, 0x76, 0x00, 0x00, 0x00, 0x50, 0x30, 0x02};
somebody knows how these values are working?
thanks
YourNameInHere
Edit: ok just tested it with the faux-app:
Gamma Amp Adjust 0 = value number 6
Gamma Amp Adjust 1 = value number 7
some more info?
Here are my original mods to the LGE video driver (see attachment) (fnf has faithfully reverse engineered, congrats and very nice indeed, we should talk sometimes if you have a chance):
The last bit of "mystery code" that fnf has noticed is nothing really big as he suspected. This is a simple checksuming code that's commonly used in many computer data transfers. What it does it to validate the payload values before accepting them into the video drivers because incorrect values could CAUSE PERMANENT damage to your screen. It was added to prevent derps from users trying to mess with the sysfs directly burning up the displays due to incorrect values.
Also as YourNameInHere have described:
gamma amp 0 is value 6
gamma amp 1 is value 7
This code needs a custom kernel in order to function and won't work in non-custom kernels.
faux123 said:
Here are my original mods to the LGE video driver (see attachment) (fnf has faithfully reverse engineered, congrats and very nice indeed, we should talk sometimes if you have a chance):
The last bit of "mystery code" that fnf has noticed is nothing really big as he suspected. This is a simple checksuming code that's commonly used in many computer data transfers. What it does it to validate the payload values before accepting them into the video drivers because incorrect values could CAUSE PERMANENT damage to your screen. It was added to prevent derps from users trying to mess with the sysfs directly burning up the displays due to incorrect values.
Also as YourNameInHere have described:
gamma amp 0 is value 6
gamma amp 1 is value 7
This code needs a custom kernel in order to function and won't work in non-custom kernels.
Click to expand...
Click to collapse
Looking forward to see this enhancement (LG-Presets: YAY!!!) in other kernels
Does anybody know more about the other values we can control this way?
The only hint I found is in the change to the color calibration by google:
https://github.com/CyanogenMod/lge-kernel-mako/commit/c1be92b7967f05ed5c6ea3b9c31060617541f96a
https://github.com/CyanogenMod/lge-kernel-mako/commit/0c0acb146c275ae01837fd6ad583df5fcdaa744c
What does ief stand for?
Also has anyone played with the look up tables yet?
https://github.com/CyanogenMod/lge-...bean/arch/arm/mach-msm/lge/lge_qc_lcdc_luts.c
STEP 1 : install resolution changer pro on any h2os rom from play store (kinmaricans i preffer).
STEP 2 : First do not enable it just put height = 1440 and width = 2560 and then density to 538.
STEP 3 : ENABLE IT. ENJOY
Can't it be in oxygen or any other cm based custom rom
You can't change your phone's screen resolution ahahaha that depends on the hardware. That app is just changing your DPI to change the size of UI elements.
If you could change your phone screen resolution with a simple app, why would any OEM make phones with 4k screens?
The OP2 was, is, and will always remain 1920x1080. You can always change the DPI to get smaller icons or whatever (I prefer 380, stock is 480). More the DPI, bigger your UI elements.
jash2909 said:
STEP 1 : install resolution changer pro on any h2os rom from play store (kinmaricans i preffer).
STEP 2 : First do not enable it just put height = 1440 and width = 2560 and then density to 538.
STEP 3 : ENABLE IT. ENJOY
Click to expand...
Click to collapse
That is just absolute nonsense, sorry to say that. You just make the device believe to have a 2k display, which means the GPU will have to push even more "virtual" pixels, while everything is just "downscaled". You won't get any benefits from that, in contrary you will just introduce more cluster****, by letting it run on a virtual resolution instead of it's native.
There's a reason why people with 2K phones set the virtual resolution down to 1080p, so that the GPU doesn't have to work as hard.
How this differ from changing dpi, it comes to my mind that oos doesn't like changing dp
Sent from my ONE A2005 using Tapatalk
OP, you may want to alter your thread title in the advanced edit menu to something more accurate. You will see what I mean if you read the comments here.
And members, it's fine to try to educate someone or correct them, but do it respectfully. Or don't post otherwise.
Thanks,
Darth
Forum Moderator
Hi, I want to share you my Color Control Settings, it increases for me the Quality of the LG-Display very much:
R/G/B = 256
Saturation = 75
Value = 111
Contrast = 135
Hue = 4
I hope I could help anybody
For those who don't know what KCAL is yet, it's basically an advanced colour control for Qualcomm devices and can be accessed via Kernel Adiutor. KCAL is supported by both SkyMelon 7 and Foy Kernels. It'll be interesting to see what are the profiles used by you guys now. Share here - so others could also benefit from it (our display are quite dull af). I'll start with mine:
Red : 256
Green : 250
Blue : 256
Saturation intensity : 37
Screen Hue : 0
Screen Value : 130
Screen Contrast : 131
Use Kernel Adiutor Mod V15...there u will find few Color Profiles!
Mine is:
Red : 256
Green : 256
Blue : 246
Saturation intensity : 50
Screen Hue : 0
Screen Value : 120
Screen Contrast : 120