General :: Media Scanner Battery Drain - Searching For Reason
Jun 22, 2012
I am experiencing massive battery drain from *wakelock*/mediaplayer while music playback.
For now, i have tried everything:
- full wipe
- music playback on fresh wiped rom
- formatting sdcard / internal storage
- disabling media server
- debugging with logcat
- ...
Currently, the mediaserver drains more power then any other process, including screen. The phone gets not hot, but warm while only playing music with screen off. That was not happening before, as i listen music daily.
After all, the problem is most likely caused by a corrupt file, but how can i locate this file ? I have 2300 mp3s on my phone, so testing every single one would be a bit complicated...
GT-I9100
View 9 Replies
Nov 26, 2013
Often your Media scanner can misbehave and eat lot of CPU, Battery un-wantedly.
I had been digging out how to fix it, and here are my solutions. Perhaps try al of them, it would definitely relieve your cpu and battery usage by large. Solution works on any Android version:
Solution 1. Clear media storage data
Settings > applications > Media Storage > clear data, force stop and reboot.
Solution 2. Remove unwanted media files Navigate to /sdcard/DCIM/.thumbnails and delete all files. Repeat for external sd card. On AOSP roms, Android gallery creates too many of thumbnails that later becomes problematic for media scanner.
Solution 3. Analyze and delete excessive media files Find out what files are causing media scanner to go mad. Use any sdcard analyst (I use ES file manager > menu > Sd card analyst) to determine which directory has lots of files/subdirectories inside it. Any directory having >1000 files/folders is an alarmingly high number. Get rid of them (if you can).
Solution 4. Probe and delete bad/damaged media If you're sure you've tried above solutions and still encountering battery drain, its time to dig deeper with developer tools. Pre-requisite: You must be rooted, and have android developer tools (adb) setup. With ADB tools installed, enter shell and acquire su permissions
Code:
adb shell
su
Then run top (linux task manager) to see which process is eating cpu. You can filter top results
Code:
top -grep media
this would give you a result like
Quote:
130|root@n7000:/ # top | grep media
1905 0 10% S 7 23080K 6168K bg media /system/bin/mediaserver
2808 0 40% S 3 3524K 740K media_rw /system/bin/sdcard
2825 0 9% S 19 255832K 43936K bg u0_a5 android.process.media
%age cpu shows media server is eating cpu and needs to be fixed. Run the following command to determine which file is it currently reading
Code:
lsof | grep media_rw
If the media service is stuck at a directory/file for a long time, you know it's a damaged media file, you should get rid of it.
Once you get rid of such files, Its guaranteed media server would finish scanning soon enough.
Solution 5: Format SD cards If nothing works (or you're too lazy of trying solution 4): Take backup and format Internal, external sd card and copy only selective files/folders that you need. Problems would go away for sure.
Solution 6: Disable Media scanner If your Droid is against you and it just won't tame, its time to disable the media scanner. You can do this from adb shell
Code:
pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver All Solutions with full detail: Fix Android Media server scanner SDcard CPU, Battery drain
View 6 Replies
View Related
Jun 1, 2013
Just recently, my captivate battery has been draining very fast. I've been going from 100% to 0 in about 8-12 hours. The main battery consumer is Android System. There are no processes that are keeping the phone on according to BatterBatteryStats. I loose about 7-8 percent every hour while it is in idle/deep sleep. If I enable the extreme setting on Juice Defender, it bumps up the battery life to about 45+ hours. But if I use juice defender, sending and receiving mms is very difficult. I tried it on another spare battery and it gave me the same results. This problem started earlier this week and was present when I first flashed a ICS rom back in June and hasn't gone away yet. I did not change any settings or flash anything new to my phone. One day it suddenly went from 100% to 40% in 5 hours and after I rebooted it dropped to 5% in a matter of minutes. I recalibrated the battery but that did not do anything.
View 1 Replies
View Related
Nov 22, 2012
Have a brand new HTC One X+ (AT&T). Having an issue where after boot and sometimes all of the sudden during the day, the phone gets hot and battery level drops l like ton of bricks. Using Android Task Manager App and enabling monitor of system processes and selecting realtime monitor, I've traced the problems to "android.process.media". This appears to be something to do with Android scanning the device for media files (audio/video/etc) and creating some sort of database. I also usually see the "Music Enhancer" process which has to do with Beats Audio according to HTC (but I have Beats turned off.)
I've seen old threads of people with same problem and in some cases it had to do with a "corrupted" media file and they had to remove all media files and/or factory reset their device. I just spent an entire weekend customizing this device! Plus, how the heck do you prevent yourself from copying the corrupted file over if it was a corrupted mp3 or something?
I'm pretty sure my issue stems from the fact I used my media manager (Media Monkey) to sync over 2,800 audio files to the device. My collection is of high bitrate quality, about 16GB worth of music. I'm pretty sure this is what it is choking on. What I'm not sure of is if the Media Scan the Android device is performing is just a "normal check" for changes/addition/deletions to any of the media files. This of course would take a lot of time and CPU if it has to scan 2,800 files every reboot or periodically. It seems launching Google Play sometimes starts it too as I also sometimes see Google Play Service:Music or something like that (even though I don't stream any of my audio from Google Play.)
View 1 Replies
View Related
Sep 27, 2010
When I run the following line of code:
MediaScannerConnection scanner = new MediaScannerConnection( this, null );
scanner.connect();
scanner.scanFile( szFinalFileName, null ); //<---crash here
I get a crash and this message in the console window:
09-26 14:47:44.074: ERROR/MediaScannerService(10288): Failed to delete file /data/data/com.android.providers.media/pause_scan
does anyone have any ideas why this isnt working and what i can do to fix it?
View 1 Replies
View Related
Sep 3, 2010
I've had this phone since Tuesday and it's not made it from morning to night one time. I am using it, yes, but I thought that was the point. My usual routine is wake up, check the twitter/facebook feeds, log in and check email, browse a few web pages, and get moving. today, i did all of that and took a walk and listened to a cd for an hour on the doubletwist player. i took a single photo. and made one very short phone call. it is nearly dead. it's been off the hook since 830 and it's only 3. I could do all this minus the music playing part on my blackberry, which was ancient 8830 and i would still have juice by midnight tonight. and it should be noted, blackberry constantly pushed my email--i have k9 set to manual, as i do with the facebook and twitter/social media widget. so that instantaneous access that's supposed to be so useful and exciting--i don't have it.
i've done all the usuals, turned off the bluetooth, the wifi radio, the 4g radio (the whole point of the damn phone), lowered screen brightness to the very lowest number, making it totally useless in bright daylight and i mean completely useless-can't see to answer a damn call), i have the screen lock to 15 seconds. i have the autosyncing off, i have the whole phone crippled, and it's about to die. does anyone have any suggestions? i was using launcher pro, but want to go back to the standard touchwiz--only bummer is i can't swap out the messaging icon for handcent which i installed over the regular msging app--because ppl said it uses less battery drain-- but not sure how to disable the old one. i am using live wallpapers, but again, how much of a drain can they really be overall? i turned off the animations, is this a lemon? will rooting make it better? will the new upcoming os make it better? or is 6 hours of usage all i can expect? srsly, i would like to know, because if that's the case, i will go back to the blackberry. i don't care how fancy the phone is, if you can't use all the fun things without it dying, then what's the point?
View 6 Replies
View Related
Jun 9, 2011
And if yes, what is the name of the app/service that I have to freeze using Titanium Backuup?
I have a 8 GB SD Card with only about 550 MB free, and the stupid media service creates 500mb worth of thumbnails and cache. It re-creates it each time I delete the cache. I'm currently running MIUI Gingerbread 2.3.4. Back when I was running CyanogenMod 6.xx I used to simply freeze the Gallery app and that used to solve the issue, but I don't see the gallery app listed in Titanium on the MIUI ROM. Freezing the MIUI Gallery app didn't stop the thumbnail cache creation process.
Creating a .nomedia file in the respective folders isn't an option because I need my photographs (I have about 20k worth of family/spouse pics that I always carry around on my phone in addition to wallpapers etc.) to be visible in Quickpic / Fishbowl photo app etc.
View 5 Replies
View Related
Sep 28, 2012
I used to have a problem with the media scanner making duplicate song entries, only one would play and the other was invalid. For some reason that went away and now it adds media once and never scans again, so if I add songs later they never get picked up to be shown in the music player or winamp etc.
I found these tips:
go to application manager> all application and search
-media storage,
-music player,
-gallery application
and just delete cache and data and restart. It will solve the problem a it force to re build data base
This works still but it is a complete PITA because it resets wallpapers, ringtones and all sorts of other things to default and I don't want to have to do this every time I add a song. How do I fix the media scanner, does it even have logs or something I can look at?
Galaxy Note i717 ICS 4.0.4.
View 1 Replies
View Related
Aug 10, 2013
For some reason my battery drained extremely fast while it was idle. My phone had about 50% left and an hour later it got all the way down to 14% without any usage. Wifi was on and I didn't get any notifications. I know there are background processes but to have that much battery drained is really strange.
View 2 Replies
View Related
Nov 17, 2011
What's the best (read: most efficient) way to drain the battery? this is after a new kernal or ROM and during a battery recalibration. I'm thinking WiFi off, GPS on, even better, searching for a signal; screen brightness at 100%, no auto dim; lots of apps in task manager; streaming internet video.
I can leave 4G on, with no 4G coverage within 50 miles of me that should suck some more power. I thought the vibration buzzing might be a pretty decent power hog, but a) not sure how to make it stay on, and 2) not sure I could put up with hearing it for that long.
View 7 Replies
View Related
Aug 26, 2012
When i use thether via usb, cable with extra power-contact, my battery drains really quick. Im running cm7.2 on my defy.
View 3 Replies
View Related
Apr 24, 2012
Ok so i have found battery offender for doing initial calibrations after i go on my rom flashing frenzies. I was wondering if there are any apps that are similar but that will power the device down at a certain battery level as to not sllow the battery to be fully drained.
View 2 Replies
View Related
Sep 16, 2012
Android app that will use a lot of battery (maybe using the phones functions like wifi etc) to drain the battery and then when the battery reaches 1 or 0% it logs how long the battery lasted.
This could then be used to compare battery life on a range of Android devices.
GT-I9300
View 4 Replies
View Related
Apr 11, 2014
There are many battery drain processes, applications. I saw that one of the biggest issues related to my ZTE Grand X In battery drain problems are mostly related to WiFi.
Explanation (all in sleep mode):
- When WiFi is off (and Airplane mode on) battery drain is 0-1 % during 1 hour;
- When WiFi is on (and Airplane mode on) and I am at the home Access Point environment, battery drain is 1-2 % during 1 hour;
- When WiFi is on (and Airplane mode on) and I am outside any Access Point environment, battery drain is 2-3 % during 1 hour;
- When WiFi is on (and Airplane mode on) and I am at an Access Point environment where Android is getting connection but does not get IP address so it is repeating obtain IP address process, battery drain is 4-5 % during 1 hour;
On ZTE Grand X In there is Android ICS 4.0.4.
I am emphasizing that I have Huawei Ascend Y300. It has Android JB, and it is almost not affected at all by mentioned WiFi issues, all the time, in any environment (I mentioned in this post) it has low battery drain.
As I saw there are some programs which are checking those WiFi different situations and then try to resolve issues. For Huawei, I simply do not need any program, everything is okay. For ZTE seems that there is no perfect program, I have to say there are nice programs, but still not perfect for resolving this issue.
What would be the best to do (on rooted Android smartphone) to change frequency (inside build.prop or any other file) of checking, obtaining IP address, to optimize that, not to have huge battery drain because of WiFi environment?
View 2 Replies
View Related
Jul 5, 2012
i've just flash a new miui rom on my o2x. and i found that the battery drain much faster than it was before. last night i had 14% of battery left on my phone, and this morning it shut down due to out of battery. so i pluged in my wall charger while my phone was off. and when it showed the green fully chargeed bar i disconnected the charger and boot my phone in to CWM recovery to wipe battery stats. then i reboot the phone into android and u know what? the phone show 100% of battery only in 3 secconds and then it show 1% left. i connect the charger and the phone show that it's being charged? how can it charge a fully charged battery? and the charging speed is faster as light. it's has been charging about 15 mins now and it show 46% charged. may be google was wrong saying that batterystats.bin does not affect the measurement of battery level.
View 1 Replies
View Related
Aug 14, 2012
I was asking myself if goLocker drain battery ? I use GoLauncher and didn't notice any battery drain, but i would like to assosiate GoLauncher to GoLocker .. So is it draining battery faster ?
View 1 Replies
View Related
Dec 1, 2013
does sweep2wake drain battery? I think the screen is completely off while phone is sleeping and hence doesn't use any battery at all but to use sweep2wake the screen needs to be on all the time.
View 1 Replies
View Related
Aug 30, 2013
My phone went from 99% to 15% overnight in just a few hours and i saw that its from google services. I am using a i9300 on cyanogenmod 10.1. How do i repair this? my wifi is off at night.
View 5 Replies
View Related
Aug 21, 2011
i have some problems with battery life. The reason is the facebook for android app. I have already turned off the automatic sync, so the app shouldn't start itself but here is the partial wakeup spareparts shows me after a day of very light use (i have sometimes closed the Facebook process when i saw that my battery made jumps of 10% without touching it for an hour.
View 9 Replies
View Related
May 22, 2014
i have been using xperia P for more than a year and um quite happy with it except one fact which is the battery drain issue. my phone is running stock JB with nemesis 6.3 kernel and some other excellent mods.but when the battery level is below 40-30% it suddenly falls below 20% both with the stamina mode on and off! i have tried almost all the stock based custom roms and this issure persists.this doesn't happen when the battery level is above 40%, i have been facing this issue since i bought it!
View 1 Replies
View Related
Oct 2, 2011
I get pretty bad battery life. I wiped everything and reflashed the ROM and only installed about 10 apps instead of my usual 150 or so. Total difference in battery life! Except I want want my apps back, at least most of them.
I'm wondering if there's a way of finding out which ones take the most juice or are always running when I don't want them to do I can get rid of those few.
View 9 Replies
View Related
Jun 3, 2013
Will toggling Wi-Fi on and off drain your battery? I'm asking this because I read:
[URL]...
Essentially, you want your Wi-Fi sleep policy to be "Never" because when the Wi-Fi sleep policy is "Always," your phone searches for Wi-Fi more often and that drains battery (I think that's what it is saying).
At the moment, I toggle the W-Fi on every time I'm using it and off as soon as I'm done using it in an attempt to save battery. I'm not sure if this actually works or it's actually draining my battery because it would search for Wi-Fi every time I toggle it on.
On my Samsung Galaxy S4, I can't find Wi-Fi sleep policy as mentioned in the article, but I found "Keep Wi-Fi on during sleep." Am I supposed to set this setting as "Always" to save battery life?
I toggle Air View and Smart Gestures on a frequent basis as well--not sure if I should do that too.
View 1 Replies
View Related
Sep 30, 2013
I was wondering, if I set wifi off but I keep the global sync option on in the 4.2.2 tiles, does the apps will try to sync even if wifi is off, and then drain a little bit off battery ?
View 6 Replies
View Related
Jan 12, 2013
does Android Firewall [URL] .....
has any battery drain ? I would like to block access to internet to some of my apps, but i read somewhere that LBE and other firewall like that is draining battery ..
View 7 Replies
View Related
Oct 14, 2013
my Samsung s2 on jelly bean 4.1.2 drains battery alot while even in off mode not only that, whenever I press the switch off key the phone won't give me various options of restart, flight mode , sound mode and the likes, the phone will just go into off mode directly.
View 1 Replies
View Related
Dec 4, 2013
Does it drain more battery when I overclock the GPU but not the voltage?
View 1 Replies
View Related
May 11, 2013
My Xperia Arc S has a really, really weird battery draining issue. The battery drains in 10 hours on standby. It seems completely random and happens as long as the battery is in the phone (even when it's off). I was rooted and had a custom rom and kernel but I've switched back to the stock firmware and guess what: the battery still drains randomly. I also bought a new battery with twice the capacity of the old one but nothing changed.
View 3 Replies
View Related
Feb 23, 2012
I charge at night, by noon its dead with never having turned it on.
View 3 Replies
View Related
Jun 12, 2012
I am a long-time lurker of XDA Forums and had an issue that I could not resolve on my own. I have upgraded my Xoom 4G to 4.0.4, stock, locked, not rooted. Factory reset recently and have tried everything to my knowledge to fix the following issue.The mediaserver is in a constant loop. There are no music files, pictures, anything on the device right now. Here are the few logs that have looped (I used OS monitor to find)
Code:
setup_dma
cpcap_audio_configure_power: regulator -> stanb
cpcap_audio_configure_power: regulator -> enable
[code]....
It happens every few seconds and keeps the tablet awake constantly. The battery is in a huge drain.
View 7 Replies
View Related
May 10, 2013
Does having sync on for calender drain a lot of battery android ?
GT-I9505
View 2 Replies
View Related