How to Fix Android Media Scanner Issues: Missing Photos, Videos, and Music
Table of Contents
Understanding Android Media Scanner
The Android Media Scanner is a core system service that indexes media files on your device, making them discoverable by gallery apps, music players, video players, and other media applications. When functioning properly, the Media Scanner constantly monitors your device storage for new, modified, or deleted media files, updating the MediaStore database so that apps can quickly find and access your content.
What Android Media Scanner Manages
- Image files: JPG, PNG, GIF, WEBP, HEIC, and other photo formats
- Video files: MP4, MKV, AVI, MOV, and other video formats
- Audio files: MP3, FLAC, OGG, WAV, and other music/sound formats
- Document thumbnails: Preview images for PDFs and other documents
- Media metadata: Artist information, album art, video details, photo location data, and timestamps
Unlike conventional file browsers that simply display all files, the Media Scanner builds and maintains a specialized database of media content. This approach enables features like album organization, music playlists, photo collections by date, and efficient thumbnail generation. The scanner also helps Android optimize storage by tracking which files are important media versus temporary or system files.
When the Media Scanner isn't working correctly, newly added photos might not appear in your gallery, transferred music might be invisible to your music player, or videos might be missing from media libraries. These issues can be frustrating since the files themselves are present on your device but simply aren't being recognized by the apps you use to access them.
The Media Scanner's behavior has evolved significantly across Android versions, with newer releases (Android 10+) implementing a more selective and privacy-focused scanning approach called Scoped Storage. This change helps protect your data privacy but can sometimes lead to media detection issues that didn't exist in older Android versions.
Why Media Scanner Problems Occur
Media Scanner issues can be caused by a variety of factors, ranging from simple file system quirks to more complex system-level problems. Understanding these root causes is essential for applying the right fix to your specific situation.
.nomedia Files Blocking Scanner Access
The most common cause of media not showing up is the presence of a special file called ".nomedia". When this file exists in a folder, it explicitly instructs the Media Scanner to skip that entire directory and all its subdirectories. This is actually a feature, not a bug—app developers use it to prevent clutter in your media libraries by excluding thumbnails, temporary images, or cache files. However, if a .nomedia file accidentally ends up in a folder where you want media to be scanned (like your camera folder), all your files will become invisible to media apps even though they're still physically present on your device.
Incomplete Media Transfer or Corruption
When files are transferred to Android devices (especially via USB from computers), sometimes the transfer process gets interrupted or doesn't complete properly. This can result in partially written files or metadata corruption. The Media Scanner is designed to ignore files it recognizes as incomplete or corrupted to prevent crashes or system instability. Files with odd permissions, zero-byte size, or corrupt headers often get overlooked by the scanner for safety reasons.
Android's Scoped Storage Restrictions
Starting with Android 10, Google implemented a major security change called Scoped Storage that restricts how apps can access files. Under this model, apps only have unfettered access to their own private directories and must use specialized frameworks to access shared media. This change improves privacy but can lead to situations where files placed in non-standard locations aren't automatically scanned or accessible to media apps, especially if those apps haven't been updated to support the new storage access framework.
Media Scanner Service Issues
The Media Scanner runs as a background service, and like any system service, it can sometimes experience problems. The scanner might be temporarily disabled, have a corrupted database, or be stuck in a bad state after system updates or app installations. Power-saving measures on some Android devices can also aggressively limit background services, preventing the Media Scanner from running as expected, especially when the device is idle or low on battery.
Hardware and File System Problems
Sometimes the issue isn't with the Media Scanner itself but with the storage media. SD cards developing bad sectors, internal storage fragmentation, or file system inconsistencies can all cause the scanner to skip certain areas. This is particularly common with older or lower-quality SD cards that may have developed physical errors or logical corruption over time.
Media File Format Compatibility Issues
Each Android device comes with specific media codecs and format support. If you transfer media files in formats that your device doesn't natively support (like certain RAW photo formats, specialized audio codecs, or uncommon video containers), the Media Scanner might recognize them as files but not properly categorize them as media, leading to them not appearing in media apps even though they exist on the device.
By identifying which of these factors may be causing your specific issue, you can choose the most effective solution from the methods detailed in the next section.
Solutions to Android Media Scanner Issues
When your photos, videos, or music aren't showing up in your apps, try these proven solutions to fix Android Media Scanner issues. We've arranged them from simplest to most advanced, so start at the top and work your way down if needed.
Method 1: Force a Media Scan
The most direct solution is to manually trigger the Media Scanner to re-index your files. There are several ways to do this depending on your device.
Step-by-Step Instructions:
Option A: Reboot Your Device
- Power off your Android device:
- Press and hold the power button until the power menu appears
- Tap "Power off" or "Restart"
- Turn the device back on:
- Wait for the device to completely shut down
- Press the power button to restart
- A full reboot often triggers the Media Scanner automatically
Option B: Use a Media Scanner App
- Install a media scanner app:
- Open Google Play Store
- Search for "Media Scanner" or "Rescan Media"
- Good options include "Rescan Media", "SD Scanner", or "Media Rescan"
- Install a highly-rated app (check for recent reviews)
- Run the media scanner app:
- Open the installed app
- Grant any required permissions when prompted
- Select the folders you want to scan or choose "Scan All"
- Tap the "Scan" or "Rescan" button
- Wait for the scan to complete (may take several minutes)
- Check your media apps:
- After scanning completes, open your gallery or music app
- Your media should now be visible
- If not, try forcing the gallery app to close (from Recent Apps) and reopen it
Option C: Create an Empty File to Trigger Scan
- Install a file manager app:
- If you don't already have one, install a good file manager like Files by Google, Solid Explorer, or Cx File Explorer
- Navigate to the folder with missing media:
- Open the file manager
- Browse to the directory where your media files are located
- Create a new file to trigger the scan:
- Tap "New" or "+" button and select "File"
- Name it anything simple like "scan.txt"
- Save the empty file
- The act of creating a new file often triggers Android's Media Scanner to check that directory
- Alternatively, move a media file:
- Select an existing media file in the folder
- Move it to another folder temporarily
- Move it back to the original location
- This file operation will also trigger a media scan
Pros:
- Quick and non-invasive solutions that don't modify system settings
- Works in most cases where the issue is simply that the scanner hasn't run
- No technical expertise required
- No risk of data loss
Cons:
- May not work for deeper issues like corrupted databases or system bugs
- Third-party scanner apps may include ads or request unnecessary permissions
- Temporary fix if the underlying cause is persistent (like misconfigured folders)
Method 2: Fix .nomedia Files
If your media isn't showing up because of .nomedia files, these steps will help you find and manage them appropriately.
Handling .nomedia Files:
1. Find Hidden .nomedia Files
First, you need to locate any .nomedia files that might be blocking the Media Scanner:
- Install a file manager that can show hidden files (Files by Google, Solid Explorer, or Cx File Explorer)
- Open the file manager and enable "Show hidden files" in settings:
- In Files by Google: Tap the three-line menu > Settings > Show hidden files
- In Solid Explorer: Tap the three-dot menu > Settings > Show hidden files
- In most other file managers, look for a similar option in settings or the view menu
- Navigate to the folders where your missing media is located
- Look for files named exactly ".nomedia" (starts with a dot)
- You may also want to search the entire device:
- Tap search or magnifying glass icon in your file manager
- Type ".nomedia" (include the dot)
- Review all results
2. Remove Unwanted .nomedia Files
Once you've found .nomedia files, decide which ones to remove:
- If the .nomedia file is in a folder containing your personal media (photos, videos, music):
- Long-press the .nomedia file
- Select "Delete" or the trash icon
- Confirm deletion
- If the .nomedia file is in an app folder or system folder:
- Be cautious—these are likely intentionally placed by apps
- Removing them may cause your gallery to fill with app thumbnails and cache images
- Only delete if you're certain it's causing your specific issue
3. Create .nomedia Files Strategically
Sometimes you actually want to add .nomedia files to prevent specific folders from being scanned:
- Navigate to a folder you want to exclude from media scanning (like a folder with documents or app data)
- Create a new file:
- Tap the "New" or "+" button
- Select "File" or "Empty file"
- Name it exactly ".nomedia" (with the dot)
- Save the file
- This will prevent media apps from showing screenshots, memes, or other images you prefer to keep private
4. Trigger a New Media Scan
After modifying .nomedia files, you need to tell Android to rescan:
- Reboot your device to trigger a full media scan
- Or use a media scanner app as described in Method 1
- Give the scan time to complete—it may take several minutes depending on how many files you have
Pros:
- Directly addresses one of the most common causes of media not appearing
- Gives you control over which folders get scanned
- Can help organize your media by excluding clutter
- One-time fix that persists until files are moved again
Cons:
- Requires understanding of which .nomedia files are safe to remove
- May accidentally expose app cache or temporary files in your gallery if you remove the wrong .nomedia files
- Requires enabling hidden file view which can expose system files you shouldn't modify
Method 3: Clear App Cache and Data
Sometimes the issue isn't with the Media Scanner itself, but with the apps that display your media. Clearing their cache and data can resolve many common issues.
App-Specific Solutions:
1. Clear Gallery App Cache
Start with the gallery app that's not showing your photos and videos:
- Open Settings on your Android device
- Tap "Apps" or "Applications" (name varies by device)
- Find and tap your gallery app:
- This could be "Gallery", "Photos", "Google Photos", Samsung "Gallery", etc.
- You may need to tap "See all apps" to find it
- Tap "Storage" or "Storage & cache"
- Tap "Clear cache" first
- Open the gallery app and check if your media is now visible
- If not, return to the same screen and tap "Clear data" or "Clear storage"
- Note: This will reset your app preferences and remove any cached thumbnails
- It will NOT delete your actual photos or videos
2. Clear Media Store Data
If clearing individual app caches doesn't work, try clearing the Media Store data:
- Open Settings > Apps
- Tap the three-dot menu or "More"
- Select "Show system apps" or "Show system processes"
- Find "Media Storage" or "Media Store" in the list
- Tap on it, then "Storage" > "Clear data"
- When prompted, confirm your choice
- Restart your device
- Android will automatically rebuild the media database from scratch, which may take several minutes
3. Update or Reinstall Media Apps
Sometimes app bugs or compatibility issues are the cause:
- Open Google Play Store
- Search for your gallery, music, or video apps
- If updates are available, install them
- If problems persist after updating, try reinstalling:
- Go to Settings > Apps > [Your app] > Uninstall (or "Uninstall updates" for system apps)
- Return to Play Store and reinstall the app
- For built-in system apps that can't be uninstalled:
- Go to Settings > Apps > [System app] > Disable
- Then tap "Enable" to reactivate it
- This often resets the app to its factory state
Pros:
- Fixes issues related to corrupted caches or app-specific problems
- Doesn't require technical expertise
- Can resolve inconsistencies in the media database
- Safe approach that doesn't risk file loss
Cons:
- Clearing data resets app preferences and settings
- May remove saved states like photo editing history
- Complete media rescan can take significant time on devices with many files
- Doesn't address hardware-level or file system issues
Method 4: Fix SD Card Media Scanner Issues
External SD cards often present unique media scanning challenges. These solutions specifically address SD card-related media detection problems.
SD Card-Specific Solutions:
1. Ensure Proper SD Card Mounting
An improperly mounted SD card can cause media scanner issues:
- Go to Settings > Storage
- Check if your SD card is listed and recognized
- If it shows as "Unmounted" or "Ejected":
- Tap on the SD card name
- Select "Mount" option if available
- If it doesn't appear at all:
- Power off your device
- Remove the SD card carefully
- Reinsert it, ensuring it's properly seated
- Power on your device
2. Fix SD Card Permissions
Permission issues often prevent proper media scanning on SD cards:
- Go to Settings > Storage
- Tap on your SD card
- Look for "Permissions" or similar option (varies by device)
- Ensure the card has read/write permissions
- For Android 6.0+ devices:
- The system may ask you to choose between "Use as portable storage" or "Use as internal storage"
- For better media detection, "Use as internal storage" generally works better, but requires formatting the card and can make it unreadable by other devices
3. Transfer Media Using Media-Aware Apps
How files are copied to SD cards matters for scanning:
- Instead of using USB file transfer from a computer, which may bypass the Media Scanner:
- Use Android's built-in file manager to copy media files
- Or use gallery apps with "Move to SD card" functionality
- These methods typically trigger the Media Scanner automatically
- If transferring from a computer is necessary:
- After transfer completes, safely eject the device
- Force a media scan using one of the methods from Method 1
4. Check SD Card Health
A corrupted or failing SD card may prevent media scanning:
- Backup important files from the SD card (if possible)
- Check for errors:
- Connect the SD card to a computer using a card reader
- Run CHKDSK (Windows) or Disk Utility First Aid (Mac)
- Fix any reported errors
- If errors persist or the card behaves erratically:
- The card may be failing physically
- Consider replacing it with a new, reputable brand SD card
- Look for Class 10 or UHS Speed Class cards from brands like SanDisk, Samsung, or Lexar
Pros:
- Addresses the unique challenges of external storage media
- Can recover access to media that exists but isn't being detected
- Helps identify failing SD cards before complete data loss
- Improves overall reliability of media access
Cons:
- Formatting SD card as internal storage makes it unusable in other devices
- SD card diagnostics may require a computer
- Some solutions require technical comfort with file systems
- May require purchasing a new SD card if current one is failing
Method 5: Advanced Solutions (Developer Options)
For persistent issues, these advanced techniques leverage Android's developer features and third-party tools. These methods require more technical comfort but can resolve stubborn media scanner problems.
Warning: Advanced Methods
These solutions involve advanced settings. Follow instructions carefully. Some steps may vary by device manufacturer and Android version.
Developer-Level Solutions:
- Use Media Scanner via ADB (Android Debug Bridge):
- Enable Developer Options on your Android device:
- Go to Settings > About phone
- Tap "Build number" seven times until you see "You are now a developer"
- Enable USB Debugging:
- Go to Settings > System > Developer options (location varies by device)
- Toggle on "USB debugging"
- On your computer:
- Install Android SDK Platform Tools (available from Google's developer website)
- Connect your Android device via USB
- Accept the USB debugging prompt on your device
- Open a command prompt or terminal window
- Navigate to the platform-tools directory where ADB is installed
- Run the command:
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard
- For SD card scanning, you might need to modify the path to match your device's SD card mount point
- Enable Developer Options on your Android device:
- Reset Media Storage Database (requires root):
- This method requires a rooted device and should only be attempted if you understand the risks of root access
- Install a root file explorer like Root Explorer or Solid Explorer with root capability
- Navigate to /data/data/com.android.providers.media/databases/
- Rename (don't delete) the files external.db and external.db-journal to external.db.bak and external.db-journal.bak
- Reboot your device
- Android will create new media databases and perform a complete rescan
- Use fstrim Command (for internal storage issues):
- This can help if internal storage fragmentation is causing issues
- Requires root access
- Install a terminal app like Termux
- Run the command:
su
to gain root access - Then run:
fstrim -v /data
- Wait for completion and reboot
- Disable Battery Optimizations for Media Process:
- Go to Settings > Apps > See all apps > Show system apps
- Find "Media Storage" or "Media Process"
- Tap "Battery" or "Battery optimization"
- Select "Don't optimize" or "Unrestricted"
- This prevents power-saving features from limiting the Media Scanner
- Adjust Media Volumes in Storage Settings:
- Some advanced devices have a "Storage" or "Volume" setting under Developer options
- Look for settings related to media volumes or scanned directories
- Make sure these are properly configured for your device's storage structure
Pros:
- Can resolve persistent issues when other methods fail
- Addresses system-level media database problems
- Provides more precise control over the Media Scanner's operation
- Permanent fixes for structural issues
Cons:
- Requires technical knowledge and comfort with advanced settings
- Some methods require a computer or root access
- Risk of misconfiguration if instructions aren't followed precisely
- May void warranty depending on device manufacturer
- Complete media rescans can take significant time (hours for large libraries)
Comparison of Media Scanner Fix Methods
Different media scanner issues call for different approaches. This comparison table helps you choose the right solution for your specific problem:
Method | Best For | Ease of Use | Effectiveness | Risks | Time Required |
---|---|---|---|---|---|
Force a Media Scan | Recently added files not appearing | ★★★★★ (Very Easy) |
★★★☆☆ (Moderate) |
Minimal | 5-15 minutes |
Fix .nomedia Files | Entire folders of media missing | ★★★★☆ (Easy) |
★★★★★ (Excellent) |
Low | 10-20 minutes |
Clear App Cache/Data | Media visible in file manager but not gallery/player apps | ★★★★☆ (Easy) |
★★★★☆ (Good) |
Low (App settings reset) |
5-10 minutes |
SD Card Fixes | Media on external storage not detected | ★★★☆☆ (Moderate) |
★★★★☆ (Good) |
Medium (Potential formatting) |
15-30 minutes |
Advanced Solutions | Persistent issues after trying other methods | ★★☆☆☆ (Difficult) |
★★★★★ (Excellent) |
High (System modification) |
30-60 minutes |
Recommendations Based on Specific Scenarios:
- For new photos/videos not showing in gallery: Start with Method 1 (Force a Media Scan), as this is usually a simple case of the media scanner not having run yet
- For media in a specific folder never appearing: Check for .nomedia files using Method 2, as this is very often the cause of folder-specific issues
- For media appearing on the file system but not in apps: Use Method 3 (Clear App Cache and Data) since this indicates a problem with the apps' media databases rather than file detection
- For problems with SD card media: Jump directly to Method 4, which specifically addresses the common SD card-related scanning issues
- For issues persisting after system updates: Method 5's advanced options may be necessary if the Media Scanner service itself is having problems
- For complete media library rebuilding: Clearing Media Store data (Method 3) or using ADB commands (Method 5) are the most thorough approaches when you need a fresh start
Conclusion
Android's Media Scanner is a critical system component that bridges the gap between your device's file system and the media apps you use daily. When it's not working correctly, your photos, videos, and music may be physically present on your device but invisible to the apps you use to access them. This disconnect can be frustrating, but as we've seen, there are multiple effective approaches to resolve these issues.
Let's recap the key solutions we've covered:
- Forcing Media Scans: Simple solutions like device reboots or dedicated scanner apps that can quickly resolve issues with newly added files not appearing
- Managing .nomedia Files: Finding and removing (or strategically adding) these special files that control which folders the Media Scanner examines
- Clearing App Caches and Data: Resolving issues in the apps that display your media by refreshing their databases and settings
- Addressing SD Card-Specific Issues: Solutions tailored to the unique challenges of external storage media, including mounting, permissions, and file system health
- Advanced Solutions: Developer-level techniques for persistent issues, including ADB commands, database resets, and system-level optimizations
The most effective approach depends on your specific situation. For recent file additions not showing up, simple rescans are often sufficient. For longer-term or more pervasive issues, you may need to dig deeper into cache clearing or .nomedia file management. Only in the most persistent cases should you need to resort to advanced solutions.
As Android continues to evolve, its media management systems change as well. Newer versions increasingly prioritize privacy and security, sometimes at the expense of the seamless media access experience of earlier versions. Understanding how these systems work helps you navigate these changes and maintain access to your important media files regardless of Android version or device manufacturer.
Remember that regular maintenance—like clearing caches periodically and organizing media into standard folders—can help prevent Media Scanner issues before they start. With the solutions outlined in this guide, you can ensure your Android device consistently and reliably displays all your photos, videos, and music files when and where you need them.
Need help with other Android file issues?
Check out our guides for other common Android file error solutions: