If you don't consider yourself 'comfortable' with messing with your phone, then don't.
This is mostly the work of collin_ph, all the ideas are mostly his and I have only contributed in part to getting some things functioning correctly and some optimizations. We've been enjoying the performance/battery life benefits for about a month now and everyone is, hopefully, enjoying it as well.
Collin, myself and a couple others have decided to turn this script into an app which I hope, and we hope, will be on the market sooner than later.
The original thread can be found here: http://forum.xda-developers.com/showthread.php?t=762283
This script is more functional and more efficient than applications that constantly run in the background(like setcpu,ocwidget); the reason for this is that it only polls all dependencies every 60 seconds(default) to check for changes. Even the polling interval can be changed.
Why use this?
This script has proven time and time again to not only battery life(on average, about 3-4 hours), but also improve the performance of the device.
Enough of the backstory, into the details:
Original documentation can be found here: http://www.primoweb.com/froyo/battery_tweak_v3.html
The entire 'application' is written in shell code and was first written just to give a performance and battery boost, but since has evolved more and more.
All the tools mentioned will be utilized either through the terminal, or in adb shell.
This is the core of the entire script. Don't mess with it.
The one thing you should do after installing the script:
This is the 'main menu' of sorts, as it gives the user all the options and allows him to toggle tweaks/mods on the fly.
The presets are just default configurations that I have set up that can make your phone more efficient without you, the user, having to manually set everything.
The preset of 806 literally means that 806400 is the scaling_max_freq, or the max frequency, that your phone can achieve after you enable it.
Just typing 1, and then enter, you'll be ready and set to go. Same with 2.
This is only for the experienced user, and it allows you to manipulate most/ifnotall the configurables on your device.
All the settings explain what each option does, so read them carefully.
Remounts via noatime and nodiratime. Look up what that means on your own, and why it benefits performance the way it does.
Disables stagefright for bettery audio quality, though it will hinder your benchmark scores only because it affects the AAC codec and how it behaves.
Echos NO_NEW_FAIR_SLEEPERS to sched_features to change CFS into more of a traditional scheduler like BFS, which gives a noticeable benchmark performance boost, but hinders how gps behaves(kind of like the real BFS).
This new tool allows you to set a temperature(in celsius) at which to override the maximum frequencies to something a bit safer to save your phone battery from melting. It allows you to choose the override max frequency and the override min frequency.
So lets say that you choose the 710 preset.
And you enable the Temperature Management, and set the temperature to 450(45.0 C*) and you set the override max frequency to 537600mhz.
At 45 C*, the tweak will override the preset and echo 5376000 to scaling_max_freq until your battery temperature drops below 45.0 C*, at which point it will resume 710mhz.
It's a diagnostics utility, allowing you or someone knowledgeable to figure out any issues that you may be having with your device and be able to pinpoint exactly where the problem is.
batt-diag -v gives a more thorough output as you can see here; http://pastie.org/1162034
It's a battery tweak removal script, follow the onscreen prompts and it should remove just about any trace of the battery tweak script.
Prerequisites needed to run this
If you're running a version of CM6, this will work completely fine.
If you're running any other kind of rom, that developer will need to add an 'import' call in the init.rc(in the ramdisk) that imports the init.d script necessary for this application to function at boot. If you don't know how to do this, well, pm me, I might help you, depending on how much I like you.
This script will WORK even if you don't have the import call at boot, but it won't survive on the next reboot.
You can check via:
adb logcat | grep collin_ph
- vinylfreak89 for being so naggy about porting this here
Download Collin_ph BatteryTweak v3 DecaMod v2.2
Last update: Tues 10/26/2010 11:08AM CST.
Download Collin_ph BatteryTweak v3 DecaMod v2(TazzFroyo/KaosFroyo) TAKEN DOWN
If you flashed this earlier, it breaks wifi, so just reflash your ROM over the top. Tell your ROM cook to fix his CM6 :P!
Flash via recovery, enjoy!
Why doesn't it work for KaosFroyo/TazzFroyo?
Because they're not built like the CM6 repos, and do not have the init.local.rc import and updated busybox's as well lacking some dependencies found in CM6 itself when its built from source.
ROMs that need to have init.rc patched with import call of init.local.rc(This is necessary for this script to work correctly)
'start collin_ph' starts the service created in init.local.rc. If init.local.rc isn't imported at boot via the init.rc, then it fails.