[mod/script] CPU Editor script on HTC Chacha - HTC ChaCha

Hi All,
Just wanna share this awesome script by smokin1337
http://forum.xda-developers.com/showthread.php?t=1584508
this is a batter saver script which acts like SetCPU and other CPU control apps. however, since it is not an app, it doesn't run in the background and therefore doesn't add additional battery consumption
I have tested this script on 3 Chacha ROMS:
CM7 (really, really effective, my phone can now last more than a day on moderate use:good
CM9 (somewhat effective, but not as effective in CM7, I'm not sure why but, could it be because of Ice Cream Sandwich processes? )
Hexgore's Stock Plus (doesn't work, the settings do not stick)
It seems that the dev who created this isn't updating the thread anymore so the main DL links are gone. However, another member has posted another download link here:
http://forum.xda-developers.com/attachment.php?attachmentid=1243323&d=1344187468
Instructions:
Flash the zip on CWM
Open terminal
Type "su" without the quotes
Type "cpu" without the quotes
Make the selections on the menu
Choose the battery saver ondemand profile for the awesome battery life :cyclops:
Known Issues:
Selecting CPU governor in CM7 doesn't work (the terminal will show a bunch of numbers with increasing numerical value)
However, this doesn't mean that the script won't work anymore since you need to choose the ondemand governor in order to choose the battery saver ondemand profile (and there aren't any other viable governors for the Chacha anyway )
Credits to:
smokin1337 for creating this awesome script, made my Chacha's battery last longer
let me know if this script helped your Chacha
Cheers!

can the moderator please move this to the general section? I didn't mean to post it here, sorry must have been absent-minded

kesongpinoy said:
can the moderator please move this to the general section? I didn't mean to post it here, sorry must have been absent-minded
Click to expand...
Click to collapse
very useful.Thank you!

I flash it on CM 10.1,,,and its good...tnx:thumbup:
Sent From My ChaCha Using CM 10.1

Related

[MOD] Collin_ph Battery Tweak For EVO By Myn

Background
As many of you recently saw in my Warm TwoPointTwo RLS2 thread there was an optional download for Collin_ph's battery tweak ported to the EVO by me.
This mod was so large I figured It deserved it's own thread and at the same time I'd like to share it with the community so other ROM devs can incorporate this into their ROMs
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 for the EVO and INCredible. The original thread from Collin_ph can be found here and the original documentation can be found here.
What does it do?
This tweak creates a service that periodically checks the phone's power source.
If the power source changes, it reconfigures the device for maximum performace, battery and safety.
Tweaks compcache (if enabled) for current power source
Tweaks memory settings for current power source
Re-clocks CPU based upon battery remaining or current power source
Reclocks for maximum performance if on AC power
Reclocks for maximum performance and charging safety if on USB
Reclocks for performance and battery if on Battery
As Battery life is diminished, Maximum CPU frequency is lowered
Tweaks scaling charactaristics depending on power sourcee
CPU Scales up less frequently on battery power
CPU Scales up more frequently on USB/AC power
The CPU is allowed to scale dynamically in all charging states based upon CPU usage
Includes a batt-cfg utility to configure the system
You may load 1 of 2 pre built profiles
Manually configure CPU Frequencies in all charging states
Determine the percentage of underclocking as the battery drains
Configure how often to poll the power state / battery statys
Disable batt.sh service from running at startup
Includes a batt-rm.sh uninstall utility
Includes a batt-diag diagnostic utility
Includes an LED fix if your LED is stuck on
Includes optional experimental performance tweaks (disabled by default)
Includes optional Disk performance tweaks (enabled by default)
Includes optional froyo Audio quality fix (disables stagefright)
The Tools
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.
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.
batt-cfg
This is the 'main menu' of sorts, as it gives the user all the options and allows them to toggle tweaks/mods on the fly.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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.
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 998 literally means that 998400 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.
Note, you do not need to configure anything to enable this battery mod. Default settings will be assigned.
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
Currently not functional. Will evolve in time. What it will eventually do is Echo 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).
Prerequisites needed to run this
If you're running a version of CM6 or Warm TwoPointTwo RLS2 and above, 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, please see post #2.
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:
pidof batt.sh
NOTE: This script will also prompt you to try to run itself as root if you use it in terminal.
Contributors:
Collin_ph
Decad3nce
myn
onicrom
shabbypenguin
Download And Install:
Version 3 RC2 Download Herehttp://www.mediafire.com/?xmjdd797f6v2m90
A new guide is available: [GUIDE]* How to properly flash collin_ph battery tweak & have best battery life ever! *
Disable SetCPU or other overclocking programs as they will interfere with this tweak.
Kernels that manage and throttle CPU (ex HAVS) may interfere with the operation of this mod as they will fight and conflict with CPU deltas.
Download, the zip, copy to SD card.
Reboot into recovery and flash.
Reboot and run the batt-cfg configuration utility.
Help us debug!
Having issues with this mod? Help us debug your issue by doing 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 Developers
You need 3 things for the script to survive a reboot:
A clockable kernel
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)
Future Development:
I'd love to have a bunch of developers contributing to this project. I maintain this project out on github branched from Collin_ph's base code. If you'd like to contribute let me know and I'll add you as a contributor to the project.
http://github.com/myn/battery-tweak-v3
Original Source: http://github.com/collinph/battery-tweak-v3
* This one reserved too *
Quick question....is v3 the same that was included with rls2?? Another question that was asked in your ROM thread, does this need to be activated via ADB or does flashing activate? Thanks in advance and keep up the phenomenal work.
Nice nice im reading at the moment but looks tastey and im in!!!
Sent from my phone... I think Tapatalk??
I assume you use this OR SetCPU and can't use them both together as it sounds like they would clash...
Swyped from my supercharged Evo!
So far so good myn. I jumped right in and gave it a shot w the latest stock kernel.. Will report as i go
Thanx much man!!!
Sent from my phone... I think Tapatalk??
Can I use this AND keep setcpu a long as I don't use profiles?
Wouldn't this interfere with havs the same way that profiling in setcpu does?
Sent from my PC36100 using XDA App
tonwarr.the.incredible said:
Quick question....is v3 the same that was included with rls2?? Another question that was asked in your ROM thread, does this need to be activated via ADB or does flashing activate? Thanks in advance and keep up the phenomenal work.
Click to expand...
Click to collapse
Yes. V3 is the same as what was included in RLS2. This mod is automatically activated as soon as you flash it.
stanglifemike said:
I assume you use this OR SetCPU and can't use them both together as it sounds like they would clash...
Swyped from my supercharged Evo!
Click to expand...
Click to collapse
overthinkingme said:
Can I use this AND keep setcpu a long as I don't use profiles?
Wouldn't this interfere with havs the same way that profiling in setcpu does?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Exactly. Anything that controls the CPU may conflict with this mod.
I'd love to hear feedback from people about what configurations work and what don't though.
myn said:
Yes. V3 is the same as what was included in RLS2. This mod is automatically activated as soon as you flash it.
Exactly. Anything that controls the CPU may conflict with this mod.
I'd love to hear feedback from people about what configurations work and what don't though.
Click to expand...
Click to collapse
Myn, what kernal do you recommend given the potential conflicts with the tweak?
lido said:
Myn, what kernal do you recommend given the potential conflicts with the tweak?
Click to expand...
Click to collapse
I'd start with the stock kernel, HTC #11 and then keep trying others out.
I'd love to figure out a nice combination for this
I'm running king's aosp cfs kernel #1 and scared to run this script on my phone. Should I be fine?
Sent from my PC36100 using XDA App
locoboi187 said:
I'm running king's aosp cfs kernel #1 and scared to run this script on my phone. Should I be fine?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Don't let the first post scare you hehe.
If you just flash it, it automatically is enabled and configured for your EVO. No configuration needed.
Give it a try. If it doesn't work, you can always remove it or turn it off.
Sry, still quite new to the whole flashing rom and kernel thing.
I'm just wondering if im using the king's #11 CFS kernel, would it conflict with this tweak?
*PS i dont think i have setCPU install or enable. I just flashed the kernel to the rom that I'm using right now if that helps
thanks in advance!
How do I know if it's enabled or not? Using ADB shell after I flashed it won't show anything after I enter the pidof batt.sh. It brings me back to #. I am running a sense ui stock deodexed rom.
So u dont need to enter batt-cfg in terminal to activate? Simply just flashing it activates it?
casual864 said:
How do I know if it's enabled or not? Using ADB shell after I flashed it won't show anything after I enter the pidof batt.sh. It brings me back to #. I am running a sense ui stock deodexed rom.
Click to expand...
Click to collapse
Unfortunately the stock sense UI stock deodexed rom does not support the call to init.rc.
See below for prereqs:
Prerequisites needed to run this
If you're running a version of CM6 or Warm TwoPointTwo RLS2 and above, 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, please see post #2.
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:
pidof batt.sh
casual864 said:
How do I know if it's enabled or not? Using ADB shell after I flashed it won't show anything after I enter the pidof batt.sh. It brings me back to #. I am running a sense ui stock deodexed rom.
Click to expand...
Click to collapse
Tiffany84 said:
So u dont need to enter batt-cfg in terminal to activate? Simply just flashing it activates it?
Click to expand...
Click to collapse
yup, flashing activates this automatically.
I'm having trouble finding the newest stock htc kernel, can someone help me/us with a link please since this doesn't play nice with havs?
Sent from my HTC Evo 4g
I enabled the cfs tweak using terminal emulator and then flashed kings #11 cfs. I'm not getting high CPU usage and when I'm idle its staying around 245mhz. We will check battery results tomorrow.
Sent from my PC36100 using XDA App

