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

Search This thread

collin_ph

Senior Member
May 8, 2010
153
26
46
Norman, Ok
primoweb.com
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 http://www.primoweb.com/froyo 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
batt-cfg

It will pull up a menu of choices. For further info, see http://www.primoweb.com/froyo

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 www.tweaktool.com

COMPATIBILITY NOTES:
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:
pidof batt.sh
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
batt-cfg
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.
 
Last edited:

krispuniq

Senior Member
Oct 21, 2008
533
72
Birmingham
So to flash this tweak and have it working on the latest Froyo nightly, do we need to flash overclockfix.zip ??

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.
 

LifeInTheGrey

Senior Member
Dec 2, 2009
1,304
231
Boston
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
 

Ezintn

Senior Member
Aug 6, 2010
210
18
Johnson City
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.
 
Apr 27, 2008
34
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?
 

tb87

Senior Member
Apr 11, 2010
121
1
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
batt-rm.sh
Follow the prompts and the tweak will be uninstalled.

Then flash the new version, this is how I have been doing it.
 

Big-O-Devil

Senior Member
Jul 23, 2010
573
29
Miami
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..
 

Papa Smurf151

Senior Member
Feb 24, 2010
5,643
6,741
Atlanta
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
 

imb951

Senior Member
Nov 8, 2009
258
35
8/22 RC1 update does not have a working batt-diag, says not found. I am getting "89" when I do "pidof batt.sh"
 
Last edited:

collin_ph

Senior Member
May 8, 2010
153
26
46
Norman, Ok
primoweb.com
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
hmm.. what rom are you running? It sounds like the code I've got in to detect root (and ask for it if necessary) is causing an issue with what you're running. All it does is a whoami to see if you are logged in as root, if not, it su's and relaunches itself.
 

collin_ph

Senior Member
May 8, 2010
153
26
46
Norman, Ok
primoweb.com
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
hmm.. what rom are you running? It sounds like the code I've got in to detect root (and ask for it if necessary) is causing an issue with what you're running. All it does is a whoami to see if you are logged in as root, if not, it su's and relaunches itself.
 

Papa Smurf151

Senior Member
Feb 24, 2010
5,643
6,741
Atlanta
hmm.. what rom are you running? It sounds like the code I've got in to detect root (and ask for it if necessary) is causing an issue with what you're running. All it does is a whoami to see if you are logged in as root, if not, it su's and relaunches itself.

I'm using my red dawn rom with a modded ramdisk to allow for the battery tweak. The beta 10 worked and even the rc1 asked for su and I said allow the the whoami just kept going and going. I uninstalled via ur instructions on ur site and flashed again and same results
 

zachslavin

Senior Member
Jul 8, 2010
109
7
Reno, NV
RC1 kept crashing my phone. Right after saving settings it would freeze them hard reset and get stuck at the htc screen. I've reverted back to beta 10. The only problem I've ever had with beta 10 is I would have random hard resets when charging. I really can't even pin point it on this tweak but its the only thing that I could think that would do it.
 

collin_ph

Senior Member
May 8, 2010
153
26
46
Norman, Ok
primoweb.com
RC1 kept crashing my phone. Right after saving settings it would freeze them hard reset and get stuck at the htc screen. I've reverted back to beta 10. The only problem I've ever had with beta 10 is I would have random hard resets when charging. I really can't even pin point it on this tweak but its the only thing that I could think that would do it.
Were you doing the updates through ADB or terminal? When would it hard lock up.. during save changes?
 

Pauper7

Senior Member
Jul 14, 2010
123
0
Streamwood
CFS Tweaks and Decad3nce Kernel

I understand from reading the Kernel info, that the CFS on this tweak needs to be disabled first....did you make CFS tweaks on by default? Arent we supposed to flash the kernel first, then disable cfs tweaks and reboot? Im confused as to the order in which things are flashed. WIPE, ROM, GSHITZ, BLACKMOD, KERNEL#7, COLLINS RC1. Then go to term EMU and disable CFS, then save then go back into batt-cfg and choose option 1 768 and save and exit then reboot. Woudl that be correct?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    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 http://www.primoweb.com/froyo 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
    batt-cfg

    It will pull up a menu of choices. For further info, see http://www.primoweb.com/froyo

    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 www.tweaktool.com

    COMPATIBILITY NOTES:
    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:
    pidof batt.sh
    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
    batt-cfg
    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.
    1
    Yes basically. Cm7 has CPU settings in it so you would want to probably align those (you min&Max speeds & governor)

    ~maybe I set it too high...