massive props to:
mcp2009 (providing the gscripts)(original post)
coolbho3000 (figuring this all out)
everyone else (for being awesome)
From Market download
gscript
linpack
quadrant
visionary
setcpu (this is $1.99)(also by buying this you are supporting coolbho3000)
Note: If at any time you see a pop-up asking for super user permission click allow and remember
on your phone goto settings -> applications -> development
and then check ON USB debugging
run visionary(if you want, click the button once so it says "run on boot" and it's green. )
let visionary do its thing
It should run, screen flicker, run and then close automatically.
on your phone, start gscript and then close gscript using the back arrow.
download the 3 files:
http://dl.dropbox.com/u/36553/vision_oc.ko
http://filevo.com/8uyu7e66z3uw.html (cpoc.zip)
http://filevo.com/19eh5t055ezi.html (oc.zip)
unzip both cpoc.zip and oc.zip and copy them to the gscript folder on your sdcard.
copy vision_oc.ko to the root of your sdcard (not in any folder)
run linpack and run benchmark (write down MFLOPS #)
run quadrant and run a full benchmark. (write down score)
# optional run setcpu to see stock speed (should be 806MHz)
Run gscript -> press menu -> add script -> load file. select a file, make sure "Needs SU" is checked and then click save. do this for all four of the .sh scripts.
After adding the scripts, click the cpoc script. when it says autoclosing in ## seconds, go ahead and click close.
Then click oc. again click close when it says autoclosing. this OC script overclocks to 1GHz.
Close gscript and run linpack/quadrant/setcpu to see the different scores. write them down if you want.
start gscript again, run the noreboot script. close when autoclosing. then run the oshitttt script. which overclocks to 1.42GHz.
always use the noreboot script before changing oc or oshitttt script.
close gscript and run the benchmarks again and be blown away.
if you want to try different speeds, start gscript and long press oshitttt script -> click edit. the number at the end "=74" is the multiplier to change the clock speed. some users have tested and feel that 74 is the ideal number. others are getting away with 79, 80, etc. some can't go past 65.
rebooting the phone makes it go back to stock. to apply again just run visionary (if you haven't set it to run on boot), open gscript and run oc or oshitttt.
Hope it helps. And yes I called the G2 an HD2.
Cool here's a download link with all 4 scripts http://db.tt/CNxQ6C2 zipped figured that I didn't need two zips so I put all the scripts in one zip, it has oshittt.sh, oc.sh, noreboot.sh, and cpoc.sh
Sent from my T-Mobile G2
Thanks bro. I'm about to do it right now.
If I ever wanna disable this... how do I do so??
And do I have to do this everytime I reboot my phone?
Sent from my T-Mobile G2
mftek said:
Thanks bro. I'm about to do it right now.
If I ever wanna disable this... how do I do so??
And do I have to do this everytime I reboot my phone?
Sent from my T-Mobile G2
Click to expand...
Click to collapse
nice.
reboot.
yes. but i think there is way to add it to the visionary.sh to start on boot. sadly that will have to be another tutorial. (read i dont know how) =)
mftek said:
Thanks bro. I'm about to do it right now.
If I ever wanna disable this... how do I do so??
And do I have to do this everytime I reboot my phone?
Sent from my T-Mobile G2
Click to expand...
Click to collapse
I use a script to go back to default
Code:
rmmod vision_oc.ko
insmod /data/local/vision_oc.ko pll2_l_val=42
I can't seem to push past 73 so my max stable is at 72. 1382MHz.
My scripts are for 1GHz Overclock, Upgrade to 1.2Ghz, Upgrade to 1.3GHz(1305Mhz), Upgrade to 1.38GHz MAX, and Reset to 800MHz(see code above).
You have to run VISIONary everytime you reboot(or set it to run at boot) and then run the script to overclock.
Not to try and thread crap here, but is there a compelling reason to overclock? Especially that far?
I'm curious to know what software you might be running that is benefiting from that besides a benchmark app. I'm sure you'll get an obscene Quandrant score with that (any 2500's yet?).
I've been thinking about getting setCPU, but to underclock, ha ha.
ChazzMichaelMichaels said:
Not to try and thread crap here, but is there a compelling reason to overclock? Especially that far?
Click to expand...
Click to collapse
Lol you ask why? we ask why not?
I got a 2600 =) http://twitpic.com/2zbv1y
Sent from my T-Mobile G2 using XDA App
RuncaProfundus said:
Lol you ask why? we ask why not?
Click to expand...
Click to collapse
Ha ha ha, how insightful.
Didn't know if there was some app I wasn't aware of that needed that kind of horsepower to run. I can understand the "Why? Because we can!" side to it
ChazzMichaelMichaels said:
Ha ha ha, how insightful.
Didn't know if there was some app I wasn't aware of that needed that kind of horsepower to run. I can understand the "Why? Because we can!" side to it
Click to expand...
Click to collapse
emulators benefit from increased cpu speeds.
Phone is slow to wake up after overclocking . Sometimes I have to press power button 3 times.
Sent from my T-Mobile G2 using telepathy and unicorn dust!
sinistersai4d4d said:
Phone is slow to wake up after overclocking . Sometimes I have to press power button 3 times.
Sent from my T-Mobile G2 using telepathy and unicorn dust!
Click to expand...
Click to collapse
Don't set it so high. Mine did same when set to 1.42ghz, also make sure you're using setcpu.
Look at his setting at the end of the video. http://forum.xda-developers.com/showthread.php?t=813681
An Alternative Super Noob Guide to Streamlined Overclocking and ADB =)
Personally, this is what I did, and I think it may be a good guide for some people here. Why is this nice? Because it streamlines the way the overclock works using VISIONary. I'm new to Android but I've been learning pretty fast, and I want to give back to the community that has helped me come along.
1. Obtain Root through VISIONary
The first thing you need to do is gain root on your phone. To do this, download and install VISIONary from Android Market. The first time you run it, make sure to allow it to run-on-boot from now on. Run it, and you'll have root. Easy as pie.
2. ADB Push to /data/local
Next, you'll need to adb push the vision_oc.ko file to the /data/local folder using my desktop computer. How do you adb push? Cyanogen Wiki has a good guide on how to get this going on your computer. A caveat with the G2 is you may run into driver issues. If this happens, download PdaNet onto your computer, and it will install all the drivers you need for adb. There is also another solution to the driver issues that was solved on this thread. I believe everyone should learn to use adb at some point or another, since it is an invaluable tool and opens up a world of possibilities, which is why I advocate it as the route of choice in this method.
Once you have adb installed, go download the vision_oc.ko file in the original thread. Make sure you put it into the folder on your computer that your command prompt is directed to at the time (most likely your Document and Settings folder). Enable USB debugging on your phone, connect it to your computer, open the command prompt and type:
Code:
adb push vision_oc.ko /data/local
This should copy the file to your /data/local folder on your phone. One more file you should adb push to the /data/local folder is a file you will name visionary.sh. Open up Notepad, and put in there:
Code:
su
insmod /data/local/vision_oc.ko
Make sure you name it visionary.sh, and push it the same way you did the other file using the following code in the command prompt:
Code:
adb push visionary.sh /data/local
There is a lot more to do with adb, so I encourage you to learn it, but for now, we are done with it!
3. Set Scripts up in GScript Lite
Download and install GScript Lite from the Android Market. I then set up 5 scripts to control the overclock:
1. 1017.6 MHz Default
rmmod vision_oc.ko
insmod /data/local/vision_oc.ko
2. 806.4 MHz Factory Setting
rmmod vision_oc.ko
insmod /data/local/vision_oc.ko pll2_l_val=42
3. 1209.6 MHz Overclock
rmmod vision_oc.ko
insmod /data/local/vision_oc.ko pll2_l_val=63
4. 1305.6 MHz Overclock
rmmod vision_oc.ko
insmod /data/local/vision_oc.ko pll2_l_val=68
5. 1401.6 MHz Overclock
rmmod vision_oc.ko
insmod /data/local/vision_oc.ko pll2_l_val=73
Basically with these scripts, I can control everything. You can always change the values to make it more suitable to your phone, but I think these values give you a nice range.
4. SetCPU
I highly recommend you buy SetCPU from the Android Market. It will help you have complete control over your overclock. So go do it!
At this point, you are done! I suggest you reboot the phone so you can see all of this in action! So for example, when I reboot my phone, and everything gets wiped, VISIONary runs, my phone gets rooted, and the visionary.sh script runs automatically to give me the 1017.6 MHz Default script to start the overclock, meaning, you are overclocked already at 1017.6 MHz at boot! The reason I used the default 1017.6 MHz in my visionary.sh script, is because it is definitely stable enough for every G2 to handle, so people won't be locking themselves out because of setting an overclock too high at boot. From there, I can just simply click any other overclock script in GScript to change the CPU to my desired speed at the time.
Hopefully this helps some people out!
Wow! At 1.4 GHz the home screens are much smoother! And with Launcher Pro its slicker than butter!
Awesome!!!!
Curious about everyone's stability at 1.42Ghz, seems that I'll lock up after a few runs of Linpack when on the web. 50.5 MFlops is hot though.
Tmender said:
Curious about everyone's stability at 1.42Ghz, seems that I'll lock up after a few runs of Linpack when on the web. 50.5 MFlops is hot though.
Click to expand...
Click to collapse
Every phone is different. Not everyone is gonna be stable at 1.42 GHz. Some people may be much lower. Some might even be higher.
Understand that concept, I've been overclocking my PC's for years. Some hardware's just better at it than others. Quadrant did seem very stable, best I could do was 2395 before downclocking to 1Ghz. I have to admit, the phone's already stupid fast already, even before the overclocking.
awesome post! thanks for the help!
Related
Just sharing some info for noobs.
So you set your CPU to 1.22 Ghz and checked 'set at boot'. You enjoy your 10% speed increase until suddently you get a random reboot. You know it is because you set the CPU too high (for your phone, every phone is differnet) so you wait for it to reboot so you set it back but then BAM! another reboot. Now Sh!t hits the fan because of the 'set at boot' flag has been checked. You didn't do a nandroid backup recently or you don't have any set up. What to do??
I found this on android developers forum and thought I should share this in an OP because it's very valuable for us overclockers.
Basically, to remedy this, you need to delete the SetCPU config file from the internal memory. To do, follow this:
1) Boot into recovery
2) Connect USB
3) open ADB shell - 'adb shell'
4) mount the Data folder - 'mount /data'
5) navigate to the Data folder - 'cd /data/data'
6) Remove the config file - 'rm -r com.mhuang.overclocking'
7) exit and reboot phone
Now you should be all set. SetCPU is now in its default form.
havn't needed this yet but very useful for everyone who does need it
good job
Nice find bro, wish I would have none this a few weeks ago
Awesome. Thank you
Or, if easier, you can just pull the SD card, and put a text file named 'setcpu_safemode' in the root of the card, then reinsert and boot. The dev added that feature a while back.
Thanks man, first day owning my droid inc, and I'm a little too used to cranking my old moto droid up all the way without consequence. I don't even need the little scosh of a speed boost I'm just always effing with things. Oh well lesson learned, no harm no foul.
Shushunmire said:
Or, if easier, you can just pull the SD card, and put a text file named 'setcpu_safemode' in the root of the card, then reinsert and boot. The dev added that feature a while back.
Click to expand...
Click to collapse
Thanks this worked perfectly!
i Found an app i hate setcpu piece of garbage spent an hour fixing my phone found this and it worked
wyllem said:
i Found an app i hate setcpu piece of garbage spent an hour fixing my phone found this and it worked
Click to expand...
Click to collapse
Don't blame SetCPU for the fact that you didn't know what you were doing. That's not the app's fault, it's yours.
(from... Evo/MIUI/Tapatalk)
Ok, played with setcpu today, for the first time, and after awhile set the orevclock to max and now the phone reboots everytime I try to open anything. I found this thread and put the .txt file on my sd's root, but it didnt help. I am using amon_ra and cant figure out how to try the other method with it. Can someone please help me out.
Update, I made another .txt file and this one seemed to work, but I now see there is a flashable .zip you can extract in setcpu itself.
Err...there's a failsafe built into setcpu. It places a file on your sd to flash in the event of a bootloop.
Simply look in the setcpu settings for it.
You could also mount SD card from recovery and do it that way
Deck's + SZ + SuperCharger script + ViperMod script.
Greater IO performance and reduce disk consumption,From:
http://forum.xda-developers.com/showthread.php?t=903507
Thanks ownhere...
Please backup original file(/system/lib/libsqlite.so)
ownhere said:
I think you are wrong.
With Android applications, the database operation is non-persistent, normal step in app is:
1.open db
2.do read/write
3.close db
with step3, the data in cache will be flush to disk. so user will not notice any sudden lag, always smooth.
With SYNC-ON, the db operation like this:
1.open db
2.1. write a record/do a transcation
2.2. fsync()
2.3. write a record/do a transcation
2.4. fsync()
.....
3.close db/fsync()
with SYNC-OFF, operation like this:
1.open db
2.1 write a record/do a transcation
2.2 write a record/do a transcation
....
3. close db/fsync()
So, no-sync can significantly save IO time.
Click to expand...
Click to collapse
libsqlite.so compiled for harmony froyo 2.2:
I have a quadrant I/O score of 2184 using this lib.
what was your score before the tweak?
I would like to say i know, but i don't. I can say that i'm using TNT lite latest version.
Whats your total quadrant?
EDIT: I went from 1998 to 2314 on the Adam ROM... Nice bump and I can definitely see a difference...
rfisher1968 said:
I have a quadrant I/O score of 2184 using this lib.
Click to expand...
Click to collapse
My Quadrant score went from 2120 to 2450.
IO step 4 used to take about 20 seconds, now it's less than 1 second. Step 1 file write seems slower than before.
Went from 2110 to 2580! Awesome lol! tent lite 4.2.2
Sent from my GTablet-TnT-Lite using Tapatalk
Do I adb push this or can I install via cwm?
barakisbrown said:
Do I adb push this or can I install via cwm?
Click to expand...
Click to collapse
Code:
adb remount
adb shell mv /system/lib/libsqlite.so /system/lib/libsqlite.so.bak
adb push libsqlite.so /system/lib/
adb reboot
Total Quandrant Score of 2546(peek of 2700) and Quandrant I/O score of 2181.
Will this work on CM7?
just installed... IO went from 1018 to 2466.
Very nice!
Quadrant Advanced result:
overall
before 2079, after 2314
I/O only
before 208, after 520
gADAM 1.0.0 on gtab.
Can we have this as an update.zip? I tend to re-flash my device and using ADB each time is a pain.
gksmith said:
Can we have this as an update.zip? I tend to re-flash my device and using ADB each time is a pain.
Click to expand...
Click to collapse
I did it using Dolphin browser, Rootexplorer, Unrar. I downloaded the file to /sdcard/download directory using Dolphin Browser. Using Unrar got the lib file. I renamed the original file with .old at the end with Rootexplorer. Then copied the file to the /system/lib/ directory using Rootexplorer. Then changed the permissions to match the original with Rootexplorer. Then i rebooted, it took about 5 minutes.
gksmith said:
Can we have this as an update.zip? I tend to re-flash my device and using ADB each time is a pain.
Click to expand...
Click to collapse
If you reflash your device all the time, then take the libsqlite.so and insert it into the update zip that you intend to flash. On my g2, I made a script that unzips the latest cm7 nightly, removes a couple files, throws in my intended keychars and keylayouts, modifies the build.prop lcd.density to my liking and rezips it up, ready to flash. I just did this libsqlite.so using term emu and unrar.
cd /system/lib
pwd
mv libsqlite.so libsqlite.so.bak
cp /sdcard/unrar/libsqlite.so ./
busybox ls -l libsqlite.*
busybox chown root:root libsqlite.so
busybox chmod 644 libsqlite.so
echo "Profit"
Nice! My quad scores are back over 2600 again. I noticed my apps are launching faster especially dolphin HD.
Can this be used with any ROM, including Vegantab?
Sent from my G-Tab ( running VeganTab 5.1) using Tapatalk
smalis said:
Can this be used with any ROM, including Vegantab?
Sent from my G-Tab ( running VeganTab 5.1) using Tapatalk
Click to expand...
Click to collapse
Confirmed. Works fine with Vegan V1 Beta5.1
I used root explorer to rename, move and change permissions.
I am getting a bit of an increase in quadrant scores I think, was getting 2800-3038 or so now I am getting 2800-3191 top score so far.
Getting 36.44 or so in Linpack.
39-42 FPS in nenamark1.
I am using the vegan Rom with the recently released supplement 5.1.1
At some point I think I have done some other tweaks because my quadrant score seems a bit higher then some, but don't ask me what I did, lol.
This is a tweak of this thread to work with the nexus. I claim no credit what so ever. All the work was done by Smokin1337, Rmk40, Juwe11, Sybregunne, and -viperboy-, I just tweaked it a bit to work with the nexus.
I am using this at the moment with the latest MIUI.us rom (1.8.26) and it is working for me. I am unsure about other roms but I imagine that it will work with CM because it supports init.d.
Install this from recovery and make sure to make a backup before because I guarantee nothing. Make sure to remove any overclocking apps otherwise the daemon wont work. A lowmemorykiller app such as autokiller will change the values set by the RAM script therefore you might want to remove that too.
More info on the overclock daemon here. http://forum.xda-developers.com/showpost.php?p=14529333&postcount=5
More info on the RAM optimization. http://forum.xda-developers.com/showpost.php?p=14446249&postcount=1
A nice graphical tool that allows users to change Virtuous_OC frequencies and governors. http://forum.xda-developers.com/showpost.php?p=16726715&postcount=2
edit:
updated zips because i messed up the update-script on the original ones.
flashed zip and installed apk but cant get the gui to work the apply button doesnt allow it to apply, 1.8.26 miui
which gui version are you using? I used 2.11 and it works for me.
2.11 hangs on the loading screen for me...i get further with 1.21 but not by much
probably hanging because the install didnt work. Using adb shell, terminal emulator, or root explorer verify that the virtuous_oc folder got installed to /system/etc and has the 6 adjustable files inside of it. I will do a clean wipe on my phone and give it a try again with the files from the OP.
OK so I messed up on the update-script, I am still new to this. The OP will have the updated zips.
to tell if its working go to adb shell or a terminal emulator and type
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
it should change when you wake and sleep the phone
edit:
lol just thought about this. Will be kinda hard to check to see if it is working from a terminal emulator.
Working now thanks
Sent from my Nexus One using XDA App
FIRST: Supercurio makes a really awesome app, so I highly recommend purchasing the pro version to support further development for two reasons. First, it's the right thing to do and second, I haven't figured out how to make all of the VooDoo sound settings work yet, and I'm a busy college student in my senior year attempting to convince someone to pay me, so I don't have much time on my hands (thus my erratic shower schedule).
That being said, I have attached a script that I run on boot. That being said, I'm running AOSP's oiCSv43 ROM with Eugene's Speedy 2 kernel. So long as your kernel supports the following options (which will be listed below), you shouldn't have a problem with this script. I've also verified that it works just peachy with GLaDOS 2.5 for ICS-- another very good ICS kernel [I head 2.6 is quite nice]. (This should also work for GB roms if anyone cares to test for me)
You must have
root
superuser
busybox, or an alternate way to mount /system as writable (there are 2 other methods AFAIK)
ROM that supports init.d scripts OR scripter or some other app like it (in this case, you can just add the script to scripter and set it to run on boot)
If you don't (know if you) have init.d support, check out this post by damnmisur about scripting with ROM Toolbox
This script changes the following:
cpu governor -> interactive
max freq->1000mhz
min freq->150mhz
touchwake enabled with 10 second delay
back light dimmer settings are commented out, so it uses whatever is default for you kernel
bln enabled with blink disabled
blx commented out (reverts to kernel default which is likely 96%)
voodoo_color/red_multiplier->2724764160
voodoo_color/green_multiplier->3059586880
voodoo_color/blue_multiplier->2944130880
voodoo_color/red_v1_offset->-26
voodoo_color/green_v1_offset->-30
voodoo_color/blue_v1_offset->-33
voodoo sound anti-jitter, hi-fi play, hi-fi record, dac direct, voodoo sound control enabled
headphone_amplifier_level->+3db
voodoo sound mono downmix disabled
USE AT YOUR OWN RISK! I AM NOT LIABLE IF ANYTHING GOES WRONG!!!
NANDROID NANDROID NANDROID.
ALWAYS MAKE A BACKUP
NANDROID
The script is in the zip. To install:
Unzip archive into same directory as adb (or wherever you want if you know what you're doing)
open a terminal
Code:
adb remount
adb shell
su
busybox mount -o remount,rw /system
exit
adb push 99whirlpool-Speedy_2 /system/etc/init.d/99whirlpool-Speedy_2
adb shell
chmod 755 /system/etc/init.d/99whirlpool-Speedy_2 && reboot
The file has no extension! If you want to edit it, open it in a text editor. If you don't know what you're doing, don't play with it. To disable boolean values, change the 1 (1 means true i.e. on) to a 0 (which means false, i.e. off).
frequency values are in hertz
you can find out what scaling governors and frequencies your kernel supports by typing
Code:
adb shell
su
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
Feel free to edit anything you'd like!
DO NOT FLASH THE .ZIP FILE! Extract and follow the directions above
thanks....
Nice but some of your changes are the exact opposite of what I use. So I'll just change voodoo settings because I'll be a lot less to change with every boot than if I was to use this.
I do of course use easy settings. Color multipliyer: all the way right.
Gama: all the way left.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
Thank you.
Don't voodoo settings stick by default? It seems my voodoo settings stick just fine without using any script?
Si_NZ said:
Don't voodoo settings stick by default? It seems my voodoo settings stick just fine without using any script?
Click to expand...
Click to collapse
They do with the PRO version, not the free one. I've also never had a problem with them NOT sticking on Pete Alfonso's GPA19, or any GB ROM for that matter, but many ICS users, including myself, have not been able to get our settings to stick recently.
This also means that I don't have to use NSTools or VooDoo Control.
Translation:
no apps changing settings on boot->
fewer individual SU requests (count the number of toast notifications, or check the request list in the superuser app for NSTools and VooDoo control on boot)->
faster boot sequence, and less lag on boot.
Not everyone may have this problem, but I and others do.
I'm visiting for a lesson, had read this before on aosp's or Eugene's kernel threads, but didn't get it so, wanted to ask and thank you for this help.
I'm trying to make voodoo stick, I downloaded your zip, opened and changed a couple of things in Wordpad, it asked to save and rezip, said yes. I used different multipliers and want bln to blink, so changed those numbers and the blink 0 to 1 (or vice versa, followed your directions).
So to do this, do I just flash zip in recovery? Any wipe or just flash away??
Like you said, I will backup, but really don't want to make a mess and thought I would double check first.
nmoreman said:
I'm visiting for a lesson, had read this before on aosp's or Eugene's kernel threads, but didn't get it so, wanted to ask and thank you for this help.
I'm trying to make voodoo stick, I downloaded your zip, opened and changed a couple of things in Wordpad, it asked to save and rezip, said yes. I used different multipliers and want bln to blink, so changed those numbers and the blink 0 to 1 (or vice versa, followed your directions).
So to do this, do I just flash zip in recovery? Any wipe or just flash away??
Like you said, I will backup, but really don't want to make a mess and thought I would double check first.
Click to expand...
Click to collapse
Don't flash the zip. It's just there so that I could upload the attachment properly.
The script is in the zip. To install:
Unzip archive into same directory as adb (or wherever you want if you know what you're doing)
open a terminal
Code:
adb remount
adb shell
su
busybox mount -o remount,rw /system
exit
adb push 99whirlpool-Speedy_2 /system/etc/init.d/99whirlpool-Speedy_2
adb shell
chmod 755 /system/etc/init.d/99whirlpool-Speedy_2 && reboot
I'll add a readme to the zip to make it more obvious.
Shark_On_Land said:
Nice but some of your changes are the exact opposite of what I use. So I'll just change voodoo settings because I'll be a lot less to change with every boot than if I was to use this.
I do of course use easy settings. Color multipliyer: all the way right.
Gama: all the way left.
Sent from my Nexus S 4G using XDA App. Developer of brickROM, and OP of XDA Thread of The Year 2011.
Click to expand...
Click to collapse
If your just worried about voodoo settings you could do the following :
http://forum.xda-developers.com/showthread.php?t=1366780 or just use the script from this method. Of course you have to edit numbers to your preference.
Sent from my Skanky Nexus S in the Matr1x using XDA App
damnmisur said:
If your just worried about voodoo settings you could do the following :
http://forum.xda-developers.com/showthread.php?t=1366780 or just use the script from this method. Of course you have to edit numbers to your preference.
Sent from my Skanky Nexus S in the Matr1x using XDA App
Click to expand...
Click to collapse
Thanks, I'm going to add this post to the OP as an alternative for those without init.d support
Feature list
- sets hostname to LG-G4 something that was missing at first from lineage/aosp 7.1.1 (maybe i will remove that)
- Better mount point flags
- Internal storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- external storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
cfq scheduler tweaks
remove add_random (if its enabled in the kernel by default)
rq_affinity
- Net and virtual memory:
tcp_congestion_control
disable_ipv6
dirty_writeback_centisecs
dirty_expire_centisecs
dirty_background_ratio
dirty_ratio
drop_caches
kernel.panic
min_free_kbytes
overcommit_ratio
panic_on_oom
swappiness 0 #llama doesn't have zram feature, it's useless on Lg G4
vfs_cache_pressure
- CPU customisations ~depends on your choice of script~
balanced ~doesn't make any cpu changes~
less ~for less battery drain, cpu rests more~
more-less ~for a lot less battery drain, but with a big lag (will soon try fix stability and smoothness)~
performance ~for full cpu power, but rest when the screen is off~
- Kernel customisations
msm_thermal ~off on battery save / on and set a safe temp. for performance~
lowmemorykiller
read_wakeup_threshold
write_wakeup_threshold
hotplug customisation
- Only the safe internet customisations
tcp_timestamps
tcp_tw_reuse
tcp_sack
tcp_tw_recycle
tcp_window_scaling
tcp_keepalive_probes
tcp_keepalive_intvl
tcp_fin_timeout
For stock based roms follow the guide in post #2
How to "install" it ? Simple
1.unzip
2.place it in /system/etc/init.d
Code:
adb root
adb remount
adb push <your tweak> system/etc/init.d/
3.change its permissions to 755
4.lastly change owner:group to root:shell
Code:
adb shell
su
mount -o remount rw /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
If you don't have a pc, type in a terminal inside your g4
Code:
su
mount -o rw remount /system
chmod 755 /system/etc/init.d/<your tweak>
chown root:shell /system/etc/init.d/<your tweak>
Those of you that use the new systemless root method of chainfire you can put the script in /system/su.d or in /su/su.d with permissions 700 (same permissions at folder and script) and set owner:group to root:root
Those of you that use the new magisk root method you can put the script in /magisk/.core/service.d/ with the same permissions and ownership as in init.d
Those coming using search bar and don't have this phone and this kernel, don't try it, unless you know what to edit to "fit" your own kernel.
These tweaks aren't just for faster easy setting up our phone, they are more useful for those that don't want to have root access ON, for various personal reasons. They can apply those settings on boot and setup their phone without the need of root and an app asking for root.
Easy removal: delete the script and reboot. And never use more than one of these scripts inside init.d
Careful, some stock based roms have preinstalled some scripts inside init.d by default.
Those must be removed after flashing Llama Sweet Kernel. They are not compatible and they cause instability !
BIG Thanks to this genius
@genesixxbf3
for his kernel to our lg g4.
XDA:DevDB Information
[Tweaks][MM/N][H815][H811]Kernel Tweaks[CM/STOCK/AOSP], Tool/Utility for the LG G4
Contributors
kessaras, genesixxbf3
Version Information
Status: Stable
Created 2016-12-09
Last Updated 2017-04-25
Reserved
This is a guide for ALL stock based roms and all kernels.
My script will only add tweaks that apply to all kernels.
For those that are rooted with SuperSu, they must first fully remove it.
Nub guide to change SuperSu for Magisk root:
Step 1.
SuperSu must be removed.
Go into supersu -> settings -> fully remove root access.
###Or download and flash in recovery mode the UnSu script from osm0sis thread.###
Step 2.
Use hardware key combination to boot to TWRP.
###If you used the UnSu script, no need to reboot to recovery, skip step 2 and go to next one.###
Step 3.
Flash latest magisk flashable zip for users that are not rooted yet.
It sais: "If you're not rooted, or something went wrong and you need a clean start"
Download that .zip file and flash it.
Now you are rooted again. Reboot to your rom.
Step 4.
Download Magisk Manager from play store. In that app you can even enable systemless root to hide root from the apps, or do many things that you like.
Questions further go to magisk thread not here. And don't forget to re-enable usb debugging. After you removed root, that was toggled, ###Unless you used the UnSu script again. That means that before reboot you were already rooted.###
Now it's time to install your script.
Download the compressed tweak from this post , uncompress it and follow the next guide.
The steps are the same with the lineage based roms and it works for ALL lineage based roms too
If you use a root file manager then you can skip the guide and just cut - paste the script in /magisk/.core/service.d/
set permissions to 755, ownership to root:shell and reboot.
INSTALLATIONStep 1.
place it in /magisk/.core/service.d/
Code:
adb push /<path to the script>/90balanced /sdcard/
adb shell
su
mv /sdcard/90balanced /magisk/.core/service.d/
Step 2.change its permissions to 755 if it's not already set to 755 by default
Code:
chmod 755 /magisk/.core/service.d/90balanced
If you don't have a pc, type the same commands in g4 terminal but of course without the adb command. Script is supposed to be in path /sdcard/
not in /sdcard/download/ or whatever path. Otherwise edit the command "mv ..." to match the script path.
That's it. Reboot to apply your tweaks.
~I will add Llama Sweet kernel tweaks for stock based ROMS when Genesixxbf3 fixes the bluetooth issue.
Until then all use this one that applies to all kernels including Llama.
Special thanks to:
@topjohnwu for developing Magisk
and to
@osm0sis for his UnSU script
My scripts are not meant for use with kernel adiutor.
Changelog
31/01/2017
- fixed stability for "90less"
- changed to "westwood" tcp congestion control
01/02/2017
- changed to Fiops scheduler only for the 90less and 90more-less
- fixed stability for 90more-less
12/02/2017
- when screen is on, 3 cores always online not 1.
- fixed stability for 90less , 90more-less
- 90balance, interactive governor stable and at the same time conserving some battery
- big cores governor is same with small cores
15/02/2017 and 20/02/2017
- changed back to cfq scheduler
- added cfq scheduler tweaks
- fixed path to disable ipv6
09/03/2017
- fixed a bug for those that big cores were found disabled on boot
Although this is something caused from dirty flashing and can only be fixed with a clean flash
18/03/2017
- Added better mount point flags for Lineage/Aosp based roms, for f2fs, for those that prefer using f2fs partitions format
- i changed the way the mount points get set, now you don't need busybox if you don't want to.
- bigger timer rate for interactive governor for the balanced tweak, balanced can conserve battery now too.
25/04/2017
- Less-more is not lagging anymore but of course it still loads slow since cpu runs at a lower frequency
- interactive governor in balanced script saves more battery than before
- All scripts now give a small cpu frequency amount on input to reduce lag
- At less and less-more the hotplug sets the cores online at a lower frequency. Before, with those scripts you could rarely see the other cores online
kessaras said:
You can request any setting for kernel and cpu you want. I can add them for you.
Screenshots of battery with 90less.
~Haven't done anything special. Brightness is at normal with "auto" ON, gapps stock, usage: Normal, chat, xda, phone Calls/Messages, GPS ON.
Many factors determine the battery drain, such as 3rd party apps, ads from apps, services and more, don't blame my settings. Those settings are absolute and tested and i only do this to help everyone.
Click to expand...
Click to collapse
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...-msm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
jskasia said:
Thanks for you work, I am using H818p without BL unlock. Currently, I can modify /etc/init/qcom.post_boot.sh from this thread (http://forum.xda-developers.com/tmo...sm-8992-cpu-io-ram-interactive-gov-t3351478).
The question is, can I port some tweaks from this thread to the stock kernel using qcom.post_boot ? I am not familiar with the seqence of boot, any idea ?
Thanks,
Click to expand...
Click to collapse
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
EDIT:
a part of the scripts does work for stock without llama kernel. it's not dangerous because the stock lg rom doesn't have init.d support on boot and the script only can be applied inside kernel adiutor by enabling init.d emulator.
you can use it then. you will just not get the 100% out of it.
in the 90less you wont get the alucard governor and the hotplug to let the cpu rest.
the only alternative available is to make you one that edits the interactive governor to work almost the same as alucard and conserve a bit more battery than the stock interactive does.
@matgesiarz
follow the op
kessaras said:
Scripts are only for Llama kernel. So,
it depends if the stock kernel has same file "trees". Worst case scenario is to not be able to boot. If you can enter recovery you can fix it by doing :
Code:
rm /system/etc/init.d/<name of the script>
Or use the recovery file manager to delete it,
reboot and you are fine.
Don't use 90less as it is or for sure you won't boot. Less is using alucard governor which doesn't exist in stock. Open script and edit those lines, change alucard to interactive.
"kernel tweaks" delete them. the stock kernel doesn't have same hotplugs and heat protection.
Click to expand...
Click to collapse
Okay, I successfully put the tweaks (balance) on to init.qcom.post_boot.sh. My phone boot without any problem. After few days we will see the result.
Thanks
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Vipery said:
we just need to push scripts or I need also to clean the init.d folder first from other scripts? I am on ChyperOS 3.1.4
Click to expand...
Click to collapse
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Oletros said:
If I understand right, if I put this tweak I don't need to setup any kernel modification in apps like EX Kernel manager, isn't?
Click to expand...
Click to collapse
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
kessaras said:
no you don't clean the init.d folder. if you do that you will lose important script that needs the rom to boot. you only use one of those scripts in init.d, if you put 2 of those in, delete the one.
Click to expand...
Click to collapse
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
only what the op sais. only group owner. its already set from me, but you have to at least check if its set, if not, set it. group owner shell
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
joaste said:
Thanks for the tweaks!
Sorry for this perhaps silly question, but which is supposed to be more battery friendly between balanced and less?
Click to expand...
Click to collapse
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
kessaras said:
less refers to less battery consuption and its only by a little cause we don't want to have lags. Of course we can do it even more battery friendly but we will have a very slow phone.
Click to expand...
Click to collapse
Thanks for the clarification!
kessaras said:
exactly and if you need any change and you don't know how to edit the script, you can ask me to add it for you
Click to expand...
Click to collapse
Thanks
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
welder73 said:
Ok,I applied your 90less tweaks and here's what I've got after reboot:
The big cores governor-interactive,max.freq.-1248
The little cores governor-alucard,max.freq.-1440
MSM Hotplug-OFF
MSM MPDecision Hotplug-ON
Is that ok or...?
Click to expand...
Click to collapse
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
kessaras said:
nothing applied on boot.
in less,
max for the big is set to 1536
and hotplug is off to not get load for nothing since the temp wont go higher than 60 even under the hot summer sun.
Click to expand...
Click to collapse
So I should change the max for the little cores to 1536 and everything else is ok?
Vipery said:
Thank you. Another thing, I need to set owner and group to shell or just group? The other scripts are set root/shell and not shell/shell.
Click to expand...
Click to collapse
...