[Script][Guide] V6 Supercharger by Zeppelinrox or how to kill lags in ROMs! U9RC7!

This script is made by Zeppelinrox all credits, thanks and donations should go to him for his amazing work! here is his original thread [Script]V6 SuperCharger! The ONLY Android MEMORY FIXER! 3G & KAK!
ICS users should check this page for GB follow the guide below
most recent supercharger files are found here
--------------------------------------------------------------------------
Recommended settings for Sense 3.5 ROMs:
- Build.prop + integrate
- Balanced 512HP settings (number 6. Ledded)
- BulletProof launcher
- DON'T INSTALL Nitro Lag Nullifier
- Kickass kernelizer + IO tweaks
--------------------------------------------------------------------------
I will not be updating this guide when new versions are out simply because they never stop the general guidelines below should apply on newer versions, i will update only if we have a major change
--------------------------------------------------------------------------
For smooth sense 3 launcher check here [FIX] Ultra & Super, Liquid Smooth Rosie for Sense 3 & 3.5 ROMs
Many of us complain about launcher lags or frame rate drops, the launcher itself might be 60fps smooth but once you start using your device and loading it, sudden lags start creeping up.
A lot of this is due to the way android handles multitasking, Zeppelinrox’s script has been always around but I’m sure many of the users didn’t hear of it, so in order to lessen the pressure on our favorite chefs, i thought i should post a specific guide specific to the Desire HD users
What the script does is tweak android memory minfrees and applications priority, it attempts to insure lag free operation of the launcher and also prevents launcher redraws
Thankfully our device have a generous amount of RAM so it shouldn't have side effects on battery etc, we will still have apps running in the background just not as busy and at lesser priority then the launcher, It's not a task killer app
I won’t go into technical details which are better explained in Zeppelinrox's OP let’s just say the results will speak for themselves, you can easily control what the script is doing and you can undo it at anytime
V6 Supercharger is currently in beta for the U9 version and has been expanded, it now it includes a kernel tweaker and 3G speed booster too, here is a step by step guide, remember this script is universal it should work on any android, in my case I tried it on ARHD v6.1.1 official sense 3.0
Make sure you have Root, init.d scripts enabled at boot, latest busybox and do a nandroid backup
Download Script Manager https://market.android.com/details?id=os.tools.scriptmanager&feature=search_result
Download the scripts V6_SuperCharger_for_Android-Update9_RC6.9.sh.pdf and KickAssKernelizer_Tweaks_Installer_Update_3_RC6.sh.pdf from this post http://forum.xda-developers.com/showpost.php?p=18703418&postcount=5021 rename them to V6_SuperCharger_for_Android-Update9_RC6.9.sh and KickAssKernelizer_Tweaks_Installer_Update_3_RC6.sh
Place the script files in an easily accessed folder on your SD card
Open script manager and then press menu > more > advanced options > config and tick “browse as root”, allow root once requested
Browse to the scripts location and click on V6_SuperCharger_for_Android-update9_RC6.9.sh, make sure to tick “run as root” but don’t tick “run at boot” otherwise we will face issues, the script runs at boot automatically, press run
Once loaded follow the onscreen instructions, select text speed (1 is the fastest and hidden 0 for super fast), the script will ask for init.rc integration which is a further measure to insure the launcher priority will stick, init.rc method has risk of boot issues, so insure you have a backup and proceed.
Once done loading the script will detect that the device has 620MB RAM and suggest custoomizer calculator settings, you can choose your own preference from option 2 to 9, the insured free memory is the last number in the list of mem frees, the bigger the number the less active running apps in the background, it will also shut down apps based on priorities, like explained in the list of options for more multitasking you can choose less minfress by going for the 512HP options, please don't complain about multitasking gone since you can control how much minfrees you want! otherwise if you choose to trust the supercharger calculator select option 10 and supercharger will apply the best settings for your device available RAM
For further improvements select option 20 (nitro lag nullifier) and enable it warning! i suspect that this setting increases "LCD ghosting" at high frame rates
Press back and kill the script, browse to the scripts location and click on KickAssKernelizer_Tweaks_Installer_Update_3_RC6.sh, make sure to tick “run as root”, press run. The script will request permission to Install and then to modify the IO scheduler and warns for possible bootloops, in the case of ARHD and ER3BUS ROMs I had no issues and I selected yes, you can opt for no, the rest of the tweaks will still be implemented
Once done, close the script and reboot the device, you can select Superclean option 29 (wipe caches and reboot) for clean operation, now enjoy smooth lag free launcher and android
The script will always let you know whether the launcher is locked in memory or not, if locked it will advice against locking the launcher in memory in order to enable priority tweaks, in sense ROMs its usually left unlocked, but some chefs lock it, in CM ROMs you unlock using the "Lock home in memory" option, some third party launchers have an option in settings.
If launcher's new DIE HARD or BULLETPROOF state doesn't stick after restart (you can tell by running the script) then go to option 26 (Driver Options) and set the method to build.prop, you can choose init.rc integration which will insure the priorities will stick but as warned there is a risk of bootloops. You can also disable the script boot animation and change the text speed again from this menu.
Otherwise you can leave it, the minfrees will still be in effect even if locked, but not the priorities.
At any time you can undo the script tweaks, by running the surpercharger script and select options 14 and 15, unkernelizer and unsupercharge you can also check this in case you run into bootloops due to kernelizer
You can also try zeppelinrox ‘s 3G turbocharger and Die-Hard Battery Calibrator scripts http://forum.xda-developers.com/showthread.php?p=18703418#post18703418
The details above are simplified for noobs like me, much more info can be found in Zeppelinrox‘s OP
hamdir said:
Many of us complain about launcher lags or frame rate drops, the launcher itself might be 60fps smooth but once you start using your device and loading it, sudden lags start creeping up.
A lot of this is due to the way android handles multitasking, Zeppelinrox’s script has been always around but I’m sure many of the users didn’t hear of it, so in order to lessen the pressure on our favorite chefs, i thought i should post a specific guide specific to the Desire HD users
Thankfully our device has a generous amount of RAM, what the script does is tweak android memory minfrees and applications priority, it attempts to insure lag free operation of the launcher and also prevents launcher redraws, I won’t go into technical details which are better explained in Zeppelinrox's OP let’s just say the results will speak for themselves, you can easily control what the script is doing and you can undo it at anytime
V6 Supercharger is currently in beta for the v8 version and has been expanded, it now it includes a kernel tweaker and 3G speed booster too, here is a step by step guide, in my case I tried it on ARHD v6.1.1 official sense 3.0
Make sure you have Root and make a nandroid backup
You should have Busybox v1.8.2 or less, the script has issues with Busybox higher than 1.8.2, you should downgrade using busybox installer from the market https://market.android.com/details?id=com.jrummy.busybox.installer&feature=search_result
Download Script Manager https://market.android.com/details?id=os.tools.scriptmanager&feature=search_result
Download the scripts V6_SuperCharger_for_Android-update9_beta_6.1.sh.txt and KickAssKernelizer_Tweaks_Installer_Update_3_test_5-OPTIONAL_IO_TWEAK.sh.txt from this post http://forum.xda-developers.com/showpost.php?p=15948434&postcount=1127
Place the script files in an easily accessed folder on your SD card
Open script manager and then press menu > more > advanced options > config and tick “browse as root”, allow root once requested
Browse to the scripts location and click on V6_SuperCharger_for_Android-update9_beta_6.1.sh.txt make sure to tick “run as root” but don’t tick “run at boot” otherwise we will face issues, the script runs at boot automatically
Once loaded follow the onscreen instructions, select text speed (1 is the fastest) and let it proceed, the script will detect that the device has 620MB RAM and suggest the 768HP settings , select option 8 (super 768HP aggressive), you can go for more aggressive minfrees with option 9, this basically means the device will always have around 250MB of free memory which means less active running apps in the background, it will shut down apps based on priorities, it will insure 150MB for the launcher in the third slot
For further improvements select option 17 (nitro lag nullifier) and enable it
The script will always let you know whether the launcher or locked in memory or not, if locked it will advice against locking the launcher in memory in order to enable priority tweaks, in sense ROMs its usually left unlocked, but some chefs lock it, you can unlock by quitting the script and adding ro.HOME_APP_ADJ=0 to the top of the build.prop file in the system folder (using root explorer) otherwise you can leave it as is, in case of ARHD 6.1.1 the launcher is locked by default, the minfrees will still be in effect even if locked
Press back and kill the script, browse to the scripts location and click on KickAssKernelizer_Tweaks_Installer_Update_3_test_5-OPTIONAL_IO_TWEAK.sh.txt, the script will request permission to modify the IO scheduler and warn for possible bootloops, the script advices noop or deadline scheduler, in the case of ARHD6.1.1 I had no issues and I selected yes, you can opt for no the rest of the tweaks will still be implemented
Once done, close the script and reboot the device enjoy smooth lag free Sense 3 launcher and android
At any time you can undo the script tweaks, by running the surpercharger script and select options 13 and 14, unkernelizer and unsupercharge
You can also try zeppelinrox ‘s 3G turbocharger script http://forum.xda-developers.com/showpost.php?p=15948434&postcount=1127
The details above are simplified for noobs like me, much more info can be found in Zeppelinrox ‘s OP http://forum.xda-developers.com/showthread.php?t=991276
all credits, thanks and donations goes to Zeppelinrox for his amazing work!
Click to expand...
Click to collapse
thx for sharing my friend
How do I install version Busybox v1.8.2? I only find 1.14.3 and above.
I tried manually install but I dont understand.
I hope to hear from you soon
Thanks for simplifying. I see hime everyday and I don't get these walkthrough's lol
Amazing guys!! Really impressive!!
Installed on RCMix Runny 1.3 sense 3.5 and it works...a lot!!;-)
Is it right use this script on a sense 3.5?
Just one thing...now my ram is ALWAYS up to 230/250 just like on the first boot, and the smoothness it's amazing..really close to perfection..I've just experienced one weird thing..when you scroll the homescreens continuously, sometimes there's a jump between pages, from page 1 to 3 for example..I've tried to clean sense data and run wipe dalvik, but this weird issue is still here..maybe the script needs some time to work properly?
Thanks for sharing this masterpiece in Android;-)
Inviato dal mio HTC Desire HD usando Tapatalk
Glaxo said:
How do I install version Busybox v1.8.2? I only find 1.14.3 and above.
I tried manually install but I dont understand.
I hope to hear from you soon
Click to expand...
Click to collapse
latest requirement is Busybox 1.18.2 OR LOWER
nice tool, thanks for sharing
OP writes 1.18.2 or lower
---------- Post added at 03:57 AM ---------- Previous post was at 03:56 AM ----------
tingardz said:
latest requirement is Busybox 1.18.2 OR LOWER
Click to expand...
Click to collapse
only seconds before me
---------- Post added at 04:42 AM ---------- Previous post was at 03:57 AM ----------
I just tried it with RCMix3D Runny v1.2 and it's fantastic C:
Awesome! This has definitely made a noticeable difference in smoothness, thanks for sharing!
liljom said:
nice tool, thanks for sharing
OP writes 1.18.2 or lower
Click to expand...
Click to collapse
hamdir said:
[*]You should have Busybox v1.8.2 or less, the script has issues with Busybox higher than 1.8.2, you should downgrade using busybox installer from the market https://market.android.com/details?id=com.jrummy.busybox.installer&feature=search_result
Click to expand...
Click to collapse
I see 1.8.2, guide should be updated
correct version 1.18.2, typo fixed
Great, thanks for share i will try it now.
Has this script any effect on the battery?
The title says 'in any rom ', and so CM 7 works too?
Slight improvements on RCMix3D VoidU 1.1...
Thanks for this hamdir. Can't wait to try those but I have 2 questions:
1. I currently have busy box 1.19. What do we lose by downgrading?
2. Does the downgrade have to be permanent or only temp until we run the scripts and then we could upgrade again? Other apps rely on this and so I don't want to break their functionality (i.e. Titanium Backup)
Arhd 6.1.1 and unity v9 kernel and i for sure see improvments. Big thanks
Old man with Sense 40+
andreasy said:
Thanks for this hamdir. Can't wait to try those but I have 2 questions:
1. I currently have busy box 1.19. What do we lose by downgrading?
2. Does the downgrade have to be permanent or only temp until we run the scripts and then we could upgrade again? Other apps rely on this and so I don't want to break their functionality (i.e. Titanium Backup)
Click to expand...
Click to collapse
Just download 'Busybox Installer' and you can upgrade/downgrade Busybox with just one click.
lululala said:
Just download 'Busybox Installer' and you can upgrade/downgrade Busybox with just one click.
Click to expand...
Click to collapse
I know this but this wasn't my question.
reneftw said:
Has this script any effect on the battery?
Click to expand...
Click to collapse
well its not a task killer, it just tweaks the way android handles priorities and memory, you will still have apps running in the background
i didn't see any side effects especially since the DHD has good amount of RAM
andreasy said:
Thanks for this hamdir. Can't wait to try those but I have 2 questions:
1. I currently have busy box 1.19. What do we lose by downgrading?
2. Does the downgrade have to be permanent or only temp until we run the scripts and then we could upgrade again? Other apps rely on this and so I don't want to break their functionality (i.e. Titanium Backup)
Click to expand...
Click to collapse
no side effect of lesser busy box as far as i can tell, it all depends on what BusyBox features the ROM is using, but it should be fine
you can still try to run it BusyBox, but for example the built-in reboot feature in the script won't work

[MOD][Updated 6.2.12]Dual Core Mod v2.1 - Screen Profiles, Auto Tweak, and more!

Hello everybody, I was asked to bring this mod over from the EVO 4G LTE section and since the One X and One S use the same file I am modifying, both devices will get it This is also untested on the One X and One S, so please let me know if you encounter any issues, but it should work! This will ONLY work on phones with the Qualcomm S4 chipset, not the Tegra chipset!
This is a mod that should give you better performance by forcing cpu1 (second core) to run more, depending on the zip you flash below. The system will handle how it scales and the dcmhelper script will modify some parameters if you choose that zip. Some people on the EVO 3D felt that it gave them better battery life, some didn't. Some thought the performance was much better, some didn't. This is just something else for you guys to play with and see what works best for you Here are the details:
=============== How was this done? ===============​
It was pretty easy, instead of modifying the kernel itself, I just modified /system/etc/init.qcom.post_boot.sh. It already sets extra parameters for the CPU and system shortly after boot. Here are the lines that I added:
Code:
echo 1 > /sys/devices/system/cpu/cpu1/online
chmod 444 /sys/devices/system/cpu/cpu1/online
What this does is it tells cpu1 to come online and then changes the permissions so user read-only so that it can't be overridden. This will be applied on every boot.
You can also verify this is working by any number of apps, but I find SystemPanel to be the best. They have a free lite version. Just download and tap on the top right where the CPU info is. You will the the CPUs changing, when it goes grey it's offline (which you won't see when using the Dual Core Mod).
aLogcat will also show you everything DCM is doing. Just apply a filter in aLogcat called DCM and it will tell you in detail what is going on.
If you want a little bit less info or want to use adb, just type su and then dcmlog and you will see what the 2nd core is doing exactly. This is updated every 1/4 second for extremely accurate results.
Click to expand...
Click to collapse
=============== Requirements ===============​
Custom recovery
Root access (to write to /system)
Click to expand...
Click to collapse
=============== How to Flash ===============​
Download the mod below and place on your internal_sdcard or sdcard (doesn't matter, just remember where you put it!)
Go into Settings > Power > Fast Boot and uncheck that.
Turn the phone off. Once off, press and hold the Volume Down + Power Button until you reach the white bootloader screen
Choose "RECOVERY" (volume down and up to move, power to select)
Choose "Install" and locate the mod wherever you put it. NOTE: If you don't see it, make sure that either internal_sdcard or sdcard is mounted. This can be done via the "Mount" button at the main menu of TWRP. Be sure that either internal_sdcard or sdcard is checked!
Wait until the install is finished and then tap "Reboot to System"
Click to expand...
Click to collapse
=============== Dual Core Mod v2.1 (flash over any existing version) ===============​Updated dcmhelper
Fixed issues with cpu1 turning off when screen on
Fixed issues with cpu1 turning on when screen off
Added double check for cpu1 off when screen off
Added logging to logcat
Updated init.qcomm.post_boot.sh
Set perms of 444 on hotplug file, regardless of dcmhelper present or not
Other
Added /system/bin/dcmlog (type su then dcmlog from terminal or adb) - Tells you current cpu1 status [0 = off, 1 = on]
=============== Dual Core Mod v2 (flash over v1) ===============​
MANY new options!
Added "Screen Profiles" and "Auto Tweak" script option (all located in one configurable file - /system/bin/dcmhelper) - see 2nd post for more info
Added "Memory Optimization" option - see 2nd post for more info
Support AT&T HTC One X
Support T-Mobile One S
"All-in-One" .zips - all devices supported via 1 .zip file (thanks to a very smart updater-script I wrote )
=============== Dual Core Mod v1 ===============​
Initial release
Click to expand...
Click to collapse
=============== Explanation of Mods===============
All DCMs have memory optimizations!​
Dual Core Mod - Full time cpu1 on
Dual Core Mod Plus - cpu1 on when screen on, cpu1 off when screen off
Dual Core Mod Ultimate - Same as Plus but governor is tweaked for more performance when screen on, more battery life when screen off.
Click to expand...
Click to collapse
=============== Downloads ===============
Dual Core Mod v2.1 Ultimate
Dual Core Mod Back to Stock​
Click to expand...
Click to collapse
=============== Credits ===============​
Freeza for doing this on the EVO 3D where I got the idea from
rohandhruva, remedy1419, and ewalk4866 for EXTENSIVE testing to fix issues and make DCM better
Click to expand...
Click to collapse
It has been asked to make it easier to donate for people using Tapatalk, so here are the links...
Donate to -viperboy-
http://bit.ly/n7sB9g​
More Info​
=============== How are all supported phones in 1 zip per file? ===============​I wrote a custom updater-script that will identify your device and automatically give you the right file needed. Just like magic
Click to expand...
Click to collapse
=============== How can I monitor the 2nd core? ===============​You can also verify this is working by any number of apps, but I find SystemPanel to be the best. They have a free lite version. Just download and tap on the top right where the CPU info is. You will the the CPUs changing, when it goes grey it's offline (which you won't see when using the Dual Core Mod).
aLogcat will also show you everything DCM is doing. Just apply a filter in aLogcat called DCM and it will tell you in detail what is going on.
If you want a little bit less info or want to use adb, just type su and then dcmlog and you will see what the 2nd core is doing exactly. This is updated every 1/4 second for extremely accurate results.
Click to expand...
Click to collapse
=============== What are the "Memory Optimizations?" ===============​The optimizations I made are the same that I have made in viperROM. They are as follows:
echo "0,4,6,8,14,15" > /sys/module/lowmemorykiller/parameters/adj
echo "2560,4096,6144,7680,8704,10240" > /sys/module/lowmemorykiller/parameters/minfree
Click to expand...
Click to collapse
This will allow better multitasking and should eliminate any issues with apps being killed off very easily.
Click to expand...
Click to collapse
=============== What are the "Screen Profiles?" ===============​The screen profiles are part of a custom script, located in /system/bin/dcmhelper. Once flashed, this .zip runs in the background to monitor screen state (uses hardly any power). When you choose a .zip with this in it, the phone won't just leave the second core always running - it will turn it off when the screen is off and on when the screen is on. This is done via this code here:
while : ; do
awake=`cat /sys/power/wait_for_fb_wake`
if [ $awake = "awake" ]; then
echo 1 > /sys/devices/system/cpu/cpu1/online
awake=
fi
sleep=`cat /sys/power/wait_for_fb_wake`
if [ $sleep= "sleeping" ]; then
echo 0 > /sys/devices/system/cpu/cpu1/online
sleep=
fi
Click to expand...
Click to collapse
Pretty simple and straightforward
Click to expand...
Click to collapse
=============== What is the "Auto Tweaking Script?" ===============​The auto tweaking script is the second part of a /system/bin/dcmhelper. This part of the script will set certain governor settings based on the screen being off or on. In the viperROM version, the screen on settings are the same as in the ROM. In the other versions, the screen on settings are more set for performance. I intentionally kept the same settings in the viperROM version to make sure you get as close to the same battery life as unmodified viperROM. Here is a code snipit (from the non-viperROM version) that shows what the settings are:
ondemand_sampling_rate_awake=40000
ondemand_up_threshold_awake=80
ondemand_down_differential_awake=12
ondemand_sampling_down_factor_awake=3
ondemand_sampling_rate_sleep=80000
ondemand_up_threshold_sleep=95
ondemand_down_differential_sleep=5
ondemand_sampling_down_factor_sleep=1
Click to expand...
Click to collapse
Long story short, when awake, it will check if the CPU needs to increase speed faster and in bigger steps. When asleep, it will wait longer before polling the CPU to scale up and it will take a more gradual approach to scaling up. However, you shouldn't experience any lockscreen lag.
Click to expand...
Click to collapse
=============== Long Term Goals for Dual Core Mod ===============​
Config file and script for users to set their own settings
Profiles for battery
Set max freq when screen off (will affect virtuous_oc daemon in viperROM, still working on that)
Click to expand...
Click to collapse
Any feedback about theses scripts (the "full one" w ith screen+memory+tweaks) on our lovely One S stock/CM9 ? It seems to be a very good option while waiting the OneS sources!
Good Job, will test it soon
Nice, good job!
Would these mods have any effect on custom roms like Lee Droid's and torxx
snwman said:
Would these mods have any effect on custom roms like Lee Droid's and torxx
Click to expand...
Click to collapse
I took a look at the scripts... It should be compatible with Stock (and derivated ROMs like LeeDroid & so on), as on CM9/AOSP ones. The scripts seems to affect on low-level files (/proc) related to the chipset, so the affected files should be present on both Stock/AOSP ones.
I'm under CM9 for now, but a Stock feedback can confirm this? You?
Thanks to me ;-) Well he came here
EDIT: lol sorry, didn't see it was a flashable zip
So, flashed the ZIP, but cpu1 never comes online... The script disables it permanently? I expected a cpu1-offline under a load factor, and goes online over another load factor.
plakers said:
EDIT: lol sorry, didn't see it was a flashable zip
So, flashed the ZIP, but cpu1 never comes online... The script disables it permanently? I expected a cpu1-offline under a load factor, and goes online over another load factor.
Click to expand...
Click to collapse
The One X guys seem to be having issues as well, it's hit or miss. Of course, I don't have issues in my testing lol what file did you use?
by linpack bench I can say 204 (and up) is stable score now.
in quadro bench:
before cpu score is 8486.
after cpu score is 8732.
so it's working.
Regards !
Thanks very much for this mod, going to try it out right now. Some questions on my part: (1) can this put any long-term additional stress on the cpu by forcing it to work more? (2) If a ROM is updated, does the script need to be flashed again after flashing the ROM? Again, thanks a lot; will try it out now and report my findings on the LeeDroid ROM.
Closed Source Project said:
Thanks very much for this mod, going to try it out right now. Some questions on my part: (1) can this put any long-term additional stress on the cpu by forcing it to work more? (2) If a ROM is updated, does the script need to be flashed again after flashing the ROM? Again, thanks a lot; will try it out now and report my findings on the LeeDroid ROM.
Click to expand...
Click to collapse
No, no added stress and yes, you will likely have to reflash after a ROM update since most ROMs wipe /system where this script is located.
The script installed fine and my ROM booted up nice and fast. I will now do benchmarks and other daily tasks while observing my battery life and report back with my final findings in a few hours. So far seems good.
I am on LeeDroid's latest with the full script installed (tweak scrip+mem opt+screen prof).
How did you come about those minfree values? Do you know offhand how the numbers in your script compare to those used by the minfree manager app (i.e. MFM uses MB, are your numbers in KB?)
My results: Battery seems to be better, yet performance is not so much. Both Quadrant and Antutu benchmarks show slightly lower scores than what I got right before flashing the mod. The difference is very minimal, just curious as to why it would be lacking ever so slightly. The general UI seems just as snappy as before.
Is there an app to view exactly what the CPU is doing and how many cores are running? If so, please share! Thanks.
Closed Source Project said:
My results: Battery seems to be better, yet performance is not so much. Both Quadrant and Antutu benchmarks show slightly lower scores than what I got right before flashing the mod. The difference is very minimal, just curious as to why it would be lacking ever so slightly. The general UI seems just as snappy as before.
Is there an app to view exactly what the CPU is doing and how many cores are running? If so, please share! Thanks.
Click to expand...
Click to collapse
Working with some people in IRC to improve everything. And yes, SystemPanel Lite, as said in the OP
-viperboy- said:
The One X guys seem to be having issues as well, it's hit or miss. Of course, I don't have issues in my testing lol what file did you use?
Click to expand...
Click to collapse
I used the modV2 with CPU/RAM/Tweaks, the full one.
Dual Core Mod v2 w/ Screen Profiles AND Auto Tweaking Script AND Memory Optimizations
And only first core is active ...
plakers said:
I used the modV2 with CPU/RAM/Tweaks, the full one.
Dual Core Mod v2 w/ Screen Profiles AND Auto Tweaking Script AND Memory Optimizations
And only first core is active ...
Click to expand...
Click to collapse
I have a fantastic group of testers, we got this sorted out. Just going over the final small details now, but I will have all new builds up in 30-60 mins confirmed working!
-viperboy- said:
I have a fantastic group of testers, we got this sorted out. Just going over the final small details now, but I will have all new builds up in 30-60 mins confirmed working!
Click to expand...
Click to collapse
Yeahhhh haaaaa!!!
hehe good testers, for good scripts man!
Updated to v2.1! Much, much improved thanks to my 3 great testers rohandhruva, remedy1419, and ewalk4866 for testing numerous builds and spending hours making sure this is as bulletproof as possible. Please see the OP for full changelog. A few other notes about v2.1:
I dropped a few of the versions because there were hardly any downloads on it. The "3 in 1" had literally 10 times the amount of downloads as some of the other versions. Based on this, memory optimizations are included in all builds. The naming scheme has changed as well, info in the OP.
Please use aLogcat if you want to view everything DCM is doing. Just apply a filter in aLogcat called DCM and it will tell you in detail what is going on. If you want a little bit less info or want to use adb, just type su and then dcmlog and you will see what the 2nd core is doing exactly. This is updated every 1/4 second for extremely accurate results.
Battery life should be very good on Ultimate because of the settings I have set. If for some reason you can verify that the mod isn't working by using what I said above, please let me know. I have verified with numerous people that it works, so it could be a minor issue in the flashable .zip. I'm not anticipating any issues, but anything can happen.
Enjoy

[GUIDE] Battery Guide Roughly 120-150% More Battery based on GB Stock Battery

I can't Garantee that This guide will give you 120-150% battery life it is all on the usage of the phone
but i get around 150% whit Bernies Pacman rom
first do we need to install some Apps all apps are free so no worries
1.Android tweaker
2.Greenify (Optional but higly Recommended)
only search for these apps on Gplay (yes i am lazy)
Let's start whit the General setting for all kind of rom's
open up android Tweaker (make an Rom backup before if you are uncertain of this app or maybe this Guide there is many more Good options in this app but i am lazy and don't Want to write them because they aren't Battery related so check around)
go to the Battery tap and klick on
1. increase deep sleep battery life
2. disable power collapse
3. disable media scanner
For CM10 roms whit Performance tab go to Kernel Tab in android Tweaker and Choose Conserativ(Battery)
but make my CM 10 steps first if you don't have you Cpu Gov on Conservativ already
For CM10 roms that have performance tab (will probably work on other Roms to like ICS but i don't know)
1.set I/O To Noop
2.set Cpu Gov to Conservativ
3.activate Kernel Sampling merging
4.set Zram to 0%
And Last if you installed Greenify use it on all the apps who have some kind of Background process that you don't Really need to have Activated allt the time Saves a lot of Ram and Battery
This is my way of Optimising if you have any improvments or something that you want to be in this Guide sen me a PM
(i may have made some misstake or Forgot something becasue my performance tab is kind of gone and i am to lazy to Flash the Newest update)
Thank you:laugh::good:
Wow that was a Quick Response

FEB-9-15 [] Post_boot tweaks - An *interactive* boost

*FOR ANY DEVICE USING QUALCOMM CHIP***
Drop this file in your /system/etc folder, replacing the stock one. Cleaned up, and modified to work with a stock kernel or lean kernel.
Please open up the file, and read some of the notes I added, so you know what this does and how to change it if you so desire. It is very basic and straightforward.
Also, please remember one thing, if you want to go to the stock kernel, simply change any words in the scripts from "interactiveX" to "interactive".
Recommended lean kernel 3.16 with these scripts.
Designed to work with ALL Galaxy Note 3's running touch wiz 4.4.2 ROMs and running lean kernel or stock kernel. Other kernels are not guaranteed due to the voltages applied.
This will make a huge difference in performance and battery. Been using this (developed by me) for a long time now.
Summary:
*I/O optimization
*tuned interactive parameters
*fixed sysfs permissions for cpu's (root now has full control of sysfs tuneables)
*GPU sysfs identified for user to customize
*screen off frequency set to 1.2 GHz (can be changed by user)
*custom voltage set for bin 2 device. (Read instructions within file to adjust for others bins accordingly)
*custom mpdecision tuning and other relevant instruction regarding mpdecision binary
*general CPU tweaks for better performance, responsiveness and battery life (yes all 3 can be achieved, and are)
Again, open the file with a file explorer (or notepad+ in windows). Read it, understand it, adjust what you want, or leave it be. These settings are very much dialed in for the interactiveX governor of LK. It won't get much better. I'd say take a look at the voltage portion and mpdecision for now (found at the end).
Once more, drop file into the /system/etc directory... Replace the existing one, and reboot.
FILE DOWNLOAD
Updated today... many useful changes, and fixes (set up for stock kernel for now)
https://www.dropbox.com/s/tjlygujptls3lks/init.qcom.post_boot.sh?dl=0
Are power save settings included in your mod?
I made some test with Antutu on stock CPU speed..
1.) Stock kernel
- original file = > 43911
- your file "interactiveX" => 43545
- your file "interactive" => 41690
2.) Lean kernel
- original file = > 44047
- your file "interactiveX" => 42484
- your file "interactive" => 41804
tkari4 said:
Are power save settings included in your mod?
I made some test with Antutu on stock CPU speed..
1.) Stock kernel
- original file = > 43911
- your file "interactiveX" => 43545
- your file "interactive" => 41690
2.) Lean kernel
- original file = > 44047
- your file "interactiveX" => 42484
- your file "interactive" => 41804
Click to expand...
Click to collapse
I wouldn't be too concerned with benchmark scores.
Performance ≠ a higher score in antutu. But suit yourself.
Just giving you all a heads up.... I think there may have been a few errors in the stock init.qcom.post_boot file (they are human too, remember).
I am testing a few small changes to certain lines in the "factory" script to make sure. A brief explanation of it is that there are certain lines I removed from the one you all are using right now, and I did so because the file paths being called out did not exist!
However, I was going over this again tonight, getting ready for the official LP release and decided to review this odd discrepancy one more time. After doing some digging, I found that the file that some of those values were intended to be written to, were actually somewhere else!
Doh! - Sammy/QC. It is very possible that this location changed from a previous design or fs structure and somebody simply forgot to modify the script. Very interesting indeed.
Anyways, after I run this for a couple of days and do a little bit more investigating, I'll post the updated script for all of you.
Updated file and link is now available... I highly recommend anybody (devs included) use this in your current setup. Lot of fixes to the stock file that were critical to stability, power saving, and performance.
red_can_soda said:
Updated file and link is now available... I highly recommend anybody (devs included) use this in your current setup. Lot of fixes to the stock file that were critical to stability, power saving, and performance.
Click to expand...
Click to collapse
I wonder if this would work on lollipop leak. I'm running ayra mod v2 and could test this out.
fookea said:
I wonder if this would work on lollipop leak. I'm running ayra mod v2 and could test this out.
Click to expand...
Click to collapse
My guess is that it would work on 5.0... I would need to see a 5.0 post_boot file, though, to compare and look for any major changes.
red_can_soda said:
Updated file and link is now available... I highly recommend anybody (devs included) use this in your current setup. Lot of fixes to the stock file that were critical to stability, power saving, and performance.
Click to expand...
Click to collapse
I've installed your script (on stock 4.4.2 kernel) but didn't notice any performance, stabilty nor battery improvements.. It's more placebo effect than a real improvement.
ranwej said:
I've installed your script (on stock 4.4.2 kernel) but didn't notice any performance, stabilty nor battery improvements.. It's more placebo effect than a real improvement.
Click to expand...
Click to collapse
You are probably right, evidenced in the reports by everyone else that has used this saying the exact opposite. Lol
For me, it's noticeable. I have tested it pretty thoroughly and the script isn't just some cute ideas thrown together. From the lpm fixes (you can thank Qualcomm for that mistake), to some of the finer things like the deadline IO tuning (geared specifically for flash memory access), to some of the virtual machine parameters I've adjusted... There is logic and reasoning behind every single line of code I put together for this.
To be frank, I don't mind opinions. Hell I love them. But you need to know what you are talking about before you make a snide comment... Not for my sake, but for somebody who might not use it simply because they saw your remarks.
Many things appear to be placebo when it comes to this kind of stuff... But go start unzipping a large compressed file before and after using this script, or move a massive amount of data from your internal storage while playing music, browsing the web, and downloading an app at the same time.... I'd doubt you come in here talking about placebo.
You have yourself a wonderfully intelligent day.
Here you go, this is the post boot file. I'm running ayra mod v3 on noa5 leak with nl8 bootloader. The file appears to be modified on 11 Feb 2015

Categories

Resources