tags:

views:

58

answers:

1

At the moment the LEDs that light up the keyboard of the G1 (HTC Dream) are very quick to turn off, I time it at six seconds. This is a pain when using the phone in the dark as you must press a button in order to turn the lights back on if you look away even for a very short time.

Since my G1 is rooted I have access to the system files and when using adb to open a shell (adb shell) to the USB connected phone I can set the brightness file to a positive value using

echo 1 > /sys/class/leds/keyboard-backlight/brightness

This keeps the keyboard on, until the screen is set to turn off (two minutes on my phone).

When I attempt the same using a Terminal Emulator or writing a simple app which should execute the same it does nothing despite both having root access. Why is this?

A: 

Even though your phone is rooted applications will still run by default under their own non-root user IDs.

You'll need to request root access for your app. In the Terminal this is done by entering the su command and an answer to this question shows you how to do it in your app.

Dave Webb
Thanks! I'm sure I tried something similar but this way works and my keyboard is now quite visible. I can now continue working on linking the backlights to the visibility of the screen.
aSemy