Remove All Ads from XDA

Collin_ph Battery Tweak RC1 for Cyanogen / Darch Froyo roms (possibly others)

152 posts
Thanks Meter: 19
By collin_ph, Senior Member on 23rd August 2010, 06:30 AM
Post Reply Email Thread
UPDATE 8/24! Please go to the site and download the latest version RC1b which corrects 2 small bugs people have reported. It now sets the proper permissions on batt-diag so it runs, and it changes the way the program tries to SU so that you can choose to not have the program attempt to run SU if your rom has trouble running su from terminal;

---Original Below---
I decided to create a new forum for the latest battery tweak as so much has changed since the initial versions.

To get things started, I'll just say that collin_ph battery tweak is a collection of scripts designed to make the hero (for now) last longer on battery, run faster, and run better. The tweak includes CPU management, Battery Management, Disk Performance Boost, Scheduler Boost, LED Fix, Audio Quality boost and other features to improve the usability of your Hero.

Instructions: Go to to download the latest version and get the documentation.

Boot into recovery and flash the zip file.
After reboot, you may run batt-cfg from shell or terminal (Note, that the scripts will all request root access, so there's no longer a need to su before running them).

to run batt-cfg
go to terminal in the phone or use adb shell from your PC
once there, type

It will pull up a menu of choices. For further info, see

You can load a 691 mhz default (most Cyanogen kernels now only support up to 691 mhz anyway), or, if you have an uncapped kernel, you can choose a 768 mhz setting. Note: Both settings actually run at 691 when on battery and only run higher when plugged in.

The basics of how the battery is extended is that this tweak causes your phone to scale down (to lower frequencies) faster and to scale up slower. In stock configuration, the cpu scales up when only under 70% load -- while part of this tweak causes it not to scale until it's at 95% load, avoiding unnecessary scaling and battery drain. A second (and arguably more important) feature, is that as the battery drains, it lowers the maxumum CPU frequency. So when you have 1% battery left, you may be running at 468mhz instead of 691. Another plus is that the phone runs in a "higher performance" mode while charging via AC, and another mode to make sure the phone is actually charging when connected bia USB, in addition to the settings mentioned above when the phone is on battery.The best part is that almost every parameter in the system is adjustable through terminal or adb shell using a program called batt-cfg -- just run it and you'll be presented with a menu of options.

I'm constantly updating the documentation, so please check back often as I'll update this thread until there's a final 3.0 version. We're already working on a 4.0 which will be available on the market. We'll post more info there as it happens at

This tweak only works with clockable kernels. A lot of ROMS have reclockable or overclockable kernels which should work. I recommend Froyo roms, but I have heard of the tweak running with 2.1 releases. The main incompatibility seems to be with the service startup-- on some roms, the service doesn't automatically start up.

to verify if your rom is compatible and that the tweak is working, reboot.
Then go to terminal or adb shell and type:
if it returns a number, then the service is running. If not, you'll have to start it manually every time the phone reboots by going to terminal or adb shell and typing
then choose the option to save and exit. This will manually start or restart the service. Note: if your rom does not start the service automatically, you'll have to do the above batt-cfg procedure after EVERY boot or battery tweak will not run.

If you're a ROM developer, you'll can probably make your ROM compatible by adjusting your rom (ramdisk) to call (import) /system/etc/init.local.rc from init.rc -- assuming your ROM has an overclockable kernel like fresh, darch, or others.

ROMS based on unclockable kernels like Damage Control, won't work without a kernel upgrade and may still not start the service automatically upon reboot.

Thanks to Decad3nce for testing and improving several parts of the battery tweak.
The Following 2 Users Say Thank You to collin_ph For This Useful Post: [ View ] Gift collin_ph Ad-Free
23rd August 2010, 07:32 AM |#2  
Senior Member
Flag Birmingham
Thanks Meter: 57
Donate to Me
So to flash this tweak and have it working on the latest Froyo nightly, do we need to flash ??

I had to flash this fix almost with ever nightly, coz the frequency list would not show up when i need to customize tweak settings.
23rd August 2010, 07:35 AM |#3  
LifeInTheGrey's Avatar
Senior Member
Flag Boston
Thanks Meter: 233
I was reading the documentation and saw the CFS tweaks are disabled by default. Will this correct the GPS issue that was on beta 10?

Froyo Hero to the rescue
23rd August 2010, 07:50 AM |#4  
Senior Member
Flag Johnson City
Thanks Meter: 18
Thank you for all your work on this, got 12 hrs on 50% today with beta 10 and Decad3nse #8, 768 pre-set, most time I've ever gotten outa my Hero. Flashed your RC1 (with Darch's RC1) about 45mn ago and used custom settings to jack-up the max to 768 across the board, min.s and intervals stock. Thank you for explaining the 768 pre-set is really 691! Gonna sit on what I've got for a day and then try w/ Darch's "fix" kernel. Hope I can keep the max on batt @ 768 'cause it seems to make my Hero more responsive/less laggy.
23rd August 2010, 08:00 AM |#5  
Junior Member
Thanks Meter: 0
I was not able to use the batt-diag in adb shell. I'll report back tomorrow how the tests go.
23rd August 2010, 10:40 AM |#6  
Thanks Meter: 0
What is the procedure for installing this if you're currently running Beta 10? Do you have to wipe, reflash, etc or can you just flash the update and reconfigure in adb?
23rd August 2010, 11:19 AM |#7  
Senior Member
Thanks Meter: 31
it made my hero laggy!!!
23rd August 2010, 12:24 PM |#8  
Senior Member
Thanks Meter: 1
Originally Posted by ToxicToastKatz

What is the procedure for installing this if you're currently running Beta 10? Do you have to wipe, reflash, etc or can you just flash the update and reconfigure in adb?

Follow the uninstall steps form the documentation


How do I uninstall it?

adb shell
Follow the prompts and the tweak will be uninstalled.

Then flash the new version, this is how I have been doing it.
23rd August 2010, 01:41 PM |#9  
Thanks Meter: 3
Excellent tweak! Used it through Beta and now enjoying the RC. Well done!
23rd August 2010, 02:20 PM |#10  
Big-O-Devil's Avatar
Senior Member
Flag Miami
Thanks Meter: 30
wow.. the way things are going i don't think i am going to jump into a evo... i am loving my hero so much.... thank you for all your hard work..
23rd August 2010, 02:41 PM |#11  
Papa Smurf151's Avatar
Senior Member
Flag Atlanta
Thanks Meter: 6,791
Donate to Me
OK I don't know if its just me but when I go into batt-cfg it just runs whoami uid o
Batt-cfg root

Or something like that over and over again. It worked on beta 10 but not like this I don't understand
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes