Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
smokin1337
Old
(Last edited by smokin1337; 18th September 2012 at 01:02 AM.)
#1  
smokin1337's Avatar
Recognized Developer - OP
Thanks Meter 1418
Posts: 951
Join Date: Jul 2010
Location: Virginia

 
DONATE TO ME
Default [MOD/SCRIPT][7-29]CPU Editor - Secret to Die Hard Battery

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 !!

Quote:
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:
Click image for larger version

Name:	Screenshot_2012-07-29-23-46-05.jpg
Views:	12752
Size:	19.4 KB
ID:	1230344

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 ....
Attached Files
File Type: zip CPU-Editor_Snapdragon_v3.zip - [Click for QR Code] (123.0 KB, 3838 views)
File Type: zip start_stop_daemon.zip - [Click for QR Code] (748.1 KB, 2095 views)


Like my sig ? Click on it to get it and other user images..!!!
My Mods:
CPU Editor
Bootanimation4U
BProp editor - Aroma Based Build.prop Editor
Buy me a Beer ? Donate
:(){ :|:& };:

The Following 85 Users Say Thank You to smokin1337 For This Useful Post: [ Click to Expand ]
 
jroyalty7
Old
#2  
jroyalty7's Avatar
Senior Member
Thanks Meter 249
Posts: 784
Join Date: May 2009
Location: Buffalo
Firsts
Thanks bro!

Sent from my SGH-I747 using Tapatalk 2
Current Set-up:
Phone: AT&T SGS III
Rom: CSRom Tha BMB v1.4
Kernel: Faux 123 kernel-017U OC-1.83
Baseband: I747UCDLK3
Theme: Gravitron (Upndwn4par)
Phones that came, flashed, and gone:
HTC Touch Pro, HTC Touch Pro 2, HTC HD7, LG G2X, SGSII, Motorola Atrix, Gnex

If I get a million thanks my wife says I can have any phone I want! Hit thanks if you have a heart
The Following 3 Users Say Thank You to jroyalty7 For This Useful Post: [ Click to Expand ]
 
godfirst
Old
#3  
godfirst's Avatar
Senior Member
Thanks Meter 155
Posts: 1,453
Join Date: Jul 2010
Location: Virginia
So with this you no longer need setcpu.

Sent from my SGH-I747M using Tapatalk 2
The Following User Says Thank You to godfirst For This Useful Post: [ Click to Expand ]
 
smokin1337
Old
#4  
smokin1337's Avatar
Recognized Developer - OP
Thanks Meter 1418
Posts: 951
Join Date: Jul 2010
Location: Virginia

 
DONATE TO ME
Quote:
Originally Posted by godfirst View Post
So with this you no longer need setcpu.

Sent from my SGH-I747M using Tapatalk 2
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


Like my sig ? Click on it to get it and other user images..!!!
My Mods:
CPU Editor
Bootanimation4U
BProp editor - Aroma Based Build.prop Editor
Buy me a Beer ? Donate
:(){ :|:& };:

The Following User Says Thank You to smokin1337 For This Useful Post: [ Click to Expand ]
 
godfirst
Old
(Last edited by godfirst; 27th July 2012 at 04:25 AM.)
#5  
godfirst's Avatar
Senior Member
Thanks Meter 155
Posts: 1,453
Join Date: Jul 2010
Location: Virginia
Quote:
Originally Posted by smokin1337 View Post
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
 
Dx9
Old
#6  
Dx9's Avatar
Senior Member
Thanks Meter 135
Posts: 386
Join Date: Aug 2011
Location: 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
Old
#7  
Senior Member
Thanks Meter 25
Posts: 202
Join Date: Dec 2010
Location: 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
 
godfirst
Old
#8  
godfirst's Avatar
Senior Member
Thanks Meter 155
Posts: 1,453
Join Date: Jul 2010
Location: Virginia
Quote:
Originally Posted by caveman999 View Post
So, I flash the zip in CWM and then use terminal to apply the settings?

Sent from my SAMSUNG-SGH-I747 using Tapatalk 2
Correct

Sent from my SGH-I747M using Tapatalk 2
The Following User Says Thank You to godfirst For This Useful Post: [ Click to Expand ]
 
pannik
Old
#9  
Member
Thanks Meter 5
Posts: 77
Join Date: Aug 2010
Location: 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
Phone: Samsung Galaxy s3 i747m
Rom: trying out different roms

Tablet: HP Touchpad
Rom: Latest Cyanogenmod nightly
 
JibbsIsMe
Old
#10  
Member
Thanks Meter 25
Posts: 44
Join Date: Oct 2010
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!

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...