Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,736,064 Members 41,840 Now Online
XDA Developers Android and Mobile Development Forum

[FIX] Capacitive buttons NOT lighting up on AOKP with Auto-brightness off

Tip us?
 
litetaker
Old
(Last edited by litetaker; 22nd April 2012 at 03:36 AM.)
#1  
litetaker's Avatar
Senior Member - OP
Thanks Meter 584
Posts: 1,586
Join Date: Dec 2011
Location: Hyattsville, MD
Default [FIX] Capacitive buttons NOT lighting up on AOKP with Auto-brightness off

This is a dirty fix. I have an idea for a better fix but I am unable to implement it.

These are scripts to be run with Script Manager.

Code:
led_on script: 
#!/system/bin/sh
print 80 > /sys/class/leds/button-backlight-portrait/brightness
print 80 > /sys/class/leds/button-backlight-landscape/brightness

led_off script: 
#!/system/bin/sh
print 0 > /sys/class/leds/button-backlight-portrait/brightness
print 0 > /sys/class/leds/button-backlight-landscape/brightness
The value can be set from 0 to 255. I chose 80 as it is good enough and also due to a known issue, as explained below.

Obviously enable root browsing in SManager and run this as root. You can also run led_on at boot if needed. This is a fix when not using auto-brightness.

This will cause the capacitive buttons to ALWAYS be on, even when the screen is off. A simple idea is to check the status of the screen and then appropriately modify that file. But this means a service running in the background and is probably wasteful on resources. But if someone can help me out or have ideas, go ahead and do so. But once done, please lemme know as I am trying to learn.

Lemme know of other issues!

Cheers!
Attached Files
File Type: zip led_fix_v0.2.zip - [Click for QR Code] (376 Bytes, 36 views)
=== <<< @ >>> ===
__________________________________
Thank me, if my post helped you, made you smile, laugh, LOL or ROFL!!!
_______________



Droid X2: Ditched!, Droid Inc2: SOLD, Droid Incredible 4G LTE: CM11.2 KitKat 4.4.2, TFP: Unlocked and on Stock JB 4.1.1 -> heaven, NOT SOLD!, Samsung Galaxy Note 8, Stock 4.4.2, iPod Touch 4g: Stock iOS 6 (iOS 6 bad, my $0.02)
The Following User Says Thank You to litetaker For This Useful Post: [ Click to Expand ]
 
knipp21
Old
#2  
knipp21's Avatar
Senior Member
Thanks Meter 578
Posts: 3,792
Join Date: May 2010
Location: FT Riley BIG RED ONE
Quote:
Originally Posted by litetaker View Post
This is a dirty fix. I have an idea for a better fix but I am unable to implement it.

These are scripts to be run with Script Manager.

Code:
led_on script: 
#!/system/bin/sh
print 50 > /sys/class/leds/button-backlight-portrait/brightness

led_off script: 
#!/system/bin/sh
print 0 > /sys/class/leds/button-backlight-portrait/brightness
The value can be set from 0 to 255. I chose 50 as it is good enough and also due to a known issue, as explained below.

Obviously enable root browsing in SManager and run this as root. You can also run led_on at boot if needed. This is a fix when not using auto-brightness.

This will cause the capacitive buttons to ALWAYS be on, even when the screen is off. A simple idea is to check the status of the screen and then appropriately modify that file. But this means a service running in the background and is probably wasteful on resources. But if someone can help me out or have ideas, go ahead and do so. But once done, please lemme know as I am trying to learn.

Lemme know of other issues!

Cheers!
Awesome work. I'm not feeling so well tonight or I would look into it bro.

Sent from my Incredible 2 using xda premium
I'm No dev, no need to donate. Just a simple thanks

Follow me on Google Plus!

https://plus.google.com/115380001456117289879/posts
 
knipp21
Old
#3  
knipp21's Avatar
Senior Member
Thanks Meter 578
Posts: 3,792
Join Date: May 2010
Location: FT Riley BIG RED ONE
Quote:
Originally Posted by litetaker View Post
This is a dirty fix. I have an idea for a better fix but I am unable to implement it.

These are scripts to be run with Script Manager.

Code:
led_on script: 
#!/system/bin/sh
print 50 > /sys/class/leds/button-backlight-portrait/brightness

led_off script: 
#!/system/bin/sh
print 0 > /sys/class/leds/button-backlight-portrait/brightness
The value can be set from 0 to 255. I chose 50 as it is good enough and also due to a known issue, as explained below.

Obviously enable root browsing in SManager and run this as root. You can also run led_on at boot if needed. This is a fix when not using auto-brightness.

This will cause the capacitive buttons to ALWAYS be on, even when the screen is off. A simple idea is to check the status of the screen and then appropriately modify that file. But this means a service running in the background and is probably wasteful on resources. But if someone can help me out or have ideas, go ahead and do so. But once done, please lemme know as I am trying to learn.

Lemme know of other issues!

Cheers!
I see you have something for lights in portrait. Maybe also write it for landscape as the lights always go out in landscape.

Sent from my Incredible 2 using xda premium
I'm No dev, no need to donate. Just a simple thanks

Follow me on Google Plus!

https://plus.google.com/115380001456117289879/posts
 
litetaker
Old
#4  
litetaker's Avatar
Senior Member - OP
Thanks Meter 584
Posts: 1,586
Join Date: Dec 2011
Location: Hyattsville, MD
Quote:
Originally Posted by knipp21 View Post
I see you have something for lights in portrait. Maybe also write it for landscape as the lights always go out in landscape.

Sent from my Incredible 2 using xda premium
Did that. This fix is a very hackey one! I wish I could make a more clean one later...
=== <<< @ >>> ===
__________________________________
Thank me, if my post helped you, made you smile, laugh, LOL or ROFL!!!
_______________



Droid X2: Ditched!, Droid Inc2: SOLD, Droid Incredible 4G LTE: CM11.2 KitKat 4.4.2, TFP: Unlocked and on Stock JB 4.1.1 -> heaven, NOT SOLD!, Samsung Galaxy Note 8, Stock 4.4.2, iPod Touch 4g: Stock iOS 6 (iOS 6 bad, my $0.02)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes