Go Back   Android Forums > Android Phones > LG Spirit 4G > Spirit 4G (Metro PCS) - All Things Root

Like Tree9Likes
  • 2 Post By GameTheory
  • 3 Post By GameTheory
  • 1 Post By Bard
  • 1 Post By GameTheory
  • 1 Post By Android Addict
  • 1 Post By Wame26

test: Reply
 
LinkBack Thread Tools
Old December 22nd, 2013, 09:05 PM   #1 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default ** Init.D Scripts ** for Freedom Kernel

Init.D Scripts For Freedom Kernel

What is init.d support?

Init.D scripts only work with the latest versions of my Freedom Kernel in both Lite & Overclocked versions.

This thread will be for posting any init.d scripts and for troubleshooting them. There are many init.d scripts on the web. Just google these search terms, init.d tweaks or init.d scripts. You can tweak many aspects of the kernel and system with init.d scripts.

I wrote a script to get you started called 00cpu located in the new directory you will have after flashing the latest version of Freedom kernel (/system/etc/init.d). It will allow you to adjust the following...
  • Governor
  • CPU clock speed
  • Scheduler
  • Enable core 2 at all times
To enable an init.d script just place it in the init.d folder and reboot your phone. That's it!

You can edit the script on your phone with a text editor like the one in root explorer or on a PC (PC recommended). You can tweak this script how you like, kind of like your own profile.

Here's a look at the script I wrote that's in your init.d folder. The things that are in green can be edited to your liking. Make sure to read the directions within the script (do not skip directions)...





After any script change you make reboot to enable changes.

Note:
If your using a CPU app then it will override the init.d script. That is ok though, this allows you to use the CPU app along with the script if you choose.
Bard and sahi2myfriend like this.

Advertisements
__________________
Free Apps
GameTheory is offline  
Last edited by GameTheory; March 31st, 2014 at 04:10 PM.
Reply With Quote
The Following 8 Users Say Thank You to GameTheory For This Useful Post:
Android Addict (December 22nd, 2013), Bard (December 26th, 2013), cubone (December 23rd, 2013), dslaven (December 23rd, 2013), jasonzech (December 23rd, 2013), joselaz (December 22nd, 2013), Keithman2567 (December 22nd, 2013), sahi2myfriend (December 23rd, 2013)
sponsored links
Old December 22nd, 2013, 09:05 PM   #2 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default

Reserved
GameTheory is offline  
Reply With Quote
Old December 22nd, 2013, 10:35 PM   #3 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default

Here's just a few of the many things you can tweak and add with init.d scripts. I've seen all of these on the web...
  • add tethering
  • add apps to SD
  • strict minfree handler tweak
  • internet speed hack tweaks
  • kernel tweaks
  • vm management tweaks
  • battery tweaks
  • remove journalism
  • increases cache size and increase speed
  • SD card speed tweak
  • Defrags database files
  • Move dalvik-cache to cache partition
  • Disable normalize sleeper
It's as simple as placing the init.d script in the init.d folder and rebooting your phone to enable the script.
GameTheory is offline  
Reply With Quote
The Following 3 Users Say Thank You to GameTheory For This Useful Post:
Android Addict (December 23rd, 2013), jasonzech (December 23rd, 2013), sahi2myfriend (December 23rd, 2013)
Old December 26th, 2013, 11:31 AM   #4 (permalink)
ROM Developer
 
Bard's Avatar
 
Join Date: Oct 2011
Location: Fort Worth, TX
Gender: Male
Posts: 514
 
Device(s): LG Esteem, LG Motion, LG Spirit, Galaxy Mega, LG F6
Carrier: Metro PCS

Thanks: 87
Thanked 270 Times in 120 Posts
Default

Nice It really is 'freedom' kernel; so many tweaks and stuff we can do with this phone and the kernel

Thanks!!
GameTheory likes this.
__________________
My Blog and Donation Link
Bard is offline  
Reply With Quote
Old December 31st, 2013, 03:37 PM   #5 (permalink)
Disabled
 
Join Date: Jul 2013
Location: In a house
Gender: Male
Posts: 640
 
Device(s): One that I wish I didn't buy
Carrier: Whoever wants to carry me

Thanks: 151
Thanked 182 Times in 158 Posts
Default

Anybody know if I need to remove "done" from this? I feel like it is not supposed to be there but I am not sure

Code:
#!/system/bin/sh

LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
Edit: My download speeds dropped drastically after using this. This might work for others though.
Android Addict is offline  
Last edited by Android Addict; January 3rd, 2014 at 11:02 AM.
Reply With Quote
Old December 31st, 2013, 06:47 PM   #6 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default

Quote:
Originally Posted by Android Addict View Post
Anybody know if I need to remove "done" from this? I feel like it is not supposed to be there but I am not sure

Code:
#!/system/bin/sh

LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
The word "done" belongs there. That script was written a few years ago by an XDA dev and has been confirmed to work. Just check the values of those files to see if they change after you apply the script.
GameTheory is offline  
Reply With Quote
Old December 31st, 2013, 06:54 PM   #7 (permalink)
Disabled
 
Join Date: Jul 2013
Location: In a house
Gender: Male
Posts: 640
 
Device(s): One that I wish I didn't buy
Carrier: Whoever wants to carry me

Thanks: 151
Thanked 182 Times in 158 Posts
Default

Okay, thanks for your help GT. If they change then would it be bad? Sorry for dumb questions but I just want to be sure because I never mess with files like this
Android Addict is offline  
Reply With Quote
Old December 31st, 2013, 07:12 PM   #8 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default

The script forces the rotational value to go from 1 to 0 and read ahead from 128 to 2048. Your phone shouldn't end up bootlooped or anything like that. You'll just have to see if you feel a difference in performance. If you don't like the results, just delete script and reboot and all goes back to normal.

What I do when testing a new script... I make a flashable delete zip. This way if I get into a bootloop or brick, then I button combo into recovery and flash the zip to delete said script which would allow me to boot again. Sshhhh don't tell anyone my secret lol.
Android Addict likes this.
GameTheory is offline  
Reply With Quote
The Following User Says Thank You to GameTheory For This Useful Post:
Android Addict (December 31st, 2013)
Old December 31st, 2013, 07:19 PM   #9 (permalink)
Disabled
 
Join Date: Jul 2013
Location: In a house
Gender: Male
Posts: 640
 
Device(s): One that I wish I didn't buy
Carrier: Whoever wants to carry me

Thanks: 151
Thanked 182 Times in 158 Posts
Default

Now you're just showing off That is a smart trick, I honestly would have never thought of that. I usually end up just re-flashing the ROM if I am ever in a situation like that (I am a noob )
GameTheory likes this.
Android Addict is offline  
Reply With Quote
Old January 1st, 2014, 05:39 PM   #10 (permalink)
Junior Member
 
Join Date: May 2013
Posts: 71
 
Device(s):
Carrier: Not Provided

Thanks: 15
Thanked 4 Times in 4 Posts
Default

Hey GT, do you have a link to the script for app 2 sd that I could use. Thanks
Wame26 is offline  
Reply With Quote
sponsored links
Old January 1st, 2014, 09:34 PM   #11 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default

Internal SD to External SD Init.D Script

You must have the latest version of Freedom Kernel Overclocked or Lite.

Here it is. I've never used it, but seems pretty straight forward...

Make sure you read read read!!! Did I mention to read lol?

[SCRIPTS]CronMod-INT2EXT (updated 02/28) - xda-developers

Note:
You will need an EXT4 partition on your external SD. You need a ratio of 5 to 1, for example: If you have 1gb of internal SD space then you will need 5gb of external SD space in your EXT4 partition.

Here's a tutorial to help you partition your external SD... Link Here
GameTheory is offline  
Reply With Quote
The Following User Says Thank You to GameTheory For This Useful Post:
Wame26 (January 1st, 2014)
Old January 1st, 2014, 10:10 PM   #12 (permalink)
Junior Member
 
Join Date: May 2013
Posts: 71
 
Device(s):
Carrier: Not Provided

Thanks: 15
Thanked 4 Times in 4 Posts
Default

@GT, thanks.
GameTheory likes this.
Wame26 is offline  
Reply With Quote
Old January 20th, 2014, 12:05 AM   #13 (permalink)
Member
 
mario16's Avatar
 
Join Date: Sep 2011
Location: Dallas,Tx.
Gender: Male
Posts: 414
 
Device(s): Lg optimus m(cm7.2),Lg esteem(number2 1.6.1),Droid razor
Carrier: Metro PCS

Thanks: 39
Thanked 43 Times in 37 Posts
Default

I can't find the script
mario16 is online now  
Reply With Quote
Old January 20th, 2014, 12:40 AM   #14 (permalink)
ROM Developer
Thread Author (OP)
 
GameTheory's Avatar
 
Join Date: Jul 2012
Location: ???
Gender: Male
Posts: 2,797
 
Device(s): [Optimus F6 Xperion ROM] [Spirit 4G Samurai ROM] [Galaxy S3 4.3 Stock]
Carrier: Metro pcs $60 plan

Thanks: 414
Thanked 2,015 Times in 932 Posts
Default

Quote:
Originally Posted by mario16 View Post
I can't find the script
When you flash the latest version of Freedom kernel you will get a new directory to support the init.d feature in the kernel...

/system/etc/init.d

Any scripts you wish to use just place in there and set permissions to script to...

rwx
rwx
rwx
GameTheory is offline  
Reply With Quote
Old January 20th, 2014, 01:02 AM   #15 (permalink)
Member
 
mario16's Avatar
 
Join Date: Sep 2011
Location: Dallas,Tx.
Gender: Male
Posts: 414
 
Device(s): Lg optimus m(cm7.2),Lg esteem(number2 1.6.1),Droid razor
Carrier: Metro PCS

Thanks: 39
Thanked 43 Times in 37 Posts
Default

Your script
mario16 is online now  
Reply With Quote
Reply


Go Back   Android Forums > Android Phones > LG Spirit 4G > Spirit 4G (Metro PCS) - All Things Root
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:03 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.