Skip to content
GalleryJury

Glossary · MediaStore

What is MediaStore on Android? The index behind every gallery

Short answer

MediaStore is Android's built-in database of the photos, videos, audio and downloads on a phone's shared storage. The system scans folders such as DCIM and Pictures and records each file's name, size, date and location on disk. Gallery and cleaner apps read photos through it, and deletes or moves to the trash go through it too.

Last updated

How is MediaStore organised?

From Android Developers, Access media files from shared storage.
CollectionHoldsUsual folders
MediaStore.ImagesPhotos and screenshotsDCIM/, Pictures/
MediaStore.VideoVideosDCIM/, Movies/, Pictures/
MediaStore.AudioMusic and soundsMusic/, Ringtones/, Podcasts/ and others
MediaStore.DownloadsDownloaded filesDownload/ (Android 10+)

Each entry carries columns such as display name, size, date taken, width, height and bucket, which is the folder a file lives in. Galleries use the bucket to show albums such as Camera, Screenshots and WhatsApp Images.

How do apps use it?

An app sends a query, for example "all images sorted by date taken", and gets back a list it can page through without touching files directly. With the right permission it can then open each image. Since Android 10 that path, rather than raw file access, is how most apps reach shared media under scoped storage.

Changes also go through MediaStore. Android 11 added createTrashRequest, which moves items to the system trash after you confirm, and createDeleteRequest, which removes them immediately. Trashed items carry an IS_TRASHED flag and are hidden from normal queries until they expire. The Android trash page covers what that means for space.

Queries can also filter. A cleaner can ask only for images larger than 5 MB, or only for files in the Screenshots bucket, which is why a scan of one folder finishes much faster than a scan of the whole phone.

  • Not scanned yet. Files copied over USB may appear only after the system rescans; a restart usually triggers it.
  • A .nomedia file. A folder containing an empty .nomedia file is skipped by the scanner, which is how some apps hide their images.
  • Hidden folders. Folders starting with a dot are ignored by most galleries.
  • Pending items. Files still being written are flagged as pending and hidden until finished.

If a photo appears in a file manager but not in your gallery, one of these is usually why. Deleting the .nomedia file brings the folder's images back into view.

Why does MediaStore matter for cleaning?

Because it is the single list a cleaner works from. A tool that reads MediaStore sees every camera photo, screenshot and chat image in shared folders, along with dates and sizes for grouping. The Media Storage system app also holds cached previews, so clearing its cache can fix wrong thumbnails without touching photos.

MediaStore does not judge content. It records size, dates and folder, but whether a photo is blurry, a duplicate or a forwarded meme has to be worked out by the app that reads the image.

Frequently asked questions

What is the Media Storage app in Settings?

It is the system component that maintains MediaStore. Clearing its cache is harmless; clearing its storage forces a full rescan and can reset ringtone choices.

Does MediaStore include photos on an SD card?

Yes. Removable volumes are indexed too, and appear in the same collections with a volume name.

Sources

  1. Android Developers: Access media files from shared storage (checked 31 October 2026)

More in Photo cleanup terms

All of Photo cleanup terms

GalleryJury is coming soon to Android

It keeps the best shot from every burst and clears the clutter around it. 50 free photos to try, then $5 for 5,000 photos or $15 for 20,000. Pay once, nothing renews. No subscription.

Coming soon toGoogle Play