[Q] /system/bin/sdcard Process completely hogs Galaxy S3 - Android Q&A, Help & Troubleshooting

Hello.
After reading all similar posts, and not finding any solutions I'm turning to XDA developers for help.
I own a brand new (3 month old) T999V Galaxy S3.
The phone is not rooted, and for now, I do not plan on rooting it , in order to keep the warranty.
Approx a month ago , I have noticed, that at times my phone becomes non responsive, and stays non responsive for many hours in a row, significantly heats up, and looses a lot of battery charge.
I have investigated the issue: process /system/bin/sdcard hogs 47-50% of the CPU.
Killing the process simply restarts it again, rebooting the phone does not help.
Galaxy S3 has a "build in" internal SD card, and I'm also using an external one.
I have tried using two different external SD cards, but result was the same.
I have tried running the phone without any external SD card - the result: /system/bin/sdcard at 45% of the CPU !
So it seems that external sd cards are not causing the problem.
I suspected, that a media storage might cause this issue: I had completely reset media storage - to no avail.
Any suggestions, short of "factory reset your device", are more than welcome.
Few illustrations are attached.

Anyone?
Anyone? No one willing to help with the issue?

Solution found
As I figured out that none is volunteering to help, I had resorted to figuring it out myself.
So first I'd like to properly describe the problem:
Every time the galaxy was rebooted, the phone was unresponsive for many hours in a row.
Using an android app called process monitor, I have established that the process that was occupying CPU was named, /system/bin/sdcard .
After reading some Android development documentation I came to a conclusion that the process itself is not to blame: /system/bin/sdcard is a process spanned by SD card access service, and the real culprit could be any application accessing the SD card.
My gut feeling told me that it is somehow related to the notorious media scanner. So I went to Settings>Applications>Running applications, and stopped application called Media. Then I cleared the memory , and suddenly CPU consumption was normal again.
So I found the "what" now I needed to figure "why".
Using android programming documentation again, I have determined that the way media scanner is working is by traversing all directories for all files, and then my bet was that the scanner is getting stuck in one of those directories.
In order to empirically detect which directory was problematic I have used "Storage analyser".
This is a tool showing the size of the folders, and I figured that if a scanner got stuck on a problematic folder, "Storage analyser" will also get stuck on it.
As predicted it got stuck on a following folder:
/Android/data/com.sec.android.allshare .
Using file browser I have determined that the folder contained around 62000 (yes sixty two thousand) files.
As it was impossible to browse within this folder (the file browser was getting stuck when entering this folder, I have simply deleted it.
Further investigation shown that the folder is getting regenerated after reboot, and it contains Samsung Allshare temporary files.
So that's it - removing the folder with a very large number of files has done the trick.
Now my phone works flawlessly, and I'm keeping my eye on the Allshare folder (Samsung shame on you).
So anyone with the "media scanner running slow" problem. Search your drive for a folder with exceedingly large number of files, and get rid of this folder (if you can).
Keywords:
Galaxy S3 high CPU consumption,Android high CPU consumption,Android media scanner slow, Galaxy S3 Slow, Phone is slow on boot.

Amazingly enough, I had this same issue, and I was up to 80k files. Took 3 hours to delete them all. What got me searching was the fact that my tumblr app stop animating gif files. Not sure how, but they were indeed related. Perhaps being rooted had something to do with it. Anyways, I've removed allshare, and there are no signs of temp files growing again.

Removing large folder resolves problem
I too had a similar problem on my Galaxy S3, however, I'm running CyanogenMod 10.1 and not the stock ROM, so my problem was not related to the Allshare app.
I started noticing terrible battery drain (suddenly), I knew something had to be wrong because my battery usually lasts forever, so I started digging. I found that the /system/bin/sdcard process consuming almost all of my battery (battery stats screen under settings).
So next I opened up SSH and connected to my phone's shell. Took a look at top and can see that /system/bin/sdcard was consuming all of my CPU constantly, thus draining my battery amazingly fast. After searching around a bit about this problem, I came across this thread (after looking at pages of similar error reports with no real answers). So I decided to see if I could tell what the sdcard process was doing with files.
So next I ran:
lsof | grep media_rw
Which will show you any files opened by the user media_rw (the user running /system/bin/sdcard)... this led me to the application and directory that was causing the problem. The application stores an image cache and that directory had over 60,000 files in it. Some oddities however, the folder did have a '.nomedia' file in it, which should have told the media scanner to skip it. The files were also not named with an image extension. Also, these files were not on the sdcard at all but the internal phone storage.
I decided to give deleting the files a try, so I did a
rm -f *
in that directory... I got an error message indicating that there were too many arguments... a limitation in the rm binary or the filesystem maybe as well. So I backed up a directory and did a rm -Rf on the directory, which after some time removed the files. Immediately my CPU and battery stabilized and are back to normal.
All of this makes me think that there is really just some limit around 60,000 (65K is a magic number?) to what the filesystem can handle in a single directory (efficiently).
Anyhow thanks for pointing me in the right direction.

Wouldn't putting .nomedia in the root of the folder prevent it from being scanned at all? Rather than deleting folders that you don't know the function of?

Related

[Q] gallery and other apps freezing, battery burning quicly

Hi folks,
so heres the thing, I recently partitioned and formatted my sd card (16gb), it all worked fine, now however some apps are freezing to open or they open quite slow, like the gallery, music player, winamp, etc, is like it was trying to read the filesystem but is just sitting there like in a loop, after a while android tell me the app is not responding and asks me if I want to force kill it. So, the phone doesnt become unresponsive, everything else still works, ES file explorer for example can get into the FS's and I can check all my files just fine, is just that maybe because of this extra effort, even when those apps are not running the OS itself is probably hanging on accesing the filesystem as well and this is consuming too much cpu and IO, the phone goes real hot, hence the battery runs out darn fast, from full charged to death will be no more than 8 hours.
In the terminal I ran "df" and checked the /proc/mounts and I can see /mnt/sdcard mounted twice, along with other mounts repeated as well, Im not sure if this ir normal or not, though they are not identical, they differ on the device file or type of FS.
Is like if android was having a very hard time trying to read the files.
Last time when I first got the sd card same thing happened when I installed it and trasnferred some files, the only way to fix it was doing a hard reset and reinstalling all my apps. I dont want to do this again because this phone is now too much customized and would take hours to set it back
So, has anyone come across with this issue and has any idea on how to fix it without the hard reset?? ... and no, normal reboot doesnt fix it neither soft reset.
Im running the ATT atrix 4g with v2.3.
thanks

[Q] Directory keeps reappearing: malware?

I have recently noticed a directory appearing in the root directory of my SD card entitled "SexyAlbum." I have not downloaded any apps or files remotely remotely related to anything that this name would suggest. And every time I delete the directory, it reappears within minutes. It is always empty, and always contains the subdirectories "Saved_images" (which is empty) and "cache," which contains another empty subdirectory called "images."
I have run anti-virus scans, but the scans don't seem to detect any virus or malware. However, since this directory reappears every time I delete it, I am convinced it's malware.
Any ideas on how to address this problem? It happens on both my ICS phone and my JB Nexus 7. Thanks.
There must be a app related to that! Go to manage apps and see if you can find the culprit!
Lifehacker7 said:
There must be a app related to that! Go to manage apps and see if you can find the culprit!
Click to expand...
Click to collapse
Thanks. After spending almost all day and night yesterday reformatting my devices, I figured out that this obnoxious directory appears to be installed by the Dolphin E-book add-on to the otherwise terrific Dolphin browser. This really shakes my confidence in Dolphin's integrity, or at least the integrity of its add-ons.

[Q] Phone is deleting media files unwanted and automatically

Gooday guys,
I've got serious troubles at the moment. 2 days ago I wanted to show a picture to a friend of mine. Opened my gallery > ehm, what is going on here? > there were no photos images anymore.
First I thought that the gallery app got some problemes, rebooted my phone, still the same. Looked up the folders with Solid Explorer, well ... all files got definitely deleted.
I searched for this here on xda and google. Well, all I found out was that it could be ROM related, or that it could have something to do with RomManager (haven't installed it though). The curious thing is that the *.jpg and *.mp4 files got deleted from all folders and subfolders, not only from DCIM and even from the sd card.
I'm not here for any recovery attempts, have done this already
Well this is not all. I've got some *.avi files on my phone (internal and external storage). Theses files were deleted too. BUT not at the same day as the other media files (*.jpg and *.mp4).
So this is the pre story. Now I wanted to know what can I do to discover what is causing this problem, because what's next? Is my phone deleting all my files in a few days?
For me it seems like a script that is searching the whole device for media files and deleting them. (malicious?)
My thoughts were:
to smali all applications and try to find out if a app is causing this
to analyze logcats
Well, These options seems to be very long-lasting, so I ask you if somebody have any ideas on this?
Information about my phone
Phone: Samsung Galaxy S3 (i9300)
ROM: ParanoidAndroid v3.68
Kernel: Googy-Max v1.5.9
I haven't isntalled any apps or updates the last two weeks so I think there are no problems with apps and therefore will not list them.
tldr;
phone is deleting media files
two days ago it deleted *jpg and *.mp4 files from internal and external storage and from all folders (not only DCIM)
today it deleted *.avi files from internal and external storage
could it be a malicious script that is crawling my phone for those files?
how can I find out what is causing this problem?
I hope that somebody could help me *pray pray*
thanks a lot in advance!
Wish you guys a nice weekend
John
Sounds like a nasty software bug
Oooooooooooooo NOT fun! I have seen this before (first time on the S3 though). Sounds like a nasty software bug. Sometimes you can fix this and sometimes you cannot.
What you NEED to do is backup ALL of your phones information. I recommend that you back it ALL up to a computer, even your memory cards information as well.
Then wipe that device clean with a Factory data reset. This will set the phone back to its default settings and will be like a brand new phone.
You might also want to consider formatting your SD card at the same time. Just in case whatever is causing this issue is coming from your Memory Card.
Afterwards I recommend that you try using your phone without any 3rd party applications for a couple days, just to make sure it’s not a bad app causing trouble.
If the phone is still acting up and erasing things then you should file a warranty claim as soon as possible.
Good luck John.
~James~

Samsung Galaxy S2 Battery Drain and Overheating - Solved

Recently my phone started getting quite hot and the battery went from lasting all day with moderate use, ending up with about 30-40% left at the end of the day, to going down to 15% or less within about half a day. So I did some research and found that lots of people had the same problem, and not just with the SGS2 but also with the SGS3 and SGS4.
Various fixes were put forward, both from people who had solved their problem and from people who didn't appear to know what they were talking about. I tried the more sensible fixes and nothing worked.
When I checked my Battery stats in Settings, I found that the media scanner was hogging the battery and keeping the phone awake all day, so I was one step nearer solving the problem. I killed the media scanner process and my battery life improved. But each time I restarted the phone, the problem came back.
I unmounted my 32GB micro-SD card (an absolute requisite in my use case) and waited. Interestingly, the problem continued, even though that's where the vast majority of my media files reside. So I went hunting.
I noticed that even though I'd unmounted the SD card, the /storage/extSdCard folder showed that it had one item inside it. If you know about Linux file systems, which Android uses, you'll know that external storage is mounted onto an existing directory - in the case of my SD card it's mounted on /storage/extSdCard. And if the external storage is unmounted, that directory reverts to being an ordinary directory.
When I looked inside that directory using ES File Explorer, I found a folder that had been created by an app called FlickFolio. It's a great app as it allows you to look at your Flickr stream, sets, etc, on your phone or tablet, and it keeps thumbnails of all your photos on the device to make viewing them very quick.
Now, my current Flickr stream has 9,263 photos in it, taken over the last 6 years. And this directory had over 55,000 subdirectories and files in it, taking up 3.02 GB. I had no idea that they were there because when my SD card is mounted, the FlickFolio directory disappears. It's still there but the mounted SD card covers it up.
So, I deleted the FlickFolio directory. It took nearly 10 minutes for ES File Explorer to do the job but not only did I retrieve a 'missing' 3.02 GB of internal phone storage space, I found that the media scanner is now behaving, and not sucking my battery to death. And my phone isn't overheating. And I'm a happy bunny again.
same problem
garryknight said:
Recently my phone started getting quite hot and the battery went from lasting all day with moderate use, ending up with about 30-40% left at the end of the day, to going down to 15% or less within about half a day. So I did some research and found that lots of people had the same problem, and not just with the SGS2 but also with the SGS3 and SGS4.
Various fixes were put forward, both from people who had solved their problem and from people who didn't appear to know what they were talking about. I tried the more sensible fixes and nothing worked.
When I checked my Battery stats in Settings, I found that the media scanner was hogging the battery and keeping the phone awake all day, so I was one step nearer solving the problem. I killed the media scanner process and my battery life improved. But each time I restarted the phone, the problem came back.
I unmounted my 32GB micro-SD card (an absolute requisite in my use case) and waited. Interestingly, the problem continued, even though that's where the vast majority of my media files reside. So I went hunting.
I noticed that even though I'd unmounted the SD card, the /storage/extSdCard folder showed that it had one item inside it. If you know about Linux file systems, which Android uses, you'll know that external storage is mounted onto an existing directory - in the case of my SD card it's mounted on /storage/extSdCard. And if the external storage is unmounted, that directory reverts to being an ordinary directory.
When I looked inside that directory using ES File Explorer, I found a folder that had been created by an app called FlickFolio. It's a great app as it allows you to look at your Flickr stream, sets, etc, on your phone or tablet, and it keeps thumbnails of all your photos on the device to make viewing them very quick.
Now, my current Flickr stream has 9,263 photos in it, taken over the last 6 years. And this directory had over 55,000 subdirectories and files in it, taking up 3.02 GB. I had no idea that they were there because when my SD card is mounted, the FlickFolio directory disappears. It's still there but the mounted SD card covers it up.
So, I deleted the FlickFolio directory. It took nearly 10 minutes for ES File Explorer to do the job but not only did I retrieve a 'missing' 3.02 GB of internal phone storage space, I found that the media scanner is now behaving, and not sucking my battery to death. And my phone isn't overheating. And I'm a happy bunny again.
Click to expand...
Click to collapse
hi I have same problem with my galaxy s2 can you give me the idiots version of what to look for please as your only person who seems to know what your talking about I tried doing what you said above loaded es file explorer took out mem card but cant see flickfolio have I missed something or open somethink first to find it any help would be great regards bob
I have Samsung galaxy S2 android phone. I am facing a strange problem now these days. I usually download apps from android apps store. Today when I download an app, another rogue app downloads automatically. Do you know about the problem? Any solutions please.
If your battery low alltime? then firstly, Format your phone

[Q] Apps can't find my media (most of the time)

Device:
ZTE Grand X (Bell Version) - Model Z933
Android 4.3
Kernel 3.4.0+
No root, stock everything.
I recently bought this ZTE Z933, and I've had some photos, videos, and music stored on the phone's storage for a while, and it worked fine.
Just in the past couple weeks, I put more videos, photos, and music onto an SD Card (4GB, FAT32) and put it into the phone, and now very often (almost daily) all of my picture browsing apps and music playing apps suddenly (and temporarily) are not able to detect ANY media on both the SD card and my phone's storage. But, if I browse my media through ASTRO or any other file manager, all the files are there and they work perfectly fine.
Rebooting the phone does nothing to fix this issue, and neither does accessing the storage through USB or unmounting and mounting the SD Card. For a while, the only fix I found was sometimes if I opened up one of my photos through ASTRO, and then closed it, about half the time it would temporarily fix the issue.
After a bit of searching, I found some threads on different sites about restarting the Media Scanner service (or something along that line) in Settings > Apps. I do not have this, but instead what I do have under Apps > Running > Cached, I have something called "Media", which, when I stop it and restart the phone, fixes the issue temporarily, but it works every time. The annoying thing about this is having to reboot, and losing all my ringtone and notification tone settings, and my playlists every time this happens.
Can anyone give me info on things to try? Or does anyone know of an app that will get me around this issue? (the phone has been reset pretty recently so I don't think that would solve it)
Any help would be very appreciated!
Hey how's it going? I to picked up one of these nice little phones and have yet to find anything as far as development on it, i.e root or any roms and ZTEusa has nothing on this phone. Every time I google it it shows another phone.
Its a great phone large screen and has quad core, if enough people post a wanted new thread on the request a thread forum we can get some help. There is a boot loader its just can anyone get root threw it. Also someone needs to try all of the towel root modstrings which are a lot and you might get it rooted. I really enjoy mine have had no problems with media, might be your sdcard is it an old one or a new one what class is it class10?
http://www.xda-developers.com/users-beware-zte-root-backdoor-found/
I just picked up this phone too.
Seems like root acess is simply password controled..
Maybe ztex1609523?
Anyone wanna jam that into an installer?

Categories

Resources