Liberty Flashed, keyboard lights?

na8flush

New Member
Joined
Feb 28, 2011
Messages
9
Reaction score
0
So, I flashed my D2G to Liberty 1.5, and I'm loving it. The Get-r-done tool worked great, awesome to see some support for the global.

However, I've run into a few snags. Mainly, the sensors. Which I know is an issue, and has been talked to death, but the only problem I'm having with it is the keyboard backlight. I can do without bluetootk and all, I would just need to have the keyboard and soft keys light up. It's pretty damn impossible to use in the dark without em.

So, I flashed the sensors.zip, and now the keys work great again, but the phone reboots itself all the time. I know this is an known issue, I'm just wondering if there's simply a solution for just the backlight issue, or does Fission not have this problem, because I'd be willing to switch to that if so. Thanks.
 
So, answering my own question. There's a lot to read in these forums, and sometimes the 22 page thread answers a question you didn't think it would.

Guess the backlight can't be fixed till the sensor issue is, and get-r-done is working hard on that.

However, I found a temp solution for the soft keys not lighting up. This app will enable them manually, but not the keyboard.

https://market.android.com/details?id=com.deskangel.adjbrightness
 
Here is my work around for lights. From terminal or script run as root.

(To turn on)
echo 1 > /sys/class/leds/keyboard-backlight/brightness
echo 1 > /sys/class/leds/button-backlight/brightness

(To turn off)
echo 0 > /sys/class/leds/keyboard-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness

You can create a shortcut on your screen with an ap like "Gscript " and just toggle them on and off as needed. I still miss the sensors but at least I can see what I'm doing now.

from D2G duh..
 
Awesome, that worked perfectly. A toggle makes it not so bad at all, I may go back to liberty now since fission isn't so good after trying liberty.

You should message your fix to buryboi, the guy who's been trying to crack the sensor issue

Sent from my DROID2 GLOBAL using DroidForums App
 
I did a little more tweaking and got it so my lights come on for 15 +- seconds after keypress. This way I don't have to toggle the backlight anymore. You'll want to create a shell script on your sdcard or use an ap like "Gscript". Run this script once as root after boot. Change "sleep" value to keep the lights on longer. The script reads the keyboard press event "event4" and turns the lights on for 15 seconds.

Code:
while [ 1 ]
    do
        echo 0 > /sys/class/leds/keyboard-backlight/brightness
        cat /dev/input/event4|read -n 4
        echo "1" > /sys/class/leds/keyboard-backlight/brightness
    sleep 15
done
Not sure what toll this may take on the battery. But I doubt its much. Hope this helps. I look forward to seeing a final fix soon.

from D2G duh..
 
Last edited:
Hey baker, just wondering if we use that does the phone not reboot itself constantly and we can always have the keyboard lights without having to constantly toggle on/off? If so I will totally be going to liberty because I can live without all of the other sensors.
 
Yes. Just flash Liberty, flash Romer, flash sensor toggle ( to turn off sensors ). Then create a shell script and run it from terminal or Gscript as my post describes. You will need to run the script every time you reboot your phone. I'm sure there is a way to run it at startup but it would probably require you to remout your /system files and change things. So its safe to just run the script manually. I don't want to be the guy that tells you to mess up your phone :icon_eek:. If you are curious you can also create scripts for other input events useing this method.

Try soft keys.

Code:
while [ 1 ]
    do 
        echo 0 > /sys/class/leds/button-backlight/brightness
        cat /dev/input/event3|read -n 4
        echo 1 > /sys/class/leds/button-backlight/brightness
    sleep 15
done
Again this fixes just the keyboard and softkey lights on the phone. It does not fix your sensors. so toggle them off when you flash your Rom with GET-R-DONE tools. That way you don't reboot every time the phone gets tired.
 
Last edited:
I copied your script but get an error when I try and run it and it doesn't work. "While[1] not found" and "syntax error do unexpected".
 
Last edited:
Lunatics sory for the error change it to ( while [ 1 ] ) at the start of the script that should do it. I think it just needs a space between while and braces.

from D2G duh..
 
I still get the same 2 errors with a space, only the first one says "While [ not found".
 
I've fixed the errors in the script above
Try to copy/paste that again. "The first one for keyboard"
Then reboot before you run it.

from D2G duh..
 
Great job! I'll incorporate this into the Romer and set it to run on boot.

Awesome! if you do. use the fixed one it works better to have the light off command before the event check.
 
Last edited:
Hm, now the soft button lights are coming on but getting an error "read Illegal option -n" and the keyboard doesn't light up.
 
ok Lunatics stick with it I swear it works lol. here do this one.

Code:
while [ 1 ]
    do
        echo 0 > /sys/class/leds/keyboard-backlight/brightness
        cat /dev/input/event4|read -n 4
        echo "1" > /sys/class/leds/keyboard-backlight/brightness
    sleep 15
done

also are you running from a terminal or from Gscript ?
 
Back
Top