The Usual.......I'm not responsible for what you do to your phone, I test these MODs on my phone and they work. If yours ends up broken, bricked, softbricked, etc, it is all on you (although we have an A-Team around all the time to help you get it back up and running )
I found this MOD over at the LG Connect section:
http://androidforums.com/connect-4g...-mod-script-enable-disable-soft-key-leds.html
and wanted to try it out since anything that helps save some battery is made for me.
So, if you feel you should THANK me for sort of porting this over to the ESTEEM, do so, but please drop by his Thread and THANK him too (IMPORTANT)
I had to take his scripts apart and modify them a little since the rw permission for the max_brightness would reset upon reboot. This googled Post gave me a general idea on how to overcome this issue: [DROIDX][BETA] - Releases - RootzWiki - Page 161
This Guide will show you how to turn off and on your LED lights under the soft keys and other small MODs
RULE#1 MAKE A FULL BACK UP. NO EXCUSES!!!
1-Download SManager (and SMWidgets):
Install it and allow it in SU.
(you can use the script runner of your choice; this app gives you the ability to add widgets to the homescreen and better yet shortcuts.
2-Download the script(s):
And using a file manager of you choice (Root Explorer in my case) unzip/extract and move the script(s) inside system/etc/init.d folder.
3-SManager:
Open SManager and locate the script(s) (you might have to hit 'back' twice to get to the root of the phone, then go to system/etc/init.d folder) and click on each script; check the FAVORITE (star) and SU icons.
5-Widgets/Shortcuts:
Now go to your home screen and add the SManager Widgets for the script(s). If you downloaded SMWidgets you may add shortcuts to the homescreen instead of battery draining widgets
6-Enjoy more battery life!:thumb:
Perhaps some steps i took or codes i used are not necessarily needed but keep in mind I'm still learning.
Known issues:
-SManager may force close when running the script (rare)
-You may need to run a script more than one time (twice) for it to take effect since permissions may need to be set
-In order to bring the softkey lights back on after toggling on you may need to lock then unlock the phone. The toggle script may have fixed this with just a small delay between the execution of the script and the lights actually coming on but it does not work all the time.
Tips and Tricks:
-Download the Softkeys lights off script, unzip it, move it inside system/etc/init.d and using SManager click on the 'Boot' option so the softkey lights will go OFF on boot (it may take a few seconds after booting back on for it to take effect but it does work)
Downloads:
1- SOFTKEYSSWITCH
2- GREEN LED SWITCH* (DONE)
3- BLUE LED SWITCH* (DONE)
4- RED/CHARGING LED SWITCH* (DONE)
5- Softkeys lights off
6- RED LED
7- BLUE and GREEN LED
8- FLASHLIGHT SWITCH
*BLUE and GREEN switches will disable the BLUE and GREEN LEDs, this means that if you receive an SMS/MMS/EMAIL or any other notification that uses this LEDs they will not light up to alert you that you have received one. To test it just send a message to yourself, exit out of the messaging app and lock your phone (otherwise if you stay in the messaging app with the screen on the LED will not come on after you receive the message and this is an android thing not related to the script)
*This one will toggle the charging light ON and OFF. After toggling it ON, you may need to unplug and/or plug you phone back to the charger for it to come back on.
Screenshots
Learners' Corner:
This is what the toggle scripts' codes look like:
Code:#!/system/bin/sh
Code:[LEFT]if busybox [ -e /sys/class/leds/button-backlight/max_brightness ]; then[/LEFT] [LEFT]if busybox [ `cat /sys/class/leds/button-backlight/max_brightness` -eq 0 ] then [LEFT]busybox chmod 755 /sys/class/leds/button-backlight/max_brightness echo 15 > sys/class/leds/button-backlight/max_brightness echo " " echo " *****************" echo " * SOFTKEYS ON *" echo " * *" echo " * ENJOY *" echo " *****************" else busybox chmod 755 /sys/class/leds/button-backlight/max_brightness echo 0 > sys/class/leds/button-backlight/max_brightness echo " " echo " ******************" echo " * SOFTKEYS OFF *" echo " * *" echo " * ENJOY *" echo " ******************" fi fi[/LEFT] [/LEFT]
I will try to explain some of its sections because we all want to learn and not just flash and push stuff on and into our phones
-'if', 'then', and 'else' are conditions used in conditional scripts like the one above. A simple way to understand it is that 'if' somethings meets a criteria, 'then' do something, else, do something else.
-"if busybox [ -e /sys/class/leds/button-backlight/max_brightness ]; then
if busybox [ `cat /sys/class/leds/button-backlight/max_brightness` -eq 0 ]"
'-e' means 'exist',
'-eq' means 'equal to'
'cat' is like the value inside the file at the end of the PATH
so it translates to "if the file exists and the value inside the file is equal to 0 then do something
-"busybox chmod 755 /sys/class/leds/button-backlight/max_brightness"
this one just says to set the permissions of the file max_brightness to 755 so we can modify it
-"echo 15 > sys/class/leds/button-backlight/max_brightness"
'echo' will basically write '15' inside the last file/folder in the PATH; in this case is the 'max_brightness" file
So in words we can all understand:
If the file at the end of the PATH exists, then check the value inside of it and if it equals 0 then change it to 15 if not change it to 0 (or leave it the same in this case)
Thanks to the already thanked users over at their Threads, Special thanks to Mexjoker who was trying this MOD from the Connect Thread and provided info regarding the rw permission not sticking. Thanks to everyone that find my GUIDES useful.