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

Search This thread

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
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 [I](Gains root)[/I]
pm disable com.sec.android.providers.drm [I](Disables DRM launcher)[/I]
pm disable com.sec.android.app.sns [I](Disables sns)[/I]
pm disable com.samsung [I](Disables updates)[/I]

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. :D

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!
 
Last edited:

zanderman112

Senior Member
Oct 6, 2010
7,957
1,844
SouthEast USA
www.twitter.com
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.
 

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
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. :D
 

dwallersv

Senior Member
Dec 10, 2007
618
102
California
I'm guessing that the Android runtime system has to be fully initialized and running for the pm command to work, and it's not in the limited runtime of the recovery environment.

Sent from my mind using telepathitalk
 

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
I'm guessing that the Android runtime system has to be fully initialized and running for the pm command to work, and it's not in the limited runtime of the recovery environment.

Sent from my mind using telepathitalk

That seems to be the problem, because I've gotten the tiny files themselves to run in the terminal, which is at least useful for streamlining this operation! But I can't get them to do anything in recovery, it just has no effect.
 

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
So I have come to the conclusion that this cannot be done from CWM due to reasons I've explained in post #1.

However, I have posted a workaround CWM flash-able which, still using Terminal Emulator, simplifies the commands down to 2 simple codes.

:D

UPDATE: Turned out I posted bad .zip files with out of date updater scripts. The links have been fixed and should work as described in Post #1!
 
Last edited:

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
Sweet! At least you kinda got it.

Sent from my Epic 4G, awaiting official gingerbread

Yup, kinda! The guys that wrote apps to freeze services deserve a lot of credit. They are fairly easy to use in bulk.

I wish I could make this automatic, but this way I only have to type two easily memorized commands to stop/start the 3 services I hate most!

:D

UPDATE: Mediafire mirror links posted for when megaupload wants to be wonky.
 
Last edited:

Pointless816

Member
Mar 6, 2009
37
21
Manhattan
You might be able to make this fully automatic with tasker. There is an option "device boot," there is the ability to launch an app, and to type, then close the app. Might look a little sloppy, but it should definitely work. I'll try it and report back later today.

EDIT: Works like a charm. For the Context, go into Event, System, Device Boot. For the Tasks, choose App, Load App, Terminal Emulator, then Input, Type, enter the text, then choose Input, Button, Back twice to close out of the app, as the Kill command will just restart it.

For what it's worth, there must be a way to have an application start off as disabled, because that's how CIQ starts, as far as I know. Perhaps the dev of the paid application Autostarts can shed some light on it for you.
 
Last edited:
  • Like
Reactions: RandomKing

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
You might be able to make this fully automatic with tasker. There is an option "device boot," there is the ability to launch an app, and to type, then close the app. Might look a little sloppy, but it should definitely work. I'll try it and report back later today.

EDIT: Works like a charm. For the Context, go into Event, System, Device Boot. For the Tasks, choose App, Load App, Terminal Emulator, then Input, Type, enter the text, then choose Input, Button, Back twice to close out of the app, as the Kill command will just restart it.

Thats a nifty trick! Now I could patch Tasker and it's data into the rom itself. Now here's the question, is Tasker a persistently running battery draining service? ;)

For what it's worth, there must be a way to have an application start off as disabled, because that's how CIQ starts, as far as I know. Perhaps the dev of the paid application Autostarts can shed some light on it for you.

That may be true, but SNS, Updates, and DRM have to run consistently. Unlike some certain apps that run non-stop for no reason. :D
 

chris41g

Inactive Recognized Developer
Sep 10, 2009
2,073
3,613
Just make the zip add a file to init.d that executes the command on next boot then deletes itself...

Sent from my SPH-D700 using XDA App
 

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
Just make the zip add a file to init.d that executes the command on next boot then deletes itself...

Sent from my SPH-D700 using XDA App

I actually tried that, but the command "pm disable" just doesn't do anything from recovery for me. Unless I'm not calling for a function I need or something. Still toying around with it. I even tried to just patch it into one of the existing init.d files, but still no result.
:confused:

Update: I'm a noob at developing. I can roughly understand existing script enough to rearrange it, but if somethings missing, I probably can't spot it. Haha
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    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 [I](Gains root)[/I]
    pm disable com.sec.android.providers.drm [I](Disables DRM launcher)[/I]
    pm disable com.sec.android.app.sns [I](Disables sns)[/I]
    pm disable com.samsung [I](Disables updates)[/I]

    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. :D

    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!
    1
    You might be able to make this fully automatic with tasker. There is an option "device boot," there is the ability to launch an app, and to type, then close the app. Might look a little sloppy, but it should definitely work. I'll try it and report back later today.

    EDIT: Works like a charm. For the Context, go into Event, System, Device Boot. For the Tasks, choose App, Load App, Terminal Emulator, then Input, Type, enter the text, then choose Input, Button, Back twice to close out of the app, as the Kill command will just restart it.

    For what it's worth, there must be a way to have an application start off as disabled, because that's how CIQ starts, as far as I know. Perhaps the dev of the paid application Autostarts can shed some light on it for you.
    1
    The command is setperm(0,0,0755,"/system/etc/init.d/z99pmdisable");

    Sent from my SPH-D700 using XDA App
    1
    Randomking, do you know why Gallery would try to sync up after a boot with some service called Picassa? I don't have a Picassa account (I even went to the Google site and it asked me if I wanted to CREATE an account), so I'm wondering why would this service be syncing when I don't even have an account? (I see this happening occassionally after a reboot or cold power on--also ATK won't kill running app "Gallery" while this is happening). Any info, if known would be appreciated.

    I don't really know why it has to do that. Overall its relatively harmless. However, I generally prefer QuickPic to Gallery. But unfortunately, if you want to upload to youtube or something similar, Gallery seems to have to be there or it fails.


    Thanks to you both for doing this... As for what DRM will bork, any music/videos you try to play, won't. The first song will paly, but try to scan or skip, anyways, I'm using it.

    This doesn't happen for me. But I'm also positive that all of my media is DRM-free.
    1
    So I'm assuming this works fine on EC05...has this improved anyone's battery life dramatically? And if so, what rom were/are you running?
    Also, would it just be easier to freeze these apps in titanium backup?

    Yeah, I'm running stock EC05 rooted and Titanium Pro. I freeze a number of apps. Titanium also lets you remove some of the bloatware which will also let you restore them if something doesn't work right (backup all your apps in Titanium first before removing anything though). It does help battery life. Of course I have an issue where my phone stops sleeping and I have to reboot. Freezing seems to help but I'm looking at possibly trying other things like using Launcher Pro. I would flash another ROM, but I've heard even that doesn't completely fix the issue. It may just be a bad app I have that I don't want to part with.