[Script] Collin_ph Battery Tweak [10/23/2010]

Search This thread

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,762
This is really a tool for power users

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.
http://tweaktool.com

The original thread can be found here: http://xdaforums.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:

READ THIS

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.

The Tools

batt.sh

This is the core of the entire script. Don't mess with it.
The one thing you should do after installing the script:
Code:
pidof batt.sh

If theres any number showing up after it, then it's working fine. Don't touch it.

batt-cfg

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.

MainMenu.jpg


The Presets
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.

Customize Settings
This is only for the experienced user, and it allows you to manipulate most/ifnotall the configurables on your device.

Customize.jpg


All the settings explain what each option does, so read them carefully.

Disk Boost
Remounts via noatime and nodiratime. Look up what that means on your own, and why it benefits performance the way it does.

Audio 'Fix'
Disables stagefright for bettery audio quality, though it will hinder your benchmark scores only because it affects the AAC codec and how it behaves.

CFS Tweak
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).

Temperature Management
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.

Enjoy!

batt-diag
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

batt-rm.sh
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:

Code:
adb logcat | grep collin_ph

Code:
pidof batt.sh

NOTE: This script will also prompt you to try to run itself as root if you use it in terminal. Should work fine in CM6 ROMS but may not run fine in other ones.




Credits:
  • Collin_ph
  • Myself
  • Tomatosoup
  • s0be
  • Barackisbrown
  • vinylfreak89 for being so naggy about porting this here

Download Collin_ph BatteryTweak v3 DecaMod v2.2http://dl.dropbox.com/u/9992367/BatteryTweak-ERISv2.2.zip
MD5: 64c40363fdc1f4c5745154a627894850
Last update: Tues 10/26/2010 11:08AM CST.

Download Collin_ph BatteryTweak v3 DecaMod v2(TazzFroyo/KaosFroyo) TAKEN DOWN
MD5: 7ade3a05e20fedc958c714e62ef27bd8
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)
  • KaosFroyo
  • TazzFroyo


'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. :D
 
Last edited:

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,762
Original Source: http://github.com/collinph/battery-tweak-v3
My Source: http://github.com/Decad3nce/battery-tweak-v3

Help us debug!

Before you complain about anything, do this.
Code:
adb shell batt-diag -v > battdiag.txt

and upload that txt file so that we can diagnose your problems more thoroughly.

For ROM Modders
You need 3 things for the script to survive a reboot:

  • An overclockable kernel(duh)
  • An 'import' call for init.local.rc in init.rc in the ramdisk.
    Just paste this into init.rc after the "Define TCP buffer sizes" setprops
    Code:
    # Include extra init file so that the battery tweak will function
        import /system/etc/init.local.rc
  • Proper file structuring/permissions(The update script in the update.zip really does all of this for you)
 
Last edited:

vinylfreak89

Senior Member
May 6, 2010
214
226
im naggy huh... no seriously... great job dude... immediately my CPU usage has gone down and tomorrow we'll see if battery life goes up as well.. i sure hope so... phone is overall... smoother
 

eklipze

Senior Member
Mar 5, 2010
324
25
Las Vegas
oh happy day! i had been using the original version of this and am happy to see it ported and enhanced... me and my eris thank you greatly!
 

UNCbassbone

Member
Jul 23, 2010
26
0
I'm assuming that since this sets frequencies on it's own that it would be ill advised to use along with something like SetCPU?
 

swaggerwocky

Senior Member
Aug 23, 2010
121
13
After choosing option [1] in batt-cfg I noticed it said "/system/bin/batt-cfg: line 467: load_806: command not found". I did the "pidof batt.sh" command before running batt-cfg and no number displayed after inputting the command. I ran it again after saving settings in batt-cfg and it displayed a number.
 

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,762
After choosing option [1] in batt-cfg I noticed it said "/system/bin/batt-cfg: line 467: load_806: command not found". I did the "pidof batt.sh" command before running batt-cfg and no number displayed after inputting the command. I ran it again after saving settings in batt-cfg and it displayed a number.

Oops, bug. Thanks. Will fix in a sec

EDIT: Fixed. Same URL, check md5.
 
Last edited:

swaggerwocky

Senior Member
Aug 23, 2010
121
13
Thanks, Decad3nce. Choosing option [1] resulted in an '...integer expression expected' and saved settings. Is it normal for it to show 'Starting batt.sh /system/bin/batt-cfg: line 107: start: command not found' afterwards? The phone just rebooted (no android skateboards) as I was typing this while looking at the terminal prompt.

edit: Had to pull the battery, it froze at the loading animation. Running KaosFroyo V34 + CFSv4, for reference.
 

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,762
Thanks, Decad3nce. Choosing option [1] resulted in an '...integer expression expected' and saved settings. Is it normal for it to show 'Starting batt.sh /system/bin/batt-cfg: line 107: start: command not found' afterwards? The phone just rebooted (no android skateboards) as I was typing this while looking at the terminal prompt.

NVM. sec. ...

I'm guessing pidof batt.sh doesn't bring back anything?
 
Last edited:

Bimmer323

Senior Member
Apr 16, 2010
528
21
Installed for me very smoothly on kaos34 w/CFS. pidof shows a #3

Thanks for bringing this over.

Sent from my FroyoEris using Tapatalk
 

swaggerwocky

Senior Member
Aug 23, 2010
121
13
Means its not running at all. :S Try reflashing it, also, could you check for the dependencies necessary in batt-diag

Reflashed again, same result.

Code:
sh-3.2# pidof batt.sh
pidof batt.sh
sh-3.2# batt-diag
batt-diag
Collin_ph Battery diagnostic utility
batt-diag -v for verbose diagnostics
Checking if batt.sh service is running
pidof batt.sh:

Checking dependencies. If any dependency is blank the battery tweak may not func
tion and should be disabled
sleep: /system/xbin/sleep
mount: /system/xbin/mount
expr : /system/xbin/expr
log :

Checking tweak files and permissions
Checking batt.sh service
-rwxr-xr-x    1 root     shell         7174 Aug  1  2008 /system/bin/batt.sh

Checking batt.conf configuration file
-rwxr-xr-x    1 root     shell          411 Aug  1  2008 /system/etc/batt.conf

Checking batt-cfg configuration utility
-rwxr-xr-x    1 root     shell        12241 Aug  1  2008 /system/bin/batt-cfg

Checking batt-rm.sh service
-rwxr-xr-x    1 root     shell          889 Aug  1  2008 /system/bin/batt-rm.sh

Checking Configuration
----batt.conf file contents----
audio_fix=0
CFStweaks=0
MOUNToptions=1
enabled=1
LEDfix=0
cpu_limiting_method=1
min_freq_on_battery=245000
max_freq_on_battery=691200
min_freq_on_USBpower=245000
max_freq_on_USBpower=691200
min_freq_on_power=245000
max_freq_on_power=691200
polling_interval_on_battery=60
polling_interval_on_power=15
polling_interval_on_USBpower=15
cpu_max_underclock_perc=33
scaling_governor=interactive
cpu_scheduler=deadline
----end of batt.conf----
----Mount points----
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /mnt/asec type tmpfs (rw,mode=755,gid=1000)
/dev/block/mtdblock3 on /system type yaffs2 (rw)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,u
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noe
xec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioch
arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,size=0k,mode=000)
/proc/mounts/
cat: can't open '/proc/mounts/': Not a directory


Displaying CFS tweaks.----
/sys/kernel/debug/sched_features
NEW_FAIR_SLEEPERS NORMALIZED_SLEEPER WAKEUP_PREEMPT START_DEBIT AFFINE_WAKEUPS C
ACHE_HOT_BUDDY SYNC_WAKEUPS NO_HRTICK NO_DOUBLE_TICK ASYM_GRAN LB_BIAS LB_WAKEUP
_UPDATE ASYM_EFF_LOAD NO_WAKEUP_OVERLAP LAST_BUDDY
/proc/sys/kernel/sched_latency_ns
10000000
/proc/sys/kernel/sched_min_granularity_ns
4000000
/proc/sys/kernel/sched_wakeup_granularity_ns
2000000



Displaying Current CPU scheduler and Scaling Governor
Scaling Governor:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
CPU scheduler:
/sys/block/mtdblock3/queue/scheduler
[noop] anticipatory deadline bfq



Displaying Batt.sh tweakables.----
/proc/sys/vm/swappiness
60
/proc/sys/vm/dirty_expire_centisecs
200
/proc/sys/vm/dirty_writeback_centisecs
500
/proc/sys/vm/dirty_background_ratio
5
/proc/sys/vm/dirty_ratio
10
/proc/sys/vm/vfs_cache_pressure
100
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
710400
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
245000
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
80
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias
0
Current charging source: 0=Battery 1=USB 2=AC
/sys/class/power_supply/battery/charging_source
1
Current battery capacity
/sys/class/power_supply/battery/capacity
100
/sys/class/power_supply/battery/health
Good

----Current Battery Temp----
 95 F / 35 C
----End of Battery Temp----

----ROM Version----
Linux version 2.6.29-DecaFuctCFS-dirty-2a66c604 (conap@conap-laptop) (gcc versio
n 4.4.0 (GCC) ) #2 PREEMPT Mon Sep 6 16:49:41 EDT 2010
----End of ROM Version ----

---CPU Time in each Frequency---
19200 0
122880 0
160000 0
245760 9146
480000 313
528000 24
604800 12
710400 9575
729600 0
748800 0
768000 0
787200 0
806400 0
825600 0
844800 0
864000 0
---End of CPU Time in each Frequency----
 

Decad3nce

Retired Forum Mod / Inactive Recognized Developer
Feb 19, 2010
2,086
2,762
Reflashed again, same result.

Code:
sh-3.2# pidof batt.sh
pidof batt.sh
sh-3.2# batt-diag
batt-diag
Collin_ph Battery diagnostic utility
batt-diag -v for verbose diagnostics
Checking if batt.sh service is running
pidof batt.sh:

Checking dependencies. If any dependency is blank the battery tweak may not func
tion and should be disabled
sleep: /system/xbin/sleep
mount: /system/xbin/mount
expr : /system/xbin/expr
log :

Checking tweak files and permissions
Checking batt.sh service
-rwxr-xr-x    1 root     shell         7174 Aug  1  2008 /system/bin/batt.sh

Checking batt.conf configuration file
-rwxr-xr-x    1 root     shell          411 Aug  1  2008 /system/etc/batt.conf

Checking batt-cfg configuration utility
-rwxr-xr-x    1 root     shell        12241 Aug  1  2008 /system/bin/batt-cfg

Checking batt-rm.sh service
-rwxr-xr-x    1 root     shell          889 Aug  1  2008 /system/bin/batt-rm.sh

Checking Configuration
----batt.conf file contents----
audio_fix=0
CFStweaks=0
MOUNToptions=1
enabled=1
LEDfix=0
cpu_limiting_method=1
min_freq_on_battery=245000
max_freq_on_battery=691200
min_freq_on_USBpower=245000
max_freq_on_USBpower=691200
min_freq_on_power=245000
max_freq_on_power=691200
polling_interval_on_battery=60
polling_interval_on_power=15
polling_interval_on_USBpower=15
cpu_max_underclock_perc=33
scaling_governor=interactive
cpu_scheduler=deadline
----end of batt.conf----
----Mount points----
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /mnt/asec type tmpfs (rw,mode=755,gid=1000)
/dev/block/mtdblock3 on /system type yaffs2 (rw)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/vold/179:1 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,u
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noe
xec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioch
arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,size=0k,mode=000)
/proc/mounts/
cat: can't open '/proc/mounts/': Not a directory


Displaying CFS tweaks.----
/sys/kernel/debug/sched_features
NEW_FAIR_SLEEPERS NORMALIZED_SLEEPER WAKEUP_PREEMPT START_DEBIT AFFINE_WAKEUPS C
ACHE_HOT_BUDDY SYNC_WAKEUPS NO_HRTICK NO_DOUBLE_TICK ASYM_GRAN LB_BIAS LB_WAKEUP
_UPDATE ASYM_EFF_LOAD NO_WAKEUP_OVERLAP LAST_BUDDY
/proc/sys/kernel/sched_latency_ns
10000000
/proc/sys/kernel/sched_min_granularity_ns
4000000
/proc/sys/kernel/sched_wakeup_granularity_ns
2000000



Displaying Current CPU scheduler and Scaling Governor
Scaling Governor:
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
CPU scheduler:
/sys/block/mtdblock3/queue/scheduler
[noop] anticipatory deadline bfq



