[Q] Tester for Capacitive Button Brightness App - HTC One X

Hi One X community! I'm from the AT&T One X world, so I don't really belong here However, I wrote a little app for the evita/snapdragon One X that changes the brightness of the capacitive buttons (back, home, recent tasks) and I'm curious to see if it also works on your endeavoru/tegra3 One X. Would anyone be willing to test it out and report back in this thread? Although the app requires root permissions, I cannot imagine it doing any damage to your device should it not work. That being said... anything is possible... you have been warned
If you don't mind testing it out, there are 2 ways to do it:
Load the APK file for the application and run it
Run a command as root
Load the APK file for the application
If you are willing to load the app, the APK is available here: http://forum.xda-developers.com/showthread.php?t=1912216. After loading the APK, just launch the app "Capacitive Buttons Brightness" from the launcher and press one of the 3 buttons in the UI. If the capacitive button brightness changes, then the app works.
Run a command as root
Run the following command from a root shell:
echo 0 > /sys/devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-led/leds/button-backlight/currents
This should shut off the button backlight. Using 1 and 2 instead of 0 should make the button backlight dim and full, respectively. These are the commands ultimately issued by the app.
Other Ideas
If this method of setting the button brightness doesn't work, would you happen to know the command to issue that does work? If you do, I could incorporate that command into my app, and have it choose the right command based on the current device.
Thanks in advance for your help!

denversc said:
Hi One X community! I'm from the AT&T One X world, so I don't really belong here However, I wrote a little app for the evita/snapdragon One X that changes the brightness of the capacitive buttons (back, home, recent tasks) and I'm curious to see if it also works on your endeavoru/tegra3 One X. Would anyone be willing to test it out and report back in this thread? Although the app requires root permissions, I cannot imagine it doing any damage to your device should it not work. That being said... anything is possible... you have been warned
If you don't mind testing it out, there are 2 ways to do it:
Load the APK file for the application and run it
Run a command as root
Load the APK file for the application
If you are willing to load the app, the APK is available here: http://forum.xda-developers.com/showthread.php?t=1912216. After loading the APK, just launch the app "Capacitive Buttons Brightness" from the launcher and press one of the 3 buttons in the UI. If the capacitive button brightness changes, then the app works.
Run a command as root
Run the following command from a root shell:
echo 0 > /sys/devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-led/leds/button-backlight/currents
This should shut off the button backlight. Using 1 and 2 instead of 0 should make the button backlight dim and full, respectively. These are the commands ultimately issued by the app.
Other Ideas
If this method of setting the button brightness doesn't work, would you happen to know the command to issue that does work? If you do, I could incorporate that command into my app, and have it choose the right command based on the current device.
Thanks in advance for your help!
Click to expand...
Click to collapse
Hi there, didnt try your app.
But here at endevour we do stuff differently
either with some kernel hacks - never tried them
apps like screenfilter or adjbrightness and its child.
or :
SENSE: editing framework-res
CM10(not sure this would work on sense):
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
chmod 444 because as soon as you go screenoff it changes to default value, same as reboot.
that path you posted I couldn't find it in my installation.
echo 0 > /sys/devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-led/leds/button-backlight/currents

PAGOT said:
Hi there, didnt try your app.
But here at endevour we do stuff differently
either with some kernel hacks - never tried them
apps like screenfilter or adjbrightness and its child.
or :
SENSE: editing framework-res
CM10(not sure this would work on sense):
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
chmod 444 because as soon as you go screenoff it changes to default value, same as reboot.
that path you posted I couldn't find it in my installation.
echo 0 > /sys/devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-led/leds/button-backlight/currents
Click to expand...
Click to collapse
Thanks PAGOT for the information. So if I understand you correctly, running these 2 commands will turn off the capacitive buttons backlight:
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
But you're saying these two command only work on CM, and not Sense-based ROMs?

denversc said:
Thanks PAGOT for the information. So if I understand you correctly, running these 2 commands will turn off the capacitive buttons backlight:
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
But you're saying these two command only work on CM, and not Sense-based ROMs?
Click to expand...
Click to collapse
I do not know if they work on Sense roms, I didn't try it there. On sense I edited framework-res which doesn't work for sure on CM.
Dont know the other way around . Someone with a sense rom and rooted would have to test it. Right now I am not near a device like that to test.

In an attempt to get this app working on the HTC One X+ (evitareul) I believe I also got it to work on the international One X (endeavoru). Since they both use the Tegra3 chipset the changes that made it work on the One X+ should make it also work on the International One X.
Could someone load the attached app and let me know if it sets the capacitive button brightness? If it does, then I will post an "official" version into the Play Store asap. Thanks!

denversc said:
In an attempt to get this app working on the HTC One X+ (evitareul) I believe I also got it to work on the international One X (endeavoru). Since they both use the Tegra3 chipset the changes that made it work on the One X+ should make it also work on the International One X.
Could someone load the attached app and let me know if it sets the capacitive button brightness? If it does, then I will post an "official" version into the Play Store asap. Thanks!
Click to expand...
Click to collapse
Confirmed working on international one x running cm10.
The half brightness doesn't work though. When enabled brightness goes down for a split second and then back to full brightness. Nice little app.
Sent from my HTC One X using xda app-developers app

hahhahhaaa said:
Confirmed working on international one x running cm10.
The half brightness doesn't work though. When enabled brightness goes down for a split second and then back to full brightness. Nice little app.
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Awesome. Thanks for your response! It was the same thing on the One X+ where "dim" and "bright" were exactly the same. On the North American One X (Evita) the "dim" setting is actually slightly dimmer than "bright". I will get this app fixed up and published as soon as possible. I will also start a thread in the apps/themes aection once that is done.

A widget would be a nice addition.
Sent from my HTC One X using xda app-developers app

hahhahhaaa said:
A widget would be a nice addition.
Click to expand...
Click to collapse
Indeed it would. I actually started to look into it a few weeks ago so next time I have a few free hours (probably in the new year) I'll see if I can hammer out a widget for it.

hahhahhaaa said:
Confirmed working on international one x running cm10.
The half brightness doesn't work though. When enabled brightness goes down for a split second and then back to full brightness.
Click to expand...
Click to collapse
I've created one (hopefully) last test version of the app. This one only shows buttons for "bright" and "off"; the button for "dim" is not shown on the International One X since "bright" and "dim" have the same effective brightness.
Could someone do a quick test with the attached app? Just press the "bright" and "off" buttons each a few times and ensure that the capacitive button backlight turns on or off, as expected. Also, double-check that the correct device name ("HTC One X (endeavoru)") is displayed at the bottom of the "About" screen. Thanks!
Version 5 of the test app is attached.

An official version of the app that supports the International One X (endeavoru) has now been published. See http://forum.xda-developers.com/showthread.php?t=2033973

Works ok and the name is displayed correctly too.
Sent from my HTC One X using xda app-developers app

Related

How to switch off your softkey backlight

I see a few people asking about this and I found this app that works on my HTC One X.
Screen Filter:
https://play.google.com/store/apps/details?id=com.haxor&hl=en
If you just want to switch the lights off, set the filter to 100% then un-tick the enable softkey back light. It works great when watching videos or using it as a nightstand clock.
Hope their wasn't a thread about his. I did a few searches and couldn't find anything, hope this helps a few people.
Does it save the preference after reboot? I use Adjbrightness and after rebooting I have to load the app up again.
Sent from my HTC One X using xda app-developers app
I will have a look but I think you have to reopen it.
Sent from my HTC One X using xda app-developers app
I had a test now and it doesn't start on boot. But when you start the app after a boot it then knows what your last settings were. Hope that helps.
Sent from my HTC One X using xda app-developers app
K, when I have the time I was thinking of writing my own app that does this.
Sent from my HTC One X using xda app-developers app
If u put the app (screenfilter) in some autostart program it will work fine, if u dont wanna enable it manually.
This text was generated by a HoX device, in symbiosis with thoughts from someone else
ououououo said:
If u put the app (screenfilter) in some autostart program it will work fine, if u dont wanna enable it manually.
This text was generated by a HoX device, in symbiosis with thoughts from someone else
Click to expand...
Click to collapse
That is a great idea, I was wondering if there was an app like that I will have a look and see how well that works. But it's really nice to disable those lights, gives the phone a really neat appearance.
Roars21 said:
That is a great idea, I was wondering if there was an app like that I will have a look and see how well that works. But it's really nice to disable those lights, gives the phone a really neat appearance.
Click to expand...
Click to collapse
I did this on my previous device (xperia u, to get rid of the annoying LED-bar )
NOTE:
*** If you accidentally make your screen go BLACK ***
1. Pull your battery
2. Uninstall the app to reset your bad brightness setting
3. Reinstall the app and use it normally again"
Click to expand...
Click to collapse
I am kinda worried about this happening on my HOX...the fist step is already too much trouble to go through.
jimmy2027 said:
I am kinda worried about this happening on my HOX...the fist step is already too much trouble to go through.
Click to expand...
Click to collapse
Don't worry if you hold down the power button for a couple seconds it simulates a battery pull. Then when you start up, provided you don't have it on a autostart app you can then go in and change the settings. Also if you do set the brightness too low it gives you 10 seconds to approve it or it will just revert your settings. If that makes sense.
Make a new file, call it 99KeyOff.sh and put this in it:
#!/system/bin/sh
# ========================================
# init.d script for key light off. ONE X.
#BACKFROMTHE[/QUOTE]STORM
# ========================================
#disable Key Backlight
echo begin set Key Backlight - KB
echo KB - set permissions rw
chmod 0666 /sys/class/leds/button-backlight/brightness
echo KB - set Key Backlight 0
echo "0" > /sys/class/leds/button-backlight/brightness
echo KB - set permissions ro
chmod 0444 /sys/class/leds/button-backlight/brightness
echo KB - done!
Put it in the init.d folder or run it manually in a terminal emulator or script manager.
Unfortunately that doesn't work on the Maximus ROM. I think it's because the rootfs mounts read only. I tried adding a remount line to the top but nothing happened.
Sent from my HTC One X using xda app-developers app

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

