# Sense auto brightness



## rouftop (Aug 17, 2011)

I can't stand how bright the auto brightness settings are for Sense. There doesn't seem to be a good option in the market to address this.

AOSP ROMs have that crazy screen where you can tweak all the auto brightness levels. Does anyone know of something similar for Sense?


----------



## thisismalhotra (Sep 14, 2011)

as far as I know, none


----------



## jglemza (Jul 9, 2011)

Sadly, it is not that simple. To adjust the auto-brightness levels it takes a little bit of work with Sense. Here's a quick overview of what you need to do. This assumes you have the Android SDK installed (adb), apktool, and 7zip.

Pull the framework-res.apk from the phone.

```
adb pull /system/framework/framework-res.apk
```
Decompile the apk.

```
apktool d framework-res.apk
```
Edit the arrays.xml. I'm using vim, but use any text editor that you like.

```
vim framework-res/res/values/arrays.xml
```
You need to change the following values.

```
<integer-array name="config_autoBrightnessLcdBacklightValues"><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>143</item><br />
        <item>143</item><br />
        <item>171</item><br />
        <item>199</item><br />
        <item>227</item><br />
        <item>255</item><br />
    </integer-array><br />
    <integer-array name="config_autoBrightnessLcdBacklightValuesUp"><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>143</item><br />
        <item>143</item><br />
        <item>171</item><br />
        <item>199</item><br />
        <item>227</item><br />
        <item>255</item><br />
    </integer-array><br />
    <integer-array name="config_autoBrightnessLcdBacklightValuesDown"><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>94</item><br />
        <item>143</item><br />
        <item>143</item><br />
        <item>171</item><br />
        <item>199</item><br />
        <item>227</item><br />
        <item>255</item><br />
    </integer-array>
```
By changing these values you adjust the brightness based on the ambient light. You want to make the value be the same for each array. In my case, I usually just change the first few lines to make the phone darker when I'm laying in bed at night and don't want to blind myself.

After you edit the arrays, save the file.

Recompile the apk.

```
apktool b framework-res framework-res-new.apk
```
Now you need to open both the framework-res.apk and the framework-res-new.apk as an archive in 7zip.

Drag and drop the resources.arsc from framework-res-new.apk and overwrite it in the framework-res.apk.

Mount /system as read/write on your phone. I do this with root explorer, but you can also mount /system in clockworkmod.

Push the modified apk to the phone.

```
adb push framework-res.apk /system/framework/framework-res.apk
```
Reboot your phone.

```
adb reboot
```
You should now have adjusted brightness levels. Hopefully I wasn't too vague.


----------



## dickenam (Jun 14, 2011)

Awesome fix for Sense. Easiest way to fix IMO is to ditch Sense lol


----------



## gfro9191 (Jul 25, 2011)

Or use http://teambamf.net/showthread.php?t=2294.


----------

