Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[SCRIPT]Hardkey LED off & microSD read ahead cache.

OP fatchick1o9

4th May 2012, 02:10 AM   |  #1  
fatchick1o9's Avatar
OP Senior Member
Flag Your Mom's closet
Thanks Meter: 38
 
133 posts
Join Date:Joined: Jul 2011
I like a stripped down, fast, power efficient install of android on my LGOV, so I decided to post up two scripts that I use to achieve this. But 1st off I have to give credit where credit is due since I did not "invent / write" these bits of code. I just discovered them through other peoples work and adapted them to my situation / phone.

1st off is obijohn and his amazing Bumblebee v2.4 ROM which you can find here Bumblebee v2.4 ROM

2nd round of credits goes to mmraz for his "External Notification LED MOD" which can be found here External Notification LED MOD

3rd round of credits goes to just Googling and reading XDA threads about the LGOV which lead me to learn how to disable the bootup animation which shaved 20 seconds off of my boot time.

1) obijohn's Bumblebee ROM has a simple script in /system/etc/inid.d that modifies the SD read ahead cache from the stock 256KB to 1024KB in order to achieve greater Read performance. Well I ended up buying a 32GB Class 10 microSD card and found through testing (using SDtools and SD-Booster from the Google Play Market) that 1024KB was not the optimal setting for my new microSD card. I found that 3072KB was the sweet spot for my new microSD. But I didn't want to have an APP installed just to set the read ahead cache when I could set it via a script in /system/etc/init.d that would execute MUCH earlier than what the APP could set in the system. So I used obijohn's script and just modified his value of 1024KB up to 3072KB. The script will be attached to this post for you to put into your /system/etc/init.d. I'd suggest that you use the above mentioned APPS to determine the "sweet spot" for your read ahead cache then edit this script to reflect that change. Then uninstall those APPs so as to not waste space. this script is called 07sdspeedfix

2) mmraz's post dealt with adding a Notification LED for sms using SL4A, Tasker and 6 scripts to toggle on/off the capacitive LED's in the 4 hard keys on our phone. I didn't have any interest in a message LED, but I was interested in his scripts as they allowed me to use SL4A (and later Script Manager) to run his scripts to completely disable the LED's after boot in order to conserve power consumed by the 3 LED's that illuminate the 4 hard keys. This required me to use 3 scripts and SL4A or Script Manager and wait almost 150 seconds for the LED's to be turned off. After looking at his scripts, it occurred to me that I could strip down the scripts and put just 2 lines of code in 1 script in /system/etc/init.d to turn off the LED's within 5 seconds of the phone being turned on. And then I could uninstall SL4A & Tasker entirely so they were not consuming internal storage or running as background services. This script is called 10lights_out

if you want to use these scripts just download theme here and put them in /system/etc/init.d with and ensure permissions are set as rwxr-x---

3) This last item is just to disable the boot animation after the "LG" logo so as to shave ~15-20 seconds off of your boot time. There is not attachment for this. you just have to edit your /system/build.prop with the following line:

debug.sf.nobootanimation=1

With the two attached files you just have to "right click & Save As". Once you have saved the files just remove the .txt portion of the name and put them in the /system/etc/init.d folder. The XDA forums required a valid file extension name for me to upload them.
Attached Files
File Type: txt 07sdspeedfix.txt - [Click for QR Code] (74 Bytes, 215 views)
File Type: txt 10lights_out.txt - [Click for QR Code] (129 Bytes, 133 views)
Last edited by fatchick1o9; 4th May 2012 at 02:14 AM.
The Following User Says Thank You to fatchick1o9 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes