Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,404 Members 48,230 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Freeze Battery-Draining Services | 6/14

Tip us?
 
RandomKing
Old
(Last edited by RandomKing; 28th July 2011 at 06:04 PM.)
#1  
RandomKing's Avatar
Retired Recognized Developer - OP
Thanks Meter 1,466
Posts: 1,484
Join Date: Mar 2011
Location: Random Land

 
DONATE TO ME
Talking [MOD] Freeze Battery-Draining Services | 6/14

This Mod is flashed through CWM to enable 2 simple all-in-one commands to Freeze/Defrost SNS, DRM, and System Updates. Downloads at the end of this post. Read on to learn what they do and how to easily use them!
Fully Flash-able Test Version HERE


Freeze SNS, DRM, and System Updates for Better Battery

These services are, generally, best kept frozen 99.9% of the time. Not deleted, as I've experienced problems if they are actually removed, but disabling them saves me noticeable battery life.

You can use Titanium Pro, MyToolbox, ,Bloat Freezer, or Mybackup Pro to freeze services, but that's only after you've installed a rom. Then once you boot in, you have to buy and download that app, and then navigate a huge list of services to freeze.

But it only takes one line of code per service you want to freeze. That's right, the following commands can be entered into a terminal like Terminal Emulator to disable these processes:

Code:
su (Gains root)
pm disable com.sec.android.providers.drm (Disables DRM launcher)
pm disable com.sec.android.app.sns (Disables sns)
pm disable com.samsung (Disables updates)
However, these commands are lengthy, not easily memorized, and just a pain to write. The best solution I can come up with is to simplify the commands.

[Note] You do not want to do this if you don't understand how freezing these services may affect your day-day use. This will save some battery at the definite cost of DRM content functionality and Facebook Contact integration.

How To Use This Mod:

Still using Terminal Emulator, after you flash one of the linked .zip files, all you will have to type is the following:

To Freeze Services:
Code:
su
superfreeze
To Defrost Services:
Code:
su
superdefrost
DOWNLOADS:If you like my work, click the Thanks button or donate a beer!


I am still in the works to make this work entirely solo once flashed from CWM.

PS: If you're looking for a free alternative to any of the apps I listed up above, this isn't it. This is only one small, dedicated part of those apps. I highly recommend buying one of them, you'll find them very useful.

PPS: This mod, and subsequent versions of it(hopefully!), is for the Epic 4G. I cannot guarantee that the script is accurate to any other phone. But the commands themselves are universal across Android.

Thanks to paulobrien for his explanation found here!
My work will always be free! If you want to buy me a coke!

Sprint Galaxy SIII: | Jaguar 2.2.1 MD4
Sprint Epic 4G | Sprint Galaxy Tab | HP Touchpad
--Battery Save!--
The Following 16 Users Say Thank You to RandomKing For This Useful Post: [ Click to Expand ]
 
zanderman112
Old
#2  
zanderman112's Avatar
Recognized Themer
Thanks Meter 1,839
Posts: 7,913
Join Date: Oct 2010
Location: SouthEast USA

 
DONATE TO ME
I can't answer you script question, but I have one of my own. Are those commands permanent, or will I have to type those in everytime I turn my phone back on? I'm assuming the latter, since you want to be able to do it easier.

Sent from the only thing i need.

^^^^^^^^^^^^^^^^^^^^^^^^^^Click banner for my Twitter^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<---- I now have a PayPal donate link right over there <----
If you don't wan't to straight up donate via PayPal, these Amazon.com virtual giftcards are always appreciated

My Devices:
 
Sprint Galaxy S3 on Stock Deodexed MB1+Multi-View mod
OUYA 1st Gen on Stock Rooted JZ054L-Ouya
HP Touchpad on patched up webOS 3.0.5 & CyanogenMod 10.1
Samsung Epic 4G on CyanogenMod 10.1 Nightlies
 
RandomKing
Old
#3  
RandomKing's Avatar
Retired Recognized Developer - OP
Thanks Meter 1,466
Posts: 1,484
Join Date: Mar 2011
Location: Random Land

 
DONATE TO ME
Quote:
Originally Posted by zanderman112 View Post
I can't answer you script question, but I have one of my own. Are those commands permanent, or will I have to type those in everytime I turn my phone back on? I'm assuming the latter, since you want to be able to do it easier.

Sent from the only thing i need.
These commands are indeed permanent on reboot. Pm Disable is exactly the function apps like Titanium use when "freezing" services. The goal is, I would like these commands to be executed while my rom is installing. I used a similar .zip file as a skeleton for the layout, but I'm just not sure what additional coding is required to make this work. I'm 99.9% positive it can be done.
My work will always be free! If you want to buy me a coke!

Sprint Galaxy SIII: | Jaguar 2.2.1 MD4
Sprint Epic 4G | Sprint Galaxy Tab | HP Touchpad
--Battery Save!--
 
zanderman112
Old
#4  
zanderman112's Avatar
Recognized Themer
Thanks Meter 1,839
Posts: 7,913
Join Date: Oct 2010
Location: SouthEast USA

 
DONATE TO ME
Oh ok. So I now don't have to disable the drm or sns anymore. Cool, if I ever needed to re-enable them, what would I type in?

Sent from the only thing i need.

^^^^^^^^^^^^^^^^^^^^^^^^^^Click banner for my Twitter^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<---- I now have a PayPal donate link right over there <----
If you don't wan't to straight up donate via PayPal, these Amazon.com virtual giftcards are always appreciated

My Devices:
 
Sprint Galaxy S3 on Stock Deodexed MB1+Multi-View mod
OUYA 1st Gen on Stock Rooted JZ054L-Ouya
HP Touchpad on patched up webOS 3.0.5 & CyanogenMod 10.1
Samsung Epic 4G on CyanogenMod 10.1 Nightlies
 
RandomKing
Old
#5  
RandomKing's Avatar
Retired Recognized Developer - OP
Thanks Meter 1,466
Posts: 1,484
Join Date: Mar 2011
Location: Random Land

 
DONATE TO ME
Surprisingly logical, you just have to type enable instead of disable.

-Sent from my Random Epic.
My work will always be free! If you want to buy me a coke!

Sprint Galaxy SIII: | Jaguar 2.2.1 MD4
Sprint Epic 4G | Sprint Galaxy Tab | HP Touchpad
--Battery Save!--
 
zanderman112
Old
#6  
zanderman112's Avatar
Recognized Themer
Thanks Meter 1,839
Posts: 7,913
Join Date: Oct 2010
Location: SouthEast USA

 
DONATE TO ME
Ok, I thought so, but sometimes things aren't as simple as could be. Good luck on your script.

Sent from the only thing i need.

^^^^^^^^^^^^^^^^^^^^^^^^^^Click banner for my Twitter^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<---- I now have a PayPal donate link right over there <----
If you don't wan't to straight up donate via PayPal, these Amazon.com virtual giftcards are always appreciated

My Devices:
 
Sprint Galaxy S3 on Stock Deodexed MB1+Multi-View mod
OUYA 1st Gen on Stock Rooted JZ054L-Ouya
HP Touchpad on patched up webOS 3.0.5 & CyanogenMod 10.1
Samsung Epic 4G on CyanogenMod 10.1 Nightlies
 
RandomKing
Old
#7  
RandomKing's Avatar
Retired Recognized Developer - OP
Thanks Meter 1,466
Posts: 1,484
Join Date: Mar 2011
Location: Random Land

 
DONATE TO ME
Quote:
Originally Posted by zanderman112 View Post
Ok, I thought so, but sometimes things aren't as simple as could be. Good luck on your script.

Sent from the only thing i need.
Too often not as simple as it could be! There must be some sort of call function I'm missing. Lol

-Sent from my Random Epic.
My work will always be free! If you want to buy me a coke!

Sprint Galaxy SIII: | Jaguar 2.2.1 MD4
Sprint Epic 4G | Sprint Galaxy Tab | HP Touchpad
--Battery Save!--
 
RandomKing
Old
#8  
RandomKing's Avatar
Retired Recognized Developer - OP
Thanks Meter 1,466
Posts: 1,484
Join Date: Mar 2011
Location: Random Land

 
DONATE TO ME
So it seems no matter how I try to launch this, from etc/lib.d, as a tool, from data/local... etc. It doesn't seem to have any effect if not run from within Android itself.
My work will always be free! If you want to buy me a coke!

Sprint Galaxy SIII: | Jaguar 2.2.1 MD4
Sprint Epic 4G | Sprint Galaxy Tab | HP Touchpad
--Battery Save!--
 
zanderman112
Old
#9  
zanderman112's Avatar
Recognized Themer
Thanks Meter 1,839
Posts: 7,913
Join Date: Oct 2010
Location: SouthEast USA

 
DONATE TO ME
Quote:
Originally Posted by RandomKing View Post
So it seems no matter how I try to launch this, from etc/lib.d, as a tool, from data/local... etc. It doesn't seem to have any effect if not run from within Android itself.
I really wish I could help.

Sent from my Epic 4G, awaiting official gingerbread

^^^^^^^^^^^^^^^^^^^^^^^^^^Click banner for my Twitter^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<---- I now have a PayPal donate link right over there <----
If you don't wan't to straight up donate via PayPal, these Amazon.com virtual giftcards are always appreciated

My Devices:
 
Sprint Galaxy S3 on Stock Deodexed MB1+Multi-View mod
OUYA 1st Gen on Stock Rooted JZ054L-Ouya
HP Touchpad on patched up webOS 3.0.5 & CyanogenMod 10.1
Samsung Epic 4G on CyanogenMod 10.1 Nightlies
 
RandomKing
Old
#10  
RandomKing's Avatar
Retired Recognized Developer - OP
Thanks Meter 1,466
Posts: 1,484
Join Date: Mar 2011
Location: Random Land

 
DONATE TO ME
Quote:
Originally Posted by zanderman112 View Post
I really wish I could help.

Sent from my Epic 4G, awaiting official gingerbread
It's a shame, it'd be nice to have a rom install with some services like this disabled by default. Then there could be a matching patch to re-enable them if needed.
My work will always be free! If you want to buy me a coke!

Sprint Galaxy SIII: | Jaguar 2.2.1 MD4
Sprint Epic 4G | Sprint Galaxy Tab | HP Touchpad
--Battery Save!--

Tags
cwm, freeze services, pm disable, terminal emulator
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes