[MOD/SCRIPT][7-29]CPU Editor - Secret to Die Hard Battery

Search This thread

smokin1337

Retired Recognized Developer
Jul 30, 2010
963
1,602
Virginia
CPU Editor Snapdragon

This mod allows you to easily change cpu settings on the fly, and supports dual core devices. Easier and cheaper $$ than available apps that do the same thing !!

ReadMe​

Quad core support coming soon !!

This mod will work on dual core devices with snapdragon processors, to check compatibility use a file explorer and go to /system/etc and look for a file named init.qcom.post_boot.sh, if that file exists this mod will work !! It is confirmed working on the Galaxy S3 and HTC One Series.

This is 90% of the secret behind my roms battery life, select ondemand profile from the menu and select battery saver. And see how long your battery lasts :)

Features:
Change CPU Governor
Change CPU Min/Max Frequencies
Set Dual Core CPU's Independently - Governor and Frequencies
Force Dual Core - Second Core Online ALL The Time
View Current Settings For Everything
Settings applied on boot/reboot
OnDemand Profiling
Edit I/O Scheduler
Edit Cache Size

Usage:
Flash in recovery
Reboot
Open terminal
Type "su" without the quotes
Type "cpu" without the quotes
Make your selections

Notes:

An error appears sometimes when enabling or disabling force dual core, it's ok the settings still get applied.

Settings get applied immediately

Cores can be set independently, you can make the governors and frequencies different on each core. Could be a great battery saver by limiting the second cores resources.

Force Dual Core will make the second core stay online all the time

Some kernels do not have a available_scaling_freq so the available frequencies will not be displayed, look up the settings your kernel has either in your rom thread or kernel thread.

OnDemand Profiling allows you to set profiles for ondemand governor, the settings possible are performance, performance and battery, and battery saver. Setting will only apply to ondemand govenor !! This will overwrite your cpu settings ie. Governor and frequency.

If you experience a dip in performance while using battery saver, in v3+ you can set your own cpu speed and still use the profile. By default battery saver underclocks the cpus to 1242000, you can now run "cpu" and set battery saver for ondemand profile then edit maxcpu0 and maxcpu1 to a higher frequency like 1350000 until your performance is how you want it.

ChangeLog:

v3:
- Added I/O scheduler
- Added cache size
- Added clear all settings ie., disable
- Made it possible to change cpu frequencies when using a profile

Screenshot:
Screenshot_2012-07-29-23-46-05.jpg

Anyone having trouble with settings sticking use a file explorer and go to /system/xbin and look for a file called start-stop-daemon, if it's not there flash start_stop_daemon.zip in attachments... The script DEPENDS on this file, it will be in the next version to be sure its there :)

Please report any bugs you may find here.

Thanks to -viperboy- for some of the code used

Enjoy ....
 

Attachments

  • CPU-Editor_Snapdragon_v3.zip
    123 KB · Views: 5,528
  • start_stop_daemon.zip
    748.1 KB · Views: 3,099
Last edited:

godfirst

Senior Member
Jul 6, 2010
4,195
1,182
Somewhere Giving God All The Glory!
It does pretty much the same thing except my profiles are preset. Try the battery saver I use it all the time.

Sent from my SAMSUNG-SGH-I747 using xda premium

So if I enable dual and max for both cpu will it over write the battery saving profile? It also doesn't have the see current settings.

Sent from my SGH-I747M using Tapatalk 2
 
Last edited:

Dx9

Senior Member
Aug 5, 2011
478
168
Ottawa
Was in the middle of charging my phone. Flashed the script, set to battery saver, rebooted and finished charging the phone. Already at 18 min screen time and battery is at 98%. Pretty sweet.
 

caveman999

Senior Member
Dec 21, 2010
206
26
Austin
So, I flash the zip in CWM and then use terminal to apply the settings?

Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
 

pannik

Senior Member
Aug 12, 2010
92
10
Montreal
Can you post the settings you are using for the script?
I would like to test the settings you are using.

Thanks

Sent from my SGH-I747M using xda app-developers app
 

JibbsIsMe

Member
Oct 13, 2010
47
26
Hmm, I can't seem to get the settings I set to stick at boot. What I'm trying to do is keep my phone in 'battery saver' mode, so I set it, and it works completely. I confirm this by checking my max CPU, and it is changed, so it worked.

Now, when I try to reboot, the settings don't stick. I checked out my root logs, and disabled all apps that may be changing anything CPU related. Then I ran the script again, set to battery saver mode, and rebooted.

Same thing, the script isn't applied anymore.

I'm running AOKP on JK with the KT747 kernel.
I also tried to make a script and get it to run on boot with ROM Toolbox, but I have no idea how to do that. I tried:
Code:
su
cpu
8
3
 
x
but that didn't work at all.

Any help or advice would be greatly appreciated!
 

godfirst

Senior Member
Jul 6, 2010
4,195
1,182
Somewhere Giving God All The Glory!
Hmm, I can't seem to get the settings I set to stick at boot. What I'm trying to do is keep my phone in 'battery saver' mode, so I set it, and it works completely. I confirm this by checking my max CPU, and it is changed, so it worked.

