yashsingh1/xdaforums huggingface dataset:
[HTC One X] coolpixs4:
-----------

Thanks denversc,

NICE application. Gr8 !

It works on HTC Desire HD, even DHD doesn't have the DIM mode because it doesn't have /sys/class/leds/button-backlight/currents file.

So, by using widget I have to press 3 times to change On/Off button backlights.

If it is possible, I suggest to add some functions:

- time schedule for On/Off capacitive button backlights as Day mode /Night mode; such as for day time from 6:00am to 6:00pm the capacitive backlights set as default OFF, and inversely 6:00pm-6:00am - it will be default ON (Of course, it still have option for turn it Off if it needs)

- in the night mode, it can be set time out for capacitive button backlight auto Off (for example, after 5s) when using applications (such as: movie, youtube, reading...) And the option to select which applications can be add to use this time out mode. And if the users pressing on screen, it can be back to On again.

It will be very nice application... I hope
[HTC One X] denversc:
A new version of this app is available: v1.0.11. This version addresses some long-standing issues with UI hangs and superuser permissions usage. It also adds an animation to the home screen widget. This version has been published to the Google Play Store in the "Pro" version; the free version will be updated to v1.0.11 on Nov 13, 2013. Note that the $0.99 USD sale on the Pro version expired on Sept 22, 2013 and the price is, at the time of writing, $2.00 USD.

Changes in v1.0.11 (since v1.0.10)

Animation added to home screen widget

Improved superuser permissions usage

Fix lags and hangs of the UI when changing brightness levels

Fix occasional issue turning buttons backlight back on with screen on HTC One XL (evita)

HTC One S officially supported

Logcat log messages cleaned up

Pro Version in Google Play Store: https://play.google.com/store/apps/details?id=org.sleepydragon.capbutnbrightness.pro

Reminder: This "release version" of the app is signed with the official key so it will fail to install if you have a beta version of the app installed. You must first uninstall any beta versions of the app before installing this release version from the Play Store.
[HTC One X] denversc:
Thank you for the suggestions. That is especially a good idea about skipping "dim" in the home screen widget when dim is not supported. The idea of scheduling times for bright and times for dim has also been suggested before and is in the backlog of features to implement. I'm also glad the app works on the Desire HD.
[HTC One X] denversc:
Update: I have created a DevDB thread for this app:

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

Please use the DevDB thread instead of this one going forward. Thanks!
[HTC One X] denversc:
FYI, a new beta version of the app is available for testing: v1.0.13-Beta1.

The APK is available from the DevDB thread, where feedback should be reported.

http://xdaforums.com/showthread.php?p=47205987#post47205987
[HTC One X] denversc:
A new version of this app is available: v1.0.13. This version fixes issues with the buttons backlight turning off, avoids cycling through "dim" in the widget if not supported, and adds HTC Sensation support. This version has been published to the Google Play Store in the "Pro" version; the free version will be updated to v1.0.13 on Dec 04, 2013.

The free version has also been updated to v1.0.12, and is available in the Play store and the APK is also available for download.

Please see http://xdaforums.com/showthread.php?p=47453810#post47453810 for details and a link to the APK of the updated free version.

Changes in v1.0.13 (Since v1.0.12)

fix issue where buttons backlight sometimes turns off after a few seconds instead of staying on

avoid cycling through the "dim" setting in the widget if dim is not even supported

HTC Sensation support added

fix issue where "dim not supported" is erroneously reported on when selecting "off" brightness when dim is not supported (HTC One X international quad-core variant only)

correct spelling error in a dialog: brigtness -> brightness

NOTE: If you have a beta or test version of this app installed, you must first uninstall it before installing one of these two official versions. The reason is that having two versions of the app installed will interfere with each other. Also, the official APKs are signed with the "official" key, whereas the beta/test versions are signed with the developer key, and if keys don't match then the app will fail to install.
[HTC One X] denversc:
FYI, the "free" version of this application has been updated to v1.0.13, to match the current Pro version.

The update will be available in the Google Play Store in the next few hours: https://play.google.com/store/apps/details?id=org.sleepydragon.capbutnbrightness

Alternately, the APK is available for download from: http://dl.bintray.com/sleepydragon/CapacitiveButtons/CapButnBrightness-1.0.13.apk
[HTC One X] jeyml:
It's a nice app,usefull sometimes but only at night. I noticed that after i set the capacitive buttons to DIM and it's light outside,they stay on, so the app doesn't use the sensor anymore and keeps them on forever and that it's a little battery consuming and annoying i might add. But overall,really nice app.
[HTC One X] mataius812:
app

will test in cyanogenmod 11
[HTC One X] TrekHackz:
Works great! I like it :) a must have for my One X!
[HTC One X] *elmo*:
now try to turn it on....
[HTC One X] denversc:
Okay, so now the app works as expected when you set the capacitive button backlight brightness to "off". But there is now a new issue where if you set the capacitive button backlight brightness to "on" in the app that the buttons do not turn back on when the screen powers on. Very interesting, and thanks for testing it out.

The workaround that I had implemented in the test version 1 is to chmod 666 the file, write 0 or 255 to the file, then chmod 444 the file. It sounds like I only need to chmod 444 the file if setting the capacitive button brightness to "off". Setting its permissions to 444 when the backlight button setting is "on" actually prevents the backlight from turning back on when the screen turns back on.

I've attached v2 of the test app to this post. In this version, it will only chmod 444 the file when setting the capacitive button backlight brightness to "off"; when setting it to "on" it leaves the permissions as 666. Please test it out and let me know if the setting persists for both "on" and "off" when the screen turns on and off. Thanks!
[HTC One X] *elmo*:
Doesn't work :thumbdown: not possible to turn on...

Sent from HOX with ARHD 17.x
[HTC One X] TToivanen:
Performs like clockwork. You're the man!

:thumbup:

Sent from my HTC One X
[HTC One X] denversc:
These seem to be conflicting reports :)

Just so I make sure that I am understanding the behaviour... can you answer these 4 questions:

Do you have v1.0.6-ScreenOnFixTest2 installed (check the "About" screen to confirm)

Which ROM are you running?

When you select "off" for the capacitive button brightness in the app, does the backlight remain off, even after turning the screen off then back on? If "no" please explain what happens with the capacitive button backlight when you turn the screen back on.

When you select "on" for the capacitive button brightness in the app, does the backlight turn back on after turning the screen off then back on? If "no" please explain what happens with the capacitive button backlight when you turn the screen back on.

Sorry for being kind of a pain with these questions. I don't have an endeavoru (quad-core) HTC One X to test it on, as I am in Canada and only have an evita (dual-core) HTC One X. But in order to understand what you are seeing it helps a lot to get very specific information. Thanks for testing out the app for me!
[HTC One X] TToivanen:
1. Yes

2. Latest CM10 nightly

3. Yes, remains off

4. Yes, turns back on

It's all good.

Sent from my HTC One X
[HTC One X] denversc:
Great. Thanks for this info! I'll let this test version #2 soak for another day or so to see if any more issues come up, and to wait for elmo's response to the same set of questions. If no more issues, v1.0.7 will be coming out with this fix :)
[HTC One X] essakas:
everything works great with OrDroid 11

Gesendet von meinem HTC One X mit Tapatalk 2
[HTC One X] omar302:
denversc;

Great work. Is there a way to make the button lights go off after some time?

For example, whenever you touch the screen or buttons, lights come on, then after 5 seconds buttons lights go off. Touching again would turn on the lights again for 5 seconds.
[HTC One X] TToivanen:
On CM10 it does exactly like that.

Sent from my HTC One X
[HTC One X] *elmo*:
denversc my answers:

1. Yes

2. Latest ARHD 17.1

some explanation:

3. working with delay about 3/4 seconds

4. working with delay about 3/4 seconds
[HTC One X] denversc:
Interesting idea, but I'm not sure. According to TToivanen,

So if I or someone else can figure out how CM10 does it perhaps it would be possible to integrate that same functionality into the app. My instinct tells me that it would require some cooperation from the OS so may not be possible from purely a userspace application.

I've created a defect report for this feature request so that it doesn't get forgotten: https://code.google.com/p/hox-cap-butn-brightness/issues/detail?id=4. I'm afraid I'm not sure when I'll have a chance to investigate though.
[HTC One X] denversc:
Thanks for this information. Just so I understand correctly, when you say "working with delay about 3/4 seconds" do you mean that if you select "off" in the application then when you turn the screen off then back on the capacitive buttons backlight turns on for about 3/4 second then turns off? And if you select "on" in the application then when you turn the screen off then back on the capacitive buttons backlight turns on for about 3/4 second then turns off? Finally, is this 3/4 second delay "acceptable" to you or is it annoying? Thanks!
[HTC One X] Vcek:
I made a personal app long time ago with Tasker, which sets the brightness to 3%(backlight is too bright in bed) unfortunately all leds are affected.

it echoes % into the "lut_coefficient" file instead of "brightness" file, can you look into this and integrate it ? im a noob in making apps :D

note: im on a test hboot and have dead autobrightness.
[HTC One X] *elmo*:
For me is OK :)
[HTC One X] denversc:
Okay cool. Thanks!
[HTC One X] denversc:
Do you happen to have the source code for this app? I don't have an endeavoru HTC One X so unfortunately I cannot run the app and test it out. Also, does this app affect the backlight brightness for the screen and the capacitive buttons or just the capacitive buttons? Finally, when you say "unfortunately all leds are affected" why do you say "unforunately"? If I understand correctly the behaviour you describe is desired behaviour, and is actually quite fortunate! Thanks.
[HTC One X] TToivanen:
Sorry but I can't get it to work.

Asks for root permissions but does not affect the lights, because I don't have an file called lut_coefficient. Perhaps only sense roms come with it?

Denversc: I'll take a look at cm10 source to see if I can find anything regarding the lights timeout.

Edit: The code controlling led timeout may be in /system/framework/services.jar/LightsService. So you were right: not possible using an app.
[HTC One X] Tabtoub:
hey denversc, so no way to only dim the cap buttons on One X like we used to do in sensation? it's a hardware restriction or what? coz I thought it's a problem with my phone but it seems it's impossible to dim them with all one x handsets!
[HTC One X] TToivanen:
Dim option only works on evita.

Dim-button has been disabled on endeavor because dim and full brightness were the same brightness level.

Sent from my HTC One X
[HTC One X] Vcek:
No need for source code(tasker doesn't give code) , all it does sets /sys/class/leds/button-backlight/lut_coefficient to X on screen-on event. Maybe this file exists only on JB Firmwares. I can't remember I updated 2 months ago.

echo 10 > /sys/class/leds/button-backlight/lut_coefficient

with root permission

Sent telepathically from my brain.
[HTC One X] denversc:
Version 1.0.7 released. You can either install the APK from the link below (and in the OP), or wait for a few hours for the new version to become active in the Google Play Store.

Changes in v1.0.7

fixes bug where brightness setting does not persist when turning screen off then back on; only affects International One X (endeavoru) and HTC One X+ (evitareul) devices

APK Download URL for v1.0.7: http://code.google.com/p/hox-cap-butn-brightness/downloads/detail?name=CapButnBrightness-1.0.7.apk

NOTE: If you installed one of the two "test" versions that were released while investigating the fix that went into this version you must uninstall it before installing this official version. The reason is that the "test" versions are signed with a developer key where v1.0.7 is signed with the "official" key. If you forget to uninstall the test version first then installation of the official version will fail. If you have a previous official version installed (eg. v1.0.6) then you do not need to uninstall it first.
[HTC One X] *elmo*:
Denversc, now working without any delay. Thanks again for great app :thumbup:

Sent from HOX with ARHD 17.x
[HTC One X] denversc:
I just took a peek at the kernel sources (see attached C source file) and it appears that there are actually a bunch of things possible with the capacitive button backlight, including setting the "off" timeout, blinking it, and setting the "lut" and "pwm" coefficients.

Any idea what "lut" and "pwm" mean here in this context? According to the source, the value of the lut_coefficient and pwm_coefficient must be between 0 and 100, inclusive. The "pwm" coefficient actually only applies to the "green" and "amber" LEDs now that I look at the source more closely, so it does not apply to the capacitive button backlight. However, the "lut" coefficient actually exclusively applies to the capacitive button backlight.

We might be able to actually have a sliding scale of brightness of the capacitive buttons using the lut coefficient. Hmm....
[HTC One X] TToivanen:
Pwm is pulse width modulation which allows blinking the notification led.

Lut might be a look up table but propably not. :)

Sent from my HTC One X
[HTC One X] denversc:
Okay so I whipped together a new test version of the app, v1.0.7-SliderTest1, which has a horizontal slider at the bottom that allows you to control the intensity of the brightness of the capacitive buttons. APK and screenshot are attached to this post. Can someone test it out and report back their findings? I tested it on the North American HTC One X (evita) and it seems to work well. It works by writing values between 0 and 100 in increments of 10 to /sys/class/leds/button-backlight/lut_coefficient.

Reminder: This "test version" of the app is signed with a developer key so it will fail to install if you have an official version of the app installed. So you must first uninstall any official versions of the app before installing this test version.

Oh, and I should mention that it's 3am here in Canada so I'm off to bed :)
[HTC One X] TToivanen:
Perhaps it only works with sense roms, cause I don't have any lut-coefficient file.

Sliding stutters quite a lot and only manages to flash the button lights like 2bps.

Someone on sense: please test this.

Sent from my HTC One X
[HTC One X] omar302:
I have an internation HOX with a Sense JB rom (IC 14.0.2), and similar to what TToivanen mentioned, the Sliding stutters, though the Buttons do dim initially, once they turn off & back on again, they are back to full brightness.
[HTC One X] theDroidfanatic:
Thanks! Left a 5 star review ;)
[HTC One X] denversc:
Looks like I've got some work to do to make this slider feature usable. At least there is one report of it sort of working. TToivanen, I'm actually quite surprised that the lut_coefficient file is not present on your device, as it's created by the kernel and I'd be quite surprised if the CM team decided for some reason not to create it. It's certainly possible though and if it's not there then there is no way to control the "brightness" of the capacitive button backlight (other than on and off)
[HTC One X] A380:
Stuttering, but promising, on the official Jelly Bean 4.1 rom for the Endeavoru.
[HTC One X] denversc:
This app is only for the capacitive buttons backlight, not the notification LED. Sorry.
[HTC One X] TToivanen:
Light flow from store.

Sent from my HTC One X
[HTC One X] lesscro:
Can we will expect more about this app ?

Like if i am on an app, only back button light full power than 2 others ?

Or when i am on Home, does Home button can be on and two others low light ?

Then i have lot of idea about this app...

And finally, this what i made to be cool with this app...

A tiny Hox... with basic light... maybe i can add 3 light bulb with various opacity...

If you are interested by Icon... Send Me a PM !
[HTC One X] denversc:
If I understand you correctly, you are basically asking about the ability to set the backlight of each of the capacitive buttons individually (eg. turn on the backlight behind the "home" key and off behind the "back" and "recent tasks" keys). The mechanism that the app uses to set the capacitive button brightness controls the backlight behind all of the keys at once and there is no mechanism, as far as I can tell anyways, to control the backlight behind individual buttons. So unfortunately, technically this feature is not possible.

Thanks for making this image! It's very creative. I'll PM you and we'll see what we can come up with.
[HTC One X] TToivanen:
So yeah... I got the slider working on CM10 too. Just had to install NCX-kernel. :)
[HTC One X] denversc:
Huh, so it was a kernel thing after all. I guess I was wrong. Thanks for the update. That will be worthwhile noting in the known issues list once the slider or equivalent feature is in the official version of the app.
[HTC One X] TToivanen:
And one more thing: the highest setting of the slider is even brighter than the brightness achieved by pressing full brightness button.

Sent from my HTC One X
[HTC One X] denversc:
I did a bit of work on the app today and I believe I got the "dim" setting working on your device. I refactored a bunch of the code to better support multiple devices and implemented the logic to use the lut_coefficient file to set the brightness to something other than full. I've attached a test version of the app for testing.

Would someone be able to test out this test version of the app? You should now see 3 buttons on the main UI (instead of 2) with a new button in the middle to set the brightness to "dim". You should see a distinct difference in the brightness when setting "dim"' verses "bright". Please let me know your experiences. If you can, please also test that all of the 3 settings stick across device reboots. Note that in contrast to a previous test version that had a slider to allow choosing from a range of brightness levels this test version of the app just hardcodes 20 for the "dim" setting.

Reminder: This "test version" of the app is signed with a developer key so it will fail to install if you have an official version of the app installed. So you must first uninstall any official versions of the app before installing this test version.
[HTC One X] MikeS.:
I've tested it, but the brightness on "dimm" stays at the same level as it does at the "bright" preset.
[HTC One X] denversc:
Okay. Which ROM are you running? Do you have a custom kernel installed? I ask because another user reported that the stock CM10 kernel is missing the file that sets the brightness and perhaps your kernel does as well.
[HTC One X] TToivanen:
Same here: the dim setting is the same level as bright. When I tap the bright button it goes bright for a split second and then dim again.

Sent from my HTC One X
[HTC One X] MikeS.:
1.) ARHD 17.1

2.) Nope, just the Kernel, which comes with the ROM.
[HTC One X] 6jaipur6:
No difference to me I.m on venom rom and no custom kernel.
[HTC One X] denversc:
Hmm... this might be because the app first writes the brightness (in the range 0..100) to lut_coefficient and then writes 255 to the brightness file. This is the correct order on the HTC One X evita (dual-core) but it sounds like it's the opposite order on the endeavoru (quad-core). I'll post an updated app which reverses the order in which the app writes to these two files. Maybe the "dim" setting is working, but the logic is not quite right yet.
[HTC One X] denversc:
Thanks for the report.
[HTC One X] denversc:
Good to know. Thanks for this information.
[HTC One X] knoxploration:
Great idea for an app, I've not yet had a chance to try it as I'm not (yet) rooted, but I do plan to in the not too distant future when my warranty expires.

One feature request: could you please make it so that the button backlight will switch off after a certain timeout, even if the screen remains illuminated? I'd love to have the backlight switch off for the buttons after say 30 seconds, while leaving the screen on for an alarm clock, then turn back on the moment I touch the screen.
[HTC One X] denversc:
Thanks. This feature has actually already been requested and is being tracked in the issue list on Google Code: https://code.google.com/p/hox-cap-butn-brightness/issues/detail?id=4. I'm not exactly sure how to accomplish this yet (I have an idea but have not tested it at all) so I'm not sure when I'll get to it. In any case, thanks for your feedback.
[HTC One X] mrberni:
Nice one. Have been looking for something like this some time... :good:

Will try it on my One X (MIUI Australia) when I get home. Will report back then.
[HTC One X] denversc:
Attached is a test version of the app, v1.0.7-DimTest2, that hopefully better supports the "dim" setting on the quad-core One X than v1.0.7-DimTest1 did. Could someone load this test version of the app and test the following:

Click each of the 3 brightness buttons in the main UI; verify that the brightness level immediately changes accordingly

Click each of the 3 brightness buttons in the main UI, press the power button to turn off the screen, then press the power button again to turn the screen back on; verify that the capacitive button backlight is the same brightness that was selected prior to turning the screen off

Reminder: This "test version" of the app is signed with a developer key so it will fail to install if you have an official version of the app installed. So you must first uninstall any official versions of the app before installing this test version.

Thanks!
[HTC One X] TToivanen:
Works, but the "dim" setting doesn't persist after screen on and off, it changes to full brightness.

Sent from my HTC One X
[HTC One X] denversc:
Looking promising... can you try the attached v1.0.7-DimTest3? I made a tiny change which hopefully will make "dim" persist across screen on and off. Please retry all 3 brightness settings, if you can, to make sure this change didn't mess the other brightness settings up. Thanks!!
[HTC One X] TToivanen:
Sorry, mate, but it still does not stay dim.

Sent from my HTC One X
[HTC One X] denversc:
Fair enough. The next thing I will try is to implement a BroadcastReceiver to respond to the ACTION_SCREEN_ON broadcast, setting the brightness explicitly instead of relying on the OS to do it for us.
[HTC One X] denversc:
Okay, last one for today! This is v1.0.7-DimTest4 which starts a background service to respond to screen on events and re-apply the capacitive buttons backlight brightness set by the user.