Displaying Batt.sh tweakables.----
/proc/sys/vm/swappiness
60
/proc/sys/vm/dirty_expire_centisecs
200
/proc/sys/vm/dirty_writeback_centisecs
500
/proc/sys/vm/dirty_background_ratio
5
/proc/sys/vm/dirty_ratio
10
/proc/sys/vm/vfs_cache_pressure
100
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
710400
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
245000
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
80
/sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias
0
Current charging source: 0=Battery 1=USB 2=AC
/sys/class/power_supply/battery/charging_source
1
Current battery capacity
/sys/class/power_supply/battery/capacity
100
/sys/class/power_supply/battery/health
Good

----Current Battery Temp----
 95 F / 35 C
----End of Battery Temp----

----ROM Version----
Linux version 2.6.29-DecaFuctCFS-dirty-2a66c604 (conap@conap-laptop) (gcc versio
n 4.4.0 (GCC) ) #2 PREEMPT Mon Sep 6 16:49:41 EDT 2010
----End of ROM Version ----

---CPU Time in each Frequency---
19200 0
122880 0
160000 0
245760 9146
480000 313
528000 24
604800 12
710400 9575
729600 0
748800 0
768000 0
787200 0
806400 0
825600 0
844800 0
864000 0
---End of CPU Time in each Frequency----

Strange. run batt-rm.sh, hit y.
reboot.
then flash it again.

If it persists, I'll go bug hunting; but this seems just erroneous.
 

swaggerwocky

Senior Member
Aug 23, 2010
121
13
Strange. run batt-rm.sh, hit y.
reboot.
then flash it again.

If it persists, I'll go bug hunting; but this seems just erroneous.

Code:
sh-3.2# batt-rm.sh
batt-rm.sh



This tool will remove almost all traces of the Battery Tweak

Are you sure that you want to go through with this?[y/n]
y
y
/system/bin/batt-rm.sh: line 15: log: command not found

:(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    This is really a tool for power users

    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.
    http://tweaktool.com

    The original thread can be found here: http://xdaforums.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:

    READ THIS

    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.

    The Tools

    batt.sh

    This is the core of the entire script. Don't mess with it.
    The one thing you should do after installing the script:
    Code:
    pidof batt.sh

    If theres any number showing up after it, then it's working fine. Don't touch it.

    batt-cfg

    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.

    MainMenu.jpg


    The Presets
    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.

    Customize Settings
    This is only for the experienced user, and it allows you to manipulate most/ifnotall the configurables on your device.

    Customize.jpg


    All the settings explain what each option does, so read them carefully.

    Disk Boost
    Remounts via noatime and nodiratime. Look up what that means on your own, and why it benefits performance the way it does.

    Audio 'Fix'
    Disables stagefright for bettery audio quality, though it will hinder your benchmark scores only because it affects the AAC codec and how it behaves.

    CFS Tweak
    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).

    Temperature Management
    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.

    Enjoy!

    batt-diag
    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

    batt-rm.sh
    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:

    Code:
    adb logcat | grep collin_ph

    Code:
    pidof batt.sh

    NOTE: This script will also prompt you to try to run itself as root if you use it in terminal. Should work fine in CM6 ROMS but may not run fine in other ones.




    Credits:
    • Collin_ph
    • Myself
    • Tomatosoup
    • s0be
    • Barackisbrown
    • vinylfreak89 for being so naggy about porting this here

    Download Collin_ph BatteryTweak v3 DecaMod v2.2http://dl.dropbox.com/u/9992367/BatteryTweak-ERISv2.2.zip
    MD5: 64c40363fdc1f4c5745154a627894850
    Last update: Tues 10/26/2010 11:08AM CST.

    Download Collin_ph BatteryTweak v3 DecaMod v2(TazzFroyo/KaosFroyo) TAKEN DOWN
    MD5: 7ade3a05e20fedc958c714e62ef27bd8
    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)
    • KaosFroyo
    • TazzFroyo


    '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. :D
    1
    I'm curious what exactly the CFS tweak does to the CFS kernal.... what is the true benefit? If it makes the CFS like the BFS why not just use BFS?

    How does the CFS tweak on the CFS kernal compare to just the plain old BFS kernal?

    That is an excellent question... I'm also curious.