Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,535 Members 40,041 Now Online
XDA Developers Android and Mobile Development Forum

[HOW TO][MOD] Lower Brightness levels [04/05/12]

Tip us?
 
loSconosciuto
Old
#41  
Senior Member - OP
Thanks Meter 2810
Posts: 762
Join Date: Nov 2011
UPDATE 4:
If the current brightness is higher than 20/255, when inactive, the screen brighntess is set to 20 instead of 1.

I did not test it that much, if you note something strange, let me know.
 
neutronz
Old
#42  
neutronz's Avatar
Senior Member
Thanks Meter 13
Posts: 163
Join Date: Jul 2011
Location: /system/
is this different with rootdim? i always set my screen brightness to 1/255 with rootdim
 
loSconosciuto
Old
#43  
Senior Member - OP
Thanks Meter 2810
Posts: 762
Join Date: Nov 2011
I had already answered to that.

You can set 1/255 with this mod too, the difference is that you don't need and external app, no background services and you can set 1/255 directly from the statusbar (faster and more confortable in my opinion). Also, there are no brightness increases if you lock the screen with a brightness level < 10/255 and then unlock it (I think it's possible to avoid this with rootdim too if you use "lock brightness" option or something like that).

It's also useful if you lowered the autobrightness levels, because when the phone is inactive or your battery level is lower than 10, there are no brightness increases (if you current brightness is lower than 10/255).
 
cuaryos
Old
#44  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Aug 2013
Location: jowo, ID
Default confuse code lacation

i was trying apply code at i8160 jb 4.1.2 but too much same code found at there, it could bootloop or something when wrong line changed.
much better when know under script (e.g) "find const/16 v4, 0x14 under Lcom/android/server/PowerManagerService;bla bla bla..........."

just IMO
 
kithmal11
Old
#45  
kithmal11's Avatar
Senior Member
Thanks Meter 222
Posts: 136
Join Date: Jul 2012
Location: Colombo
Quote:
Originally Posted by cuaryos View Post
i was trying apply code at i8160 jb 4.1.2 but too much same code found at there, it could bootloop or something when wrong line changed.
much better when know under script (e.g) "find const/16 v4, 0x14 under Lcom/android/server/PowerManagerService;bla bla bla..........."

just IMO
This MOD is for stock 2.3 ROMS mate. Wouldn't work for CM builds.

Regards
 
loSconosciuto
Old
#46  
Senior Member - OP
Thanks Meter 2810
Posts: 762
Join Date: Nov 2011
Quote:
Originally Posted by cuaryos View Post
i was trying apply code at i8160 jb 4.1.2 but too much same code found at there, it could bootloop or something when wrong line changed.
much better when know under script (e.g) "find const/16 v4, 0x14 under Lcom/android/server/PowerManagerService;bla bla bla..........."

just IMO
This guide is for Gingerbread and most importantly, it's for the Galaxy SL and probably not for the latest official firmwares. JB is a lot different and if you are using a stock ROM, things are even more different.

Anyway, starting from JB I think, you can just change a integer value somewhere in some xml to allow lower brightness level, maybe "config_screenBrightnessDim". However, Samsung usually does some changes here and there, so it maybe doesn't work.

I can't help you more than this.
 
cuaryos
Old
#47  
Junior Member
Thanks Meter 0
Posts: 11
Join Date: Aug 2013
Location: jowo, ID
Quote:
Originally Posted by loSconosciuto View Post
This guide is for Gingerbread and most importantly, it's for the Galaxy SL and probably not for the latest official firmwares. JB is a lot different and if you are using a stock ROM, things are even more different.

Anyway, starting from JB I think, you can just change a integer value somewhere in some xml to allow lower brightness level, maybe "config_screenBrightnessDim". However, Samsung usually does some changes here and there, so it maybe doesn't work.

I can't help you more than this.
Quote:
Originally Posted by kithmal11 View Post
This MOD is for stock 2.3 ROMS mate. Wouldn't work for CM builds.

Regards
sorry
my bad, still waiting another tweak works on jb rom .
 
MrinmoyJK
Old
#48  
MrinmoyJK's Avatar
Junior Member
Thanks Meter 1
Posts: 28
Join Date: Feb 2013
Quote:
Originally Posted by loSconosciuto View Post
4) Look for:
UPDATE 4: (if current brightness is higher than 20/255, use the default dim value):
Code:
Select Code
.restart local v10       #nominalCurrentValue:I
(aound line 5859) and remember the "red" part (aka the register. It could be something different). Now look for:
Code:
Select Code
const/16 v5, 0x14
Thank you very much for this awesome tutorial. I am using android 2.3.5 and it worked on my phone except the above step. The screen become more bright after the timeout as you said.

There am confused about the ".restart local v10" line. There is ".restart local v8" at line 5865. But there is no "const/16 v5, 0x14" line. Please let me know, what should I do here.

PackageManagerService.smali
Phone: Micromax A56
RAM: 256 MB
Processor: 800 MHz Qualcomm Scorpion
Android version: 2.3.5
Kernel version: 2.6.38.6-perf+
Recovery: TWRP v2.3.3
 
loSconosciuto
Old
#49  
Senior Member - OP
Thanks Meter 2810
Posts: 762
Join Date: Nov 2011
Quote:
Originally Posted by MrinmoyJK View Post
Thank you very much for this awesome tutorial. I am using android 2.3.5 and it worked on my phone except the above step. The screen become more bright after the timeout as you said.

There am confused about the ".restart local v10" line. There is ".restart local v8" at line 5865. But there is no "const/16 v5, 0x14" line. Please let me know, what should I do here.

PackageManagerService.smali
Since this guide was intended for the Galaxy SL, I didn't bother to make it "universal" and it could be really hard to follow when trying to use it for another device. Some differences are expected, especially the line numbers and the name of the registers.

Almost two years have passed since I wrote it, so I don't remember everything, but I think that in my tutorial "v10" is be the current brightness and it's compared with "v5", which is be the value at which the backlight is set when the device is in idle.
You have to figure out what's the name of the register with the current brightness (try look for "#nominalCurrentValue:I" in the code) and adjust the code.

Anyway, I'm quite sure that the file you posted has nothing to do with this mod.

The Following User Says Thank You to loSconosciuto For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes