Buggy Android Mediaserver draining your battery

Watch out for this little bugger!

Buggy Android Mediaserver draining your battery

I recently started listening to local music on my One S instead of just using Spotify. I quickly noticed that the battery drain seemed more aggressive than I was used to. I checked the battery stats and noticed that “Mediaserver” was draining a significant amount of battery. In fact, it was the second most battery consuming process. And I had only been listening to music for 3 minutes that day. A quick Google search revealed quite a few users experiencing the same issue. So whats causing it?

First and foremost, what is the Mediaserver process? Well it seems to be the process that handles music playback as well as a few other tasks, including file downloads. Basically, your music player tells the Mediaserver to play and control music, so its the latter who is doing the heavy lifting. So that could potentially explain the battery drain if the phone was doing music playback 24/7. But thats not necessarily the case. Since its a system process you cant kill it either, so you’re stuck with either tolerating the excessive battery drain or simply avoiding any kind of music playback. Neither of those are really acceptable. So lets explore some solutions.

The main trending theory seems to be that Mediaserver gets stuck in a loop while processing a media file on stored on your device. This could make sense, since removing all your music from the SD card seems to remove the problem. If this is the case, I would argue that this indicates a serious flaw in the Mediaserver process. One that is hopefully fixed in Android 4.1.

Notice the hidden files. Maybe its causing the Mediaserver to lock up?

There are two solutions I have come across. Firstly, you could take out all your music, then add songs one at the time while monitoring the battery usage of the Mediaserver process and try to figure out which files it gets stuck on. This process seems very tedious and time consuming, but for those who are interested, the process is documented over at XDA. However, someone has also suggested the the issue is caused by processing album art. Somehow Mediaserver gets stuck in a loop on some sort of album cover art, so going through your music folder and deleting anything that is not actually music might help. I just noticed that one of my albums had quite a few hidden files present. after deleting them I will check to see if it helps.

A second alternative is to create “.nomedia” files in all your folders as this will prevent the Mediaserver from scanning the files in the first place. Some users have reported that this works perfectly well, but I have been unable to figure out what the downsides of throwing those files all over your sd card are.

The third, and hopefully most viable option is to cross our fingers and hope that this issue is fixed in Android 4.1 Jellybean, which should be rolling out to quite a few devices soon enough in form of Custom ROMs now that the JB source code is out.

So, have you experienced the issue? Maybe you’ve found a fix? Please do share your experiences as this problem is quite annoying!

UPDATE: It seems that this issue is still persistent in Android 4.2. I did some tests on my Nexus 7, and after throwing some movies onto the external storage, the Mediaserver process started eating up the battery..

If anyone is experiencing the issue, please share your stories.

 

  • Jason

    It’s not fixed in JB, and I’ve tried adding nomedia files, and also tried deleting all music from my phone and playing a ringtone on loop and it still drains battery faster than it ‘should’.

    I don’t have quite as bad battery drain as you, but it sure gives the screen a run for it’s money – and I use the screen a lot.

    • Untouchab1e

      Ah no! Really? This is ridiculous. I am now in a situation where I am actively avoiding using my phone for listening to music, or if I for some reason am unable to fight off the urge to listen to music outside of Spotify, I then quickly reboot the phone after Im done, to kill the damn power hungry mediaserver process.

      Thanks for the update though! Much appreciated. Though sad to hear that its not resolved for you even after the .nomedia hack. This is becoming the most annoying and embarrassing Android issue next to the low res contact images “bug”.

  • Simon

    I today installed an app called volume+ for incresing the value of accepted loudness while in playback of music. After this the process mediaserver went nuts and were during past 10h consuming 43% of my battery far more than any other process. I put the installation of volume+ in relation to battery drain. I now uninstalled it and rebooted my phone hoping this will correct the problem.

    • Untouchab1e

      Interesting but also alarming because its yet another thing that makes the mediaserver process drain battery like crazy. Its quite a serious issue really as for those who are affected, the phone becomes pretty unusable. Glad you sorted it out though! Thanks for reporting!

  • Mike_S

    Well, I have a Sony Xperia Ion and updated to ICS yesterday. Well battery useage was a little crappy before, and was promised better useage with the new OS, unfortunately, Mediaserve was using 73% of my battery today. Was lucky to make it through the workday… Made it 9hours, 20 mins on the battery… Yikes.

    • Untouchab1e

      Oh wow, that’s terrible. I reckon you didn’t have this issue before ICS? Have you tried any of the suggestions in the post?

  • JustLetYouKnow

    you can kill the process apps>activated and then in menu press show cached processes. Then you are able to kill the process!

    • Untouchab1e

      But you still needs it for music playback, so this wouldn’t really solve anything though would it?

  • KevinThom

    Yep this is absolutely ridiculous. Mediaserver sucks up the battery like crazy on my Nexus 7 running JB 4.1.2. I can’t believe basic bugs like this survive as long as they do on Android. Thanks for the tips though. I’ll try the .nomedia files to see what happens.

  • Skire

    I’m having the exact same problem. When listening to music with any player (Apollo/PowerAmp, it doesn’t matter) my mediaserver goes crazy. At the end of the day my mediaserver usage is as high as 40%. Even when I’ve only listened to 45 minutes of music that day.

    I have tried everything. Wiping the internal and external sd card, wiping all system and cache partitions, full wipes and flashes to the latest CM10 nightly. All of this without any result whatsoever.

    I’m actually considering moving back to CyanogenMod 7.2 out of desperation.

    GT-i9000
    CM10 (4.1.2)

  • Michele

    I just purchased a Droid Razr HD and the mediaserver was consuming 44% of my battery. Battery was draining quickly! I removed all the photos I had on my SD card and the mediaserver process is no longer running and consuming my battery.

    • Untouchab1e

      Interesting discovery. However the real question is what with your pictures caused the mediaserver process to lock up. Stripping the sdcard of any media isn’t really a viable solution to the issue.

  • jess

    The mediaserver has used 40% of my battery today, it is now on 9%. My s3 had a full charge cycle last night! any ideas? I’ve removed all my music from the SD card and the phone but still running at 38%.

    • Untouchab1e

      Have you checked for hidden files on your /sdcard partition? Do a ls -la and see if you find something that you can delete

  • kornholer

    I’m using a nexus 7 with the ice cream samwitch operating system and the battery screen says that ‘media server’ has used 57% of my battery. The tablet normally has great battery life (8 to 10 hours) but because of this media server glitch the battery is lasting about 4 hours a charge.

    • Untouchab1e

      Ahh, its crazy that this issue is seemingly getting no attention by Google. Ive tried to bring it up, but to no avail. My Nexus 7 is currently having a similar issue with the “Google Services” framework draining about 38% of the battery.. Good thing my N7 is not affected by the Mediaserver bug as well, or else I would pretty much have to keep the thing in the charger at all times. :/

  • Blah

    Just noticed this bug on cm10 sg3, I’ve been listening to no music, although I’ve been using my player… Never had this before, perhaps a reboot corrects this after usage?

    • Untouchab1e

      Rebooting stops the issue, but only until you trigger the mediaserver again.. :/

  • LondonDropper

    I’m having a similar problem with this process, usually around the 40% mark. I’m actually not atributing my problem to media files though such as photos or music files. It could possibly be due to video files as I’ve a lot on my SD card, or due to creating videos/photos as I’ve used the camera a fair amount recently. I really think it’s down to one of 2 apps, either GTA: Vice City which I’ve just bought, or Sleep as Android. I only saw the problem once I installed & started playing GTA. About 12 hours after I stop playing the process seems to go back to normal. It could also be due to Sleep as Android as I use that every night and could be linked. Going to experiment to find out which of the two is causing this. Should really be fixed by now though. This and another process called exchange services has a similar fault and causes battery drain.

  • XianBild

    Having exactly the same issue (Galaxy W, CM9). Issue is starred at Google support (#37298) – look like many people are suffering from that. And it also seems it is not related to any 3rd party products but to Android.

    Unfortunately there seems to be no workaround or even solution at the moment.

  • shanky

    Experienced this issueon my note 2 after watching videos for a couple of hours. .. checked my battery usage, mediaserver was using the most battery 67.% next day thought it was the Internet and turned it off but there was no difference so I restarted my phone and after a few minutes media server has disappeared. …

  • bababooey

    I just saw this on my new 32gb N7 and I have no music on it yet,I have played a few games but that’s about it and the mediaserver used up 47% today ???

    I think this is going back to the store and going to get a ipad again I guess.

  • http://www.facebook.com/rowanbsmith Rowan Smith

    Two different problems are widely occurring on JellyBean, the first is with MediaServer draining battery the second is with MediaScanner draining battery. Although this post is about MediaServer many end users are getting the two processes confused. If it’s MediaScanner you might like to check out this post: http://rowan.smith.gen.nz/post/37744838003/media-battery-consumption-revisited?168a8080

    • Untouchab1e

      Thanks for the link. I see the patch you mention has been merged, which is good news!

      Furthermore, I still see the Mediaserver process spiking up on the battery usage screen every now and then and its frustrating that the issue hasnt been fully fixed yet. :/

  • blahhh

    Um, it’s now 2013 and I’m still seeing this issue on my stock Bell Galaxy S3 running Jellybean.

  • lrhunt87

    So I’ve noticed that the first song I play (no matter what song it is) it “keeps playing” after the song should be over. So lets say a song is 4 mins long…After that song is done, there is no sound coming out but it looks like Play Music is still playing that song. After this happens, the media server app keeps running even if you close the program. If that doesn’t happen, media server seems to function properly and won’t run if you’re not playing a song. I don’t know why this happens, but you’d think it’s something easy for Google to fix. Any ideas?

  • Oliver

    Same here on a Nexus 4 with 4.2.1. No music files in the device at all. Just played some videos shot with its own camera.

  • Achim

    I also got the same problem with my Galaxy Nexus with Jelly Bean 4.1.1
    Mediamanager process taking 47% cpu during +10 hours after reboot.
    After 10 hours of draining my battery everything is stable, as long i don’t reboot my phone.

    It is unbelievable that such a bug exists in the stock version of android!

  • Luigi2012SM64DS

    The .nomedia method worked! Thanks!!!!

  • Forward AtNone

    It is the ALBUM ART for me. I downloaded some with an app yesterday and the problem just started. I had no issues before that and that was my only change. I am running the latest JB on a Galaxy S3.

  • http://twitter.com/KON4ST4R John

    What if I have no music whatsoever on my Nexus 4? I only stream from Google music and Amazon cloud, and still the media server is taking up 26% of battery used. It is also usually the#1 battery consuming app on my phone for some reason.

  • nutao

    Just updated to Jelly Bean on my Note and got the media scanner problem all over again. In my case, removing the .nomedia file and creating a new one fixed the problem (simply renaming it twice didn’t help).

    Also note I created only one .nomedia file in the topmost directory, there’s no need for .nomedia files in its subdirectories.

  • Suhail

    I think its the GOOGLE PLAY MUSIC doing this, mine has been running at around 30% mark, then I checked my APPS SYNC and there I found google play music. I disabled it from sync and it rapidly went down to 10%. Still monitoring it, but so far so good I got everything crossed, lol

    • Suhail

      EDIT: 2 hours have passed and now it has gone to 8%. So it looks like its working.

  • Vasiliy

    I met this problem yesterday after “Booktube Youtube Downloader” and “A8 player” was installed on my 3Q tablet (Android 4.0.3). After some minutes of usage “mediaserver” freezes tablet. Reboot and factory backup didn’t help. “Mediaserver” was fixed only after factory backup with internal storage sweep.

  • http://www.facebook.com/denis.heinrich.77 Denis Heinrich

    actually, it wasnt fixed in 4.2 as well

  • Danz

    Do you guys got Viber app? Since I’ve upgraded my Razr I from ICS to JB it started to act weird and drainning battery with media server. My battery used to last like 10hours max. I’ve uninstalled it 2 days ago and hadn’t full charged it since then…2 days with no media server problem. Check your malfunctioning apps, cause Viber wasnt even opening here, it was always trying to restart service at task manager.

  • AlienHack

    SOLUTION- SOS

    So , as a pc and Mobile technician i have been doing some debugging for the past weeks on the issue.

    What i found is that mediaserver does indeed use very high percentages of cpu and stand by time and thuss battery power. I have managed to solve the problem for me BUT it is a combination of solutions.

    As people mentioned mediaserver is used to scan media files on the internal card or the external one, also it is used to decode music/video while you play it and also whenever a sound is played from your phone(ringtones, notifications etc)

    SO, to better understand it, just think that mediaserver as seen in the battery drain screen is a mother process that is used by several subprocesses (ringtones, media players, media sd scanner etc) , THATS WHY people in this thread and in other threads about this problem mention different solutions. Because for someone the SUBprocess that keeps mediaserver stuck and running might be a music player program-process and for someone else it might be his huge collection of music in his sd card and the media sd scanner process that runs all the time.

    SO BOTTOM LINE – SOLUTION

    there are some things we must take car of inorder to find whats geting mediaserver stuck in our phone .

    I will start with 2-3 things that nobody mentioned in this threas and in other solutions and that i found that they get my mediaserver stuck for me in my Samsung Note 2 4.1.1

    1- get rid of the media player widget and the alarm clock widget from your main android homescreen. For me when i put these on my main screen the mediaserver service starts running for ever. looks like these processes keep the mediaserver running on the backround so that they can start playing a song or the alarm sound immediatelly when they need

    2- DIsable the alarm when not needed. For me when i enable the alarm to wake me in the morning it starts the mediaserver process. Disable any alarms in general when not needed.

    3- The external sd card is a big thing on its own. For me when i insert it empty it does not use mediaserver. Even when i put 40-50 songs again it used mediaserver for 10 mins and stops (logical because the media scanner process starts and uses mediaserver until it scans the songs in the sdcard and then stops) – NOTICE – when i put some .bmp files in the sd card that the media scanner cant read then it is stuck there forever and mediaserver uses my battery . You can see which picture files are not read by your phone if you go to your gallery. If you see there black pictures that when you click on them say “cant open file” then these files are stucking your mediaserver process so look at their details (see the path they are in) and delete them.

    These are the basic reasons that get mediaserver stuck.

    I managed to change my mediaserver from using 30-60% of battery everyday and thus my phones battery just beeing alive for 20 hours to droping mediaserver to 5-7 % and my phone running for 40+ hours :-)

    • Don Ramesh

      Good tip.. i’ll give it a try on my galaxy s4

  • rainmanone

    Had this problem with 4.1.2 (HTC Sensation XE).
    for some reason, disabling Location History in Latitude, stops the media server issue…

  • andriusM

    I have experienced something like this in CM 10.1 (android 4.2.2) on LG Optimus 2x (p990). But in my case it seems only be the case after shutting down and powering on the phone. While playing music and watching videos from external sd card seems not to be a problem, battery does discharge as fast as it suppose to be. So, if I have to reboot my phone, I usually plug it in for some 10 min :D

    • andriusM

      BTW, I’m using a custom kernel, called Kowalski kernel

  • http://twitter.com/IanBuffet SeungHwan, Hyun

    I’m also using Nexus7 4.2.2 and have exactly same problem. The media server is running in background and drainning the battery like hell. Yesterday I went out and came back today afternoon so almost 15 hours I didn’t use my Nexus7, but I check the battery status and media server was running for 5 hours and caused batter drainning.

  • samljer

    4.2.2 and still have this issue.
    Im not getting no where near 8 hrs of battery
    and whats worse is I dont use this device for music or movies AT ALL.
    Strictly games, i have an Iconia A500 for media.
    This is bs!

  • Andon

    There are apps like android tweaker that let you disable media scanning. In my experience this removes the bug but stops android from finding your music period.

  • bach

    Had a similar problem with my nexus 7. The mediaserver was draining the battery. I eventually tracked it down to a problem between my hot mail calender and the nexus 7 calender not syncing properly. Hot mail has just changed to outlook, so I deleted the hot mail app and downloaded the new outlook one and now all is well.

  • http://www.facebook.com/tekjau Tan Tek Jau

    I’m using galaxy note (Android 4.1.2) and it keeps awake and my device does not goes into deep sleep mode after I connected to a bluetooth headphone.

  • maxi

    i did it all. i have delete all “album.art” and create a “.nomedia” file all over my sd card… but media server is still draining my battery… any options? i have a motorola milestone 3 (xt 860) and, also my phone gets really warm!!
    need help!!

  • http://www.facebook.com/ishan.samarasingha Ishan Samarasingha

    If you have viber installed on your device first try removing it before deleting your media. Most of the time viber causing mediaserver to loop.

  • Charles

    I upgraded my Samsung Galaxy Note N7000 and immediately had this problem. Scoured the net for a solution but found none that could help. I also read somewhere that waiting it out might work – and it did in my case. The explanation was that the new OS was re-indexing media files and you’d just have to wait for it to finish. Removing and restoring media files might potentially worsen it, I think, because this restarts reindexing. I’m curious to know if anyone else has had a similar experience.

  • http://www.facebook.com/suzzen.panthi Suzzen Panthi

    Here is a same problem in my gs4 4.2.2.media server eat my battery twice then music player when I play da music media server become crazy .then I format my sd card .delete all mp3 n videos from phone .stop Google account.n reset my phone also but it doesnot fix .so plz give me some suggestions

  • CCL

    Hello, I just bought a S4 and a mediaserver has drain my battery, despite closing all applications and files, mediaserver usage is around 60%!

« »