[Free APP] Nexus 5 gamma reverse engineering App. Please contribute!

Search This thread

enzo-ita

Senior Member
Dec 18, 2008
92
5
70
Ala
Hi,
I have read some of the posts. Not the whole thread!!!
I have a question which may be silly and I apologyze in advance.
I purchased a THL 5000 and the display is simply horrible compared to the Galaxy S3 I own. Colors are washed out and there is no contrast.
I would like to tweak my phone but I have not been able to understand if this app can be used with that phone and/or if there is something I can do to make it working on the THL 5000.
Also if someone knows about something I could do to improve the appearance of the display, please tell me about.
Thanks in advance for your answers.
Ciao from Italy
 

Tzfardaya

Senior Member
Sep 22, 2012
5,353
3,108
Calgary
Hi,
I have read some of the posts. Not the whole thread!!!
I have a question which may be silly and I apologyze in advance.
I purchased a THL 5000 and the display is simply horrible compared to the Galaxy S3 I own. Colors are washed out and there is no contrast.
I would like to tweak my phone but I have not been able to understand if this app can be used with that phone and/or if there is something I can do to make it working on the THL 5000.
Also if someone knows about something I could do to improve the appearance of the display, please tell me about.
Thanks in advance for your answers.
Ciao from Italy
This app is specific to the n5, you should check the forums for your device to see if they have any color control apps yet...
 
Last edited:

yorici

Senior Member
Aug 23, 2012
521
708
Hi,
I have read some of the posts. Not the whole thread!!!
I have a question which may be silly and I apologyze in advance.
I purchased a THL 5000 and the display is simply horrible compared to the Galaxy S3 I own. Colors are washed out and there is no contrast.
I would like to tweak my phone but I have not been able to understand if this app can be used with that phone and/or if there is something I can do to make it working on the THL 5000.
Also if someone knows about something I could do to improve the appearance of the display, please tell me about.
Thanks in advance for your answers.
Ciao from Italy

Tsss not even bothering reading all 1091 pages? ;)

This is Nexus 5 only. Sorry. Can't help ya with a S3
 

ho0o0o11111

Senior Member
Jun 18, 2007
205
76
Hello
I searched but didn't find an answer.

Is it possible to use this app/mod to make screen color inverted? (i.e. White background to black, for reading)
(by faux123 or Franco's kernel)

Thanks. :laugh:
 

Tylog

Inactive Recognized Contributor
Jan 4, 2013
7,423
19,740
There is no Kernel because there are no sources for the latest build, i hate the yellow tint too but solong no source we need zu life with it, the source drop maybe before 11/03 release.
 

Tylog

Inactive Recognized Contributor
Jan 4, 2013
7,423
19,740
Belive me, for the latest L Build no Custom Kernel work. Only for the older previous, not for the latest.

No source, no Custom Kernel
 

Top Liked Posts

  • There are no posts matching your filters.
  • 153
    Nexus 5 Gamma Reverse Engineering App is out!

    (This app will work on the common sysfs interface, so any kernel using this interface will be compatible with this app, not just my kernel)

    Please download my public betas here:

    http://faux.androidro.ms/hammerhead/beta/

    Franco Kernel is also compatible here:

    http://xdaforums.com/showthread.php?t=2508284

    ALL Gamma registers are accessible with new APK!

    @myfluxi Thank you again!

    After hitting apply, it's best to turn screen on/off to see the results updated!

    Please help decipher the meaning of these values and write them down in a concise manner so we can all understand what you've done and tried.

    My TODO list for this FREE app:
    Once things are figured out, I will add:

    1: "Set On Boot" options to automatically apply the new values on startup (right now "set on boot" can be dangerous and lead to black screens).
    2: Perhaps some basic profiles
    3: Maybe other cool stuff if time permits :D


    Min Value is 0 (NO NEGATIVES)
    Max Value is 255 (Don't Go over it, it will break stuff!!!)



    App Change Log:

    1.0.6 - Initial release with RGB register access only
    1.0.7 - full access to all registers
    1.0.8 - add "set on boot" feature, add webview link to 2nd post below, enabled landscape mode.
    1.0.9 - updated to latest kernel driver. add old version warning. add action bar for quicker navigation.
    1.0.10 - updated to latest kernel driver. removed unused fragments.
    1.0.11 - updated to latest kernel driver with stable sysfs locations!
    77
    Progress So Far:

    Gamma Tabs:

    columns => goes from left to right, so 1st position is most let and right most is 5th position
    row => goes from top to bottom.

    I got VERY CLOSE to ideal Gamma 2.2

    Positive and Negative Polarity tweak added. This allows for greater RGB gamma control and balance!

    Overall Color Gamma Curve (row 1 column 1 of RGB Gamma tabs) => 0 is highest, 255 lowest
    Red Gamma Positive=> 0
    Green Gamma Positive=> 73
    Blue Gamma Positive=> 78

    Red Gamma Negative => 0
    Green Gamma Negative => 73
    Blue Gamma Negative => 78

    Gamma Color Brightness (row 2 column 5 of RGB Gamma tabs) => 0 is highest, 255 lowest
    Red Gamma Positive => 100
    Green Gamma Positive => 117
    Blue Gamma Positive => 121

    Red Gamma Negative => 107
    Green Gamma Negative => 117
    Blue Gamma Negative => 121

    Overall White Point Brightness => 0 darkest, 255 brightest
    Gamma white point, Column 1 => 30
    30
    ok, do hopefully the last bit..

    First, I'd like to say that the following isn't directly aiming to be the settings everyone should use. It's meant to be just a guidance for how do these settings work. For example my display isn't that much yellowish as many others seem to experience so there are definitely big differences among these displays.

    Now in my previous tests I ended up with some (pretty much linear) green color rebalancing. I took it further then, also rebalanced blue and red a little so that they would match properly and also their levels would be correct (or much loser to that).
    Green was a little tricky as it was visually very sensitive to incorrect changes - mainly not smooth transitions and slight banding were the result. So when performing bigger corrections I had to make some compromises to limit these negative effects.

    Now this is the state after making all initial corrections (rebalancing color levels, but not targeting gamma corrections).
    EDIT: just to explain this setup a little:
    - red levels just corrected a little (minor corrections to get proper match with other color levels, more stable gamma progress)
    - green levels taken down (maybe 8% in average, the main part was done in one of my previous posts, here I tuned this a little bit more like the red above)
    - blue levels taken down (but not as much as green, maybe 2-3% in average)

    R: 0, 10, 17, 27, 37, 45, 56, 72, 83, 101, 113, 121, 129, 123, 117, 104, 89, 77, 67, 61, 52, 37, 21
    R delta:0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, -2, -2, -1, -1, -1, -1, -1, -1
    G: 84, 85, 86, 88, 91, 94, 100, 108, 112, 122, 128, 132, 119, 115, 110, 98, 82, 71, 63, 57, 49, 36, 20
    G delta: 13, 12, 11, 10, 10, 10, 10, 8, 7, 5, 4, 2, -2, -2, -1, -2, -3, -2, -1, -1, -1, -1, -1
    B: 90, 91, 93, 95, 98, 100, 104, 111, 113, 122, 127, 131, 121, 116, 111, 97, 80, 67, 57, 48, 36, 29, 16
    B delta: 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 1, 0, 1, 0, 1, -2, -4, -4, -4, -4, -4, -4, -4

    Which gives me:
    average gamma: 2.0
    contrast ratio: 920:1

    Now try to get gamma to about 2.1, delta values are difference to gamma 2.0 (above) so that they show only what's needed to correct for the gamma:
    R: 0, 10, 17, 27, 37, 45, 57, 74, 85, 103, 116, 123, 127, 121, 115, 101, 86, 76, 67, 61, 52, 37, 21
    R delta (gamma correction only): 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3, 2, -2, -2, -2, -3, -3, -1, 0, 0, 0, 0, 0
    G: 84, 85, 86, 88, 91, 94, 101, 110, 114, 124, 131, 134, 117, 113, 108, 95, 79, 70, 63, 57, 49, 36, 20
    G delta (gamma correction only): 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3, 2, -2, -2, -2, -3, -3, -1, 0, 0, 0, 0, 0
    B: 90, 91, 93, 95, 98, 100, 105, 113, 115, 124, 130, 133, 119, 114, 108, 93, 76, 66, 57, 48, 36, 29, 16
    B delta (gamma correction only): 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3, 2, -2, -2, -3, -4, -4, -1, 0, 0, 0, 0, 0

    Which gives me:
    average gamma: 2.11
    contrast ratio: 931:1

    Now try to get gamma to about 2.2, delta values are difference to gamma 2.0 (above) so that they show only what's needed to correct for the gamma.
    Note that I didn't go exactly to 2.2 as the display doesn't seem to perform that well after making such big corrections, and basically at gamma around 2.2. Some color transitions turn into just solid colors etc. And again, green is the most affected. I may try to add more exact 2.2 values later but now I've got enough of all this :D
    You can also see that blue required slightly stronger corrections.
    R: 0, 10, 17, 27, 37, 45, 57, 75, 86, 104, 117, 125, 125, 119, 113, 100, 85, 75, 67, 61, 52, 37, 21
    R delta (gamma correction only): 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 4, 4, -4, -4, -4, -4, -4, -2, 0, 0, 0, 0, 0
    G: 84, 85, 86, 88, 91, 94, 101, 111, 115, 125, 132, 136, 115, 111, 106, 94, 78, 69, 63, 57, 49, 36, 20
    G delta (gamma correction only): 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 4, 4, -4, -4, -4, -4, -4, -2, 0, 0, 0, 0, 0
    B: 90, 91, 93, 95, 98, 100, 105, 114, 116, 125, 131, 135, 117, 112, 106, 92, 75, 65, 56, 48, 36, 29, 16
    B delta (gamma correction only): 0, 0, 0, 0, 0, 0, 1, 3, 3, 3, 4, 4, -4, -4, -5, -5, -5, -2, -1, 0, 0, 0, 0

    Which gives me:
    average gamma: 2.17
    contrast ratio: 860:1

    When compared to changing just the so called white point to 30, you'll get similar values:
    WP: 31
    average gamma: 2.07
    contrast ratio: 900:1

    WP 30:
    average gamma: 2.14
    contrast ratio: 870:1

    WP: 29
    average gamma: 2.23
    contrast ratio: 870:1

    And the progress of all color levels throughout the whole range is pretty good. So if you just want to change the gamma then you may be alright with WP set to around 30. Just you won't be able to correct the color levels this way.
    When you change the WP value, colors change a little (as I mentioned in one of my previous posts), but change from 32 to 29 isn't that big and the changes will be minimal.

    I mention the average gamma in all above cases, but it of course changes throughout the range and especially around 0-10% and 90-100% gray it's harder to achieve the correct value. However I tried to get the most stable results in all cases - but also didn't go too far to cause some visible artifacts to appear.

    Again, this whole post (and also the previous ones) are more about finding out how this whole thing works so that some app with simple controls can be developed.

    You may try my settings but they may not give you good results as your display might be very different.

    Equipment used for measurements:
    X-Rite i1 Display Pro with factory WLED LCD display type correction - colorimeter
    Voodoo Screen Test Patterns 3.4 - Android test pattern generator
    HCFR 3.1.0.4 - PC colorimeter software
    Display Tester Pro - Android display tester
    27
    franciscofranco sometimes denies evidence...

    Ok, read below.

    franco is sometimes a bit quick with "nothing to do with" and "nothing changed" replies in a bit a flapsy way but usually things will be corrected within a quite reasonable period of time.

    You're a real pain in my arse. I've shown factual evidences that I haven't changed a single bit in the gamma interface - yes factual with git histories - I'm more than interested that people use this app, its free and makes people happy, so why would I make it incompatible on purpose?

    I actually am not too happy about that attitude. Shrug. I respect the guy for his talents, but sometimes he plays the defensive game too much. It's just like when CM compatibility breaks with his kernel. He denies that it's him, but sometimes in the end he makes the changes anyway.

    My point is that if you say your kernel is CM compatible, then you tweak for CM, not the other way around. CM is a full package, and it can do anything it likes. Changes that CM have made are primarily designed for CM to function better as a whole package. CM was never designed to allow for custom kernels anyway. You have to make your kernel compatible for CM. So I don't get his attitude sometimes.

    Similarly when faux hasn't touched this app for weeks now, and r31 of FK works but not r32, then what does that tell you? Even if it isn't Franco's fault, and there's a bug in faux's app, his attitude is still wrong. He should look into it and conclude what the problem is. If he truly believes his own kernel isn't the issue, then the right attitude would be to notify faux (given that he's contributed in this thread too) that his app may have an issue and that faux should look into it further.

    Ok sorry for ranting. I hope this does get fixed one way or the other soon!

    ---------- Post added at 11:05 AM ---------- Previous post was at 11:00 AM ----------



    ooh. let me try that one out. thanks for the tip.

    Just a small info for you from myfluxi, the guy who wrote the gamma Kernel code:

    http://xdaforums.com/showpost.php?p=49316012&postcount=12143
    http://xdaforums.com/showpost.php?p=49318176&postcount=12155

    No Kernel code was changed, regarding gamma interface. I've shown the git history compared to myfluxi's and there are 0 differences.

    Anyway, just wanted to share that out. And about my attitude, deal with it - at least I'm active enough to help my users answering to all kinds of posts and sometimes ridiculous reports.

    This app is not the problem per-se but I would suggest something like this for faux's app to detect the path (now the path is going to be moved to a more standard place, but this info can be useful):

    File[] dir = new File("/sys/devices/").listFiles();

    for (File f : a) {
    if (f.getName().toString().contains("qcom,mdss_dsi_jdi_command_ors"))
    return "/sys/devices/" + ff.getName().toString();
    }

    This would get the correct directory of the sysfs files even if the directory moved around with different ending numbers (.XX). Its a bit "hacky" but store that into a static variable and do it just once on app bootup, profit.

    Hope this helps!
    27

    this is to help reverse engineer the kernel drivers. it is relevant in this section for kernel development.