GALLERY - Howto Prevent Indexing Certain Directories - Android Apps and Games

I have a folder on my SD card that I don't want images to appear from. Is there a means to exclude certain directories?
Sent from my DROIDX using XDA Premium App

Put an empty file called .nomedia in the directory.

This one works well for me - makes the process easier:
https://market.android.com/details?id=com.studiokuma.nomedia

What kind of images don't you want to show up in your gallery?
The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden
Folder name examples:
.pr0n / .dontlookhere / .ignore

kyouko said:
What kind of images don't you want to show up in your gallery?
The .nomedia method should work for you, if not you can always rename the folder with a "." at the beginning to make it hidden
Folder name examples:
.pr0n / .dontlookhere / .ignore
Click to expand...
Click to collapse
.nomedia works for me, as far as keeping stuff out of the gallery. Being all grown up in my computer usage, I choose to not let my computing devices hide stuff from me, so that .folder thingy doesn't work for me (and pictures in those .folders without a .nomedia file still seem to make their way into my gallery).
I do have a .stuff folder for my .porn though... Keeps it up near the top of the list...

how about the hideitpro app from the market? it's actually pretty cool. opens up as an audio manager, then you put in a password and there you have all the hidden files you want. not just pics...just an fyi

Install the app Just Pictures and ignore the folders you don't want to see.
The .nomedia "solution" prevents the album art to display in the media players.

I use the app QuickPic from the Market, and in the app you can choose which folders you want include and exclude. Pretty useful. You don't have the pretty 3-D effects from the default Gallery app but it's so much faster.

You can do the same thing with Fishbowl Gallery. You can set default albums, as well as hide albums. However, this still doesn't prevent someone from stumbling upon the default gallery app. The best solutions are either .nomedia, or do not have media on your phone that you do not want prying eyes to see. Alternatively, while cumbersome, you can use androzip or unrar pro to zip the material in question. Of course, by zipping your files, you can add the additional layer of security by encrypting it, if you're the paranoid sort.
Sent via Tapatalk on CM7.0.0-Vision Stable.

I remember this method. Any one know if the older file deletion ever got fixed with 2.2.1 or later?
If you don't know what I'm talking about here's a quick rundown.
You put the .nomedia file in a folder with pictures, upon reboot all those pictures are deleted. This had something to do with them already being scanned once and them being older than the .nomedia file so instead of ignoring them it deletes them. Something along those lines (anyone have the link to the original bug report from back in '08 or '09?).
Anyway, if it hasn't been fixed you've been warned, you stand a good chance of losing all media in those folders. So backup those files - but you knew that already
The easiest remedy to this is to remove the files, rename the folder to .whatever or insert the .nomedia file. Reboot. Then throw the files back onto the sdcard. That should eliminate any issues.

