Tell me more ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I've got a Nexus 4 on OS version 4.2.1 that suddenly started to drain it's battery very quickly. When looking in the battery usage I see "Mediaserver"eating 60% of the battery over time, with several minutes of CPU time logged and several hours of Keep Awake time. Typically the screen, phone idle or other services eat up the majority of battery life.

I tried closing all apps and charging it up, and sure enough overnight it still drained significant battery, again Mediaserver was the culprit as reported in the Battery usage chart; it had kept the device awake all night and drained 10% of my battery despite zero use. I haven't added a large number of files and I'm not playing music/etc so Mediaserver shouldn't be doing very much on the drive.

How can I stop Mediaserver from eating my battery life like this?

share|improve this question

3 Answers

up vote 6 down vote accepted

Killing all running apps didn't solve the problem, nor did disabling the automatic sync for Google account items like videos/photos (which I heard suggested for a similar battery issue).

What did work was simply rebooting the device by holding the power button and picking shut down. After rebooting Mediaserver no longer appears to use much of my battery in the usage chart and my charge lasts like it always did. So if you get the same issue, just reboot.

share|improve this answer
1  
Funny -- that was exactly what I just wanted to recommend. It's the only way to get rid of "sticking wakelocks" I know of (those cases happen when apps request a wakelock and forget to release it lateron). – Izzy Dec 10 '12 at 16:37
@Izzy that must have been what happened. I'm not sure technically what happened, but wanted to share the solution in case it's a common problem on 4.2.1 or something. – Ben Brocka Dec 10 '12 at 16:44
That's something common to most/all Android versions (not especially with mediaserver, but with many services). Also, badly designed apps add to this. For details, you might look into the question How to deal with (orphaned) WakeLocks? and its answers. – Izzy Dec 10 '12 at 17:22

The Mediaserver process scans your device for media files to add to your library. However, the 2012/12/12 (perhaps some more) gapps version is broken and gets stuck in an infinite loop on unfamiliar files on your phone. This directly translates to battery drain and is bad for the lifetime of your battery and other phone components. When running your phone for the first time or when starting media applications, the Mediaserver is invoked and will commence the horror.

How to fix:

  • Reboot phone and do not start a media application.
  • Put a .nomedia file on your SD card root to prevent library search, thus preventing Mediaserver from getting stuck. This means no media library!
  • Wait for the glorious Google to fix this anomaly.
  • Downgrade your Android firmware + gapps to a version which lacks this bug.
  • Use an iPhone/Windows Phone
  • Modify the gapps (Mediaserver.apk) to support all kinds of files normally. (advanced + time consuming)
share|improve this answer

For me, rebooting the Nexus 4 several times didn't help. The first time I started using the mobile phone, I logged in without the Google account. So, I did factory reset and made sure I logged-in with the Google account. This seems to have fixed the issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.