NOTE: Please use the DevDB thread for all devices instead of this device-specific thread: http://forum.xda-developers.com/showthread.php?t=2496347
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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:
https://bintray.com/sleepydragon/CapacitiveButtons/APKs
http://dl.bintray.com/sleepydragon/CapacitiveButtons (direct links)
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):
HTC One X (North American "evita" variant) (original version)
HTC One X (International "endeavoru" variant)
HTC One X+
HTC One
HTC One S
HTC Sensation
HTC Sensation XL
It works in SkyDragon V3, ICS,
Thanks for the app, it s amazing.
Later will test on skydragon JB V3
SkyDragon Sense, Dsensed, SeMistock & Stock Roms. Next Targe ~ ~ ~ > JB or Kelly Bean
Works great on HOX with ARHD on new base 27
Sent from HOX with ARHD 17.x
---------- Post added at 06:14 AM ---------- Previous post was at 06:11 AM ----------
Is it possible to add third option like in thread http://forum.xda-developers.com/showthread.php?t=1933311
Sent from HOX with ARHD 17.x
*elmo* said:
Is it possible to add third option like in thread http://forum.xda-developers.com/showthread.php?t=1933311
Click to expand...
Click to collapse
Unfortunately, no. Unfortunately, the International One X (endeavoru) does not support the "dim" setting. The YouTube video in the OP and the screenshots from the thread you linked to was taken on a North American One X (evita), which does support the dim setting. I tried, but the capacitive button backlight on the One X (endeavoru) is either off or on... no dim. So instead of having a "bright" and "dim" button that do the same thing, I modified the UI to hide the useless "dim" button.
Good question though. I've added this note to the "known issues" list in the OP: HTC One X+ and International One X (endeavoru) do *not* support the "dim" setting; therefore, the middle button is omitted from the UI on these devices
denverscwhen I unlock the screen buttoms light is on - with option set off. Any ideas?
---------- Post added at 07:32 AM ---------- Previous post was at 07:21 AM ----------
Edited. Working ok :thumbup:
Sent from HOX with ARHD 17.x
*elmo* said:
when I unlock the screen buttoms light is on - with option set off. Any ideas?
Edited. Working ok
Click to expand...
Click to collapse
Did you have to "change" anything to fix this? Just curious in case someone else runs into the same issue. Thanks!
denversc said:
Did you have to "change" anything to fix this? Just curious in case someone else runs into the same issue. Thanks!
Click to expand...
Click to collapse
Nothing changed. I noticed that light turn of in few seconds after unlock and then it's still of. Even now :thumbup: Thanks mate for MOD
Sent from HOX with ARHD 17.x
*elmo* said:
Nothing changed. I noticed that light turn of in few seconds after unlock and then it's still of. Even now :thumbup: Thanks mate for MOD
Sent from HOX with ARHD 17.x
Click to expand...
Click to collapse
I guess the app is getting killed
Sent from my EndeavorU using Tapatalk 2
Yeah, you're right. When ever we turn off the screen, the lights are back. Better to use a script, which should be placed in system/etc/init.d
If any one wants that, I will attach it here.
Sent from my HTC One X using Tapatalk 2
Hey denversc, please remove the chmod 444 part from the script.
That way users choice should persist
Sent from my HTC One X
TToivanen said:
Hey denversc, please remove the chmod 444 part from the script.
That way users choice should persist
Click to expand...
Click to collapse
The app is not actually running any chmod commands. I'm not sure exactly why the capacitive button backlight is turning back on when the screen turns back on. The way the app works is that it writes either "0" or "255" to the file /sys/class/leds/button-backlight/brightness to turn the capacitive button backlight off or on, respectively. So probably the OS writes 255 to this file every time the screen turns on. It might be difficult/impossible to "fix" this. Any ideas?
shree.cse said:
Yeah, you're right. When ever we turn off the screen, the lights are back. Better to use a script, which should be placed in system/etc/init.d
Click to expand...
Click to collapse
I'm not sure that an init.d script would make any difference. It may be worth a try though. Why do you think it would make it work better with init.d? I just don't understand how init.d scripts are called. Thanks.
denversc said:
I'm not sure that an init.d script would make any difference. It may be worth a try though. Why do you think it would make it work better with init.d? I just don't understand how init.d scripts are called. Thanks.
Click to expand...
Click to collapse
Try this
http://db.tt/YpQPUPjH
Just place it in system/etc/init.d using root explorer and check permissions and execute it from there.
Sent from my HTC One X using Tapatalk 2
denversc said:
The app is not actually running any chmod commands. I'm not sure exactly why the capacitive button backlight is turning back on when the screen turns back on. The way the app works is that it writes either "0" or "255" to the file /sys/class/leds/button-backlight/brightness to turn the capacitive button backlight off or on, respectively. So probably the OS writes 255 to this file every time the screen turns on. It might be difficult/impossible to "fix" this. Any ideas?
Click to expand...
Click to collapse
Sorry, I thought you grabbed the script entirely from the q/a thread.
The thing is, you need to set the permissions of /sys/class/leds/button-backlight/brightness/ to read only. That way system wont change it to 255 when screen is turned on.
An init.d script works this way:
1. Set rw-permissions to /sys/class/leds/button-backlight/brightness by chmod 0666
2. Change value to whatever needed
3. chmod 0444 to /sys/class/leds/button-backlight/brightness for ro permissions.
I'm not quite sure if you can use chmod commands or not but thought I'd share this.
Sent from my HTC One X
TToivanen said:
Sorry, I thought you grabbed the script entirely from the q/a thread.
The thing is, you need to set the permissions of /sys/class/leds/button-backlight/brightness/ to read only. That way system wont change it to 255 when screen is turned on.
An init.d script works this way:
1. Set rw-permissions to /sys/class/leds/button-backlight/brightness by chmod 0666
2. Change value to whatever needed
3. chmod 0444 to /sys/class/leds/button-backlight/brightness for ro permissions.
I'm not quite sure if you can use chmod commands or not but thought I'd share this.
Click to expand...
Click to collapse
Ahh I see what you mean. I can definitely add that logic into the app to see if it fixes this issue. I'll post a test version of the app here in the thread when it's ready (probably late afternoon tomorrow).
One question about init.d scripts... do they run only when the device initially powers on or do they also run every time it wakes up from deep sleep, or every time that the screen powers on?
For now, I've added this issue to the "known issues" list in the OP: capacitive buttons backlight turns back on when the screen turns back on, even if "off" is selected in the app; a fix involving init.d scripts and/or chmod is currently under investigation
Here is a version of the app to test to see if it fixes the issue where the capacitive button backlight turns on when turning the screen on. It doesn't use an init.d script but it does run chmod 666 before setting the brightness and chmod 444 afterwards. The idea is that this will prevent the OS from turning the backlight back on since the file that it attempts to write to is read-only.
The APK of the test version of the app is attached to this post. You must uninstall any old versions of the app before installing this one, as it is signed with a "developer" key instead of the "official" key. As a result, you will also need to uninstall this test version of the app before installing an official version (for the exact same reason). Not doing so will simply cause the install of the APK to fail.
Please let me know if this fixes the issue.
Denversc, already tested. Works fine. Now light after unlock is off . Buttons are always off Thanks
Sent from HOX with ARHD 17.x
I am trying it with slim bran and it doesnt get brighter. Its the same.
Sent from my HTC One X using xda app-developers app
Denver, this version keeps the lights off when the screen is locked/unlocked like intended.
But I can't keep the lights on. After screen on they are off again.
Did you add chmod commands only to the the lights off script?
E: I assume you did, took a look at src.
Sent from my HTC One X
muid02 said:
I am trying it with slim bran and it doesnt get brighter. Its the same.
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
Not sure what you mean by getting brighter.
The purpose of this app is to turn softkey lights on and off.
Sent from my HTC One X
denversc said:
One question about init.d scripts... do they run only when the device initially powers on or do they also run every time it wakes up from deep sleep, or every time that the screen powers on?
Click to expand...
Click to collapse
They are executed when device boots.
Sent from my HTC One X
Great. I can confirm too that this works on Maximus 11. I have been looking for this app since the ICS times. I love how the buttons don't light up because you know where they are anyway and at least in my case when looking at a completely black image, you can see some light on the lower part of the screen from the buttons. Now that is disabled and the screen is gorgeous.

