yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] TimAnd:
I reworked this a little, hoping it might help someone:

In order to find out what's draining a battery, it's convenient to use BetterBatteryStats or OS Monitor.

If it's Media scanner, there are the following solutions.

Solution 1A. Clear media storage data and allow Media scanner to rebuild a database

Settings > Apps > Media Storage > Clear data, force stop and reboot.

Solution 2A. 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 2B. Analyze and delete excessive media files

Find out what files are causing media scanner to go mad.

Use any sdcard analyst (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 2C. 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.

In Terminal Emulator, acquire su permissions.

Then run top (linux task manager) to see which process is eating cpu. You can filter top results

Code:	"top | grep media" OR “top -n 1 | 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, media server should finish scanning soon enough.

Solution 3A: Set Media scanner not to awake a device

revoke Keep awake privilege (from Settings > Privacy > Privacy Guard)

Solution 3B. Prevent from scanning by placing a file in folder

Placing a .nomedia file will scan a directory and shot in MTP but exclude it from the media database. Placing .noscanandnomtp completely prevents the scan, which saves considerable processing power and battery life on systems with numerous media files, but prevents them from being seen over MTP.

Solution 3C: 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 from Settings-Apps or from adb shell

Code:	pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver

Solution 4: Format SD cards

If nothing works you can still take backup and format internal and external sd card and copy only selective files/folders that you need.
[Android Q&A, Help & Troubleshooting] seagull26mk:
Battery drain problem solved

Hi, I had the battery drain problem with Android 4.1.2. tablet. Tried everything found on several forums, and the result was - nothing worked. Mediaserver kept draining my battery.

Intuitively, I tried two things:

1. Unmounted SD card where I keep all sorts of media files.

2. Deleted downloaded PICTURES from "download" folder.

Result = problem SOLVED.

Then remounted the SD card - battery life still normal!

Conclusion: bloody mediaserver keeps scanning the downloaded pictures and drains the battery.

Simplicity is always the answer!
[Android Q&A, Help & Troubleshooting] LEENO:
my 64gb samsung sdcard is exFat formatted. Do you suggest keep ex fat or other type partition? My phone is samsung i9505 with stock rom
[Android Q&A, Help & Troubleshooting] berezker:
I just formatted my phone and it worked

#5
[Android Q&A, Help & Troubleshooting] bobbanico:
Hello,

I faced this issue on 2 of my devices, a galaxy note 3, and a oneplus one.

Devices were very hot, with a percentage of usage about 43% of the battery.

I tried several things, and i was able to reduce it straight away by deleting from my download folder the images attachment you can download from mails, file names like :

download-file.bin (something like that).

I m now monitoring my battery usage, and media fell from 43% to 20% already in a matter of minutes.

It may worth a try removing such files and if all goes well, you could save lot of battery :)
[Android Q&A, Help & Troubleshooting] luxkore:
I've got my Android folder filled with what seems to be about 16k subfolders + files... I think I found the reason why sdcard is being a pain...
[Android Q&A, Help & Troubleshooting] HassanM:
Hope it helps...
[Android Q&A, Help & Troubleshooting] thethinkman:
You have saved the day for me with this :) Real Racing 3 on my OnePlus One for some reason had almost 2000 subfolders, so I cleared the data for the game and it fixed the Mediascanner issue on my phone that was eating over 50% of my battery today. Major Thanks. :good:

I'm on CyanogenMod and used the File Manager instead of ES, and used Properties instead of SD Card Analyst.
[Android Q&A, Help & Troubleshooting] anwedr:
Feel the need to bump this.

Used ES file manager and saw Here Maps have over 1800 files on my sdcard and Twitter and Tapatalk combined 2800+ files on my internal storage.

Uninstalled Here Maps and removed Tapatalk, deleted data on Twitter, and no more "sdcard" being #2 on my battery usage.

Great help.
[Android Q&A, Help & Troubleshooting] 9Lukas5:
For solution 4, what are the right commands for doing this on Lollipop?

L
[Android Q&A, Help & Troubleshooting] imzjustplayin:
You always could have put a .nomedia file in those folders....
[Android Q&A, Help & Troubleshooting] Sash52:
Xposed Media Scanner Optimizer

Do you know the Xposed Media Scanner Optimizer?

It let's you customize the mediascanner behavior to restrict directories or even file types!

This great tool works like charm :cool:

Already on XDA: http://www.xda-developers.com/media-scanner-xposed-xdatv/
[Android Q&A, Help & Troubleshooting] kishan l r:
Android media scanner cpu utilization,battery drain

Step 3 helped me to solve this problem thank you.
[Android Q&A, Help & Troubleshooting] haytham-88:
internal formating fix it for me ((too busy trying other solutions))

Thanks...
[Android Q&A, Help & Troubleshooting] sputnik_skg:
A few days ago, I updated Skype and an app for playing piano on the phone. Battery was at about 97%. 3 hours later it had plunged to 6%. The device was warm, as if it was working. It took more than 8 hours to achieve a full charge. This thing kept going for days. Originally, I thought it was the battery that had kicked the bucket after 2 years. So I ordered a new one because I panicked. Turns out that I didn't have to...

Thankfully, I pinpointed the problem using the OS Monitor app in expert mode which revealed high and constant usage of /system/bin/mediaserver. I followed the advice on this thread. The first suggestions didn't work for me. Since I have no root access and didn't want to root the device, I began experimenting by wiping the sd card (problem solved) and slowly adding the very same files that I had previously backed up until the problem reappeared. It turned out that some mp3 files were the culprit. The thing is that they have been there for months with no problem, so I really don't know what triggered this behavior. For the history, I have a folder with over 1500 files (photos) and there is no problem. Good luck to you all that have the same issue.

Update: tried copying some more mp3 files, same thing happened. Windows error checking found no problems with the sd card, although I suspect that it has a problem. Also having problems renaming folders in my music folder.
[Android Q&A, Help & Troubleshooting] ssceddie:
Easier way...

I found a esier way....

I put the hole sd card into the Winamp media player, after winamp added all files to the media-liberay I clicked on "lenght" then sort Winamp the titles to title-lenght and then delete all files they display a title-lenght with 00:00

After reboot the mediaserver doesent hangup on this files....
[Android Q&A, Help & Troubleshooting] haism007:
My friends ...

I pass by article. That i love 2 share.....

Any one know

MediaServer Takes Another Hit with Latest Android Vulnerability

Posted on:August 17, 2015 at 6:07 am

Posted in:Mobile, Vulnerabilities

Author: Wish Wu (Mobile Threat Response Engineer)

The “hits” keep on coming for Android’s mediaserver component. We have discovered yet another Android mediaserver vulnerability, which can be exploited to perform attacks involving arbitrary code execution. With this new vulnerability, an attacker would be able to run their code with the same permissions that the mediaserver program already has as part of its normal routines.

This vulnerability has been designated as CVE-2015-3842. While it affects Android versions 2.3 to 5.1.1, Google has fixed and published details this vulnerability via the Android Open Source Project (AOSP). Currently, there are no known active attacks against this vulnerability.

This discovery closely follows three other major vulnerabilities in Android’s mediaserver component that surfaced recently. CVE-2015-3823 may allow attackers to trap phones in endless reboots, ANDROID-21296336 may render devices silent, while CVE-2015-3824 (Stagefright), can be used to install malware through a multimedia message.

How it works

The vulnerability involves AudioEffect, a component of the mediaserver program. It uses an unchecked variable which comes from the client, which is usually an app. For an attack to begin, attackers convince the victim to install an app that doesn’t require any required permissions, giving them a false sense of security.
[Android Q&A, Help & Troubleshooting] lilprince:
top: Unknown option 'grep' (see "top --help")
[One (M8) General] flex360:
Lol. I'm done with HTC

The specs got leaked and its gonna be a huge disappointment

http://www.androidauthority.com/htc-m8-specs-leaked-antutu-benchmarks-320044/
[One (M8) General] YoungCorruptionV2.0:
It's not official with the specs. I'd take it with a grain of salt
[One (M8) General] ajent:
Hell yeah! I love the red pictures in dark settings effect.
[One (M8) General] TriBeard:
Also, even if it were still a 4MP camera, it could very will be a completely redesigned, or at least tweaked, sensor that would perform better than the current one.
[One (M8) General] Riff76:
Seems like you have been saying that for over a year now, done with HTC
[One (M8) General] FrostyF7:
I'm pretty excited :D and I'm okay with the camera.
[One (M8) General] ericwgarza1:
Same boat here. I ditched HTC after the 3D and the One was their final chance for me. This camera sucks beyond comparison. Makes the phone only a fraction of what it should be (yes I've had my device replaced). Only nexus devices for me from here on out. I'll pass on HTC's crappy radios and cameras.

---------- Post added at 02:17 PM ---------- Previous post was at 02:16 PM ----------

Camera is trash compared to the industry standard. Period!
[One (M8) General] uh60james:
Every single person at HTC should be fired, these shakeups they've had obviously are not working. Other than the camera I love the HTC One, but using the Nexus 5 for the past week or so I haven't missed a thing about it. I will probably end up selling it and not be coming back to HTC unless they can get there act together.
[One (M8) General] flex360:
Stick to thanking posts

I'm getting nexus 5 in December anyway
[One (M8) General] FrostyF7:
It works fine for me :p but I wouldn't mind one that is better.
[One (M8) General] ericwgarza1:
It's bad enough that I have to pull out my work iPhone anytime I need to take a picture. SMH! I hate Apple by the way.
[One (M8) General] BMP7777:
Everyone is so friendly with each other .... so I thought I'd chime in with my own opinion. Name one device that any of you have used that the camera actually measured up to what they say it will....anyone? I especially love how the N5 fanboys in other posts had the balls to say the N5 had a better camera when it is exactly the same as the last one, and yes, I owned an N4. Don't get me wrong, I'm totally with everybody that these companies should stop crowing about how great their camera is when it ain't, but GET REAL. As I have said before somewhere around here, when it comes to new devices, COST IS A FACTOR. Soooooo, would you rather have the same camera or the same processor? Same cam or the same screen clarity? They know they have to cut costs somewhere, this is where it happens. GET USED TO IT. It ain't no greener in the other dude's yard. If the camera is that important, buy a Nokia. The camera is the only thing about that device that's worth a s***. My two cents, flame away....:angel:
[One (M8) General] flex360:
Lol
[One (M8) General] ED2O9:
The camera in my HTC Evo 4G LTE was amazing. I used it at work all the time, and my co-workers refused to believe that the pictures I emailed from job sites were taken with a phone. It made my brother-in-law complain about the pictures he got from this GS3, which looked crappy by comparison. That phone was largely the reason I "upgraded" to the One. There have been a few incidences where the low-light capabilities came in handy, but overall I've been fairly disappointed by the "ultra-pixel" results.
[One (M8) General] BMP7777:
Yeah, I hear you. My ONE takes great pics in near-perfect conditions, crappy ones in bad. But, my experiences with the N4, LGOG, and the ONE, not to mention my wifes GS III or any of the iPhones shes had (4, 4s, and 5) were really no better. I have just been resigned that the cam is one place that smartphones will lag until costs come down. Or until I can afford a 1000 dollar device. Have you guys seen the Lenovo?

http://shop.lenovo.com/ae/en/smartphones/k-series/k900/

http://www.thedostore.com/smartphones/k-series-k900-steel-grey-32-gb.html

...and I'll bet the cam aint that great on that badboy either lol
[One (M8) General] ronniemayo:
To keep the same camera says that there would have to be more people that like the camera than not. Most people come to forums to complain but that's a small percent of the overall user base. I still have my evo4glte and the ones camera outperforms it. If they left the camera the exact same and said it was 8 or 12mp people would all of a sudden say it was better just because of the number.
[One (M8) General] vader860:
At the very least it's worth waiting to see what will be available....unlike the PS4 vs Xbox One, which was crystal clear early on who the front runner was. :)

There are also rumors that it may have an octo core processor. Maybe outlandish but we shall see. Maybe they include a 20mp or 41mp camera like the lumia. :P
[One (M8) General] rank78:
Truth. I can only assume people have been smoking some pretty potent weed lately because they complain about the cam sucking yet it's one of the better cams on Android devices. Whenever my brother needs a pic he uses my One instead of his EVO LTE. Go buy a Nokia or iPhone, maybe G4, but don't go whining about a Nexus being the solution because it isn't. ll this crying over an article that only had an early spec leak for a prototype, and it doesn't give any info besides MP? lol c'mon guys, get real.
[One (M8) General] XaoSilentrzk:
They really do need to innovate in the camera department. The same bull camera will be a fail.

If ScamSung ever overhauls touchwiz & give it a premium design... It's all over
[One (M8) General] sgt. slaughter:
Sorry but no way they release a device next spring time and use the S800 then with same specs elsewhere as the One.... Nokia has the camera dept won in my opinion just sucks they are doing windows...

Need to use the S805 SoC and crank up the camera dept at HTC on this next device....

To those that are leaving..... That's nice, everyone will surely shed some tears for yall ......
[One (M8) General] mushages:
the note 3 is (5.95 x 3.12 x 0.33in) and the new HTC One M8 is (5.76 x 2.78 x 0.37in) and weights 8 grams less with metal body
[One (M8) General] MJFox78:
don't forget that the One has stereo speakers on the front... this makes the phone larger, but the sound the phone is producing is amazing and well worth the bigger size

Gesendet von meinem HTC One mit Tapatalk
[One (M8) General] Div033:
I understand, so you look for devices which have a good screen:device size ratio, with as little bezel as possible, rather than simply a bigger screen.

Tbh, I was unaware the new One was so big as I hadn't looked too hard at size comparisons. This changes things a bit for me as I too look for devices with smaller bezels as this was a major issue with me for the M7. This made the G2 very attractive as well, but I ultimately decided to skip on it as I was pretty content with the S3 running CM10.1. With kitkat its definitely starting to show its age. It doesn't help that Verizon recently started locking down newer firmwares.

I'll have to see it in person before making final judgement but I can definitely see where you're coming from and will have to rethink my impulse decision.
[One (M8) General] UgXvibe:
Hopefully the more rounded chassis will make it feel smaller in hand.
[One (M8) General] Life Engineer:
Yes you are right! Small bezels are ideal!

Ok it's not exactly same size as note 3, it's slightly smaller but still very big relatively to a 5" device and bigger than even s5!

That doesn't mean I will not buy it but it's not that evident or easy choice anymore!

I will wait for all 2014 flagships to choose from!
[One (M8) General] daorderdillon:
We already have kit kat
[One (M8) General] vegetaleb:
New infos are saying it will be dual 5MP, it makes more sense than 4 +2mp for refocusing (needs 2 photos with the same resolution but different focus).

Even 5mp is way better than 4 for daylight
[One (M8) General] gavinfabl:
That's interesting. Have you got a link to that info please.
[One (M8) General] vegetaleb:
Here you go: http://xdaforums.com/showpost.php?p=51343768&postcount=7797

Here again

Btw ro are you going to do reviews of Z2 and One M8 this time? :)
[One (M8) General] BoneXDA:
From phonearena

http://www.phonearena.com/reviews/HTC-One-M8-Review_id3619/page/3#27-HDR

HDR:
[One (M8) General] anaskr:
Disappointed

Really disappointed... wtf ? samsung makes **** always.. people buy it.. I expected sooooooo much from htc one m8 , being the previous owner of THE ONE (m7) , This aint THE ONE I wanted.. I sold my One and bought the xperia just to experiment before buying the new ONE.. but it turned out **** (sold it the 2nd day)... I have read LG G2 is a great phone ( - the ugly plasticy samsung copy, I am gonna try it out next week). My only expectation was from HTC .. i dont even care if we are/were the minority in Android.. And now ? this phone? with a tiny upgrade ? seriously? :crying:

Not Happy with :

The new camera (Ultrapixels my a$$ I WANT MEGA pixels, **** even the ffc has more pixels!! am i supposed to take pics from them?)

Expected at least 5.3 inches with qHD display.

Bigger Battery (They say it lasts long, lemme see)

No notification light (really needed it, point me if it does have one)

PS: I would still buy it if i have a bad experience with LG G2 or if LG G3 turns out to be disappointing...... I would only buy it because of those guys making Venom ROM (I am addicted to their ROM)
[One (M8) General] progosu:
guys there's no OIS in the new One ^_^
[One (M8) General] Apoxx:
Oh my that's some horrible samples. My iPhone 4S takes better pictures than that. Shame on you HTC.
[One (M8) General] Deiwuzas:
Let's be honest - camera sucks. And that's pity news..Damn you, HTC :(
[One (M8) General] fernando sor:
lets be honest this thread sucks, started by a notorious kanger flex360.
[One (M8) General] 1meanrex:
No matter however they make it sound 4 ultrapixels ends up looking like crap as soon as you zoom in a little, don't worry though the front facing camera has now been improved so now we all an take as many nude selfies as possible and itll be much more clearer.
[One (M8) General] Sindroid:
I liked my m7 in the beginning. But it showed its ugly side later on. Good sound but poor quality speakers. My bottom one is blown like many others. Gapless build turned out to not be so gapless at all. The camera as mentioned already sucked. And it got the purple tint.

They say the m8 is gonna cost more than the iPhone (at least here in norway). So its pretty much goodbye HTC. Good look on a phone means nothing when the inside is pretty rubbish.

Another article. http://techcrunch.com/2014/03/25/htc-one-m8-specs-availability/
[One (M8) General] Jonnyredcorn:
This is very upsetting. Where was the 16mp Camera everyone was talking about? HTC really pulled an Apple here....if you have an HTC One there is absolutely no reason to upgrade.
[One (M8) General] veritasxe:
Hey!

Just to let you know, the speakers don't get blow out. I thought the same thing, but then took a toothbrush to the speaker grills and it fixed it! I couldn't believe it, but the speakers sound just as good now as they did when I first got One last year.

Have tried it on my gf's phone as well with the same result.

---------- Post added at 03:33 PM ---------- Previous post was at 03:30 PM ----------

How so?

-Better camera

-Better battery

-MicroSD card support

-Better design (subjective)

-Better speakers/sound quality

-Integration with the dot case

-New DAC in the audio port

-faster processor/GPU

Not sure what else they could have done tbh...
[One (M8) General] flex360:
More megapixels???

Dump the ultra pixel??
[One (M8) General] kopkiwi:
Fail of a phone. Keep the same, below average camera from last year? Stick with 5"? Nah, times have moved on HTC. Appears you really haven't learned anything.
[One (M8) General] fraize:
5 minute test

I went to the Verizon store to play with it. There was nobody there looking at the phone at all. In true form, Verizon's cable-lock covered part of the camera, so my camera tests had a huge black section on the left of every photo, but what I really wanted to play with was the 2nd camera sensor's abilities.

First, the 3D effect. At first, it looks cool tapping the 3D icon, and using the camera's motion-sensor to tilt-around and get perspective, but it's entirely faked. The 2nd camera's depth-data applies a sort-of stretching algorithm to the photo to skew and distort objects in the foreground as you tilt around. Horrible and gimmicky.

Second, the refocus effect. I was expecting something not unlike the Lytro, but it's so completely not like Lytro. The fake bokeh blur effect is applied to items outside the focus-depth of the tapped object, and it's not even cleanly applied! There were many pinched artifacts, I honestly can't believe HTC Engineers released this device.

I wanted something at least as good as my Nexus 5's camera, but even that POS is better than this.

I preordered mine from AT&T. I don't think I'll even take mine out of the box. Slap a return label and send it right back. Garbage.
[One (M8) General] blestsol:
*sigh* i wanted this bad. I was going to pay full retail. that cameras terrible man. It hurts my soul that my GS3 is better.
[One (M8) General] ThePhoneGeek:
So ultimately I was hoping that there would be a glaring reason to spend $650+ on this device (won't by carrier locked devs). I have the original One on Sprint and the original Developer Edition and ultimately while a MicroSD was a huge sell for me I am just not sold on the camera at this point.

I'll probably get one later on but I am not a day one buyer.

MG
[One (M8) General] zathus:
And the waiting game continues. .ok Motorola. ..your up!
[One (M8) General] SolarTrans:
I've seen comparison shots between the M7 and M8, and to be honest the M8 looks quite a bit better. As Apple has successfully shown, there's more to a camera than megapixels. Although 4 really is cutting it low, the image quality is noticeably better than on the M7 so it's not that big of a deal IMO.
[One (M8) General] warningx:
hmph

Was excited to see this come out today, but this is just sad. My DNA is running an 8MP camera, and this should have molly-whopped it :(