[APP][Nov-13-2013] Capacitive Buttons v1.0.13

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
NOTE: Please use the DevDB thread for all devices instead of this device-specific thread: http://forum.xda-developers.com/showthread.php?t=2496347


This small application allows you to change the brightness of the capacitive buttons (back, home, and recent tasks) on many HTC devices and a few non-HTC devices, including the HTC One X (both dual-core and quad-core models), the HTC One X+, and the HTC One. Users have also reported success on other devices, including HTC One V, HTC One S, HTC Desire HD, and Evo 3g. Root is required in order for this application to work. This application works on any ROM, including CleanROM, ViperXL, Cyanogenmod, AOKP, and MIUI.

App review by Portal Administrator / Editor-in-Chief for XDA-Developers Will Verduzco: http://www.xda-developers.com/android/easily-dim-the-capacitive-buttons-on-many-htc-devices

Features
  • Intuitive UI to set the brightness of the capacitive buttons to bright, dim, or off
  • Home screen widget to cycle between brightness levels

Latest Versions
Latest Pro Version: 1.0.13
Latest Free Version: 1.0.13

Download
Google Play (Pro version): https://play.google.com/store/apps/details?id=org.sleepydragon.capbutnbrightness.pro
Google Play (Free version): https://play.google.com/store/apps/details?id=org.sleepydragon.capbutnbrightness
APK (v1.0.13): http://dl.bintray.com/sleepydragon/CapacitiveButtons/CapButnBrightness-1.0.13.apk
YouTube Video: https://www.youtube.com/watch?v=r9Zj-z02CR8

Differences in the Pro Version
The Pro version receives new features and bug fixes 2-4 weeks earlier than the free version. That's it! Oh, and also the free version has a link at the bottom of the main UI to upgrade to pro. The main motivation to pay for the pro version is to get official app updates easily and automatically via the Google Play Store. If you're happy with waiting for updates or using beta versions then you can live a full and happy life with the free version.

Officially Supported Devices
  • HTC One X (evita and endeavoru)
  • HTC One (m7)
  • HTC One X+ (evitareul)
  • HTC One S
  • HTC Sensation

Unofficially Supported Devices
  • HTC One V
  • HTC Desire HD
  • HTC Evo 3D
  • HTC Droid MAXX
  • HTC Droid DNA
  • HTC Butterfly S
  • LG Optimus G

Officially Unsupported Devices (devices that are known not to work)
  • Samsung Galaxy S2
  • Samsung Galaxy S3

Frequently Asked Questions
  • Which brightness setting is "stock"? It depends. On Sense based ROMs (eg. CleanROM, ViperXL) "Bright" seems to be the default. On AOSP-based ROMs (eg. CM10, AOKP) "Dim" seems to be the default. It all depends on how/if the ROM maintainer tweaked the default setting. The "default default" (ie. if you RUU to stock) setting is "bright". In v1.0.4, a "Default" button was added to allow reverting to stock brightness.
  • How do I get back to the default setting? The most reliable way is to click the "Default" button on the main screen of the application then simply reboot. Or, you can just set the brightness setting that is the default.
  • What happens if I uninstall the app? Nothing. Well, it doesn't change the brightness setting if that's what you're wondering. After a reboot, though, the brightness setting will revert back to the ROM's default setting.

Known Issues
  • "Dim" does not work on all ROMs and kernels
  • "Off" does not stick when "GV Integation" app installed

Source
This application is released under the GPL3 open-source license. Source code is published at https://code.google.com/p/hox-cap-butn-brightness

Reporting Bugs
Use the "Bug Reports" feature of this DevDB project or add a post to this thread. Please include the contents of the application's "Debug Information" page (available from the "Settings" screen) when reporting bugs, as it contains invaluable information for developers to use when investigating issues. There is a "Copy" button in the top-right corner of the screen for easy cut & paste.

Credits
Turge - for providing a MOD to perform the same task (http://forum.xda-developers.com/showthread.php?t=1694375)
gridlock489 - for providing higher-resolution images for the buttons in the main UI
slimdizzy - for testing on the HTC One X+ and letting me borrow his device to try things out
TToivanen - for testing on the International HTC One X (endeavoru)
lesscro - for providing the title banner that you see at the top of this post
skdubg - for testing on the HTC One X+, especially the new "dim" support

Change Log (brief - see full change log in the next post)
  • 1.0.13 (Nov 14, 2013) Fixed buttons turning off issue, skip dim in widget if not supported, HTC Sensation support added
  • 1.0.12 (Oct 24, 2013) Fixed "default" button error: "Changing permissions of file failed"
  • 1.0.11 (Oct 23, 2013) Fixed long-standing issues with UI lags and superuser permissions usage, animation added to home screen widget
  • 1.0.10 (Sept 10, 2013) Home screen widget added, HTC One brightness levels fixed
  • 1.0.9 (Sept 03, 2013) HTC One support added, support for devices without the "currents" file added
  • 1.0.8 (Jan 02, 2013) dim support for all devices, new home screen icon, debug information and credits screen added, fixed about screen scrolling
  • 1.0.7 (Dec 10, 2012) fixes bug where brightness setting does not persist when turning screen off then back on; only affects endeavoru and evitareul
  • 1.0.6 (Dec 06, 2012) added support for HTC One X+ and International HTC One X (endeavoru); added detected device name at bottom of "About" screen
  • 1.0.5 (Nov 25, 2012) fixed pixelated button images in main UI (thanks to gridlock489 for providing higher-resolution images)
  • 1.0.4 (Nov 03, 2012) visual indication when buttons pressed, better error message if not rooted, "Default" button added, some words translated
  • 1.0.3 (Oct 11, 2012) Brightness setting now sticks across reboots
  • 1.0.2 (Oct 03, 2012) Change theme to Holo (dark), replace button text off/dim/bright with pretty icons
  • 1.0.1 (Oct 02, 2012) Added to Google Play, new application icon, added "About" screen
  • 1.0.0 (Sept 29, 2012) Initial release

Old APKs:

Feel free to bake the free version of this app into custom ROMs or publish it in other places. No need to ask permission from me. However, I am quite interested personally in different places that this app is used. So if you do include it in a ROM or whatever feel free to post a note to this thread to let me know! The app is licensed under the GPL, which means you can even take it apart and include it in your own stuff... I just ask that you honor the spirit of the GPL (unlike HTC's 120-day policy... grrr!)

Threads for this app for other devices (obsolete - please use this thread instead):
 

Attachments

Last edited:

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
I need a few HTC One S owners to install this app and capture the "debug information" screen contents for me. With that information, I will be able to add the HTC One S to the list of officially supported devices.

Here are the steps to follow:
  1. Install the latest version; this can either be the free or Pro version from the Google Play Store or the free version from https://bintray.com/sleepydragon/CapacitiveButtons/APKs
  2. Launch the "Capacitive Buttons" app
  3. Open the app's menu and select "Settings"
  4. Select "Debug Information"
  5. Click the "Copy" button in the top-right corner of the screen
  6. Paste the contents into a reply to this thread

Thanks!
 

Attachments

leald

Senior Member
Jan 4, 2011
286
159
0
Cincinnati
Here you go


Application Version: 1.0.9

Detected Device: HTC One X+ (evitareul)
Supports Setting Capacitive Buttons Backlight Brightness: Yes
Setting Capacitive Buttons Backlight Brightness Possible: Yes

/sys/class/leds/button-backlight/currents
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/brightness
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/lut_coefficient
File Exists: Yes
File Permissions: Read-Only
File Contents: 100

Build.BOOTLOADER: 2.15.0000
Build.DEVICE: ville
Build.DISPLAY: cm_ville-userdebug 4.3 JSS15Q eng.jenkins.20130911.075143 test-keys
Build.MANUFACTURER: HTC
Build.MODEL: One S
Build.PRODUCT: htc_ville
Build.VERSION.RELEASE: 4.3

Process UID: 10114

Sent from my One S using xda app-developers app
 

dariusz666

Senior Member
Dec 20, 2007
164
42
0
London
Application Version: 1.0.9

Detected Device: HTC One X+ (evitareul)
Supports Setting Capacitive Buttons Backlight Brightness: Yes
Setting Capacitive Buttons Backlight Brightness Possible: Yes

/sys/class/leds/button-backlight/currents
File Exists: Yes
File Permissions: Read-Only
File Contents: 3

/sys/class/leds/button-backlight/brightness
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/lut_coefficient
File Exists: Yes
File Permissions: Read-Only
File Contents: 100

Build.BOOTLOADER: 2.15.0000
Build.DEVICE: ville
Build.DISPLAY: cm_ville-userdebug 4.3 JSS15Q eng.phoenixita.20130911.075940 test-keys
Build.MANUFACTURER: HTC
Build.MODEL: One S
Build.PRODUCT: htc_ville
Build.VERSION.RELEASE: 4.3

Process UID: 10089
 

Flashalot

Senior Member
Jun 7, 2012
2,463
2,668
203
Chicago
Application Version: 1.0.9

Detected Device: HTC One X+ (evitareul)
Supports Setting Capacitive Buttons Backlight Brightness: Yes
Setting Capacitive Buttons Backlight Brightness Possible: Yes

/sys/class/leds/button-backlight/currents
File Exists: Yes
File Permissions: Read-Only
File Contents: 3

/sys/class/leds/button-backlight/brightness
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/lut_coefficient
File Exists: No

Build.BOOTLOADER: 2.15.0000
Build.DEVICE: ville
Build.DISPLAY: JRO03C
Build.MANUFACTURER: HTC
Build.MODEL: HTC VLE_U
Build.PRODUCT: ville
Build.VERSION.RELEASE: 4.1.1

Process UID: 10183
 

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
Here you go ...
Application Version: 1.0.9 ...
Application Version: 1.0.9 ...
Thank you all for posting the debug information. I've built a test version of the app, CapButnBrightness-1.0.9-HtcOneS01.apk, which should correctly detect HTC One S. The APK is attached. Could you or any other volunteer uninstall any previous versions of the app and install this one instead. I'm quite interested to see if it works correctly. If it does, then I will add HTC One S to the list of officially supported devices. Otherwise, I will work with you to fix any issues that arise.

Please let me know if all of the following work as you expect:
  1. Click the "off" button; the capacitive buttons backlight should turn off
  2. Click the "bright" button; the capacitive buttons backlight should turn on at full brightness
  3. Click the "dim" button; the capacitive buttons backlight should turn on, but more dimly than bright
  4. Click the "bright" button; turn the screen off then back on; the capacitve buttons backlight should turn off and on with the screen
  5. Copy and paste the "Debug Information" screen contents and include them in your reply (to make sure that it's correctly detecting the device as HTC One S)

Thanks!
 

Attachments

Flashalot

Senior Member
Jun 7, 2012
2,463
2,668
203
Chicago
Thank you all for posting the debug information. I've built a test version of the app, CapButnBrightness-1.0.9-HtcOneS01.apk, which should correctly detect HTC One S. The APK is attached. Could you or any other volunteer uninstall any previous versions of the app and install this one instead. I'm quite interested to see if it works correctly.
[*]Copy and paste the "Debug Information" screen contents and include them in your reply (to make sure that it's correctly detecting the device as HTC One S)
[/LIST]

Thanks!
Working perfect for me thank god no more scripts
If you want me to test on my Evo 3D or Evo 4G I can test them tomorrow

Application Version: 1.0.9-HtcOneS01

Detected Device: HTC One S (ville)
Supports Setting Capacitive Buttons Backlight Brightness: Yes
Setting Capacitive Buttons Backlight Brightness Possible: Yes

/sys/class/leds/button-backlight/currents
File Exists: Yes
File Permissions: Read-Only
File Contents: 0

/sys/class/leds/button-backlight/brightness
File Exists: Yes
File Permissions: Read-Only
File Contents: 0

/sys/class/leds/button-backlight/lut_coefficient
File Exists: No

Build.BOOTLOADER: 2.15.0000
Build.DEVICE: ville
Build.DISPLAY: JRO03C
Build.MANUFACTURER: HTC
Build.MODEL: HTC VLE_U
Build.PRODUCT: ville
Build.VERSION.RELEASE: 4.1.1

Process UID: 10196


Sent from my HTC VLE_U using Tapatalk 2
 
Last edited:

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
Working perfect for me thank god no more scripts
If you want me to test on my Evo 3D or Evo 4G I can test them tomorrow
Thanks for the report! I've had at least one report of the app working on Evo 3D but not the Evo 4G. I'd definitely be interested in the contents of the debug information screen of those two devices.
 

Flashalot

Senior Member
Jun 7, 2012
2,463
2,668
203
Chicago
Thanks for the report! I've had at least one report of the app working on Evo 3D but not the Evo 4G. I'd definitely be interested in the contents of the debug information screen of those two devices.
Ok ill do it tomorrow after I get home

Sent from my HTC VLE_U using Tapatalk 2
 

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
The "free" version of the app has now been upgraded to v1.0.10, and includes all features in the Pro version 1.0.10. The new version of the app will be available from the Google Play store in the next 24-48 hours. For the impatient, the APK can be downloaded from http://dl.bintray.com/sleepydragon/CapacitiveButtons/CapButnBrightness-1.0.10.apk and installed manually.

Reminder: If you have a beta (or any non-release) version of this app installed then you will need to first uninstall it before installing this official version. Failing to do so will result in attempts to install the release version failing due to the non-release versions being signed with a developer key and the release versions signed with a release key.
 
  • Like
Reactions: AYTIM

Brooklyn8807

Senior Member
Aug 3, 2011
209
79
0
Melbourne,Florida
I'm not sure if you still need this but here you go. For some reason it says it's OneX + as a detected device. But it's definitely T mobile, One S. Here's some extra info

Rom: Viper OneS 2.20
Kernel: latest Elemental JB

EDIT: I didn't notice that you made a specific oneS apk, until after I pasted from older version. Here's updated info.



Application Version: 1.0.9-HtcOneS01

Detected Device: HTC One S (ville)
Supports Setting Capacitive Buttons Backlight Brightness: Yes
Setting Capacitive Buttons Backlight Brightness Possible: Yes

/sys/class/leds/button-backlight/currents
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/brightness
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/lut_coefficient
File Exists: No

Build.BOOTLOADER: 2.15.0000
Build.DEVICE: ville
Build.DISPLAY: JRO03C
Build.MANUFACTURER: HTC
Build.MODEL: HTC One S
Build.PRODUCT: ville
Build.VERSION.RELEASE: 4.1.1

Process UID: 10189



Sent from my HTC One S using Tapatalk 4
 
Last edited:

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
A new beta version of this app is available: v1.0.11-Beta01. The main new feature is an improved mechanism for requesting root permissions, which leads to a "snappier" application experience. HTC One S has also been added to the "officially" supported list of devices. Please test the attached CapButnBrightness-1.0.11-Beta1.apk and reply with your experiences, good or bad.

EDIT: A newer beta version is available: http://forum.xda-developers.com/showthread.php?p=46093788#post46093788

Changes in v1.0.11-Beta1 (since v1.0.10)
  • Completely re-wrote the mechanism that requests root; see below for details and benefits
  • HTC One S official support added
  • ACCESS_SUPERUSER added to AndroidManifest.xml (to note superuser requirements in Google Play Store)

Improved Root Mechanism
Old Behaviour: Root is requested every time that the brightness changes.
New Behaviour: Root is requested the first time that the brightness changes, and after each reboot; all other brightness changes do not request root.
The net result of this change is that changing the brightness is "snappier", and happens more quickly.
This should also fix Issue 27 "If superuser has a PIN, root requests are too frequent and time out" (https://code.google.com/p/hox-cap-butn-brightness/issues/detail?id=27)

Please reply to this post with your feedback. If reporting issues, please go to the "Debug Information" screen, press the "copy" button, and paste its contents. This will immensely help with investigation of issues.

Reminder: This "beta 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.
 

Attachments

Last edited:

gelo01

Senior Member
Sep 18, 2012
2,408
644
193
Manila
Just a tip, if you're rooted and don't want to have an app running for this, you can do the following:

Launch RootExplorer, go to "sys/class/leds/button-backlight" (NOT the LCD-BACKLIGHT or any other) and long press "max_brightness." Open in Text Editor, change 255 to 0 (or any other value you want) and save.
 
  • Like
Reactions: AYTIM and ivan123

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
A new beta version of this app is available: v1.0.11-Beta02. The main new feature is a further improved mechanism for requesting root permissions, which leads to a "snappier" application experience. Please test the attached CapButnBrightness-1.0.11-Beta2.apk and reply with your experiences, good or bad.

EDIT: A newer beta version is available: http://forum.xda-developers.com/showthread.php?p=46316821#post46316821

Changes in v1.0.11-Beta2 (since v1.0.11-Beta1)
  • Request root on a background thread instead of the main thread to avoid UI hangs
  • Explicity turn on buttons backlight when screen turns on (affects HTC One XL evita only)

Changes in v1.0.11-Beta1 (since v1.0.10)
  • Completely re-wrote the mechanism that requests root; see below for details and benefits
  • HTC One S official support added
  • ACCESS_SUPERUSER added to AndroidManifest.xml (to note superuser requirements in Google Play Store)

Please reply to this post with your feedback. If reporting issues, please go to the "Debug Information" screen, press the "copy" button, and paste its contents. This will immensely help with investigation of issues.

Reminder: This "beta 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.
 

Attachments

Last edited:

stunner2002

Senior Member
Dec 14, 2009
185
20
0
Cologne
Took the Play Store Version. Works very nice :)


Application Version: 1.0.10

Detected Device: HTC One X+ (evitareul)
Supports Setting Capacitive Buttons Backlight Brightness: Yes
Setting Capacitive Buttons Backlight Brightness Possible: Yes

/sys/class/leds/button-backlight/currents
File Exists: Yes
File Permissions: Read-Only
File Contents: 3

/sys/class/leds/button-backlight/brightness
File Exists: Yes
File Permissions: Read-Only
File Contents: 1

/sys/class/leds/button-backlight/lut_coefficient
File Exists: Yes
File Permissions: Read-Only
File Contents: 100

Build.BOOTLOADER: 2.16.0000
Build.DEVICE: ville
Build.DISPLAY: JDQ39
Build.MANUFACTURER: HTC
Build.MODEL: HTC One S
Build.PRODUCT: htc_europe
Build.VERSION.RELEASE: 4.2.2

Process UID: 10145

Sent from my HTC One S using xda app-developers app
 

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
A new beta version of this app is available: v1.0.11-Beta03. The main new feature in this beta is an animation that was added to the home screen widget when it is touched. Please test the attached CapButnBrightness-1.0.11-Beta3.apk and reply with your experiences, good or bad.

Changes in v1.0.11-Beta3 (since v1.0.11-Beta2)
  • Add animation to home screen widget
  • Clean up some logcat log messages

Changes in v1.0.11-Beta2 (since v1.0.11-Beta1)
  • Request root on a background thread instead of the main thread to avoid UI hangs
  • Explicity turn on buttons backlight when screen turns on (affects HTC One XL evita only)

Changes in v1.0.11-Beta1 (since v1.0.10)
  • Completely re-wrote the mechanism that requests root; see below for details and benefits
  • HTC One S official support added
  • ACCESS_SUPERUSER added to AndroidManifest.xml (to note superuser requirements in Google Play Store)

Please reply to this post with your feedback. If reporting issues, please go to the "Debug Information" screen, press the "copy" button, and paste its contents. This will immensely help with investigation of issues.

Reminder: This "beta 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.
 

Attachments

denversc

Senior Member
Jul 1, 2012
428
320
0
Kitchener
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)
  • HTC One S officially supported
  • 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)
  • 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.