I've used the .nomedia solution awhile back to get icons, cover art, etc out of my gallery and it worked just fine... nothing was deleted (Droid X).
IIRC, I did have to clear the gallery app's cache to get it to "forget" about media that it had already found; on first lauch after clearing it's cache, expect it to be slow as it re-scans your device / sd card (..rebooting didn't work to clear the cach on my device... had to clear it via settings > application > manage apps..)

.nomedia file solution works
KCRic said:
I remember this method. Any one know if the older file deletion ever got fixed with 2.2.1 or later?
If you don't know what I'm talking about here's a quick rundown.
You put the .nomedia file in a folder with pictures, upon reboot all those pictures are deleted. This had something to do with them already being scanned once and them being older than the .nomedia file so instead of ignoring them it deletes them. Something along those lines (anyone have the link to the original bug report from back in '08 or '09?).
Anyway, if it hasn't been fixed you've been warned, you stand a good chance of losing all media in those folders. So backup those files - but you knew that already
The easiest remedy to this is to remove the files, rename the folder to .whatever or insert the file. Reboot. Then throw the files back onto the sdcard. That should eliminate any issues.
Click to expand...
Click to collapse
The .nomedia file solution works fine for me on Android 2.3.3.
The issue you mentioned is therefore fixed (nothing file was deleted unexpectedly).
Reboot was also necessary so that the native photo gallery app does not display the icons/pics any longer for the folders where I added the .nomedia file.
Furthermore, this works also for the music files.
(I use also TapeMachine app, and wanted to avoid that the sounds I recorded are listed in the Music Player).

If I place a .nomedia file in a directory, does that exclude all of its subdirectories from the gallery, as well?

Yes, it does. I just placed a .nomedia file in my /Music folder on my extsdcard and all the pictures in my albums are gone after a reboot.
UPDATE: I just tied this on my tablet (running 4.4.2) and it did not need a reboot. Gallery adjusted automatically. It was a folder on the extsdcard - and since 4.4.x restricts access to the sdcard, it stands to reason it saw the file placed and adjust the library automatically.
NiveusLuna said:
If I place a .nomedia file in a directory, does that exclude all of its subdirectories from the gallery, as well?
Click to expand...
Click to collapse

Related

How to hide media from the gallery?

I used to be able to do it on 2.2, 2.1, etc. Just create a directory with a dot in front of it ".temps", and use astro to find the files, but maybe something is different with honeycomb? I'm doing the same thing, but gallery still sees all of my files. Thanks.
*Can't figure out how to delete this post, but go ahead and delete it, my mistake.*
maybe just use a specific micro-sd card for your porn.
toddmp said:
maybe just use a specific micro-sd card for your porn.
Click to expand...
Click to collapse
lol - that's what we were all thinking!
lockheedload said:
I used to be able to do it on 2.2, 2.1, etc. Just create a directory with a dot in front of it ".temps", and use astro to find the files, but maybe something is different with honeycomb? I'm doing the same thing, but gallery still sees all of my files. Thanks.
*Can't figure out how to delete this post, but go ahead and delete it, my mistake.*
Click to expand...
Click to collapse
.nomedia file in the directrory
toddmp said:
maybe just use a specific micro-sd card for your porn.
Click to expand...
Click to collapse
Lmao.
Clear cache and reboot -
Ya yesterday I googled this and found some said make a file called .nomedia in the folder and others said to put a . in the folder name so I did both and it didn't work, but then I reboot the TF and then it worked so not sure which one actually did it or if both did.
.nomedia does work. The thing is the media scan only run when you rebooted. I think DevTools or SpareParts (don't have my TF with me right now) has an option to force a media scan so youdon't need to reboot.
I have a similar question, but it might be different case though.
Anyway, I have a lot music folder containing mp3 songs and in each folder there is a file called folder.jpg. I created those folder.jpg files manually to assign each music folder a cover picture. They are all shown up properly in the Music player.
(I had this for long time already for my Windows phone, Android phone, Windows PCs).
The problem I have is that, those folder.jpg files are also shown in the Gallery (for Pictures) and I do not know how to exclude/hide those folder.jpg files from the Gallery.
Any clue will be appreciated.
Spawned a good idea. Given .nomedia is supported, the android devs should expand the idea to help you solve your problem. Something like .nophotos in any music folder you don't want photos to be noticed in, and .nomusic, .novideos, .nodocuments, etc..?
When you say reboot, do you mean power off/on? I use Quickpic to browse photos since it doesn't include album art, but I like the default pic viewer and would like it exclude album art as well. I added the *.nomedia to my /music directory and it still shows album art.
Try changing the name of file from folder.jpg to albumart.jpg. It worked on Android 2.x

Gallery loads EVERYTHING

Ok i have some movies and lots of albums on my SD card.
When i open my gallery it loads all pictures even screen shots of the videos and the album art as pictures.
And there are many.. i have dozens and dozens of albums on the phone.
How can i get all those hidden from gallery?
For the folders on your phone that require "ahem" discretion. You can rename the folder to start with a period. e.g. "/.pictures/" and wipe the stored data for the gallery app to remove the cache of thumbnails it has created. This does mean a lot but not all apps won't look in the folder. However, if other apps need to look in the folder for music etc. they will also ignore folders starting with a period.
There's also a couple of apps on the android market that will remove items from the gallery without deleting them.
I know your problem.
Some phones also allow you to choose which folders you want to be shown in the gallery.
When in the main screen of the gallery, press the menu button and see what comes up. Hopefully you can hide your dirty habits that way.
Dallasalien's method should work on any phone.
Dallasalien said:
For the folders on your phone that require "ahem" discretion. You can rename the folder to start with a period. e.g. "/.pictures/" and wipe the stored data for the gallery app to remove the cache of thumbnails it has created. This does mean a lot but not all apps won't look in the folder. However, if other apps need to look in the folder for music etc. they will also ignore folders starting with a period.
There's also a couple of apps on the android market that will remove items from the gallery without deleting them.
Click to expand...
Click to collapse
woohoo.. the .pron worked..thanks... http://media.xda-developers.com/images/icons/icon10.gif
wife doesn't mind.. but my 3 yr old daughter doesn't need to see when she wants to view pictures..hehehe
Download Quickpic from the market let's you hide, exclude any folders you like
Sent from my SAMSUNG-SGH-I727 using xda premium
Are you drag n dropping folders from a windows machine? If so it's even copying the folder with the art work for your media player which the gallery will see. You could always just drag over the wanted video into a folder instead, or hide with a app or name the folder with a period like mentioned
john94si said:
woohoo.. the .pron worked..thanks... http://media.xda-developers.com/images/icons/icon10.gif
wife doesn't mind.. but my 3 yr old daughter doesn't need to see when she wants to view pictures..hehehe
Click to expand...
Click to collapse
*I do like that post*
If you make a new file named .nomedia in any folder of your sd card it will stop the gallery from loading the pictures in that folder.
I use astro file manager to create an empty zip and just rename it to .nomedia without the .zip at the end. You can also copy and paste the file into any other folders. It hides the pictures in subfolders as well so just 1 in your music folder will hide album art for all folders inside.
Sent from my SAMSUNG-SGH-I897 using XDA App
john94si said:
woohoo.. the .pron worked..thanks... http://media.xda-developers.com/images/icons/icon10.gif
wife doesn't mind.. but my 3 yr old daughter doesn't need to see when she wants to view pictures..hehehe
Click to expand...
Click to collapse
Your kid needs her own skyrocket!

[Q] Hiding media from gallery or music ("nomedia" trick not working)

Hi all
I've installed some apps which have their folder on the sdcard with various images, sprites, sounds (one of these is a satnav app).
The problem is, these appear and clutter my gallery and music apps. I use both apps from motorola and not their google counterpart.
I already put a .nomedia file in the folders, rebooted the phone, cleared data on those apps, deleted thumbnail caches on the sdcard, and it doesn't work. They still show up.
So how can I do?
Thank you in advance
I've partially solved my problem with a media re-scan, triggered by renaming a folder containing media files (and then renaming it back)
The problem is that, if files into that folder change, because any app (or I) copies new stuff into them, all the hidden files pop up again in the gallery/media.
I wonder if it's an Android bug or a Motorola bug...
I've had the same problem and I solved it by placing .nomedia files in the unwanted folders and then force a media rescan with the app "Rescan Media" eek from the market
https://market.android.com/details?id=com.addz.mediascanner
or using quickpix to create that file
manojsuper said:
you have to create a new file called ".nomedia" not a folder >.>
Click to expand...
Click to collapse
Where did I say that?
I tried media scanner but it doesn't work. (fyi i'm not rooted)
When I move music around (ie from the download folderr to the music folder) it gets duplicated in the music app, both motorola's and google's. Once i unmount and remount the sd card it sorts the problem on itself.
Same thing when I move images, the thumbnails get duplicated and only one of the two loads correctly, but I can't get them to disappear unless i delete my gallery's data, and then i lose all the video thumbnails. My gallery is now full of old thumbnails, gray "unknown" thumbnails, and thumbnails that don't load.
thenext1 said:
I tried media scanner but it doesn't work. (fyi i'm not rooted)
Click to expand...
Click to collapse
As far as I know, you don't have to be rooted to use the app I linked. There is a more extensive version of the app that specifically requires root which is what I base my assumption on...
The app only forces the android internal media-scanner service to re-index all files and it does so without giving any sort of feedback. Once the app is started the media-scanner is triggered and the app seemingly does nothing, so you wouldn't get a confimation or anything...
As I said I had the same problem, but using .nomedia-files and the app solved it... Be aware that if you place a .nomedia-file in a folder the contents of that folder and it's sub-directories are being skipped by the media-scanner.
I'd recommend cleaning up all the directories and systematically copy a .nomedia file in unwanted directories. After that launch the app ance more and you should be set...
Preggy said:
As far as I know, you don't have to be rooted to use the app I linked. There is a more extensive version of the app that specifically requires root which is what I base my assumption on...
The app only forces the android internal media-scanner service to re-index all files and it does so without giving any sort of feedback. Once the app is started the media-scanner is triggered and the app seemingly does nothing, so you wouldn't get a confimation or anything...
As I said I had the same problem, but using .nomedia-files and the app solved it... Be aware that if you place a .nomedia-file in a folder the contents of that folder and it's sub-directories are being skipped by the media-scanner.
I'd recommend cleaning up all the directories and systematically copy a .nomedia file in unwanted directories. After that launch the app ance more and you should be set...
Click to expand...
Click to collapse
The problem is that, even if I put nomedia files everywhere needed, when I move files in/out of these dirs, they all pop up in Gallery/Music, including those that were previously hidden. And to solve this (talking only of Gallery now) I have to clear its app data. It would be just easier to hide the "all images" section of Gallery...
I miss the good ol android 2.1 times where you could fiddle with everything with any app without worrying for refreshes, etc...
Give ".no_media" a try?
cogeary said:
Give ".no_media" a try?
Click to expand...
Click to collapse
I never heard of such a magic file name...
thenext1 said:
I never heard of such a magic file name...
Click to expand...
Click to collapse
Neither have I, but ROM Toolbox uses it when it puts previews of boot animations onto my SDCard and the gallery doesn't pick them up.
Just use QuickPic from the market, if it's available to you. I've been using it for quite some time, install that and freeze the gallery app. Ability to hide certain folders is built right in.
+1 to the QuickPic app...the stock Gallery SUCKS!!! I hide all the folders I do not want to be scanned and now I have a clean photo library. I also use PowerAmp for music since I hide my music folder so that I don't see album art and PowerAmp allows you to select folders to scan (regardless if there is a .nodedia file or not) instead of scanning everything. I believe Winamp will do the same thing, not sure.

Filtering gallery folders

Hi guys,
I am having some issues with the Stock Gallery. I have bunch of assignments and homework on my sd card and gallery decides to add all the photos into the library...... i.e. I can't even find my photos and videos among the few thousands graphs and diagrams.. Is there a way for the app to only scan specific (e.g. media) folders? Thanks!
I am afraid that the answer is NO unless one of the dev-cracks here found a solution.
But meanwhile You could use any gallery-app with a hide function or - since You obviously just want to make them not to show in stock gallery: -simply use
Keep Safe
I see. Any cool gallery app that support include/exclude folders? Thank you!
salmonsushi said:
I see. Any cool gallery app that support include/exclude folders? Thank you!
Click to expand...
Click to collapse
QuickPic is the best one out there and with that one you can hide folders, it's free so why don't you try it out.
dropping a ".nomedia" file in the directories you don't want seen in gallery doesn't work?
Hmm, looks like there is an app that will help with these. I have not tried it: https://play.google.com/store/apps/details?id=com.studiokuma.nomedia&hl=en
You can add a . to the beginning of the folder name of any folder you do not want gallery to look at and the images will not be seen. Of course this may cause some other apps to not see the folder also.
Barsky said:
dropping a ".nomedia" file in the directories you don't want seen in gallery doesn't work?
Click to expand...
Click to collapse
It seems not to, which is driving me nuts.
There is a few folders I would like to hide and putting a . at the start of the folder name does not work either.
EDIT:
It does actually work putting .nomedia file in folders for samsung's gallery. The media scanner seems super slow or something and not specifically updated by a reboot. I have an app called "Rescan Meda" that does not seem to get the media scanner's ass in gear.
It seems that the media scanner will still do recursive if there is not a .nomedia in each folder of the tree.
making the folder hidden by putting a . at the start of the foldername does not work tho.

