Have you ever wondered where exactly your photos, videos and music are saved on your Android smartphone? Why do apps sometimes not see the files you just downloaded, or why does the gallery stop displaying them after moving folders? All this is connected with multimedia storage a special system for organizing media files in Android, which many users are not even aware of.
In this article we will look in detail at what media storage is in Android, how it works at a technical level, where your files are physically stored and how to work with them correctly to avoid losses or problems with display. You will learn why some applications require access to "storage", how Android indexes media files, and what to do if the system suddenly stops seeing your photos.
We will pay special attention to the differences between internal and external storage, the role of the database MediaProvider, as well as common myths - for example, that "deleting files from the gallery erases them from the device." If you have ever encountered problems like โthe photo is in the file manager, but not in the galleryโ or โthe music is not displayed in the player,โ this article will help you understand the reasons and find a solution.
What is multimedia storage in Android?
The term "media storage" in the context of Android means not just a folder with files, but a whole media content management systemwhich includes:
- ๐ Physical location files (folders
DCIM,Pictures,Musicetc.) - ๐๏ธ Database (
MediaProvider), where information about each file is stored (path, metadata, thumbnails) - ๐ Scanning mechanism (media scanner), which updates the database when added/deleted files
- ๐ Access rules for applications (permissions
READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGEand new models in Android 10+)
Simply put, this is not just the โC: driveโ of your smartphone, but a complex infrastructure that provides:
- ๐ Quick search for files by metadata (date, geotags, album)
- ๐ผ๏ธ Generation of thumbnails for the gallery
- ๐ต Indexing of music for players
- ๐ฑ Synchronization with cloud services (Google Photos, Dropbox)
Key feature: Android does not just store files - it actively โscansโ them and creates its own database, which may differ from the actual contents of the folders. This is why sometimes situations arise when a file is physically on the device, but the system โdoes not seeโ it (or vice versa).
Where are media files physically stored?
Multimedia files in Android are distributed across several standard folders, the path to which depends on the storage type and OS version. Here are the main locations:
| File type | Standard folder | Path (internal storage) | Path (SD card) |
|---|---|---|---|
| Photos and videos | DCIM |
/storage/emulated/0/DCIM/ |
/storage/XXXX-XXXX/DCIM/ |
| Screenshots | Pictures/Screenshots |
/storage/emulated/0/Pictures/Screenshots/ |
/storage/XXXX-XXXX/Pictures/Screenshots/ |
| Downloaded files | Download |
/storage/emulated/0/Download/ |
/storage/XXXX-XXXX/Download/ |
| Music | Music |
/storage/emulated/0/Music/ |
/storage/XXXX-XXXX/Music/ |
| Call recordings | Recordings or Call |
/storage/emulated/0/Recordings/ |
Usually not supported |
It is important to understand several nuances:
- ๐ฑ
/storage/emulated/0/is virtual path to the internal storage (in fact, the files are in/data/media/0/, but access there is closed) - ๐พ
/storage/XXXX-XXXX/is the real path to SD card, whereXXXX-XXXXis a unique drive identifier - ๐ In Android 11+, applications by default do not have access to the root of the SD card (only to their folders via Scoped Storage)
Why paths start with emulated? This is a legacy of older versions of Android, where the internal memory was emulated as a removable drive for compatibility. In fact emulated/0 - this is just an alias for the main user data section.
To see the actual file paths (for example for adb or root access), use the command
adb shell ls -la /storage/emulated/0/ - it will show symbolic links to physical directories.Like Android indexes media files: the role of MediaProvider
The system does not just store files in folders - it actively scans and enters information into a central database called MediaProvider. This process includes several stages:
- Scanning (media scanner): when adding/deleting files or on a schedule, Android looks through standard folders and records changes.
- Metadata extraction: for each file, EXIF tags (for photos), ID3 tags (for music), duration (for videos), etc. are extracted.
- Updating the database: information is written to the system database (
/data/data/com.android.providers.media/databases/external.db). - Notification of applications: the gallery, players and other apps receive a signal about updating the content.
That is why sometimes after copying files to a smartphone they do not appear in the gallery right away - you need to wait for the scan or start it manually. You can do this in several ways:
- ๐ Reboot the device (the most reliable way)
- ๐ฑ Manually start scanning via
adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///storage/emulated/0/DCIM/ - ๐ง Use applications like Rescan Media or SD Maid
An important nuance: if a file is deleted through the file manager, but not from the gallery, its entry may remain in the MediaProvider database, creating "phantom" files. To clear such entries, sometimes you need to reset the application cache Media storage (com.android.providers.media).
How to clear the MediaProvider cache?
1. Go to Settings โ Applications โ Show all applications (โฎ) โ Show system ones
2. Find Media storage (com.android.providers.media)
3. Click Storage โ Clear cache
โ ๏ธ After this, the gallery and players will temporarily โforgetโ everything media files, but they will be restored after rescanning.
Internal vs external storage: key differences
Android has two main types of storage for media files, and they are often confused:
| Option | Internal storage | External (SD card) |
|---|---|---|
| Physical location | Internal device memory | Removable microSD card |
| Access speed | High (UFS/eMMC) | Low (depending on SD class) |
| Access for applications | Full (with permissions) | Limited (starting from Android 11) |
| Encryption | Supported (FBE) | Not supported |
| Backup | Included in Google backup | Excluded from backup |
The main problems with external storage (SD cards) began with Android 4.4 KitKatwhen Google introduced the concept of Scoped Storage - limited access of applications to files. In modern versions of Android (11+), applications can:
- ๐ See only their own files. folder
Android/data/[package_name]/ - ๐ Request access to specific files via Storage Access Framework
- ๐ซ Do not have direct access to the root of the SD card without root access
This means that:
- ๐ต Music players will not see tracks on SD card, if they are not in standard folders (
Music,Podcasts) - ๐ท The gallery will not display photos if they are in an arbitrary folder on the card
- ๐ฑ Applications will not be able to save files directly to SD without explicit user selection
โ ๏ธ Attention: If you use an SD card as internal storage (function Adoptable Storage in Android 6-9), then after it is removed or damaged, the device may stop booting. This function is removed in new versions of Android due to the high risk of data loss.
Frequent problems with multimedia storage and their solutions
Even experienced users face problems related to media storage. Here are the most common scenarios and ways to solve them:
1. The files are in the file manager, but are not displayed in the gallery
Reasons:
- ๐ Media files were not scanned
- ๐ The files are in a non-standard folder (for example,
/Download/MyPhotos/instead of/DCIM/) - ๐๏ธ Database
MediaProviderdamaged - ๐ฑ Files have non-standard extensions (for example,
.jpeginstead of.jpg)
Solutions:
Run manual scan (reboot or adb command)|Move files to standard folders (DCIM, Pictures)|Clear application cache Media storage|Check file extensions (must be .jpg, .png, .mp4 etc.)-->
2. Music is not displayed in the player
A similar problem often occurs with audio files. Check:
- ๐ต File format (supported
.mp3,.flac,.m4a, but not.cueor.apewithout additional codecs) - ๐ Location (must be in
/Music/or/Podcasts/) - ๐ Metadata (if there are no ID3 tags in the file, the player can ignore)
3. After updating Android, media files disappeared
This is one of the most unpleasant situations:
- ๐ Resetting the database
MediaProviderwithout physically deleting files - ๐ฑ Changing the storage structure (for example, appeared in Android 10+ Scoped Storage)
- ๐พ Damage to the SD card when mounting
First steps:
- Check the files through the file manager (for example, Solid Explorer or FX File Manager)
- Connect your phone to the PC and scan the memory with apps like Recuva or PhotoRec
- If the files are in place but are not displayed, clear the cache
MediaProviderand reboot the device
โ ๏ธ Attention: If the files disappeared from the SD card after updating Android, formatted as internal storage, it is almost impossible to restore them using standard methods. In such cases, only professional data recovery from the memory chip will help.
How to properly manage media files on Android
To avoid problems with displaying, losing or accessing files, follow these recommendations:
1. Organization of files
- ๐ Use standard folders:
- Photos and videos โ
DCIM/orPictures/ - Music โ
Music/ - Screenshots โ
Pictures/Screenshots/
- Photos and videos โ
- ๐ท๏ธ Avoid special characters in file names (for example,
photo#1.jpgmay not be indexed) - ๐๏ธ Do not create nesting deeper than 3-4 levels (for example,
DCIM/2023/June/Vacation/is normal, butDCIM/2023/June/Vacation/Day1/Morning/Beach/is too much)
2. Transferring files between devices
When copying media files to a new smartphone:
- ๐ฑ Use original paths (for example, transfer
DCIM/entirely, not individual files) - ๐ After copying be sure to wait scanning (or run it manually)
- ๐พ For SD cards: if you transfer the card between devices, unmount it correctly (
Settings โ Storage โ Eject)
3. Backup
Recommended methods:
- โ๏ธ Google Photos (automatic synchronization, but quality compression in the free plan)
- ๐พ Local copying to PC via
MTPor adb pull - ๐ Applications type Sync.com or Nextcloud for encrypted backup
โ ๏ธ Attention: If you use Google Photos in the "Quality" (compression) mode, the original files are not saved in the cloud. When you delete files from the device, they will be lost forever, unless the function is enabled. "Save originals."
4. Cleaning storage
To free up space without losing important files:
- ๐งน Use built-in storage analysis:
Settings โ Storage โ Free up space - ๐ธ For photos: enable automatic cleaning in Google Photos (will delete local copies after backup)
- ๐ฌ For video: check the folder
Movies/andDCIM/for large files (for example, 4K video) - ๐ต For music: delete the cache of streaming services (Spotify, YouTube Music)
Never delete files directly from folders Android/data/ or Android/obb/ โthis may break applications. Use the application-specific settings to clear the cache.
Security and permissions: how applications access media files
The permissions system in Android has undergone significant changes, especially with output Android 10 and Android 11. Currently, access to media files is regulated as follows:
Android 9 and older (before Scoped Storage)
- ๐ฑ Applications requested permissions
READ_EXTERNAL_STORAGEandWRITE_EXTERNAL_STORAGE - ๐ After granting access, the application could read/write all files on the device
- ๐ซ This created security risks (attackers could steal files)
Android 10+ (Scoped Storage)
- ๐ Introduced limited access:
- Applications see only their files in
Android/data/[package_name]/ - To access other files, use Storage Access Framework (selecting files through the system dialog)
- Applications see only their files in
- ๐ For media files (photos, video, audio) there is an exception: applications can request access to all media files via permission
READ_MEDIA_IMAGES/READ_MEDIA_VIDEO/READ_MEDIA_AUDIO - ๐พ On SD cards, applications can only work with their own folders or via SAF
How does this affect the user:
- ๐ท Gallery and players still have access to all media files (they use
MediaProvider) - ๐ฑ Regular applications (for example, instant messengers) cannot automatically scan all files on the device
- ๐ง To work with arbitrary files (for example, in a file manager), you need to use the system file picker
โ ๏ธ Attention: In Android 13+, apps are not allowed to request permissionREAD_EXTERNAL_STORAGEto access all files. Instead, they must use photo picker (PHOTO_PICKER) or Storage Access Framework.
FAQ: Frequently asked questions about media storage in Android
Why does it remain in the file manager after deleting a file from the gallery?
The gallery and the file manager work with different โlayersโ of storage. The gallery deletes the entry from. base MediaProvider, but does not always physically erase the file. To delete the file completely:
- Open the file manager (for example, Files by Google)
- Find the file in the folder (usually
DCIM/orPictures/) - Delete it manually
If the file is not deleted, check if it is being used by another application (for example, a photo editor).
How to transfer media files to an SD card without losing access?
In modern versions of Android, transferring files to an SD card may cause them to โdisappearโ from the gallery. To avoid. problems:
- Use built-in functions applications (for example, in the gallery select "Move to SD card")
- If you copy manually, place the files in standard folders on the card (
DCIM/,Music/) - After transfer restart the device or run a scan manually
In Android 11+, applications will not see files on the SD card if they are not in their own folder or standard directories.
Is it possible disable scanning of media files to save battery?
Technically yes, but this will result in new files not being displayed in the gallery and players. If scanning really interferes (for example, due to a large number of files), you can:
- Disable automatic scanning via
adb shell settings put global media_scanner_volume /storage/emulated/0(requires root or adb) - Use alternative galleries (for example, Simple Gallery), which scan files using their own algorithm
However, it is better to optimize the storage: delete unnecessary files or transfer them to an archive (for example, in ZIP).
Why do some files in the gallery appear as "damaged"?
This happens if:
- File partially downloaded (for example, interrupted download)
- File format not supported (for example
.heicon older devices) - File corrupted (bad sectors on the SD card or copying errors)
- File metadata incorrect (for example, incorrect EXIF tags)
To fix:
- Try to open the file on your PC - if it is damaged, restore it using PhotoRec or Recuva
- For
.heicinstall codecs (for example, HEIF Image Extensions from Google Play) - If the file has not been downloaded completely, delete it and download it again
How to restore the MediaProvider database if the gallery is empty?
If after a crash or Android update the gallery does not show the files, although they are physically on the device, try:
- Clear cache and data applications
Media storage(com.android.providers.media) - Reboot the device (this will start a second scan)
- If that doesnโt help, manually start scanning via ADB:
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///storage/emulated/0/ - As a last resort, reset application settings (
Settings โ System โ Reset โ Reset application settings)
โ ๏ธ After the reset MediaProvider all applications working with media files will temporarily โforgetโ their location, but the files will remain in place.