Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Script {APP} CPU Sleeper, The Battery Saver Mod! 08/06/2012 Release 2.7

OP eugene373

28th June 2012, 10:00 PM   |  #1  
eugene373's Avatar
OP Recognized Developer
Thanks Meter: 7,303
 
5,626 posts
Join Date:Joined: Aug 2009
Donate to Me
More
App Version:
CPU Sleeper
~Free to all XDA Memebers
~ Must Be Rooted to use App

What is it?
Its a fairly simple App that will put CPU 1/2/3 OFFLINE when the screen turns off. Once the screen comes back on, it will allow CPU 1/2/3 back ONLINE.

How does it work?
Since we have Dual & Quad core CPUs, we have a CPU 0 and a CPU 1/2/3, core 0/1/2/3, while the screen is off we really only need to have 1 core active "CPU0", this App will make sure CPU 1/2/3 shuts off while the screen is off, then resumes normal usage when the screen comes back on.

Compatibility?
Works with any Dual Core & Quad Core Devices!
~ICS
~Gingerbread

Battery Saving?
Battery savings all depends on Usage & idle times.

v2.7
App Download: CPUSleep.apk

Quote:

v2.8 via Market
CPUSleep.apk
Version 2.8 Release Notes:
~ Fixed GPS Not Locking while App is installed
~ GNex Freeze Issue should be Fixed
~ JB Compatibility should be fixed regarding Sleep Of Death
~ Fix Quad Core Sleep Issue's
~ Better Handling of CPU2 & CPU3 on Quad Core's

Credits:
Handlerexploit for co-creation of this wonderful App.



Script Version!
Code:
This time I present to you a script that will in theory (and so far for me, in reality) save us some battery without having to risk our hardware with undervolting! I present to you...

CPU Sleeper
Quote:

Honestly the Script can be made to work with any Dual Core / Quad Core! The Only Problem is you need to be Rooted! ~ Currently the issue with CM9, is that the boot becomes incomplete while in init.d folder without Modification to the sysinit.. ~ however, with any rooted device you can download the script & continue to use it via a script manager app on every boot. ~ With the Script Manager App, this script virtually can run on any Multi-Processor CPU Hope that clears things Up, ~~Eugene

What is it? Its a fairly simple script that will put CPU 1 OFFLINE when the screen turns off. Once the screen comes back on, it will allow CPU 1 back ONLINE. How does it work? Since we have dual core CPUs, we have a CPU 0 and a CPU 1, core 1 and core 2, while the screen is off we really only need to have 1 core active, this script will make sure CPU 1 shuts off while the screen is off, then resumes normal usage when the screen comes back on. WARNING! READ THIS! This script relies on init.d OR script manager! CM9, for some reason, tends to run this at the exact same time it runs some other script (I forget atm which) and it will clash, causing no boot! CM9 users MUST use the script manager version install! Flex Reaper appears to work fine with it as init.d. I strongly urge you to use the script manager version of this, NOT the flashable version. Always make a nandroid backup before modifying the system, including this! Instructions Available in 2 versions, script only version which you can place wherever you want and run however you want, or a CWM/TWRP flashable zip that will place the file for you in /system/etc/init.d and set permissions. Version 1: Flashable Same as any of my flashable releases, I did most of the work for you! Make a full backup Download to external SD card Install from SD card Pick the cpu sleeper zip file it'll be almost instant reboot Shouldn't be any need to clear caches or anything like that. Version 2: Script only This can be run in 2 ways, via init.d support, or via script manager. Both are pretty similar, and can be done a number of ways, however this is the basis of how. Init.d supported kernel: Make a backup! Download the script file, making sure no extensions get added onto the file. Copy the file to /system/etc/init.d and set the permissions to the following: XOX XOX XOX Once done, reboot the system, and it will take effect when your system is finished rebooting. Script Manager This method is probably the better method, and should work with any kernel/ROM. Download the script file, making sure no file extensions get added, and copy it to /system/etc. Set the file permissions to: XOX XOX XOX Once done, load up script manager, select browse as root (if it isn't already set from the crossix mod method in the guide) then browse to /system/etc and select the script file S98cpu_sleep, then select ROOT and BOOT options. After this is set, reboot system. What do I do if I can't boot after using this? You made that backup, right? Ok, then here is what you do. Hold the power button until the tablet powers off Press and hold the volume down button, next to the screen lock switch Press and hold Power (while holding volume down) Once the recover kernel message comes up, release the buttons In CWM go to advanced, mounts, mount system, then format system In TWRP, go to wipe, then wipe system In CWM go to restore, advanced restore, restore ONLY system In TWRP select restore, then uncheck all so ONLY system is checked After restoring system, wipe cache and dalvik cache, then reboot system. System should boot normally. Downloads Available in 2 versions, script only version which you can place wherever you want and run however you want, or a CWM/TWRP flashable zip that will place the file for you in /system/etc/init.d and set permissions. Dual Core: Download: Script Only - Recommend Install via Script Manager App CPU Sleeper script only Quad Core: Download: Script Only - Recommend Install via Script Manager App cpusleep Download: ClockworkMod Recovery .zip for T989 / I727 CPU_Sleeper.zip Thanks to pio_masaki for rewriting the OP
Last edited by eugene373; 6th August 2012 at 09:26 PM.
The Following 144 Users Say Thank You to eugene373 For This Useful Post: [ View ]
28th June 2012, 10:04 PM   |  #2  
LoopDoGG79's Avatar
Senior Member
Flag Modesto, Cali
Thanks Meter: 1,345
 
6,304 posts
Join Date:Joined: Feb 2012
More
What permissions should it be set at? Still a bit of a noob

Sent from AOKP Goodness :D
28th June 2012, 10:11 PM   |  #3  
eugene373's Avatar
OP Recognized Developer
Thanks Meter: 7,303
 
5,626 posts
Join Date:Joined: Aug 2009
Donate to Me
More
Quote:
Originally Posted by LoopDoGG79

What permissions should it be set at? Still a bit of a noob

Sent from AOKP Goodness :D

755 or
r-x r-x r-x via rootexplorer
The Following 7 Users Say Thank You to eugene373 For This Useful Post: [ View ]
28th June 2012, 10:14 PM   |  #4  
sinfulgray's Avatar
Senior Member
Flag St. Petersburg, FL
Thanks Meter: 331
 
746 posts
Join Date:Joined: Aug 2010
More
Can this be used on any ROM or Kernel?
Last edited by sinfulgray; 28th June 2012 at 10:27 PM.
28th June 2012, 10:15 PM   |  #5  
teambestyrandy's Avatar
Senior Member
Thanks Meter: 178
 
465 posts
Join Date:Joined: Mar 2012
Wow this is great Eugene is very impressive

Sent from my SGH-T989 using xda premium
28th June 2012, 10:19 PM   |  #6  
hiz99's Avatar
Senior Member
Flag Tulsa
Thanks Meter: 45
 
569 posts
Join Date:Joined: Jan 2011
More
this can be used with any kernel correct?
The Following User Says Thank You to hiz99 For This Useful Post: [ View ]
28th June 2012, 10:19 PM   |  #7  
snguyen0730's Avatar
Senior Member
Thanks Meter: 125
 
604 posts
Join Date:Joined: Nov 2010
What should it be once I copied it into inid? Like the name

Sent from Samsung Galaxy SIV
28th June 2012, 10:21 PM   |  #8  
Senior Member
Thanks Meter: 63
 
999 posts
Join Date:Joined: Sep 2010
Will the phone function well with the asleep profile you created on the scary governor?

Sent from my SGH-T989 using xda premium
Last edited by iwasblown; 29th June 2012 at 01:00 AM.
28th June 2012, 10:39 PM   |  #9  
eugene373's Avatar
OP Recognized Developer
Thanks Meter: 7,303
 
5,626 posts
Join Date:Joined: Aug 2009
Donate to Me
More
Quote:
Originally Posted by sinfulgray

Can this be used on any ROM or Kernel?

Yes this can be used with any Multi-core Phone that supports init.d

Quote:
Originally Posted by teambestyrandy

Wow this is great Eugene is very impressive

Sent from my SGH-T989 using xda premium

Thanks,

Quote:
Originally Posted by hiz99

this can be used with any kernel correct?

Yes this can be used with any Multi-core Phone that supports init.d

Quote:
Originally Posted by snguyen0730

What should it be once I copied it into inid? Like the name

Sent from Samsung Galaxy SIV

You can just leave the naming the same, user preference.

Quote:
Originally Posted by iwasblown

Will the phone fiction well with the asleep profile you created on the scary governor?

Sent from my SGH-T989 using xda premium

Yes it will function correctly regardless of Gov selected, all we're doing is ensuring that cpu1 goes to sleep.
The Following 3 Users Say Thank You to eugene373 For This Useful Post: [ View ]
28th June 2012, 10:54 PM   |  #10  
Senior Member
HTC glacier
Thanks Meter: 9
 
220 posts
Join Date:Joined: Dec 2010
More
No int. d file. Can I use a script manager to run it?

Sent from my SGH-T989 using xda premium

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes