Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
walterddr
Old
(Last edited by walterddr; 8th January 2012 at 12:33 AM.)
#1  
Member - OP
Thanks Meter 8
Posts: 56
Join Date: Feb 2010
Default [MOD]Keyboard backlight toggle

I have tried to use some apps to turn off the backlight permanently but not work for my O3D.

So I tried an odd way to do it.
I tried to forced brightness value to 0 by using

Code:
echo 0 > /sys/class/leds/keyboard-backlight/brightness
chmod 444 /sys/class/leds/keyboard-backlight/brightness
Running this script should permanently kill off your keyboard LED. you can use

Code:
echo 1 > /sys/class/leds/keyboard-backlight/brightness
chmod 444 /sys/class/leds/keyboard-backlight/brightness
to turn on the LED or use:

Code:
chmod 664 /sys/class/leds/keyboard-backlight/brightness
to restore system automatic operation


I have written a simple apk file for u who dont have gscript.
the app just run the script above, you can always run the script on gscript or any terminal emulator you want (needs su)

Bug:
This runs perfect on my O3D now with Acurarom, but it sill have some problem with CM7-SF ROMs. Anybody knows what is the problem here?

For those who found the script useless, you might try to add two lines after turning on/off
Code:
chown 0 /sys/class/leds/keyboard-backlight/brightness
chgrp 0 /sys/class/leds/keyboard-backlight/brightness
and make sure add these two lines before the restore script
Code:
chown 1000 /sys/class/leds/keyboard-backlight/brightness
chgrp 1001 /sys/class/leds/keyboard-backlight/brightness
These two codes may prevent changing the led setting back to "rw" from some other apk with root access
Attached Files
File Type: apk Keyboard_Backlight_Toggle1.apk - [Click for QR Code] (15.3 KB, 444 views)
HTC Dream(Stolen)
Acer A1(Stolen)
Motorola MilestoneXT720(Stolen)
HTC HD2 on NAND Android(Stolen)
LG Thrill 4G(Guess what will happen?)
The Following 5 Users Say Thank You to walterddr For This Useful Post: [ Click to Expand ]
 
treasurmu
Old
#2  
Junior Member
Thanks Meter 4
Posts: 28
Join Date: Jun 2010
Lightbulb HElP

I have the same problem but the question is how cpmment scripts with which tool is my first time I do this kind of things. Sorry for my english
 
MarkAndroid
Old
#3  
Senior Member
Thanks Meter 6
Posts: 198
Join Date: Feb 2011
Excuse me, where I post these scripts in O3D?
 
walterddr
Old
#4  
Member - OP
Thanks Meter 8
Posts: 56
Join Date: Feb 2010
I have made an .apk file for anybody have trouble running the script
HTC Dream(Stolen)
Acer A1(Stolen)
Motorola MilestoneXT720(Stolen)
HTC HD2 on NAND Android(Stolen)
LG Thrill 4G(Guess what will happen?)
The Following User Says Thank You to walterddr For This Useful Post: [ Click to Expand ]
 
moxalis
Old
#5  
Member
Thanks Meter 3
Posts: 33
Join Date: Sep 2011
Thanks a lot for that apk. I've been looking for a way to turn the buttons backlight off n this works perfectly on 2.3.5. Thanks again!
 
MarkAndroid
Old
#6  
Senior Member
Thanks Meter 6
Posts: 198
Join Date: Feb 2011
Thanks for APK!
 
IFLPI
Old
#7  
Senior Member
Thanks Meter 21
Posts: 413
Join Date: Sep 2010
Is there any option to set the backlight on permanently only when the screen is on, and to dim it a bit?

Nice app btw.
My nick is 'FLP' in 'brackets' xD
 
crime_of_heart
Old
#8  
Senior Member
Thanks Meter 736
Posts: 308
Join Date: Jun 2009
Quote:
Originally Posted by IFLPI View Post
Is there any option to set the backlight on permanently only when the screen is on, and to dim it a bit?

Nice app btw.
+1 for that

Sent from my LG-P920 using xda premium


My NEW Galaxy NOTE N7000 TW JB Kernel: c.o.h.'s HelloWorld Kernel

Samsung Galaxy Note with my own ROM (XXLT4 240dpi Light with my HelloWorld Kernel!)

Google Nexus 7 with SmoothROM...

You can press that when u think i deserve more than a THANKS button : DONATION BUTTON
 
walterddr
Old
(Last edited by walterddr; 28th December 2011 at 06:28 PM.)
#9  
Member - OP
Thanks Meter 8
Posts: 56
Join Date: Feb 2010
Quote:
Originally Posted by IFLPI View Post
Is there any option to set the backlight on permanently only when the screen is on, and to dim it a bit?

Nice app btw.
I knew a way to do that but it won't be as easy as this one.
And for dimming the max backlight might require some mod in the boot.img which i am not familiar.
I will see what I can do

After all, this app only works with some devices on some ROMs. There's an app in the market that can do the job. If your devices made no response to those apps, you can try this method. (which is fairly unconventional)
HTC Dream(Stolen)
Acer A1(Stolen)
Motorola MilestoneXT720(Stolen)
HTC HD2 on NAND Android(Stolen)
LG Thrill 4G(Guess what will happen?)
 
314
Old
(Last edited by 314; 31st December 2011 at 04:37 AM.)
#10  
Senior Member
Thanks Meter 35
Posts: 166
Join Date: Sep 2011
Location: Sydney
would it be possible to make this script run at boot? (Such as init.d scripts), i've tried directly adding it to init.rc but it doesn't seem to work (System rewrites it the on boot, even without write permissions).


(Not with a script app such as Rom Toolbox/Script manager)

 
Post Reply+
Tags
keyboard led brightness
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Xposed Framework Module for the AT&T Galaxy S 4

Got yourself a brand new Galaxy S 4? Are you looking for some fun mods to make it truly your … more

Job Interview Prep: Phone Screen Part 1 – XDA Developer TV

XDA Developer TV Producer Jayce has been very busy creating videos to help … more

Auto Test Your Android Apps with Robotium

You’ve just finished coding your very first app, but before you release it to the wild, you … more

Open Source CPU Info App for Windows

So you’re playing with your shiny new Windows 8 tablet PC, when one of your like-minded geeky … more