Android : Possible To Rescan Sd-card With Media Scanner?

Nov 2, 2009

I've already been searching forums and google groups to find out how to force Media Scanner to rescan the sd-card for media files, but with no luck. So after 2 days of searching i decided to post a question here.

In my app i need to rename media files, change their extension, or to reveal them by changing back their extension, but the changes take effect only after i run Media Scanner from the dev-tools, or remount the image, or reboot the phone/emulator. I've tried using MediaScannerConnection, and it only works when revealing media files, but not refreshing the gallery / music player thumbnails which is the biggest problem in my app development right now.

I've also tried copying files and deleting the old ones, but that has no effect also. Does anyone have any experience with this?

Android : Possible to rescan sd-card with Media Scanner?

Android :: Media Scanner Connection Scan File - Scanner Crashing

Sep 27, 2010

When I run the following line of code:
MediaScannerConnection scanner = new MediaScannerConnection( this, null );
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/
does anyone have any ideas why this isnt working and what i can do to fix it?

View 1 Replies View Related

Android : How Can I Rescan An Entire Folder To Watch For Changes In Media

Aug 5, 2010

So my app downloads images at the users' request from an online source. Through a button in the activity, the user can choose to hide or show the images in the gallery. This is easy enough, I just add or remove a .nomedia file as needed. However, I want to rescan media every time so that the change is instant, and requires no further user interaction.

After each image is downloaded, I am using the method at to scan the specific image into the library. That works great for one image, but when the .nomedia file is added, I really need to be able to scan a whole directory.

I have considered calling the MediaScannerNotifier on each image in the directory, but that just seems clumsy and lazy.

View 1 Replies View Related

KitKat 4.4 :: How To Force Media Rescan

Dec 16, 2013

I used to use an app but none of them are working after 4.4. how to trigger a rescan manually? I tried rebooting and still doesn't work.

View 5 Replies View Related

Android : How To Force MediaStore To Rescan SD Card

Feb 14, 2009

If I pragmatically store new media files on the SD card, the MediaStore does not know about them until I remove and reinsert the SD card. Is there a way to tell the MediaStore to rescan the SD card without first unmounting the SD card?

View 6 Replies View Related

General :: Besides Clearing Media Storage Ways To Force Rescan

Oct 9, 2012

Besides clearing the media storage, what are the ways to force a rescan? My rescan service seems to have stopped and everything in the gallery is blank. I tried some third party rescan but all fail. GT-N7000

View 1 Replies View Related

Motorola Droid X : Music App Showing Deleted Songs / Rescan SD Card?

Aug 22, 2010

I don't know if this is a problem with using double twist to sync music then the default player to play it, but i recently wiped all my phones music using double twist media sync program and then put some more music on... after this i went into the default music player and it was very lagy and showed songs that i had removed with double twist but when i went to play them it would play a random song that was on the phone... does anyone know how to get the media player on droid x to rescan your SD card so i can realize that some songs are gone now?

View 1 Replies View Related

Android :: Class Name Of Media Scanner Service?

Sep 1, 2010

What is the class name of media scanner service?

View 2 Replies View Related

Android :: Media Scanner Connection Scan File

Sep 7, 2009

