New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
ericwgarza1
Old
(Last edited by ericwgarza1; 1st July 2012 at 03:29 AM.)
#1  
ericwgarza1's Avatar
Senior Member - OP
Thanks Meter 312
Posts: 501
Join Date: May 2008
Location: H-Town, TX

 
DONATE TO ME
Default Battery Saver Script - 6.30.12

Greetings all!

I have modified Calkulin's Battery Saver Script to work with our GNex devices. I updated the undervolt init.d script to work on both CPUs and tweaked the voltages based off Apex's voltage table. If you are setting cpu setting on boot via control app (ie: Glados, Franco, performance settings) please disable since the conflicting scripts will cause issues. The default governor and other settings can be modified by manually changing values within the scripts.


Prerequisites:
A kernel with init.d support
-default CM9 kernel doesn't work (still looking for a fix)


Flashing Instructions:
1. Reboot into recovery and make Nandroid backup
2. Flash attached zip file just like you would a rom.
3. Reboot and enjoy.


REMOVED FOR STABILITY/COMPATIBILITY
Undervolt Steps are based on # of CPU frequencies available:
Code:
STEPS_10="1475 1375 1325 1275 1225 1175 1050 975 850"	
STEPS_9="1425 1375 1325 1275 1225 1175 1050 975 850"
STEPS_8="1375 1325 1275 1225 1175 1050 975 850"
STEPS_7="1325 1275 1225 1175 1050 975 850"
STEPS_6="1275 1225 1175 1050 975 850"
STEPS_5="1225 1175 1050 975 850"


CPU profiles:
Code:
BATTERY_PROFILE_1: From 100% - 85% battery level
MAX_CPU_SPEED="1200000"
MIN_CPU_SPEED="0"

BATTERY_PROFILE_2: From 84% - 0% battery level
MAX_CPU_SPEED="1000000"
MIN_CPU_SPEED="0"

AWAKE_GOVERNOR_ON: Changes to this initially after screen turns on
AWAKE_GOVERNOR="interactive"
AWAKE_MAX_CPU_SPEED=max profile speed
AWAKE_MIN_CPU_SPEED=max profile speed
AWAKE_DURATION="5"

SLEEP_GOVERNOR_ON: Changes to this once screen turns off if no SCREENOFFMAX file is found
SLEEP_GOVERNOR="conservative"
SLEEP_MAX_CPU_SPEED="800000"
SLEEP_MIN_CPU_SPEED="0"

The script at work.






CREDITS:
98% of the credit goes to Calkulin -
bigxie for posting the voltage table
ME
Attached Files
File Type: zip Battery_Saver_1.0.zip - [Click for QR Code] (141.8 KB, 173 views)
File Type: zip Battery_Saver_1.1.1.zip - [Click for QR Code] (141.8 KB, 324 views)
File Type: zip Battery_Saver_Interactive_6.30.12.zip - [Click for QR Code] (140.7 KB, 226 views)

Make it idiot proof and someone will make a better idiot


The Following 12 Users Say Thank You to ericwgarza1 For This Useful Post: [ Click to Expand ]
 
DatDude123
Old
#2  
DatDude123's Avatar
Senior Member
Thanks Meter 143
Posts: 723
Join Date: Aug 2011
Location: VA
I'll most def be giving this a shot.

D

Sent from my Sprint Galaxy Nexus CDMA using xda premium
 
justro
Old
#3  
Member
Thanks Meter 12
Posts: 70
Join Date: May 2010
Location: san diego
Default installing

so i just flash threw recovery right? if i make a nandroid back up will it remove it if it makes my phone go crazy?
 
ÜBER™
Old
#4  
ÜBER™'s Avatar
Recognized Themer
Thanks Meter 7612
Posts: 13,140
Join Date: Nov 2011
Location: Marble Falls, TX

 
DONATE TO ME
Quote:
Originally Posted by justro View Post
so i just flash threw recovery right? if i make a nandroid back up will it remove it if it makes my phone go crazy?
yes

Sent From My Sprint Galaxy Nexus via XDA Premium
Nexus 4: RasSaber / Franco.Kernel
___________________________


My UCCW Thread--------------------MyColorScreen--------------------My CM10 Theme
 
broad_st_bully
Old
#5  
broad_st_bully's Avatar
Senior Member
Thanks Meter 17
Posts: 423
Join Date: Aug 2011
Location: Philadelphia
do I need to install anything else besides this .zip?
script manager?
setCPU??
anything?
-My.Color.Screen-
I know it was wrong but I did it anyway.
 
justro
Old
#6  
Member
Thanks Meter 12
Posts: 70
Join Date: May 2010
Location: san diego
Just installed combined with samurai kernal and let me say its pretty damn cool

Sent from my Sprint Galaxy Nexus CDMA using xda premium
 
ericwgarza1
Old
#7  
ericwgarza1's Avatar
Senior Member - OP
Thanks Meter 312
Posts: 501
Join Date: May 2008
Location: H-Town, TX

 
DONATE TO ME
Quote:
Originally Posted by broad_st_bully View Post
do I need to install anything else besides this .zip?
script manager?
setCPU??
anything?
No, the script looks for those programs and deactivates itself. You should only run this script for cpu scaling.

Sent from my Sprint Galaxy Nexus CDMA using Tapatalk 2

Make it idiot proof and someone will make a better idiot


 
bankO_mAn
Old
#8  
Junior Member
Thanks Meter 0
Posts: 8
Join Date: Apr 2012
Quote:
Originally Posted by justro View Post
Just installed combined with samurai kernal and let me say its pretty damn cool

Sent from my Sprint Galaxy Nexus CDMA using xda premium
I just installed this combo. I'm using stock rom though. How's your bat life been?

Also are there any setting/options, I havent found any going through settings.
 
jten9
Old
#9  
Member
Thanks Meter 4
Posts: 50
Join Date: Jul 2010
Is there a way to easily remove the script... another zip to flash perhaps? Or is a nandroid restore the only way?

In any case, thanks OP this looks good :thumbup:

Sent using Tapatalk 2
 
Bradart
Old
#10  
Bradart's Avatar
Senior Member
Thanks Meter 68
Posts: 219
Join Date: Jan 2008
Location: Belleville, IL

 
DONATE TO ME
Quote:
Originally Posted by jten9 View Post
Is there a way to easily remove the script... another zip to flash perhaps? Or is a nandroid restore the only way?

In any case, thanks OP this looks good :thumbup:

Sent using Tapatalk 2
You should be able to just delete the script from the init.d directory.
VZW CDM-8910>VZW VX-5200>AT&T Samsung Blackjack 2>Sprint HTC Touch (Vogue)>Sprint HTC Touch Diamond>Sprint HTC Hero>T-Mobile G1 (x3)>T-Mobile Mytouch 3g>Verizon Samsung Fascinate>T-Mobile Motorola Cliq>Verizon Motorola Droid X>Sprint HTC EVO 4g>Barnes and Noble Nook Color>Sprint Nexus S 4g>Sprint HTC Evo View 4g>Samsung Epic 4G Touch>HTC Evo 3d>Sprint Samsung Galaxy Nexus>Samsung Galaxy SIII>Asus Transformer Prime>HTC Evo LTE>Asus Nexus 7>Sprint Galaxy Note II>Sprint HTC One

The Following User Says Thank You to Bradart For This Useful Post: [ Click to Expand ]