File .nomedia is a hidden marker that blocks scanning of multimedia files in Android folders. It is often created by applications (such as instant messengers or games) to hide unnecessary media from the gallery. But what if you accidentally added such a file or want to restore the visibility of photos, music or videos? In this article we will look at all current methods for deleting .nomedia from simple to advanced, taking into account the features of different versions of Android and brands (Samsung, Xiaomi, Google Pixel etc.).

It is important to understand: deletion .nomedia does not always solve the problem hidden files. Sometimes application settings, cache or file system errors are to blame. We'll also look at how to check what exactly is blocking the display of your media, and what to do if, after deleting, the files still do not appear in the gallery.

What is a .nomedia file and why do you need it?

A file .nomedia (sometimes written as nomedia without a dot) is an empty text file a file without an extension, which signals the Android performer MediaScanner about the need ignore the contents of the folder when scanning media. Its main functions:

  • ๐Ÿ“ Hide service files: messengers (WhatsApp, Telegram) create it in folders with downloaded stickers or cache, so as not to clog up the gallery.
  • ๐ŸŽต Optimization of work: games (for example Genshin Impact or PUBG Mobile) hide their resources so that they do not appear as music or images.
  • ๐Ÿ”’ Privacy: some note-taking applications or password managers use .nomediato hide screenshots or exported data.

However, users often encounter problems with this file:

  • ๐Ÿ–ผ๏ธ Photos/videos are not displayed in the standard gallery or Google Photos, although they are physically in memory.
  • ๐ŸŽง Music tracks disappear from player, although the files are there.
  • ๐Ÿ“‚ Folders become "invisible" for the media scanner, even if they contain important files.
๐Ÿ“Š How do you usually manage files on Android?
Through a standard explorer
I use a file manager (Solid Explorer, FX)
I connect to a PC
Through cloud services

Interestingly, .nomedia works only on Android level. If you connect your phone to a computer, the files in the folder with this marker will be visible in Windows Explorer or Finder (macOS) โ€”they will simply not be seen by media players on the device itself.

How to find a .nomedia file on Android

Before deleting, you need find the problematic file. It's hidden by default, so standard Explorer won't show it. Here's how to detect .nomedia:

Method 1: Through a file manager with support for hidden files

Best options: Solid Explorer, FX File Explorer or MiXplorer (for Xiaomi). Instructions:

  1. Install one of the applications from Google Play.
  2. Open the menu (โ˜ฐ) โ†’ Settings โ†’ enable the option Show hidden files.
  3. Go to the folder where the media was lost (for example, DCIM/Camera or Download).
  4. Look for a file named .nomedia (it will be translucent or with a "hidden" icon).

Method 2: Via PC (Windows/macOS/Linux)

Connect your phone via USB in File transfer (MTP) i mode:

  • ๐ŸชŸ To Windows: open This computer โ†’ find your phone โ†’ enable the display of hidden files in the menu View โ†’ search by name .nomedia.
  • ๐ŸŽ On macOS: use Android File Transfer โ†’ Command + Shift + . (dot) to show hidden files.
๐Ÿ’ก

If you are looking for .nomedia in your photos folder but don't find it, check subfolders โ€”sometimes the file is in a subdirectory (for example, DCIM/.thumbnails).

Method 3: Via ADB (for advanced)

If you have Android Debug Bridge (ADB)run the command:

adb shell find /sdcard -name ".nomedia" 2>/dev/null

This will recursively scan the internal memory and output the paths to all files .nomedia.

Search method Difficulty Requires root Suitable for
File manager โญ โŒ No All users
Connecting to a PC โญโญ โŒ No If there is no manager
ADB โญโญโญ โŒ No Advanced users
Root explorer โญโญโญโญ โœ… Yes System folders

How to delete .nomedia using standard Android tools

If the file is found, it can be deleted without additional tools. Let's consider two safe ones. method:

Method 1: Through a file manager

Suitable for most devices (Samsung, Xiaomi, Realme, Oppo etc.):

  1. Open a file manager (for example Files by Google or built-in Mi File Manager for Xiaomi).
  2. Turn on display of hidden files (see section above).
  3. Find .nomedia and long tap on it.
  4. Select Delete โ†’ confirm the action.

โ˜‘๏ธ Preparing to delete .nomedia

Done: 0 / 4

Method 2: Via PC (more reliable)

If it doesnโ€™t work on the phone:

  1. Connect the device to the computer via USB.
  2. Select mode File transfer (MTP) on the phone.
  3. On the PC, find the file .nomedia (as described above) and remove it with the key Delete.
  4. Remove the device safely.

After removal be sure to restart the phone or manually run a media scan:

  • Open Settings โ†’ Applications.
  • Find Media storage (Media Storage) โ†’ Storage โ†’ Clear cache.
  • Or install the application Rescan Media from Google Play.
๐Ÿ’ก

If after deleting .nomedia files are still not displayed, check folder permissions - sometimes they get lost with manual intervention.

Deleting .nomedia via ADB (without root)

If the file is located in a protected system folder (for example, /Android/data/), standard methods may not work. ADB โ€”Android debug bridge tool will help here. data-i="174">Step 1: Install ADB on PC

Step 1: Install ADB on PC

Download Platform Tools from the official website Google and unzip to any folder. Windows you will also need drivers (usually installed automatically).

Step 2: Connect the phone and enable debugging

On the phone:

  1. Go to Settings โ†’ About phone โ†’ tap 7 times on Build numberto enable Developer mode.
  2. Return to Settings โ†’ System โ†’ Developer Mode โ†’ enable USB Debugging.
  3. Connect your phone to the PC and confirm permission for debugging.

Step 3: Remove .nomedia via command

Open the command line (Windows) or terminal (macOS/Linux) in the folder with Platform Tools and run:

adb devices

If the device is displayed in the list, enter:

adb shell

rm /sdcard/path/to/folder/.nomedia

Replace /sdcard/path/to/folder/ with the real path (for example, /sdcard/DCIM/Camera/).

What to do if ADB does not see the device?

1. Check if USB debugging is enabled on your phone.

2. Install drivers for your model (for example, for Samsung needed Samsung USB Drivers).

3. Try another USB cable (preferably the original one).

4. Restart your phone and PC.

5. If you use macOS/Linux, add a rule for udev (instructions are on the Google website for developers).

To delete all files .nomedia on the device use:

adb shell find /sdcard -name ".nomedia" -exec rm {} \;
โš ๏ธ Attention: Be careful with recursive deletion! Some system applications can create .nomedia repeatedly, and its absence in service folders (for example, /Android/obb/) can cause games to malfunction.

Removing .nomedia with root access

If the file is located in the system folder (for example, /data/data/), you will need root access. Use this method only if you are sure of your actions!

Step 1: Get root access

To do this:

  • Unlock bootloader (instructions depend on the model - for Xiaomi need Mi Unlock Tool, for Samsung โ€” Odin).
  • Install Magisk or SuperSU to manage rights.

Step 2: Use root explorer

Install Root Explorer or FX File Explorer with root support:

  1. Open the application and provide root access.
  2. Go to the folder with .nomedia (for example, /data/data/com.whatsapp/).
  3. Hold the file โ†’ select Delete.

Step 3: Alternative - Terminal Emulator

Install Termux or Terminal Emulator and run:

su

rm /full/path/.nomedia

โš ๏ธ Attention: Deleting files c /data/data/ may disrupt the operation of applications! For example, deleting .nomedia from the folder WhatsApp will cause all media from chats to begin to be displayed in the gallery, which may be inconvenient.

Critical information: On some firmware (for example, MIUI from Xiaomi), system folders are mounted in read-only mode even with root. In this case, before deleting, you need to run the command mount -o rw,remount /data.

What to do if .nomedia files do not appear after deleting

Sometimes deleting .nomedia does not solve Here are the possible causes and solutions:

Cause 1: The media scanner cache is not updated

Android caches information about media files. To force an update:

  • ๐Ÿ“ฑ Reboot your phone.
  • ๐Ÿงน Clear the cache. applications Media storage (Settings โ†’ Applications โ†’ Show system โ†’ Media storage โ†’ Storage โ†’ Clear cache).
  • ๐Ÿ”„ Install Rescan Media from Google Play and run a scan.

Cause 2: The files are damaged or have an unsupported format

Check:

  • Whether the files can be opened on the PC.
  • Does the extension correspond to the real format (for example, .jpg should not be renamed .png).
  • Are there invalid characters in the file name (for example, ?, *, /).

Reason 3: The folder is excluded from scanning in the settings

On some firmware (for example EMUI from Huawei or ColorOS from Oppo) there are separate settings for the media scanner:

  • Go to Settings โ†’ Storage โ†’ Storage settings โ†’ Excluded folders.
  • Make sure that the desired folder is not added to the exceptions.

Cause 4: Problems with the file system

If the files are not displayed even on the PC, it may be the file system is damaged. Try:

  • Connect the phone to another USB port or PC.
  • Check the disk for errors via chkdsk (Windowsor fsck (Linux/macOS).
  • Copy the files to another medium and format the memory card (if that is the problem).
Problem Possible cause Solution
Files are not displayed in the gallery Cache is not updated Clear cache Media storage or restart the phone
Files are visible on the PC, but not on the phone Unsupported format Check the file extension and codec
The folder is empty in the gallery, but there are files The folder is in scanner exceptions Check the media scanner settings
The files are damaged File system error Check the disk for errors or copy data

How to prevent .nomedia from appearing again

Some applications create .nomedia automatically To prevent this:

Tip 1: Set up exceptions in applications

For example, in WhatsApp:

  1. Open Settings โ†’ Storage and data โ†’ Storage management.
  2. Disable the option Save incoming media to the gallery (this will prevent creation .nomedia in a folder WhatsApp Media).

Tip 2: Use alternative folders

If the application persistently creates .nomedia, move your files to another folder:

  • Create a new folder (for example, MyPhotos) in the root of the storage.
  • Move media files there.
  • Make sure that the new folder is not .nomedia.

Tip 3: Automate deletion

For advanced users:

  • Set up a task in Tasker or Automatethat will delete .nomedia when connected to Wi-Fi.
  • Use the script on Termux s cron for periodic cleaning.
๐Ÿ’ก

If you often work with media files, install Gallery Doctor or QuickPic โ€”these galleries ignore .nomedia and show all files.

Tip 4: Disable automatic creation of .nomedia

On some firmware (for example, MIUI) you can disable this function:

  1. Go to Settings โ†’ Advanced โ†’ Privacy.
  2. Find the option Hide media files and disable it.
โš ๏ธ Attention: Deactivating automatic creation .nomedia may lead to to the fact that application service files (for example, game cache) will begin to be displayed in the gallery. Be prepared for the media library to become clogged.

FAQ: Frequently asked questions about .nomedia

Is it possible to delete .nomedia in the WhatsApp folder without disrupting operation? messenger?

Yes, but after deleting all media files from chats (photos, videos, voice messages) will begin to be displayed in the standard gallery. This may be inconvenient if you receive a lot of media. It is better to move the necessary files to another folder and leave .nomedia in the folder WhatsApp.

Why after deleting .nomedia files are still not available? are shown in Google Photos?

Google Photos uses its own scanning mechanism. Try:

  1. Open Google Photos โ†’ tap on the avatar โ†’ Photo settings โ†’ Clear cache.
  2. Disable and enable again Backup and synchronization.
  3. Delete and reinstall the application.
How to create .nomedia to hide a folder from the gallery?

Create an empty text file with the name .nomedia (without extension!) and place it in the desired folder. You can do this:

  • Through the file manager (turn on showing hidden files).
  • Via PC (create a file in Notepad, save as .nomedia, selecting the "All files" type).
  • Via Termux: touch /sdcard/path/to/folder/.nomedia.

After adding the file, restart your phone or clear the cache Media storage.

Is it safe to delete .nomedia in the Android/obb folder?

No, this is not recommended. Folder obb contains game and application data (for example, cache Genshin Impact or Call of Duty Mobile). Deleting .nomedia there can lead to:

  • The appearance of thousands of unnecessary files in the gallery.
  • Games crashing (they expect the media in this folder to be hidden).

If you need to access files from obb, copy them to another folder.

Why is there no .nomedia file on my phone, but the media is still not displayed?

Possible reasons:

  • The files have unsupported format (for example .heic on older versions of Android).
  • Folder encrypted (for example, in Secure Folder on Samsung).
  • Media scanner disabled in the settings (found on custom firmware).
  • Files damaged or have zero size.

Try opening the files on a PC or other device to check their integrity.