I am trying to open an image edit it and save it back. And i am using the below code, mScanner = new MediaScannerConnection(this, new MediaScannerConnection.MediaScannerConnectionClient() { public void onMediaScannerConnected() { mScanner.scanFile (fileName, null /* mimeType */); }

View 4 Replies View Related

General :: Disable Android Media Scanner Service?

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

Android :: Why Does Media Scanner Not List Audio File Suffixed With .aac

Sep 17, 2009

I push a audio file named "music.aac" into SD card, and then execute "Media Scanner" application or re-start the device. I found that media scanner didn't process ".aac" file, so the "music.aac" file doesn't exist in music player. But Android supports AAC/AAC+/eAAC format.So who know the reason that the ".aac" file doesn't be processed by media scanner.

View 2 Replies View Related

Android :: Business Card Scanner / OCR Reader

Jun 15, 2010

I am looking for a business card scanner app.I know there are a ton on the market but i can not find one that gives me the option to add the cards to a database.I would like to be able to have the cards added to the database and then be able to open the database and search by company or name ect.If there was an option to add to contacts that would be ok as well.Point is i have probably 1000 business cards and do not want them in my contacts even if i make a trash group it is just not worth the effort.

View 1 Replies View Related

How To Dynamically Change Media Scanner Scan Path

Nov 2, 2011

how to force media scanner to scan different location other than /mnt/sdcard like /mnt/USB or /mnt/sdcard_2 ..

View 1 Replies View Related

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...


View 9 Replies View Related

General :: Media Scanner SDCard CPU Utilization Battery Drain

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

adb shell

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


top -grep media

this would give you a result like


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

%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


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


pm disable All Solutions with full detail: Fix Android Media server scanner SDcard CPU, Battery drain

View 6 Replies View Related

General :: Media Scanner / Manager Causing CPU Battery Usage / Drainage

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 "". 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

General :: Galaxy Note I717 / ICS 4.0.4. - Media Scanner Making Duplicate Song Entries

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

Samsung Captivate :: Captivate/Android Media Scanner/Playlists ?

Sep 8, 2010

I am having an issue with my M3U playlists.

I use the default Samsung media player, Isyncr and Itunes. Although I have also used the Doubletwist Player (not the desktop software) and had the same issue, I just prefer the Samsung default player mainly because of the lock screen app.

Here is the issue.

First, I sync my playlists with Itunes using Isyncr, all of the songs come over great, art and tags, everything is perfect. It also creates M3U playlists on my phone. I double checked that everything is there.

Then when I unmount, media scanner scans my SD card (which takes way longer than it should) and it deletes all of my playlists. Now a little research on XDA forums tells me that this is because anytime the media scanner scans a playlist and can't find all of the songs from that playlist, it assumes it is an old playlist and deletes it. The problem is that when I look through the M3U files, every song referenced in the list is on the card...they are all there, yet it keeps deleting them.

Does anyone know of a solution to make it stop deleting my playlists?

View 2 Replies View Related

Media :: Adding Media Card

Oct 28, 2008

can someone please explain what is exactly stored on the media card that came with the phone and what i need to do to upgrade to the 8gb card i got in the mail today?

View 17 Replies View Related

Android : Install A Game Media To SD Card?

Feb 4, 2010

I have created a rather large game, 18 megs, and am sick of getting 1 star because of the size. Now normally I would just figure out how to do this on my own but since this is something I'm only doing because Google dropped the ball and may soon rectify,I would really appreciate it if some one would provide me with code to do the following.

1. Make an HTTP connection to a server and dowload a .zip file to the SD card. 2. Then unzip the file to a directory on the SD card. 3. Finally delete the .zip file.

Has anyone done this before? What are the gotchas? I'm sure doing this comes at a cost, such as having to insure the graphics have been downloaded, failed downloads, and if you have a future update you have to manage updating the graphics yourself, am I missing anything?

View 2 Replies View Related

Android :: How To See Image / Media Files In SD Card From Emulator

Mar 6, 2009

When we insert images or media files to sdcard, how we can see this in emulator, means in which folder, i inserted some images and checked in "pictures", but i cant see anything there, just blank only --"No Pictures found" displaying. For media i checked in "Media scanner" under 'Dev tools", there also cant see anything.Can anybody guide me in this issue.

View 5 Replies View Related

Samsung Captivate :: Android Media Programs Not Recognizing Sd Card

Nov 30, 2010

( I am a new Captivate convert from blackberry) and trying to find my way through.My sd card ( 32 gig kingston) is recognized by windows ( when attached to usb) and recognized by astro file reader , and winamp etc.yet the built in voice recorder and video player will not run and I get erroro message.Your phone does not have an SD card inserted.I didnt format the card originally since the phone recognized the card without it
I also disabled the scan at startup with a program startup manager is that the problem ?

View 5 Replies View Related

Media :: Reformat Damaged SD Card?

Jun 4, 2010

I was at Benihanas last night and my Nesus One was acting a little sketchy. Glitching while going in and out of the camera/camcorder. Since I had quite a bit of up time I rebooted and got the "SD card damaged you may have to re format it" error. I have a 16g Sandisk micro sdhc class 2. I bought the chip separately at office depot 8 months ago and spent $100 bucks on the thing because I read all over the forums about how people were having issues with the cheap ebay chips. This happened once before on my mytouch with the same chip. After I was threw crying in my cool aid I just formated the card and moved all the music/movies back over from my laptop. No biggie.

This time, my computer isn't even registering the card when I plug it in at all. After pulling up the notification and formating the card it will check for errors for what seems like an unusually long period of time it pops back up with the damaged sd card notification again. I have formated over and over, pulled the battery and removed the card and rebooted several times and even checked for updates for my laptop and rebooted it as well and just cannot for the life of me get this card unlocked. Here I am on vacation with my bran new $500 phone with a custom $100 chip in it and cannot even take an effing picture. So of course my Iphone and Blackberry fanboy friends are having a field day on me.

View 2 Replies View Related

Media :: How To Download Music From My PC To Sd Card?

Nov 19, 2010

just bought the evo a week ago and would like to download my music from my folders on my pc to the sd card. have been looking on this forum for about one and half hours cant find it.

View 2 Replies View Related

Media :: Save MP4 Videos On SD Card?

May 20, 2010

I have an MP4 video on my PC that I want to copy onto my sd card. When I connect the phone I can see various folders including MP3, however there isnt one for either videos (or photos for that matter). Do I just create one purely for videos and then it will play once it is dropped in there or is there something I am missing? Similalry if I want to copy photos do I just create a specific folder for photos and the phone will just "pick them up" when I go into the photos icon?

View 4 Replies View Related

Media :: Transferring Mp3 To 32gb Card

Sep 6, 2010

I got a Motorola Droid from Verizon in the spring. It came with a Sandisk 16gb card, but I have over 20 gb of music, so for the time being I've only kept some of my music on there. I always transferred music through the USB connection, using Windows Explorer (I have Windows 7). I have all the files tagged with title/artist/album etc. but for easy organization I have them sorted into folders - a folder for each artist, and a subfolder for each album. Right now my phone is running Froyo (Android 2.2).

My husband recently bought me a Samsung 32 gb micro SDHC card that he got on eBay. So of course as soon as it was in the phone, I wanted to transfer my music. I connected it to the computer via USB, and copied all my music folders onto it. Explorer showed that it would take a few hours for the transfer, so I left it plugged in overnight.....................

View 8 Replies View Related

Media :: Alarm Folder On SD Card?

Sep 7, 2010

Want to use one of my custom rings for my alarm on Milestone. Do i create a folder on my SD card called alarm?

View 1 Replies View Related

Media :: How To Use Ringtones On SD Card As Alerts?

Aug 18, 2010

The alerts and ringtones don't show up on the list when I go to messaging and gmail and then to pick what I want. How do I make them as an option?

View 4 Replies View Related

Media :: Videos On Storage Sd Card To Put On Pc?

Jul 14, 2010

I took a few videos and pictures and they were saved onto my phone storage i want to put them on my storage card to put on the computer not a clue how can anyone help me out please - droid inscredible

View 1 Replies View Related

Media :: Can't Get MP3's On Phone To Play / Cause Is 32g Card?

Aug 5, 2010

First, I've just put Froyo on so I am up to date. I've also just installed a 32g card, formatted it on the phone (twice now) and used Windows explorer to copy mp3's of my CD's over from my laptop to the phone in to a folder called Music a couple of different times to rule out copy issues with the same results. FYI I normally carry/listen to my tunes on my Zune, and keep them associated with Zune.

My problem is that when I look at the phone's properties in Explorer, I see that I've used about 3.9g used, yet when I look at the individual CD folders I see nothing near that size. the Music folder on the phone shows 36 folders,108 files but a size of only 548m. No other phone folder shows any substantial usage. When I browse to the folders, a few of them have mp3's, but almost all show as empty, 0 files. I know I copied files, I watched it happen. When I launch the music app it doesn't see any of the folders with 0 files. Some of the folders that show mp3 files play but most don't. I get an "unable to play this type of audio file" message on the phone yet all of the files are the same. I should note that before I put the 32g card in, I did a trial copy of about 4 CD's with the 8g card in and they played fine. I didn't bother copying any more since I knew that I was getting the 32g card.

Any thoughts? Does the phone have a problem with a 32g card?

View 2 Replies View Related

Copyrights 2005-15, All rights reserved