View Full Version : BackLight brightness adjust command line utility for Kaiser aka TYTN II
lobsterii
31-07-2008, 11:44 AM
I dunno if I'm only one who has this problem but when I'm occasionally on sun I can't see nothing on my Kaiser and it's really difficult to setup backlight brightness on touchscreen which u can't see.... So I've been looking alot if there is some utility which I can link with button or gesture and I haven't found anything... So I've wrote my own utility. Feel free to use it as well if u find it useful -> http://lobster.3web.cz/bordel/bl/index.htm
is this useful or is there easier way to do that??
viven
31-07-2008, 11:59 AM
Been searching for an app like this for a week.
Works great!
Thanks.
mattarse
31-07-2008, 02:01 PM
Here's another program that gives you a today plug in for it:
http://forum.xda-developers.com/showthread.php?t=412896
I'll b trying yours tho as I like the idea of UL with icons for up and down
Cheers,
Matthew
silentanvil
01-08-2008, 07:43 AM
I made a cab with this program mapped to the PTT button. I have a AT&T Tilt, Im not sure if your phone has a PTT button or if its called something else or whatever.
With this, just run the cab then I tap the button and it changed the brightness really quickly, no menu or anything, I love it! If I walk out into the sun I just tap the button 3 times and my screen is bright.
Lobsterii, I love this program thanks a ton!
lobsterii
01-08-2008, 09:36 AM
I'm glad that I could helped u out guys... actually there might be more funny stuff possible only if HTC release some documentation on theirs DLL files cos it's pain to guess arguments...
silentanvil
01-08-2008, 11:09 AM
you did it all by guessing? I figured you would have decompiled the dll.
pudifoot
01-08-2008, 11:14 AM
Truly excellent! I have also been looking for something like this for a long time. :)
I figured I might as well kick off the feature requests that always follow a new release: How about the option set both battery and power brightness with one command? Perhaps by a special switch, or by only specifying the brightness level (i.e. no 'b' or 'p' switch)? Or is there a way to do it already?
Thanks again for a useful app!
lobsterii
02-08-2008, 09:27 AM
you did it all by guessing? I figured you would have decompiled the dll. I've read some forum where someone pointed out that backlight function should be in some dll by HTC dunno where it was... Then I was googling "dll find export function" and I've found prog "DLL Export Viewer" which can show function names in dll. Unfortunatelly there is generally impossible to find out how many/what arguments the function has. So I've found function name like HTCUtilSetOnBatteryBrightnessLevel and I've simply try prototype int HTCUtilSetOnBatteryBrightnessLevel(int); but it crashed... so I keep going like int HTCUtilSetOnBatteryBrightnessLevel(int*); and it worked... voila...
Truly excellent! I have also been looking for something like this for a long time. :)
thx alot...
I figured I might as well kick off the feature requests that always follow a new release: How about the option set both battery and power brightness with one command? Perhaps by a special switch, or by only specifying the brightness level (i.e. no 'b' or 'p' switch)? Or is there a way to do it already?
done. + it's now compiled as an release version so it actually has 50KB less than old version... enjoy ;) it's at the same place instead original files http://www.lobster.3web.cz/bordel/bl/index.htm...
silentanvil
03-08-2008, 06:04 AM
Nice improvements! how about another a switch so that it will toggle between brightest to dimmest? So if this was used it would just go between 1 or 10 and none in between.
pudifoot
03-08-2008, 06:08 AM
Thanks for implementing the feature I was looking for. A perfect application - it's small and fast, and it gets the job done with excellence.
jpope
03-08-2008, 06:54 AM
Thank you. Works perfectly.
lobsterii
03-08-2008, 12:44 PM
Nice improvements! how about another a switch so that it will toggle between brightest to dimmest? So if this was used it would just go between 1 or 10 and none in between.
hmhm... what I wouldn't do for y... There is new version 02 (on my web at the same place) where u can setup your own sequence. Length of sequence might be from 1 to 10... values are as usual from 0 to 9... But numbers must not repeat (known feature ;) I don't see point to solve it) so u can set something like "bl02.exe 0 5 1 9 3" or whatever else... enjoy ;)
Report any found bugs... I mean it's super simple but it's 4 am so I'm half sleeping...
hmhm... what I wouldn't do for y... There is new version 02 (on my web at the same place) where u can setup your own sequence. Length of sequence might be from 1 to 10... values are as usual from 0 to 9... But numbers must not repeat (known feature ;) I don't see point to solve it) so u can set something like "bl02.exe 0 5 1 9 3" or whatever else... enjoy ;)
Report any found bugs... I mean it's super simple but it's 4 am so I'm half sleeping...
Awesome! Thanks so much! I've also been looking everywhere for something like this!
antman68
04-08-2008, 06:56 AM
Well done! I've been looking for ages for something to do this.
Something from lobsterii that helped me:
create link in Total commander (file manager) I think its in options "File -> >>>>> -> Create shortcut" then I have another file bl02.lnk then I open properties of the lnk file, I click tab shortcut and put the text of path into "" and after it I wrote parameters so it looks like
"\Program files\bl\bl02.exe" 1 3 9
volleykinginnc
05-08-2008, 09:21 PM
OK dumb question and first time posting so don't slaughter me.:D If I understand the thread correctly this will put large buttons to adjust from the Backlight screen....correct? Is there a program (other than the PTT button which I'm using) that will allow a button or swipe to adjust the brightness without having to open the brightness display? If you get far enough to open the utility then its not that hard to move the brightness up. Sorry for the dumbness of the question.
lobsterii
06-08-2008, 03:04 AM
If I understand the thread correctly this will put large buttons to adjust from the Backlight screen....correct?
my bl02.exe doesn't put any button anywhere... it's just app which actually toggle brightness. U can try to run it via file explorer it should change brightness...
Is there a program (other than the PTT button which I'm using) that will allow a button or swipe to adjust the brightness without having to open the brightness display?
There is plenty of programs to map this app to buttons, finger swipes and some other crazy stuff like voice commands etc.. For example I'm using FTouchFlo (u can use FTouchSl which is easier to configure) and map backlight change for finger swipes... Most easy way is just copy blXX.exe to /Windows/Start Menu/Programs/blxx.exe and then go to Start->Settings->(tab)Personal->Buttons and link it with some buton...
I'm just now at work so have no time for more explanation... but Once I get home I'll create some FAQ at download page cos... cos it'll be easier for all of us ;)
volleykinginnc
06-08-2008, 02:30 PM
dont sweat it that was a perfect explanation and I now have it helped me to get it running to a button.
One other quick question though....I have S2U2. So the button doesn't work until I have unlocked it (which sometimes is hard to see going out to daylight) is there any way (easy way, Im no programmer)to allow the button to work (that is brighten the display via the button I have it mapped to) while it is still locked?
holmanm
06-08-2008, 04:08 PM
dont sweat it that was a perfect explanation and I now have it helped me to get it running to a button.
One other quick question though....I have S2U2. So the button doesn't work until I have unlocked it (which sometimes is hard to see going out to daylight) is there any way (easy way, Im no programmer)to allow the button to work (that is brighten the display via the button I have it mapped to) while it is still locked?
I'm sure he won't be able to bypass A_C's S2U2, but (assuming you have a Kaiser, you didn't say) if you enable dpad in S2U2 you can always hold your right dpad button to make sure S2U2 is unlocked, even if you can't see the screen, and then hit the button for the "bl02.exe 9" link.
volleykinginnc
06-08-2008, 04:21 PM
Ha ha...you guys are awesome! Right Dpad enabled and now it works like a charm even in the brightest sun!! Thanks for the great application...makes a big difference in usability.
Some of you experts ought to make a list of these application gems (this program/kaeser tweaks etc) to make it easy for the noobs like me. This is good stuff!!:o
fluffylad
15-08-2008, 08:44 AM
Like many others I have been looking for something like this for ages as is impossible to see screen to adjust brightness when already outside.
I can confirm works perfectly on my TouchDual where I have used the Buttons setting to assign to my VolUp button when held.
Many thanks, lobsterii
Balrog82
15-08-2008, 12:15 PM
sweet, gonna try this. will hopefully work superb with my ultimatelaunch setup.
someone help me here....:)
is this correct for creating a command line for backlight?
\Program files\bl\bl02.exe 1 3 9
created a short-cut in the start-menu, then created a folder called bl where the .exe is stored.
all i want is that that backlight to remain on forever until I turn it off.
please assist and thank you,
tvos
holmanm
21-08-2008, 10:40 PM
someone help me here....:)
is this correct for creating a command line for backlight?
\Program files\bl\bl02.exe 1 3 9
created a short-cut in the start-menu, then created a folder called bl where the .exe is stored.
all i want is that that backlight to remain on forever until I turn it off.
please assist and thank you,
tvos
What you have is correct, but not to do what you want.
\Program files\bl\bl02.exe 1 3 9
will make the screen go full dim "1" on the first run of the shortcut. Then a little brighter "3" on the next run of the shortcut. Then Full brightness "9" on the next run. And the back to full dim "1" on the next run. And so on.
This is the same as going into "Settings", "Backlight", "Brightness" and sliding the sliders.
You want to go under "Settings", "Backlight", "Battery Power" and/or "External Power" and uncheck the "turn off backlight box". This program wont do this.
thanx for the info.
the biggest problem i have noticed is that the dim light, no matter what comes on after ten seconds. now, i did play with the registry for a bit and almost came up with a solution.
HKEY_CURRENT_USER\ControlPanel\Backlight\Locklevel
Set LockLevel = from 0 to 1
Then do a soft reset
also,
\HKCU\ControlPanel\Backlight\LockLevel
ACTimeout and BatteryTimeout.
change both keys to 3600
this actually does work after reboot.. as long i don't run any apps. after that, ten second dim light triggers.
i am using Rotohammer's rom and it's awesome. I was using Akadonna's but it was unstable, although didn't have problems with the backlight..:)
any ideas?
tvos
funem
22-08-2008, 10:51 PM
Thank you so much, exactly what I needed since my first windows mobile phone some years ago I have had a problem with seeing the screens in direct sunlight. I assigned this to my voice recorder button which I dont use, shame I cant use the button when the phone is locked though to see the unlock screen :-(
... Thank you again anyway
Biges
24-08-2008, 02:38 AM
Now my "Start Menu" key has a much better use! 0 2 4 6 9 :)
Thanks a lot!
kati42
24-08-2008, 10:48 PM
thanx for the info.
the biggest problem i have noticed is that the dim light, no matter what comes on after ten seconds. now, i did play with the registry for a bit and almost came up with a solution.
I think you can turn that off (or change the time) in the *Power* settings of your device. The screen goes dim to save power.
The Mike
25-08-2008, 05:42 AM
I use homescreen plus plus with the taskbar at the bottom activated. This utility is perfect as I've added the shortcut for bl02.exe 2 8 to the taskbar at the bottom of the screen. The only problem is that it's an eyesore as the icon isn't customized....just a white block that's the generic shortcut icon. Is there a way to make it look like a tiny lightbulb? Oh, I should add that I'm using the htc-herald (wing). It seems to work but not perfectly... It only works when I use just 2 arguments.. ie: bl02.exe 2 8 .... But if I use more than that it ignores the others and always just will either go from lowest brightness to highest brightness... doesn't even matter what arguments I use.. 5 7 or anything close in increment makes no difference.... So i just figured, oh well, it works nicely even if just dimmest to brightest it's basically what I want out of it. Is this a known bug or since this was created for the kaiser nobody has tried using it on the wing?
pudifoot
25-08-2008, 08:47 AM
The only problem is that it's an eyesore as the icon isn't customized....just a white block that's the generic shortcut icon. Is there a way to make it look like a tiny lightbulb?
As far as I know there are two ways you can add a custom icon:
Add an icon to the executable file. If you have an .ico file ready you can use a software such as Resource Hacker (http://angusj.com/resourcehacker/) to add the icon as a resource in the executable file.
Add an icon to the shortcut (.lnk) file. You can either manually edit the shortcut file or use Shortcut Creator (http://forum.xda-developers.com/showthread.php?t=275577) (at least I think so, I haven't tried it myself). You probably have to convert your icon into an icon library (.dll or .icl) first.
I used the first option which worked fine. The downside is that the executable more than tripled in size, but on the other hand the icon's there for every new BackLight shortcut I make.
The Mike
25-08-2008, 01:53 PM
Ok, this works with the Wing.. but acceptable values are not 1 - 10 on the Wing. Only 0 1 2 3 and that's it. 25% increments only with 3 being 100%.
"I used the first option which worked fine. The downside is that the executable more than tripled in size, but on the other hand the icon's there for every new BackLight shortcut I make."
@ Pudifoot: Can you post the steps necessary to modify the executable bl02.exe using "res hacker" with the icon that I already have. I tried some variations using the program but I can't seem to get it to work how I want it to.
pudifoot
26-08-2008, 01:56 AM
@The Mike: I sent you a PM.
Le Sage
11-09-2008, 05:12 PM
Thanks for the sources, that's very nice of you. :)
My participation : for .NET users (C#, can easily be translated on VB.NET), here are the calling functions :
[DllImport("HTCUtil.dll")]
private static extern int HTCUtilGetOnPowerBrightnessLevel(ref int pValue);
[DllImport("HTCUtil.dll")]
private static extern int HTCUtilGetOnBatteryBrightnessLevel(ref int pValue);
[DllImport("HTCUtil.dll")]
private static extern int HTCUtilSetOnPowerBrightnessLevel(ref int pValue);
[DllImport("HTCUtil.dll")]
private static extern int HTCUtilSetOnBatteryBrightnessLevel(ref int pValue);
[DllImport("HTCUtil.dll")]
private static extern int HTCUtilGetBacklightMinBrightness(ref int pValue);
[DllImport("HTCUtil.dll")]
private static extern int HTCUtilGetBacklightMaxBrightness(ref int pValue);
Le Sage
11-09-2008, 07:33 PM
To HTC Touch Diamond or HTc Touch Pro users, don't forget to disable the auto mode on brightness (registry : HKCU\ControlPane\BackLight\LightDetectOn - values : 0 = disabled or 1 = enabled = auto mode).:D
hardstylz
15-09-2008, 04:24 AM
hi how are you? my ptt button is already maped to my voice commmand. any idea if thif this could be mapped to the "ok" button and work the same way. 2n
tdusen
15-09-2008, 06:18 AM
I just assigned it to the "OK" button using AE Button plus. It works great.
tdusen
15-09-2008, 05:11 PM
I just assigned it to the "OK" button using AE Button plus. It works great.
ok, revised statement. It works, but not so great. The ok button still returns to the Today screen and pops up the start menu. I think it works better bound to a double click of the PTT button.
mfrazzz
23-09-2008, 04:54 PM
You could use HButton (http://hbutton.dyndns.org/index.jsp) to map it to a button. HButton lets you map things so that any button can have a long hold (or multiple long holds) on them. Very handy (for instance, Map Opera to the IE button, and IE to the same button when you hold it longer). So you could map your screen brightness to holding down the start key, or Ok key longer.
Enjoy!
Oh, and thanks for this app! This is perfect for what I was looking for to change brightness.
lobsterii
29-10-2008, 03:39 PM
Hello,
New release BackLight 03 (http://lobster.3web.cz/bordel/bl/index2.php)
Changes>
- I got report that some devices has actuall backlight parameter value from 0 to 10 instead of my Kaiser which has 1 to 10. So it was no possible for those devices set up minimum value 0. In new version is possible set values from 0 to 99 so I hope that it's suitale for most devices out there... Also there is check of sequence so if your device support values from 0 to 10 and u run "bl 0 2 9 20 30" it'll run as if u call it as "bl 0 2 9 10" (20 goest to max [=10] and 30 is ommited).
Enjoy ;)
frifox
09-11-2008, 05:39 AM
wow, exactly what i was looking for... now my HTC Touch Pro modding is complete :)
>> "bt03.exe 1 4 10" mapped to double-click of "End Call" button
now, a suggestion... it would be a big plus if the program would take "x" argument such as "bt03.exe x 4 10", where x would mean 'completely turn off screen+keyboard backlight'
Bouloama
09-11-2008, 02:55 PM
You could use HButton (http://hbutton.dyndns.org/index.jsp) to map it to a button. HButton lets you map things so that any button can have a long hold (or multiple long holds) on them. Very handy (for instance, Map Opera to the IE button, and IE to the same button when you hold it longer). So you could map your screen brightness to holding down the start key, or Ok key longer.
Enjoy!
Oh, and thanks for this app! This is perfect for what I was looking for to change brightness.
You can't map it to the useless OK button underneath the scroll wheel?
This function doesn't work at this moment;
bl*.exe b [0..99] // set only battery brightness level [0..99]
bl*.exe p [0..99] // set only power brightness level [0..99]
Probably a nice feature to add, i need the battery brightness level feature :D
Thx for this nice little app!
lobsterii
10-11-2008, 02:40 PM
now, a suggestion... it would be a big plus if the program would take "x" argument such as "bt03.exe x 4 10", where x would mean 'completely turn off screen+keyboard backlight'
What exactly would be benefit of such feature? I've on my Kaiser turn off button which is doing exactly 'x' parameter stuff so I expect that other devices have also dedicated button for that. + I think that there might happend more operation than just display turn off... I would expect some underclock CPU and sleep down some other modules... Anyway functions I'm exploiting probably doesn't allow to turn off display completelly so I'm not sure if I'm able to do that... definitelly not in 5 minutes...
lobsterii
10-11-2008, 04:03 PM
This function doesn't work at this moment;
bl*.exe b [0..99] // set only battery brightness level [0..99]
bl*.exe p [0..99] // set only power brightness level [0..99]
I've released new version 04 where it's working again! I'm terribly sorry that I messed it up in version 03. That's cos I'm not really windowz programmer and some BS like wchar_t never interested me. In my opinion all the f**king world should speak one language and then it would perfectly fit into old good ASCII... And I'm not native English speaker (as u can read :) ). And guys from UK should learn to drive on right right side. But it's out of scope of this forum... sry for my dummy comments... and keep me posted if something else is wrong or worthy to change.
Bouloama
10-11-2008, 06:54 PM
WEhwehhe thx for the fix, let me change my shortcut on my TyTN to test your modification!
For now.. i don't have more feature requests.. and i'm not from the UK.. i'm from the Netherlands.. we drive on the the right side of the road :D
frifox
10-11-2008, 10:01 PM
What exactly would be benefit of such feature? I've on my Kaiser turn off button which is doing exactly 'x' parameter stuff so I expect that other devices have also dedicated button for that. + I think that there might happend more operation than just display turn off... I would expect some underclock CPU and sleep down some other modules... Anyway functions I'm exploiting probably doesn't allow to turn off display completelly so I'm not sure if I'm able to do that... definitelly not in 5 minutes...
oh no, i didnt mean turn off screen and then turn off backlight... i meant, keep the screen on but turn off its backlight, as well as keyboard backlight and hardware-button backlight... i had this feature on my old ppc6800 and it saved some serious battery life.
Bouloama
10-11-2008, 10:37 PM
@Frifox... whats the use of it.. since you almost can't see your screen properly without the backlight on?
frifox
10-11-2008, 10:50 PM
you have a valid point, some people might not want to do that... but in my case, i use my ppc a lot in the evenings where there is lighting. i can see the screen perfectly without any backlight and i can see the keyboard keys without any backlight just as good. keyboard/hw-button backlight is quite bright and is just useless in those situation. so i spend about 3 to 4 hours with those keyboard/button led's draining the battery, where i would have been much better off without them.
joe mboule
11-11-2008, 01:05 AM
I like the program a lot but it doesnt work when phone is blocked with pin. Pin input in bright day light is often problematic when backlight is set to low. Also advanced config tool doesnt do the job.
lobsterii
11-11-2008, 01:58 PM
Pin input in bright day light is often problematic when backlight is set to low. I would say that this is rather issue of application which u r using to run blXX.exe. They simply don’t start bfr u set up the code and therefore they won’t run my program at the very beginning after power up. But if the device is just locked it’s working on my Kaiser using FtouchFlo as a trigger for bl04.exe.
lobsterii
11-11-2008, 02:08 PM
oh no, i didnt mean turn off screen and then turn off backlight... i meant, keep the screen on but turn off its backlight, as well as keyboard backlight and hardware-button backlight... i had this feature on my old ppc6800 and it saved some serious battery life.
I c your point now. But I'm not sure if it's even technically possible. As I'm just now looking on wiki there r 2 types of LCD the one with backlight and the one with reflective layer. I'm not sure if someone is making some hybrid (it would be great though!) but I'm not sure if u would be able to c anything when the backlight is completelly off. I'm calling some genuine internal HTC function and I' setting there minimum possible value for brightness. I'm not sure if it can be somehow put lower than that. Can u set it up in menu somewhere somehow? I really would be interested to see how it look like completelly without backlight...
Bouloama
12-11-2008, 09:19 PM
I've released new version 04 where it's working again! I'm terribly sorry that I messed it up in version 03. That's cos I'm not really windowz programmer and some BS like wchar_t never interested me. In my opinion all the f**king world should speak one language and then it would perfectly fit into old good ASCII... And I'm not native English speaker (as u can read :) ). And guys from UK should learn to drive on right right side. But it's out of scope of this forum... sry for my dummy comments... and keep me posted if something else is wrong or worthy to change.
Heya could you tell me how to use this specific b / p command with bl.exe?
I've got this in my shortcut; "\Storage Card\bl.exe" b [4 5 9]
I also tried this method: "\Storage Card\bl.exe" b 4 5 9
This still does not work, it only pics the character 4. It changes the status of the battery brightness to 4. Could you tell me how to activate the 5 and 9 settings also?
lobsterii
13-11-2008, 12:20 PM
I also tried this method: "\Storage Card\bl.exe" b 4 5 9
This still does not work, it only pics the character 4.
Eh yup I know. I meant it for only one parameter from beginning. But I will extend it to take a queue of parameters.... I think it shouldn't be a prob. I think I'll release it on weekend... So far I would use it as bl.exe 4 5 9. It will toggle with both brightness levels...
Bouloama
13-11-2008, 04:41 PM
Thx for the feedback! and bigg ups for the upcomming fix ;-)
I'm using now the settings to change both parameters, to fix this minor bug indeed!
I'll keep track of the update!
Bouloama
19-11-2008, 10:01 PM
Jow bro..is it fixed? ;p
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.