[RESOLVED][IDEA/REQUEST] Backlight button light up notification

See first post, page 3 for an solution
-------------------------------
Dear XDA,
I've searched for this kinda app but couldn't find it so i decided to make a thread about it.
Anyway, i was wondering if it's possible to make the backlight of the buttons light up when there is some kind of notification as the led in the One X is kinda useless imo.(dirt gets into the tiny holes)
If it IS possible, does someone want to take the effort to try and make such an application/mod?
I'll be eager and happy to test it and my thanks will be beyond eternity
Thanks in advance,
Joran
+1
Good idea, but I do think there could be any hardware limitations to make this work....
anyways, sounds great if it could be possible! :good:
I wrote an app called "Capacitive Button Brightness" which lets you control the brightness of the capacitive buttons backlight on the HTC One X: http://forum.xda-developers.com/showthread.php?t=2033973. Someone pointed this thread out to me so I thought I'd chime in with an idea.
I have not tested this (in fact I don't have a device to test it on!) but you might be able to flash the backlight of the capacitive buttons by running the following command from a root terminal:
Code:
echo 1 > /sys/class/leds/button-backlight/blink
If that doesn't work, take a look at the list of files in /sys/class/leds/button-backlight and see if perhaps I got the name of the file wrong. There should be one in there with "blink" in its name.
If this does indeed flash the capacitive button backlight then you could write a simple script in "Tasker" to blink the capacitive button backlight every time that a message is received.
User Vcek reported doing something very similar with Tasker, and I'd recommend to contact him if you have further questions. See http://forum.xda-developers.com/showthread.php?p=35266420#post35266420 and http://forum.xda-developers.com/showthread.php?p=35276999#post35276999
denversc said:
I wrote an app called "Capacitive Button Brightness" which lets you control the brightness of the capacitive buttons backlight on the HTC One X: http://forum.xda-developers.com/showthread.php?t=2033973. Someone pointed this thread out to me so I thought I'd chime in with an idea.
I have not tested this (in fact I don't have a device to test it on!) but you might be able to flash the backlight of the capacitive buttons by running the following command from a root terminal:
Code:
echo 1 > /sys/class/leds/button-backlight/blink
If that doesn't work, take a look at the list of files in /sys/class/leds/button-backlight and see if perhaps I got the name of the file wrong. There should be one in there with "blink" in its name.
If this does indeed flash the capacitive button backlight then you could write a simple script in "Tasker" to blink the capacitive button backlight every time that a message is received.
User Vcek reported doing something very similar with Tasker, and I'd recommend to contact him if you have further questions. See http://forum.xda-developers.com/showthread.php?p=35266420#post35266420 and http://forum.xda-developers.com/showthread.php?p=35276999#post35276999
Click to expand...
Click to collapse
i tried your app but all it does is either off or it's on.
Thanks for the input for this idea:good:, but i'm kinda low skilled (read no skill) in the technical side of the phone.
so i hope someone can try this?
edit: nvm, don't got terminal on this rom yet.
jorank said:
i tried your app but all it does is either off or it's on.
Thanks for the input for this idea:good:, but i'm kinda low skilled (read no skill) in the technical side of the phone.
so i hope someone can try this?
edit: nvm, don't got terminal on this rom yet.
Click to expand...
Click to collapse
You're right, my app won't address the feature you are looking for.
If you want a terminal, you can install "Android Terminal Emulator" from the Play store: https://play.google.com/store/apps/details?id=jackpal.androidterm. You will need to be rooted though.
If you want to test out the "echo" command in the previous post, you will need to run "su" in the terminal before running the "echo" command.
denversc said:
You're right, my app won't address the feature you are looking for.
If you want a terminal, you can install "Android Terminal Emulator" from the Play store: https://play.google.com/store/apps/details?id=jackpal.androidterm. You will need to be rooted though.
If you want to test out the "echo" command in the previous post, you will need to run "su" in the terminal before running the "echo" command.
Click to expand...
Click to collapse
tried the command and i confirm it works
jorank said:
tried the command and i confirm it works
Click to expand...
Click to collapse
Sweet. Now you can use an app like tasker to run that command every time you receive a message. Can anyone help with this?
denversc said:
Sweet. Now you can use an app like tasker to run that command every time you receive a message. Can anyone help with this?
Click to expand...
Click to collapse
I try to create a tasker profile with this. Does someone know a command to stop the blinking?
staffordniko said:
I try to create a tasker profile with this. Does someone know a command to stop the blinking?
Click to expand...
Click to collapse
Same command that is used to enable exept with echo 0.
Sent from my HTC One X
Got it done, how can i post a tasker script here?
Omg guys stop discussing aokp has this feature called button back light notification
Thread can be closes and don't forget to hit the thanks button
Gesendet von meinem HTC One X mit Tapatalk 2
howdid said:
Omg guys stop discussing aokp has this feature called button back light notification
Thread can be closes and don't forget to hit the thanks button
Gesendet von meinem HTC One X mit Tapatalk 2
Click to expand...
Click to collapse
and what if i don't want aokp but sense?
think twice please.
Okay so i've installed tasker but i can't find out how to set the appropriate settings for this event.
Anyone did it already?
Did anyone find a solution?
not really, tried tasker but that didn't get me any luck.
so i hope anyone else does
Profile: blink (2)
Event: Notification [ Owner Application:WhatsApp Title:* ]
Enter: blink (3)
A1: Run Shell [ Command:echo 1 > /sys/class/leds/button-backlight/blink Timeout (Seconds):0 Use Rootn Store Result In: ]
A2: Wait [ MS:0 Seconds:4 Minutes:0 Hours:0 Days:0 ]
A3: Run Shell [ Command:echo 0 > /sys/class/leds/button-backlight/blink Timeout (Seconds):0 Use Rootn Store Result In: ]
Did anyone test the battery usage for this?
@staffordniko: You could use a trigger for "screen on" to stop the blinking.
I can confirm that it works. It should be cool to blink one button at a time!
Sent from my EndeavorU using xda app-developers app
A mod like this would be nice!
I'll follow this thread!
I'm trying to export a app with this settings with "Tasker app factory", but no luck so far. Maybe someone know how to do this right? Getting a "package installer stopped" error.
Sent from my HTC One X using xda premium

[SCRIPT] Brightness buttons always on

Hi,
Just a little trick for those who want the "capacitive" buttons always on (maybe not very battery friendly but...) Remember someone asked this a few weeks ago somewhere...
Obviously you need root and init.d support... You can also edit directly the brightness file in /sys/class/leds/button-backlight/brightness but the modification will not survive after a reboot so you need to use an init.d script to load the modified value at each boot.
Put the init.d script below in /system/etc/init.d set the permissions to rwxrwxrwx, reboot, done
Here's the script: http://www.multiupload.nl/SMQWQQVBTJ
If you want to return back to stock: rename the init.d script with the .back extension or delete it.
If you want to set the "capacitive" buttons always off you need to edit the value, open the init.d script with notepad++ (on PC) or with a file explorer directly on your phone and set the value to "0" instead of "255", save, reboot, done.
Hoping that it will be useful,
Won't be using but thanks anyways, one question though, when do the HTC one buttons come on and off normally? They seem to have no specific interval
Sent from my HTC One using xda app-developers app
Hi,
No worries , it works with the ambiant light so with the sensor (light->off / night->on), even if the auto brightness is on or off the capacitive buttons vary in brightness so this part is independant...
After that I'm not a dev, the only solution I found is to modifie the value by the user in one file. Maybe it's set in the framework, or kernel? i don't realy know. The auto brightness values can be changed with a modified framework-res.apk, maybe it's the same thing for the capacitive buttons . In any case I have not the knowledge and skills for this part about the "automatic" dimming...
Capacitive button in Play works well and less cumbersome. Am using it with Pie. Automatic dimming would be cool though Thanks for looking into this.
Sent from my HTC One using Tapatalk 2
Stea1thmode said:
Capacitive button in Play works well and less cumbersome. Am using it with Pie. Automatic dimming would be cool though Thanks for looking into this.
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
Hi,
Sorry but I don't know what you mean... or you mean a kind of greater "light graduation", not on or off like stock, at least it looks like this for me (for example some values like 0 / 100 / 200 / 255), depending of the ambient light?
Like I said, for this I have not the knowledge, maybe a dev can take a look . In any case I don't think you will see a big difference between 100 and 255 for example...
And in the path /sys/class/leds/button-backlight/ there is nothing related to the graduation, it's in the framework stuff I think...
Stea1thmode said:
Capacitive button in Play works well and less cumbersome. Am using it with Pie. Automatic dimming would be cool though Thanks for looking into this.
Click to expand...
Click to collapse
This app now officially supports the HTC One in the latest beta version. I'm the developer of the app and I'd love to hear feedback from HTC One owners to know if it really works (since I don't have a device of my own to test on). See this thread: http://forum.xda-developers.com/showthread.php?t=2402153. Thanks!
denversc said:
This app now officially supports the HTC One in the latest beta version. I'm the developer of the app and I'd love to hear feedback from HTC One owners to know if it really works (since I don't have a device of my own to test on). See this thread: http://forum.xda-developers.com/showthread.php?t=2402153. Thanks!
Click to expand...
Click to collapse
Thanks I've just tested it. It has 3 settings right? Seems to be working well. It would be cool though to have an auto brightness feature.
Sent from my HTC One using Tapatalk 4 Beta
Stea1thmode said:
Thanks I've just tested it. It has 3 settings right? Seems to be working well. It would be cool though to have an auto brightness feature.
Sent from my HTC One using Tapatalk 4 Beta
Click to expand...
Click to collapse
That would be pretty cool.
Sent from my HTC One
Stea1thmode said:
Thanks I've just tested it. It has 3 settings right? Seems to be working well. It would be cool though to have an auto brightness feature.
Click to expand...
Click to collapse
Yep, it has 3 settings. Thanks for the idea about auto-brightness. You are definitely not the first person to pose that idea!

Swap recent and back keys and kill the lights on both buttons.

Having used Samsung's before and other devices, I've become accustomed to the back button being on the right.
I was hesitant about changing this as it would mean that you'll have a back symbol on the left and recent's on the right, even though they've switched, which would look a bit crap to be honest.
Anyway, disabling the backlight's will make it look a lot better whilst you have your buttons swapped
To do this you'll need to be rooted, that's it.
Flashable Zip Method
Here are some zips for flashing via recovery should you not want to edit these files yourself.
ButtonSwapLights0% - Swaps back & recents, kills button backlight
ButtonsDefaultLights0% - Default button order, kills button backlight
ButtonsDefaultLights50% - Default button order, backlight brightness 50%
ButtonsDefaultLights100% - back to normal
Manual Method
Download a text editor capable of altering system files, i personally used QuickEdit which is free in the play store.
Once that's installed
To disable the back light go here with a text editor.
/sys/class/leds/button-backlight/max_brightness change the number in here which will be 255 to 0.
This will switch off the lights immediately.
If you'd like to swap out the buttons so that back is recent and recent is back,.
Go to cypress-cap-sensor.kl which is in
system/user/keylayout/cypress-cap-sensor.kl
and find then simply reverse the text from the following two lines (there's only two in the file anyway)
key 158 BACK VIRTUAL
key 580 APP_SWITCH VIRTUAL
to
key 158 APP_SWITCH VIRTUAL
key 580 BACK VIRTUAL
Reboot the device and the keys will be switched
Enjoy
Thanks to @LeeDroid for putting me onto the location of the recents and back button file. :good:
Another big thanks to @Chronzy for making these zips, very much appreciated :good:
Update : These same zips work with Nougat on both cm and sense based roms.. Can be flashed at the same time of a Rom.
Outstanding job dladz. This is exactly what I was looking for, and so easy in your instructions. Thank you.
Off topic;
What about a lower haptic vibration ? Stock this phone vibrates like a wild rattlesnake in my hand, about to bite me. I thought most phones have a setting to adjust the vibration ? My Galaxy Note 5 does, as well as my LG G5 did and OnePlus One.
I am running LeeDroid ROM and he has specific settings for power abd haptic feedback, but even down to 1 it's still pretty powerful, just too strong for my tastes. I like to feel a slight vibration, nothing much. Is that possible ?
Is there a way to swap the Nav / software keys that some ROM's enable ?
Zorachus said:
Is there a way to swap the Nav / software keys that some ROM's enable ?
Click to expand...
Click to collapse
I'd say there is, but haven't looked into it mate.
Zorachus said:
Outstanding job dladz. This is exactly what I was looking for, and so easy in your instructions. Thank you.
Off topic;
What about a lower haptic vibration ? Stock this phone vibrates like a wild rattlesnake in my hand, about to bite me. I thought most phones have a setting to adjust the vibration ? My Galaxy Note 5 does, as well as my LG G5 did and OnePlus One.
I am running LeeDroid ROM and he has specific settings for power abd haptic feedback, but even down to 1 it's still pretty powerful, just too strong for my tastes. I like to feel a slight vibration, nothing much. Is that possible ?
Click to expand...
Click to collapse
There should be a file which you can edit to make haptic feedback alter, I've never looked into it mate.
Personally I switch feedback off. I don't need it.
Google: marshmallow haptic feedback how to change system
Also mate,, use the thanks button [emoji106] [emoji16]
When i tested the htc 10 i was shocked how the vibration intensity felt.. just like a cheap phone. Sometimes, I cannot understand htc.
DSF said:
When i tested the htc 10 i was shocked how the vibration intensity felt.. just like a cheap phone. Sometimes, I cannot understand htc.
Click to expand...
Click to collapse
Custom kernels + app allow that to be adjusted. I turned mine way down, and it feels a lot better now.
DSF said:
When i tested the htc 10 i was shocked how the vibration intensity felt.. just like a cheap phone. Sometimes, I cannot understand htc.
Click to expand...
Click to collapse
Please. This and haptic feedback has nothing to do with this thread.. If you'd like to speak about this, then please, take it elsewhere.
You can use init.d script to prevent brightness changing on every reboot, i.e
"#! /system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/max_brightness"
Create a file in /system/etc/init.d and paste the above lines (without quotes), and give 755 permission, itll set to 0 before boot Everytime
If on stock rom dont have init.d support then use superSu's su.d, place same file to /system/su.d folder
Sent from my Redmi Note 3 using Tapatalk
Adarsh1998 said:
You can use init.d script to prevent brightness changing on every reboot, i.e
"#! /system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/max_brightness"
Create a file in /system/etc/init.d and paste the above lines (without quotes), and give 755 permission, itll set to 0 before boot Everytime
If on stock rom dont have init.d support then use superSu's su.d, place same file to /system/su.d folder
Sent from my Redmi Note 3 using Tapatalk
Click to expand...
Click to collapse
Cheers mate, will give it a whirl
Was looking all over the web for this.
Thank you, great job.
dladz said:
Cheers mate, will give it a whirl
Click to expand...
Click to collapse
If you want, i can make automated flashable zip to disable and enable the hardware keys, just upload Cypress-cap-sensor.kl here
Sent from my Redmi Note 3 using Tapatalk
FIFATG said:
Was looking all over the web for this.
Thank you, great job.
Click to expand...
Click to collapse
You're welcome
Adarsh1998 said:
If you want, i can make automated flashable zip to disable and enable the hardware keys, just upload Cypress-cap-sensor.kl here
Sent from my Redmi Note 3 using Tapatalk
Click to expand...
Click to collapse
That'd be brilliant, thank you, appreciate that.
Primarily it's the lights coming back on, i tried to lock down the permissions but they're reset on each boot, it isn't the end of the world but it's annoying if you reboot a lot.
Made the init.d file, just seeing if it works.
Will upload once i'm in work.
EDIT: Nah didn't work mate.
Permissions in root explorer are 4 places and not 3.
so 755 comes out like 0755
dladz said:
Made the init.d file, just seeing if it works.
Will upload once i'm in work.
EDIT: Nah didn't work mate.
Permissions in root explorer are 4 places and not 3.
so 755 comes out like 0755
Click to expand...
Click to collapse
You might need to place it in su.d?
This is awesome, thanks!
Quick question regarding the init.d script - I'm currently on the stock rom, rooted with Supersu, but don't have a system/su.d directory. Should this already have existed? I can't create it either due to read only file system.
dladz said:
Made the init.d file, just seeing if it works.
Will upload once i'm in work.
EDIT: Nah didn't work mate.
Permissions in root explorer are 4 places and not 3.
so 755 comes out like 0755
Click to expand...
Click to collapse
@Adarsh1998 thanks for your tip, exactly what this mod needed.
Got it to work in system/etc/init.d, had to enable all permissions: read, write, & exec for all 3 user groups: owner root, group root, and global.... 0777.
It's survived 2 reboots now and the lights are staying off. I might try to scale back the permissions one by one... don't know if there is any danger to leaving all off those permissions enabled.
Thank you both for the info, this is something I wanted to do since I bought the phone (on other devices as well) because i'm used to the Samsung (also older HTC) setup. The no lights looks so slick and the button swap feels perfect. Thanks again!
Chronzy said:
@Adarsh1998 thanks for your tip, exactly what this mod needed.
Got it to work in system/etc/init.d, had to enable all permissions: read, write, & exec for all 3 user groups: owner root, group root, and global.... 0777.
It's survived 2 reboots now and the lights are staying off. I might try to scale back the permissions one by one... don't know if there is any danger to leaving all off those permissions enabled.
Thank you both for the info, this is something I wanted to do since I bought the phone (on other devices as well) because i'm used to the Samsung (also older HTC) setup. The no lights looks so slick and the button swap feels perfect. Thanks again!
Click to expand...
Click to collapse
Thank you.
Flashable zip on the way, thanks to @Adarsh1998 Good times
Adarsh1998 said:
You can use init.d script to prevent brightness changing on every reboot, i.e
"#! /system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/max_brightness"
Create a file in /system/etc/init.d and paste the above lines (without quotes), and give 755 permission, itll set to 0 before boot Everytime
If on stock rom dont have init.d support then use superSu's su.d, place same file to /system/su.d folder
Sent from my Redmi Note 3 using Tapatalk
Click to expand...
Click to collapse
This worked perfectly. Thanks!

Categories

Resources