Android 11 and .nomedia file

I was about to post a question about this, but I just figured this out myself. My phone recently updated to Android 11. I have an SD-Card which has music on it - along with a lot of album art. Since the update, all these album art photos have been cluttering up my gallery. Every time I add a .nomedia file in here (which also was there before the update), it seems to get automatically deleted (no, not hidden). I tried copying a .nomedia file from elsewhere on the phone. I even tried popping out the SD-Card and adding the file via PC. As soon as Android touches it, it deletes the file again.
So, here is the issue. With Android 11, it is creating some default folders (I wish it wouldn't clutter up things with these empty folders that I never need or use). Those default folders include: Music, Pictures, Movies. These are created at the top level on the SD-Card and on internal storage. So, if you are also using one of those folders for something, it's going to auto delete the .nomedia file. In my case, I just moved my music into a Musics folder instead(and ensured it has a .nomedia file, of course.
Hopefully this will save someone else from wasting their time trying to figure out why this is happening!
pacaveli420 said:
I was about to post a question about this, but I just figured this out myself. My phone recently updated to Android 11. I have an SD-Card which has music on it - along with a lot of album art. Since the update, all these album art photos have been cluttering up my gallery. Every time I add a .nomedia file in here (which also was there before the update), it seems to get automatically deleted (no, not hidden). I tried copying a .nomedia file from elsewhere on the phone. I even tried popping out the SD-Card and adding the file via PC. As soon as Android touches it, it deletes the file again.
So, here is the issue. With Android 11, it is creating some default folders (I wish it wouldn't clutter up things with these empty folders that I never need or use). Those default folders include: Music, Pictures, Movies. These are created at the top level on the SD-Card and on internal storage. So, if you are also using one of those folders for something, it's going to auto delete the .nomedia file. In my case, I just moved my music into a Musics folder instead(and ensured it has a .nomedia file, of course.
Hopefully this will save someone else from wasting their time trying to figure out why this is happening!
Click to expand...
Click to collapse
This makes no sense, please explain in more detail.
android1977 said:
This makes no sense, please explain in more detail.
Click to expand...
Click to collapse
If you're storing your music files in any of the default folders, Android is going to auto delete your .nomedia file if you try to put one there. Ergo, the solution is you need to store your music in a folder named something else.
pacaveli420 said:
If you're storing your music files in any of the default folders, Android is going to auto delete your .nomedia file if you try to put one there. Ergo, the solution is you need to store your music in a folder named something else.
Click to expand...
Click to collapse
Thanks that's what I did and got lucky, I was so desperate I signed up to XDA just to comment I gotta say XDA I love your site and been reading for a couple year's now, enjoy the information provided, thanks guy's for all your hard work
pacaveli420 said:
If you're storing your music files in any of the default folders, Android is going to auto delete your .nomedia file if you try to put one there. Ergo, the solution is you need to store your music in a folder named something else.
Click to expand...
Click to collapse
Thank you for saving my media library! I've been tortured by this issue since using the new phone, finally!
hello, i just get Android 11 on my MI A3, and those folders ( music, pictures, movies )appears on my sd card, they are useless for me, is there a way to delete them?
before Android 11, i didn't have this problem because i choosed " use sd as external support " instead of "use sd as extended memory" when inserting the sd card, but now even if i make the same choice, the folders are there and i can't delete them.
Sort of off topic but not really:
How do I stop it from creating these default folders? It's extremely annoying. I don't have my SD card structured that way and never have. I've deleted the default music, movies, etc folders numerous times now as they just clutter up the root directory and they keep reappearing. Is there a solution to this?
This seems to be a part of Android 11s default folder structure which no one ever bothered to do something about. I wouldn't be surprised if it's there for "security reasons" as well as a communist one. As in you only have the option to use these "secure" folders or else it won't show up in your apps at all.
This might be a way for Google to slowly faze out SDCards entirely while only giving you the option to use said folders for your "private" stuff akin to how IOS (kinda) works. In other words, they are doing it on purpose and no one ever bothered to read the fine print.
Obviously private music and other media collections is the root (see what I did there) cause of the problem. They don't want you to have those at all, And want you to use streaming services instead (tinfoil hat). Which is probably what these folders will probably end up being used for.
Netflix and Spotify allow you to store music on your device, but it's encrypted and will probably end up there at some point in Androids lifecycle. Obviously these files don't need .nomedia since the files are encrypted and will only show up in said app either way which makes the above meaningless.
Most of this is speculation obviously, but we've slowly been moving towards this trend if you look at how System apps were split into app and priv-app and so on. At some point in time only certain apps that has had the blessing of Google will be allowed to read anything off your storage. This happened with Chrome not to long ago where they blocked side-loaded extensions from running.
You will slowly see Android turning into IOS because they (Google) and big-tech in general wants 100% control of what you can and can't do. And everything based on AOSP or LOS is gonna follow suit because no one gives a flying fudge because that's too bothersome. The fragmentation of custom builds based on LOS/AOSP in general already shows that this has always been the case for the last 10 years. Linux in general is no different either as can be seen with wokeism. Except that was through decimation via woke people and not big-tech.
I was going crazy thinking this issue was specific to my samsung's stock rom. I started searching about this once I noticed it on LOS 18. Glad I'm not alone
I tend to be a little OCD about my folder structures but at this point I don't mind making a separate folder to avoid album arts in my gallery.
I believe I found a solution to this. It's been about a week or two with no further incident now. My solution was to delete the default folders from the root of the SD card because I don't use them, then create blank files that used those names. Haven't had a problem since.
I use the top level pictures folder because of a compatibility issue with programs that have small file path character limits that cause the program to hang. I don't use them anymore but I haven't had a reason to move it back where I had it previously and that would only make the default folder issue worse if I did. Or at least it would have until now with this discovery.
I do not use the movies and music folders, and if I move my pictures folder back where I had it I won't use that one either. Having them pop up on their own to clutter my root directory on both my SD card and my phone itself was very annoying. After deleting the movies and music folders off of the root of my SD card for the billionth time and getting rid of the empty default folders on my phone again, I created two blank files on my SD card root called Music and Movies. Ever since then the default folders haven't reappeared. On top of that, it hasn't created any ".thumbnails" folders all over the place like it always used to do either. That includes doing so on the internal phone storage. Creating those files on the SD card seems to have broken the whole process. I imagine the same would work vice versa for OP since it sounds like they use those default folders. Find an empty default folder on internal storage, delete it, create a file and name it the name of the folder you deleted (case sensitive), and that should disable the annoying default folder management process too. I can't vouch for that method, but I can vouch for it working when you do so on the SD card.
I just noticed this today on my tab s7+.
From what I can tell, the .nomedia file nolonger does anything on its own. However, if I add the .nomedia file to a folder, then rename the folder placing a . in front, of course it hides the entire folder. When I rename the folder again, removing the ., the .nomedia file now works. No matter how many times I rename the folder, the gallery does not see it until I remove the .nomedia file.
pool_shark said:
I just noticed this today on my tab s7+.
From what I can tell, the .nomedia file nolonger does anything on its own. However, if I add the .nomedia file to a folder, then rename the folder placing a . in front, of course it hides the entire folder. When I rename the folder again, removing the ., the .nomedia file now works. No matter how many times I rename the folder, the gallery does not see it until I remove the .nomedia file.
Click to expand...
Click to collapse
thank you pool shark.. i tried what you did/suggested and it worked. thanks.

Categories

Resources