FORUMS
Remove All Ads from XDA

[SCRIPT] KILL android.process.media FOR SAVING BATTERY

534 posts
Thanks Meter: 588
 
By bamsbamx, Senior Member on 16th December 2012, 12:47 PM
Post Reply Email Thread
Of course, root is required...

I was getting tired about seeing how mediaserver was draining my battery(see attached picture) so I researched a bit and I found how to kill mediaserver process...



Just replace .txt with .sh and execute it with script manager or terminal emulator...

Here is its code:

Code:
#!/system/bin/sh
killall -9 android.process.media
killall -9 mediaserver

-----------------------------------------------------------------------------------------------


If you have enabled int.d scripts, you can put this script in /system/etc/init.d/...
Or flash this zip: http://d-h.st/2bU (Thanks to acer73 )

the idea is to schedule the execution of this script for example each 1 hour.... Because i think that when we start playing music media server starts again...

however, I must investigate a bit more....


-----------------------------------------------------------------------------------------------

to see which processes are running currently: just write "ps" in terminal emulator
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2012-12-16-13-38-11.jpg
Views:	93639
Size:	30.4 KB
ID:	1567777  
Attached Files
File Type: txt 00mediaserver.txt - [Click for QR Code] (76 Bytes, 6227 views)
The Following 31 Users Say Thank You to bamsbamx For This Useful Post: [ View ] Gift bamsbamx Ad-Free
 
 
16th December 2012, 01:14 PM |#2  
Member
Flag Wollongong, Australia
Thanks Meter: 13
 
More
Seems to work.

Sent from my Nexus 4 using xda premium
16th December 2012, 01:36 PM |#3  
stefandunn's Avatar
Senior Member
Flag London
Thanks Meter: 5
 
More
I'm only getting 2% usage on Media Service, my display uses the most (24%). Maybe I'm lucky :S
16th December 2012, 01:51 PM |#4  
Senior Member
Thanks Meter: 44
 
More
Quote:
Originally Posted by stefandunn

I'm only getting 2% usage on Media Service, my display uses the most (24%). Maybe I'm lucky :S

well that's until you launch any media application like music/video players.
16th December 2012, 02:19 PM |#5  
bamsbamx's Avatar
OP Senior Member
Flag Bilbo
Thanks Meter: 588
 
Donate to Me
More
Quote:
Originally Posted by stefandunn

I'm only getting 2% usage on Media Service, my display uses the most (24%). Maybe I'm lucky :S

Do you listen a lot of music with your phone???
16th December 2012, 03:23 PM |#6  
Senior Member
Flag Bangalore
Thanks Meter: 329
 
More
The script has to be launched at every boot right?

Sent from my HTC Explorer A310e using xda premium
16th December 2012, 03:37 PM |#7  
kancherlapraneeth's Avatar
Senior Member
DFW
Thanks Meter: 266
 
More
Quote:
Originally Posted by karanrajpal14

The script has to be launched at every boot right?

Sent from my HTC Explorer A310e using xda premium

yes.

---------- Post added at 09:07 PM ---------- Previous post was at 09:05 PM ----------

but I think this script can be called during boot process on ROMS having init.d support
16th December 2012, 03:45 PM |#8  
polar2792's Avatar
Senior Member
Flag Gastonia, NC
Thanks Meter: 195
 
More
Quote:
Originally Posted by bamsbamx

Of course, root is required...

I was getting tired about seeing how mediaserver was draining my battery(see attached picture) so I researched a bit and I found how to kill mediaserver process...



Just replace .txt with .sh and execute it with script manager or terminal emulator...

Here is its code:

Code:
#!/system/bin/sh
killall -9 android.process.media
killall -9 mediaserver

Undo?

Sent from my PC36100 using xda app-developers app
16th December 2012, 04:02 PM |#9  
kancherlapraneeth's Avatar
Senior Member
DFW
Thanks Meter: 266
 
More
Quote:
Originally Posted by polar2792

Undo?

Sent from my PC36100 using xda app-developers app

just reboot..
The Following 2 Users Say Thank You to kancherlapraneeth For This Useful Post: [ View ] Gift kancherlapraneeth Ad-Free
16th December 2012, 05:41 PM |#10  
Senior Member
Flag Brooklyn
Thanks Meter: 4,376
 
Donate to Me
More
Am I doing something wrong? Or is this how it is suppose to look?
Edit: seems like it won't let me post a pic of it. Can someone post how it is supposed to look on script manager?
Sent from my Nexus 4 using xda premium
16th December 2012, 05:55 PM |#11  
raimondomartire's Avatar
Senior Member
Flag Salerno
Thanks Meter: 4,899
 
Donate to Me
More
Use this zip
http://d-h.st/2bU
The Following 5 Users Say Thank You to raimondomartire For This Useful Post: [ View ] Gift raimondomartire Ad-Free
Post Reply Subscribe to Thread

Tags
mediaserver process script

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes