[Xperia Arc Themes and Apps] jader13254:
Hi,

I made a little script, to run with Script Manager or in init.d.

#!/system/bin/sh
#Script written by jader13254
dev=/sys/devices/i2c-0/0-0040/leds
logFile=/data/backlight.log
log2=data/backlight2.log
if [ -f $logFile ]; then
rm $logFile
fi
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Script launched" >> $logFile
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Applying new values" >> $logFile
echo 1 > $dev/button-backlight/max_current
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Applied new values" >> $logFile
if [ -f $log2 ]; then
sh /system/etc/hw_config.sh
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Log2 exists! Means values were applied to hw_config.sh" >> $logFile
realvalue=`cat /sys/devices/i2c-0/0-0040/leds/button-backlight/max_current`
if [ "$realvalue" ] && [ "$realvalue" = "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): All done & Sucess!" >> $logFile
exit 0; fi;
if [ "$realvalue" ] && [ "$realvalue" != "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Error occured" >> $logFile
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Trying to fix Error" >> $logFile
echo "\n" >> /system/etc/hw_config.sh
echo "echo 1 > /sys/devices/i2c-0/0-0040/leds/button-backlight/max_current" >> /system/etc/hw_config.sh
sh /system/etc/hw_config.sh
if [ "$realvalue" ] && [ "$realvalue" = "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Values were just removed! All fine & Done." >> $logFile
exit 0; fi;
if [ "$realvalue" ] && [ "$realvalue" != "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Can't fix! Aborting" >> $logFile
exit 0; fi; fi; fi;
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Applying to hw_config.sh since it hasn't been done before" >> $logFile
echo "\n" >> /system/etc/hw_config.sh
echo "echo 1 > /sys/devices/i2c-0/0-0040/leds/button-backlight/max_current" >> /system/etc/hw_config.sh
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Applied to hw_config.sh" >> $logFile
echo " $( date +"%m-%d-%Y %H:%M:%S" ): hw_config patched" >> $log2
sh /system/etc/hw_config.sh
if [ "$realvalue" ] && [ "$realvalue" = "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): All done & Sucess!" >> $logFile
exit 0; fi;
if [ "$realvalue" ] && [ "$realvalue" != "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Error occured" >> $logFile
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Trying to fix Error" >> $logFile
echo "\n" >> /system/etc/hw_config.sh
echo "echo 1 > /sys/devices/i2c-0/0-0040/leds/button-backlight/max_current" >> /system/etc/hw_config.sh
sh /system/etc/hw_config.sh
if [ "$realvalue" ] && [ "$realvalue" = "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Values just weren't applied correctly! All fine & Done." >> $logFile
exit 0; fi;
if [ "$realvalue" ] && [ "$realvalue" != "1" ]; then
echo " $( date +"%m-%d-%Y %H:%M:%S" ): Can't fix! Aborting" >> $logFile
exit 0; fi; fi;

Make a new file in /system/etc/init.d, name it "03bl" and paste in the code. OR DOWNLOAD HERE and put to /system/etc/init.d.

Now reboot & see if Button Backlights are turned off. If not, download smanager and run the script on boot as root :victory:

what does this? it disables button backlight automagically, edites hw_config.sh to apply on boot again, after you runned once you can delete it ;)

cheers,

jader