[GUIDE][HOW-TO][ANY-ROM]Change Auto Brightness Levels

Search This thread

chiragkrishna

Senior Member
Jul 16, 2010
617
522
bangalore
If you like it then dont forget THANKS Button

Things You Need
-apkTv1(attached)- its easier for n00bs
-notepad++
-7-zip
-framework-res.apk(Your ROM)


Lets Start
1)Download apkTv1 its attached in post, extract it some where you can easily access it.

2)Copy your framework-res.apk to the directory where you extracted apkTv1

3)Now run "Run Me.bat" and press 1 to decompile. you will get a framework-res folder.

4)navigate to "framework-res\res\values"

5)open "arrays.xml" in notepad++

6)these things you can change, dont worry if you dont have few of them, just ignore
Code:
config_autoBrightnessLevels - light sensor filter values

config_autoBrightnessHysteresisLevels - prevents the light from drastically changing

config_autoBrightnessLcdBacklightValues - your display brightness values

config_autoBrightnessButtonBacklightValues - your buttons  backlight values

config_autoBrightnessKeyboardBacklightValues - your keyboard backlight values

7)this is what i did with s3
original
Code:
<integer-array name="config_autoBrightnessLevels">
<item>15</item>
<item>150</item>
<item>1500</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessHysteresisLevels">
<item>7</item>
<item>75</item>
<item>1000</item>
<item>10000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>20</item>
<item>80</item>
<item>130</item>
<item>190</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues ">
<item>255</item>
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>

modified
Code:
<integer-array name="config_autoBrightnessLevels">
<item>0</item>
<item>1</item>
<item>20</item>
<item>150</item>
<item>400</item>
<item>800</item>
<item>1500</item>
<item>3000</item>
<item>6000</item>
<item>9000</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessHysteresisLevels">
<item>0</item>
<item>2</item>
<item>50</item>
<item>110</item>
<item>320</item>
<item>900</item>
<item>2000</item>
<item>6000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>30</item>
<item>50</item>
<item>60</item>
<item>80</item>
<item>100</item>
<item>120</item>
<item>150</item>
<item>190</item>
<item>210</item>
<item>230</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>200</item>
<item>100</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues ">
<item>255</item>
<item>200</item>
<item>100</item>
<item>0</item>
<item>0</item>
</integer-array>

if you like a particular roms auto brightness levels you can just copy paste the values ;)

10)again run "run me.bat" and select 2 to recompile, you will get "temp.apk"

11)open your "framework-res.apk" & "temp.apk" in 7-zip and add the "resources.arsc" from "temp.apk" to "framework-res.apk",... yes replace it,...

12)push it to your phone, make a rom or do what ever you want from here,...

13)hit THANKS if you like it and feel it was useful
 

Attachments

  • apkTv1.zip
    6.3 MB · Views: 2,678
Last edited:

vasiaeva

Senior Member
Jan 6, 2011
635
90
What I got.

Sent from my SPH-D710 using Xparent ICS Tapatalk 2
 

Attachments

  • uploadfromtaptalk1348630344105.jpg
    uploadfromtaptalk1348630344105.jpg
    13.1 KB · Views: 2,138

Blackrose666

Senior Member
Jan 19, 2012
170
52
Adelaide
What I got.

Sent from my SPH-D710 using Xparent ICS Tapatalk 2

What version of Java do you have installed?

I got the same error and am running 64 bit windows but only had 32 bit Java installed, installing 64 bit Java fixed the error.

@ chiragkrishna thanks for a great guide, I can use the auto brightness feature now it was not very good on stock settings :good:
 
S

shadowch31

Guest
Why not just download one of the number of auto brighness adjustable apps on the market for example Velis Auto Brightness?
 

ak0r

Senior Member
Jul 20, 2011
759
338
Pune
Is this applicable for any device/rom? For my device CM10 has following values

Code:
    <integer-array name="config_autoBrightnessLevels">
        <item>1</item>
        <item>3</item>
        <item>5</item>
        <item>19</item>
        <item>26</item>
        <item>69</item>
        <item>219</item>
        <item>309</item>
        <item>498</item>
        <item>1024</item>
    </integer-array>
    <integer-array name="config_autoBrightnessLcdBacklightValues">
        <item>57</item>
        <item>57</item>
        <item>57</item>
        <item>85</item>
        <item>114</item>
        <item>142</item>
        <item>170</item>
        <item>199</item>
        <item>227</item>
        <item>255</item>
        <item>255</item>
    </integer-array>
    <integer-array name="config_autoBrightnessButtonBacklightValues">
        <item>255</item>
        <item>255</item>
        <item>255</item>
        <item>255</item>
        <item>-1</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
    </integer-array>
    <integer-array name="config_autoBrightnessKeyboardBacklightValues">
        <item>255</item>
        <item>255</item>
        <item>255</item>
        <item>255</item>
        <item>-1</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
        <item>0</item>
    </integer-array>
 
  • Like
Reactions: Hpsgill

chiragkrishna

Senior Member
Jul 16, 2010
617
522
bangalore
^^^
You can use this method...
But cm10 has a feature to set custom brightness values in settings... so it's easier to go in settings n change them instead of decompiling n recompiling apk...
 
Last edited:

desalesouche

Senior Member
Feb 6, 2012
3,651
4,297
hi .i have no values in frameworck/res so how could i change light setting on cm7.2 for huawei u8220? by egg minimum is around i think /15 or 20% how could i do do minimize this to 10%? thank you...
 

Attachments

  • framework-res.apk
    2.3 MB · Views: 49

sixline

Senior Member
Mar 17, 2010
596
179
Yanbu
Samsung Galaxy S10e
Nokia 7.2
hi .i have no values in frameworck/res so how could i change light setting on cm7.2 for huawei u8220? by egg minimum is around i think /15 or 20% how could i do do minimize this to 10%? thank you...
CM7.2 has a built in auto-brightness tweak setting. Settings>cm settings>display>auto brightness>change other levels (i think!)

---------- Post added at 08:28 AM ---------- Previous post was at 07:53 AM ----------

Tried on HTC Wildfire running Rempuzzle ROM but got into a bootloop :(
Here are my edited values:

</integer-array>
<integer-array name="config_autoBrightnessLevels">
<item>9</item>
<item>10</item>
<item>11</item>
<item>41</item>
<item>91</item>
<item>161</item>
<item>226</item>
<item>321</item>
<item>641</item>
<item>1281</item>
<item>2601</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>10</item>
<item>15</item>
<item>40</item>
<item>70</item>
<item>100</item>
<item>130</item>
<item>150</item>
<item>180</item>
<item>200</item>
<item>230</item>
<item>240</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesUp"> //don't know what this is..never touched
<item>100</item>
<item>100</item>
<item>100</item>
<item>142</item>
<item>142</item>
<item>180</item>
<item>180</item>
<item>255</item>
<item>255</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValuesDown"> //don't know what this is..never touched
<item>100</item>
<item>100</item>
<item>142</item>
<item>142</item>
<item>180</item>
<item>180</item>
<item>255</item>
<item>255</item>
<item>255</item>
<item>255</item>
</integer-array>
 

davidshooki

Senior Member
Mar 15, 2008
90
2
Why not just download one of the number of auto brighness adjustable apps on the market for example Velis Auto Brightness?

I have a few apps that adjust the brightness automatically, but they cannot go below the lowest value the system allows.
So I need the system settings to change and not just an app that changes brightness.
For example, phone weaver will adjust the brightness based on time and location (in car, at nights, in meetings, movie theater etc...) so an app that manually or independently adjusts the brightness will not be as helpful.

I have not tried this mod yet, but will give it a try on my Galaxy S2 rooted stock.
 

RobAndroid

Senior Member
Dec 4, 2010
71
14
Portland, OR
Thanks for the info! I did this on my GSII E4GT, and I have another tip - I thought I'd be clever and rename the old framework-res.apk file before copying the new one - BIG MISTAKE!! There's not enough space for one thing, and secondly once I renamed it the system freaked out and I couldn't get the new one pasted in there (using Root Explorer). Had to reflash using ODIN and try it again. Just copied the old one somewhere else and pasted and replaced the file in system/framework. Also, I pasted to /tmp initially so I could set permissions first (can't do that on SD card). Once I pasted the file, the phone froze and rebooted but all was well.
 

Qevinator

Senior Member
May 4, 2011
173
67
Nijmegen
Is there anyone who can help me with this error:



Just want to adjust the autobrightness settings in the framework-res.apk

EDIT: never mind! Solved it by updating aapt
 
Last edited:

Moscow Desire

Retired Senior Moderator
Go to http://forum.xda-developers.com/showthread.php?t=1755243 and download the apktool.jar, aapt.exe and apktool.bat files under "Downloads". Once downloaded, put them in your folder and replace the old ones.

Why don't you all just do things the easy way, and use Virtuous Ten Studio by our own @Diamondback ? No fuss, no muss. Pull, decompile, edit with built in editor, recompile, zipalign and push back to device. Built in support for all apk version levels.
 

funkysonic

Senior Member
Nov 9, 2011
181
16
racconigi
Problems


host image

I have all these errors and i don't understand why. However the program decompile well framework-res.apk. Also when i recompile i give errors. But temp.apk is generated. Obviously when i push with abd the framework-res.apk modified the system go into bootloop or have strage resizing of the display and i have to come back to old frameworl-res.apk. No brightness change at all. I have installed android sdk and java sdk.
 

sivakarthick

Senior Member
Jan 27, 2013
53
15
After trying this my mobile is always rebooting....

If you like it then dont forget THANKS Button

Things You Need
-apkTv1(attached)- its easier for n00bs
-notepad++
-7-zip
-framework-res.apk(Your ROM)


Lets Start
1)Download apkTv1 its attached in post, extract it some where you can easily access it.

2)Copy your framework-res.apk to the directory where you extracted apkTv1

3)Now run "Run Me.bat" and press 1 to decompile. you will get a framework-res folder.

4)navigate to "framework-res\res\values"

5)open "arrays.xml" in notepad++

6)these things you can change, dont worry if you dont have few of them, just ignore
Code:
config_autoBrightnessLevels - light sensor filter values

config_autoBrightnessHysteresisLevels - prevents the light from drastically changing

config_autoBrightnessLcdBacklightValues - your display brightness values

config_autoBrightnessButtonBacklightValues - your buttons  backlight values

config_autoBrightnessKeyboardBacklightValues - your keyboard backlight values

7)this is what i did with s3
original
Code:
<integer-array name="config_autoBrightnessLevels">
<item>15</item>
<item>150</item>
<item>1500</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessHysteresisLevels">
<item>7</item>
<item>75</item>
<item>1000</item>
<item>10000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>20</item>
<item>80</item>
<item>130</item>
<item>190</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues ">
<item>255</item>
<item>255</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>

modified
Code:
<integer-array name="config_autoBrightnessLevels">
<item>0</item>
<item>1</item>
<item>20</item>
<item>150</item>
<item>400</item>
<item>800</item>
<item>1500</item>
<item>3000</item>
<item>6000</item>
<item>9000</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessHysteresisLevels">
<item>0</item>
<item>2</item>
<item>50</item>
<item>110</item>
<item>320</item>
<item>900</item>
<item>2000</item>
<item>6000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>30</item>
<item>50</item>
<item>60</item>
<item>80</item>
<item>100</item>
<item>120</item>
<item>150</item>
<item>190</item>
<item>210</item>
<item>230</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>200</item>
<item>100</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues ">
<item>255</item>
<item>200</item>
<item>100</item>
<item>0</item>
<item>0</item>
</integer-array>



10)again run "run me.bat" and select 2 to recompile, you will get "temp.apk"

11)open your "framework-res.apk" & "temp.apk" in 7-zip and add the "resources.arsc" from "temp.apk" to "framework-res.apk",... yes replace it,...

12)push it to your phone, make a rom or do what ever you want from here,...

13)hit THANKS if you like it and feel it was useful

After trying this my mobile is always rebooting...my mobile is turbo mini a200...If you have time kindly try this framework app to lower brightness value and also capacitive key... thanks
 

Attachments

  • framework-res.apk
    12.9 MB · Views: 17

Top Liked Posts

  • There are no posts matching your filters.
  • 32
    If you like it then dont forget THANKS Button

    Things You Need
    -apkTv1(attached)- its easier for n00bs
    -notepad++
    -7-zip
    -framework-res.apk(Your ROM)


    Lets Start
    1)Download apkTv1 its attached in post, extract it some where you can easily access it.

    2)Copy your framework-res.apk to the directory where you extracted apkTv1

    3)Now run "Run Me.bat" and press 1 to decompile. you will get a framework-res folder.

    4)navigate to "framework-res\res\values"

    5)open "arrays.xml" in notepad++

    6)these things you can change, dont worry if you dont have few of them, just ignore
    Code:
    config_autoBrightnessLevels - light sensor filter values
    
    config_autoBrightnessHysteresisLevels - prevents the light from drastically changing
    
    config_autoBrightnessLcdBacklightValues - your display brightness values
    
    config_autoBrightnessButtonBacklightValues - your buttons  backlight values
    
    config_autoBrightnessKeyboardBacklightValues - your keyboard backlight values

    7)this is what i did with s3
    original
    Code:
    <integer-array name="config_autoBrightnessLevels">
    <item>15</item>
    <item>150</item>
    <item>1500</item>
    <item>15000</item>
    </integer-array>
    <integer-array name="config_autoBrightnessHysteresisLevels">
    <item>7</item>
    <item>75</item>
    <item>1000</item>
    <item>10000</item>
    </integer-array>
    <integer-array name="config_autoBrightnessLcdBacklightValues">
    <item>20</item>
    <item>80</item>
    <item>130</item>
    <item>190</item>
    <item>255</item>
    </integer-array>
    <integer-array name="config_autoBrightnessButtonBacklightValues">
    <item>255</item>
    <item>255</item>
    <item>0</item>
    <item>0</item>
    <item>0</item>
    </integer-array>
    <integer-array name="config_autoBrightnessKeyboardBacklightValues ">
    <item>255</item>
    <item>255</item>
    <item>0</item>
    <item>0</item>
    <item>0</item>
    </integer-array>

    modified
    Code:
    <integer-array name="config_autoBrightnessLevels">
    <item>0</item>
    <item>1</item>
    <item>20</item>
    <item>150</item>
    <item>400</item>
    <item>800</item>
    <item>1500</item>
    <item>3000</item>
    <item>6000</item>
    <item>9000</item>
    <item>15000</item>
    </integer-array>
    <integer-array name="config_autoBrightnessHysteresisLevels">
    <item>0</item>
    <item>2</item>
    <item>50</item>
    <item>110</item>
    <item>320</item>
    <item>900</item>
    <item>2000</item>
    <item>6000</item>
    <item>8000</item>
    <item>10000</item>
    <item>12000</item>
    </integer-array>
    <integer-array name="config_autoBrightnessLcdBacklightValues">
    <item>30</item>
    <item>30</item>
    <item>50</item>
    <item>60</item>
    <item>80</item>
    <item>100</item>
    <item>120</item>
    <item>150</item>
    <item>190</item>
    <item>210</item>
    <item>230</item>
    <item>255</item>
    </integer-array>
    <integer-array name="config_autoBrightnessButtonBacklightValues">
    <item>255</item>
    <item>200</item>
    <item>100</item>
    <item>0</item>
    <item>0</item>
    </integer-array>
    <integer-array name="config_autoBrightnessKeyboardBacklightValues ">
    <item>255</item>
    <item>200</item>
    <item>100</item>
    <item>0</item>
    <item>0</item>
    </integer-array>

    if you like a particular roms auto brightness levels you can just copy paste the values ;)

    10)again run "run me.bat" and select 2 to recompile, you will get "temp.apk"

    11)open your "framework-res.apk" & "temp.apk" in 7-zip and add the "resources.arsc" from "temp.apk" to "framework-res.apk",... yes replace it,...

    12)push it to your phone, make a rom or do what ever you want from here,...

    13)hit THANKS if you like it and feel it was useful
    2
    What I got.

    Sent from my SPH-D710 using Xparent ICS Tapatalk 2

    What version of Java do you have installed?

    I got the same error and am running 64 bit windows but only had 32 bit Java installed, installing 64 bit Java fixed the error.

    @ chiragkrishna thanks for a great guide, I can use the auto brightness feature now it was not very good on stock settings :good:
    1
    @Blackrose666
    great that you find it helpful

    ========================
    updated: added description for each field,.. so you understand what your changing,...
    1
    Is this applicable for any device/rom? For my device CM10 has following values

    Code:
        <integer-array name="config_autoBrightnessLevels">
            <item>1</item>
            <item>3</item>
            <item>5</item>
            <item>19</item>
            <item>26</item>
            <item>69</item>
            <item>219</item>
            <item>309</item>
            <item>498</item>
            <item>1024</item>
        </integer-array>
        <integer-array name="config_autoBrightnessLcdBacklightValues">
            <item>57</item>
            <item>57</item>
            <item>57</item>
            <item>85</item>
            <item>114</item>
            <item>142</item>
            <item>170</item>
            <item>199</item>
            <item>227</item>
            <item>255</item>
            <item>255</item>
        </integer-array>
        <integer-array name="config_autoBrightnessButtonBacklightValues">
            <item>255</item>
            <item>255</item>
            <item>255</item>
            <item>255</item>
            <item>-1</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
        </integer-array>
        <integer-array name="config_autoBrightnessKeyboardBacklightValues">
            <item>255</item>
            <item>255</item>
            <item>255</item>
            <item>255</item>
            <item>-1</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
            <item>0</item>
        </integer-array>
    1
    Same error! How can i solve? What do you me for "updating aapt"?

    Go to http://forum.xda-developers.com/showthread.php?t=1755243 and download the apktool.jar, aapt.exe and apktool.bat files under "Downloads". Once downloaded, put them in your folder and replace the old ones.