File .nomedia is an invisible marker that Android uses to exclude folders from being scanned by the media scanner. When you accidentally or intentionally create such a file in a folder with photos, videos or music, they disappear from standard applications Gallery, Google Photos or Music. But the files themselves remain in place - they are simply not shown.
The problem is that many users do not suspect the existence of .nomediauntil they notice the loss of important pictures. Most often, the file appears after installing some applications (for example WhatsApp, Telegram or launchers), which automatically create it in their folders. Or you yourself added it according to instructions from the Internet to hide personal files from prying eyes. Now you need to put everything back - and we will tell you how to do it correctly.
What is .nomedia and why it hides files
A file .nomedia is an empty text document without an extension, the name of which begins with a dot. In Linux-systems (a Android built on its basis) such files are considered hidden and are not displayed in the standard file manager. Its only function is to signal to the media scanner MediaProviderthat the contents of the folder do not need to be indexed.
When you open Gallery or Google Photos, the application does not show files from folders with .nomedia, although they physically remain on the device. This is convenient for:
- ๐ System application folders (for example,
/Android/data/com.whatsapp/), where cached media is stored. - ๐ Hiding personal photos from strangers (if you know, where to look).
- ๐ต Organization of music - for example, so that ringtones are not displayed in the player.
However, if the file appears in a folder with important photos (for example, DCIM/Camera), this becomes a problem. The media scanner ignores the entire folder, and even new files added there later will not be displayed.
โ ๏ธ Attention: Some applications (for example, ES Explorer or Solid Explorer) can automatically create .nomedia in new folders. Check your file manager settings if files disappear without your participation.
How to find .nomedia on Android: 3 ways
Before deleting, you need to locate the file. Since it is hidden, standard File manager ot Google will not show it. Here are the working methods:
1. Through a file manager with support for hidden files
Install one of these applications:
- ๐ฑ Solid Explorer (paid, but with a trial period).
- ๐ฑ FX File Explorer (free, without unnecessary water).
- ๐ฑ MiXplorer (for advanced users).
Instructions:
- Open the manager and go to
Settings โ Show hidden files. - Scroll through the folders manually or use the search by name
.nomedia. - Pay attention to the folders
DCIM,Pictures,Downloadโthe file is found there most often.
2. Via PC (Windows/macOS/Linux)
Connect the phone to the computer in File transfer (MTP) i mode:
- ๐ฅ๏ธ On Windows: enable displaying hidden files in Explorer โ View โ Hidden elements data-i="92">๐ง On
Explorer โ View โ Hidden Items. - ๐ฅ๏ธ On macOS: V Finder click
Cmd + Shift +.(dot). - ๐ง On Linux: in the file manager, select
View โ Show hidden files.
3. Via ADB (for advanced users)
If you have ADB (Android Debug Bridge), run the command:
adb shell find /sdcard/ -name ".nomedia" 2>/dev/null
It will recursively find all files .nomedia on the internal memory. To search on the SD card, replace /sdcard/ with /storage/XXXX-XXXX/ (you can find out the path to the card via adb shell ls /storage/).
How to delete.nomedia: step-by-step guide
When the file is found, the only thing left to do is delete it. Important: deleting.nomedia does not delete the media files themselves - it only makes them visible to the system again.
Method 1: Removing through a file manager
The simplest method:
- Open a file manager (for example, Solid Explorer) and find
.nomedia. - Hold your finger on the file to select it.
- Click
Delete(or the trash can icon). - Confirm the action.
After deleting, reboot the device or manually update the media database:
adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/
โ๏ธ Preparing to delete.nomedia
Method 2: Removing via PC
If you are working from a computer:
- Connect your phone in
MTP. - Find the file
.nomediain Explorer. - Click
Deleteor drag the file to the trash. - Disconnect the device and reboot it.
On macOS an additional application may be required Android File Transfersince Finder does not always work correctly with MTP.
Method 3: Uninstalling via ADB
To automatically delete all .nomedia on the device:
adb shell find /sdcard/ -name ".nomedia" -exec rm -f {} \;
Beware of this command - it will delete all files .nomedia, including those needed by system applications. It is better to delete manually, checking each folder.
โ ๏ธ Attention: If after deleting.nomediafiles still do not appear in the gallery, check:
- ๐ Have you updated media database (rebooting usually helps).
- ๐ Have the files been moved to another folder (for example, WhatsApp may duplicate media).
- ๐ ๏ธ Are there any errors in the files themselves (try opening them through VLC or QuickPic).
What to do if .nomedia appears again
Sometimes the file
.nomediais restored after a reboot or update applications. This means that some software is actively creating it. Here's how to find the culprit:1. Check applications that work with media
Most often
.nomediacreate:
- ๐ฌ Messengers: WhatsApp, Telegram, Viber (in folders with downloaded files).
- ๐ต Music players: Poweramp, Musicolet (to exclude music from the system scanner).
- ๐ท Photo applications: Snapseed, Lightroom (for cache editing).
Go to the settings of these applications and look for options like:
Hide media in the gallery(WhatsApp).Exclude folders from scanning(Poweramp).Do not show in other applications(Google Photos).2. Use App Inspector to find the culprit
The application App Inspector (available in Google Play) shows which apps have recently modified the file system. data-i="175">Open
.nomedia:
- Open App Inspector.
- Go to the tab
File Access.- See which application last edited the media folder.
3. Prevent the creation of .nomedia via Xposed (for root)
If you have root accessa module Xposed called
NoMediamay block file creation. Please note that this is risky - some applications may not work correctly.If you canโt find the culprit, try deleting suspicious applications one by one and checking whether .nomedia returns after a reboot.
How to restore media files if they did not appear after deleting.nomedia
In rare cases, deleting
.nomediadoes not return files to the gallery. Reasons and solutions:
Problem Cause Solution Files are not displayed in the gallery The media base has not been updated Reboot the device or run adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard/Files are damaged Error when writing or deleting Try to open via VLC or restore using DiskDigger Files on SD card Android does not scan external drives automatically Insert the card into another phone or use SD Maid to force scan Folder excluded in gallery settings Manual exclusion in Google Photos or Gallery Go to the application settings and uncheck Excluded foldersIf files are physically deleted (for example, along with
.nomediayou accidentally erased media), use recovery apps:
- ๐ฑ On the phone: DiskDigger, Dumpster (requires preliminary setup).
- ๐ฅ๏ธ On PC: Recuva, PhotoRec (work with the connected device in the mode
MTP).โ ๏ธ Attention: The faster you start recovery, the higher the chances of getting the files back. Each new write to the device reduces the likelihood of success.How to prevent reappearance.nomedia
To prevent the file from appearing again, follow these tips:
- ๐ Check folders regularly check media for availability
.nomedia(once a month).- ๐ง Configure applications: disable media hiding options in instant messengers and players.
- ๐ก๏ธ Use alternative hiding methods:
- ๐ Archive files with a password (via 7-Zip or RAR).
- ๐ Move them to protected folders (Samsung Secure Folder, Xiaomi Private Mode).
- ๐ผ๏ธ Use safe applications (KeepSafe, GalleryVault).
- ๐ฑ Update your software: new versions of Android (starting from 11) have built-in tools for managing the visibility of media.
Why do some applications create .nomedia automatically?
Many instant messengers and social networks (for example, WhatsApp or Instagram) store cached media files in their folders to prevent these files from clogging up the user's gallery, they automatically add .nomedia. This is not a bug, but intended behavior - this is how the application separates it. "system" files from user ones.
Frequent errors when working with .nomedia
Some actions can aggravate the problem. Here's what not do:
- ๐ซ Delete.nomedia from system folders (for example,
/Android/data/). This may disrupt the operation of applications.- ๐ซ Use ADB commands without understanding. An error in the syntax (for example, an extra space) will lead to the removal of the wrong files.
- ๐ซ Ignore backupsBefore mass deletion
.nomediacopy media to PC or cloud.- ๐ซ Create .nomedia in the root folder (
/sdcard/This will hide all media on the device.If in doubt, it is better to move
.nomediato another folder (for exampleDownload), rather than deleting it immediately. This way you can get the file back if something goes wrong.Removing.nomedia is a safe operation if you know exactly why you are doing it. The main rule: do not touch files in system folders and always check the result after changes.
FAQ: Answers to frequently asked questions
Is it possible to delete .nomedia without root access?
Yes, root is not needed. A file manager with support for hidden files (for example, Solid Explorer) or a connection to a PC is enough.
Why did the .nomedia files not appear in the gallery after deleting?
Possible reasons:
- The media base was not updated (reboot device).
- The files are damaged or moved.
- The folder is excluded in the gallery settings.
Try opening the files through another player (for example, VLC).
How to hide files without .nomedia?
Alternative methods:
- Use built-in tools (Secure Folder on Samsung, Private Mode on Xiaomi).
- Install a safe application (KeepSafe, GalleryVault).
- Archive files with a password (7-Zip, RAR).
Is it possible to recover deleted .nomedia?
Yes, if you deleted it recently. Use file recovery apps (DiskDigger, Recuva). However, you need to restore it only if you know exactly why you need it (for example, for the application to work).
Why does .nomedia appear on its own? yourself?
Most likely, it is created by one of the installed applications. Most often the culprits are:
- Messengers (WhatsApp, Telegram).
- Music players (Poweramp, Musicolet).
- Launchers and themes (for example, Nova Launcher can create .nomedia for icons).
Check the settings of these apps or uninstall them to test the hypothesis.