Now, when I try to reboot, the settings don't stick. I checked out my root logs, and disabled all apps that may be changing anything CPU related. Then I ran the script again, set to battery saver mode, and rebooted.

Same thing, the script isn't applied anymore.

I'm running AOKP on JK with the KT747 kernel.
I also tried to make a script and get it to run on boot with ROM Toolbox, but I have no idea how to do that. I tried:
Code:
su
cpu
8
3
 
x
but that didn't work at all.

Any help or advice would be greatly appreciated!

You have to apply sticky mode after you set the battery setting so it will stick on a reboot.

Sent from my SGH-I747M using Tapatalk 2
 

Spartoi

Senior Member
Jul 31, 2009
1,862
101
Pomona
So will this work on Stock LG1 with ktoonsez kernel?

Also, instead of flashing via CWM, could I just transfer the files to their respective directory via Root Explorer?
 

Spartoi

Senior Member
Jul 31, 2009
1,862
101
Pomona
Well then I don't see why not if that is the only two files in the zip. Make a nand and try it out, but if you make a nand you might as well flash it lol. Or at least backup original files if it will do any replacing.

Sent from my SGH-I747M using Tapatalk 2

I just installed TWRP and then installed the .zip and ran the script. All seems well for now. :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 88
    CPU Editor Snapdragon

    This mod allows you to easily change cpu settings on the fly, and supports dual core devices. Easier and cheaper $$ than available apps that do the same thing !!

    ReadMe​

    Quad core support coming soon !!

    This mod will work on dual core devices with snapdragon processors, to check compatibility use a file explorer and go to /system/etc and look for a file named init.qcom.post_boot.sh, if that file exists this mod will work !! It is confirmed working on the Galaxy S3 and HTC One Series.

    This is 90% of the secret behind my roms battery life, select ondemand profile from the menu and select battery saver. And see how long your battery lasts :)

    Features:
    Change CPU Governor
    Change CPU Min/Max Frequencies
    Set Dual Core CPU's Independently - Governor and Frequencies
    Force Dual Core - Second Core Online ALL The Time
    View Current Settings For Everything
    Settings applied on boot/reboot
    OnDemand Profiling
    Edit I/O Scheduler
    Edit Cache Size

    Usage:
    Flash in recovery
    Reboot
    Open terminal
    Type "su" without the quotes
    Type "cpu" without the quotes
    Make your selections

    Notes:

    An error appears sometimes when enabling or disabling force dual core, it's ok the settings still get applied.

    Settings get applied immediately

    Cores can be set independently, you can make the governors and frequencies different on each core. Could be a great battery saver by limiting the second cores resources.

    Force Dual Core will make the second core stay online all the time

    Some kernels do not have a available_scaling_freq so the available frequencies will not be displayed, look up the settings your kernel has either in your rom thread or kernel thread.

    OnDemand Profiling allows you to set profiles for ondemand governor, the settings possible are performance, performance and battery, and battery saver. Setting will only apply to ondemand govenor !! This will overwrite your cpu settings ie. Governor and frequency.

    If you experience a dip in performance while using battery saver, in v3+ you can set your own cpu speed and still use the profile. By default battery saver underclocks the cpus to 1242000, you can now run "cpu" and set battery saver for ondemand profile then edit maxcpu0 and maxcpu1 to a higher frequency like 1350000 until your performance is how you want it.

    ChangeLog:

    v3:
    - Added I/O scheduler
    - Added cache size
    - Added clear all settings ie., disable
    - Made it possible to change cpu frequencies when using a profile

    Screenshot:
    Screenshot_2012-07-29-23-46-05.jpg

    Anyone having trouble with settings sticking use a file explorer and go to /system/xbin and look for a file called start-stop-daemon, if it's not there flash start_stop_daemon.zip in attachments... The script DEPENDS on this file, it will be in the next version to be sure its there :)

    Please report any bugs you may find here.

    Thanks to -viperboy- for some of the code used

    Enjoy ....
    3
    Firsts
    Thanks bro!

    Sent from my SGH-I747 using Tapatalk 2
    2
    Thread Cleaned
    In thread is not the place for this and not helping your case!
    Pissing matches and arguing in thread will not be tolerated. This is what PM is for.
    Thank you for your cooperation
    Friendly Neighborhood Moderator
    2
    How do you see what settings are currently enabled?
    I want to know if its sticking on reboot. I saw this questions asked in the thread already, but no one answered.

    In /data there is a file called cpu editor.log after a reboot look at the bottom of the file, it says battery saver enabled with a timestamp look at the time it will say something close to the current time.

    Sent from my SAMSUNG-SGH-I747 using xda premium
    2
    It's easy, open the terminal emulator you downloaded in the play store. When it opens, assuming you are rooted just type the letters su and the type the letters cpu and the you should see the options there. I picked option 8 for on demand then the number 3 for battery save if that's what you want and then you should be good. Reboot and you are all set.

    I have been using my phone for about 8 hours and medium Usage, 2 separate 30 min phone calls and reading news feeds off and on all day and reading and replying here and I'm at 71 percent. This is crazy
    Sent from my SCH-I535 using xda app-developers app