[Q] How to customize Media Scanner - Galaxy S II Q&A, Help & Troubleshooting

It's over: Media Scanner sucks.
As of KI4, still has bugs:
- stores album name, in Genre (m4a)
- cannot read properly album arts (m4a)
I'm seriuosly thinking about customizing Media Scanner.
Questions:
- Are Samsung Android's sources available?
- What would it take to customize the media scanner?
-

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to Q&A

............Thanks

RixNox said:
It's over: Media Scanner sucks.
As of KI4, still has bugs:
- stores album name, in Genre (m4a)
- cannot read properly album arts (m4a)
I'm seriuosly thinking about customizing Media Scanner.
Questions:
- Are Samsung Android's sources available?
- What would it take to customize the media scanner?
-
Click to expand...
Click to collapse
I would love that too.... for me I just want the Media Scanner to be able to point to certain folders only, not the whole SD card, in that way it will be even faster...
I do not know where to start... but if anyone can point out the apks for media scanner or how to find which apks are used, maybe I can decompile and see if there are few values to be alter and it works !

infra4800 said:
I would love that too.... for me I just want the Media Scanner to be able to point to certain folders only, not the whole SD card, in that way it will be even faster...
I do not know where to start... but if anyone can point out the apks for media scanner or how to find which apks are used, maybe I can decompile and see if there are few values to be alter and it works !
Click to expand...
Click to collapse
just add a .nomedia file to any directory you don't want scanned.

Rakinos said:
just add a .nomedia file to any directory you don't want scanned.
Click to expand...
Click to collapse
I don't want to cancel ALL media scanning for a folder. For instance, music folders that have album art should index the MP3 files but not the image files. If .NOMEDIA allowed me to specify the type of media to skip this would be ok, but excluding the images also excludes the music.
Personally, I would much rather just specify certain folders for each type of media. While I've seen this opinion expressed countless times, I have yet to see any workable options so I'm eager to hear any recommendations.

Related

Hide media?

Hopefully i am missing something simple! How do i stop all my pics and videos from being indexed and revealed via albums? I have made several sub folders in new directories on mem card, but it still gets indexed?
I suppose if there is not a simple control to stop index then is there a good app for password protecting a folder?
elmoono said:
Hopefully i am missing something simple! How do i stop all my pics and videos from being indexed and revealed via albums? I have made several sub folders in new directories on mem card, but it still gets indexed?
I suppose if there is not a simple control to stop index then is there a good app for password protecting a folder?
Click to expand...
Click to collapse
I've searched for something like this too, but can't find any way do hide stuff from the album.
Found Photo Vault and Video Vault on market place, only allows 5 files in trial mode, cheap to buy license though. Hides from album, and Linda file manager - seems to work, open the app to view all the files you have hidden.
you can stop it simple by putting a file name .nomedia in the directory.
But then it will not popup in any media application anymore.
hope thats what you were looking for.
BR
phlo
phlo said:
you can stop it simple by putting a file name .nomedia in the directory.
But then it will not popup in any media application anymore.
hope thats what you were looking for.
BR
phlo
Click to expand...
Click to collapse
Wonderful - thank You

Hero Album flow

Can anyone tell me the right way to get all the cover album flow to work. Some of the photos of the album to work and some doesn't. As for Windows Mobile, we need to place on individual folders and rename the photos to "folder.jpg". How do I do it for the HTC Hero?
I did search on the thread and couldn't get anything. Apologies if I do missed-out on the threads.
Thanks!
I use MusicBrainz Picard to get the tag information of the mp3/album.
I manually search the cover art/album art with google.
Then I use Mp3tag to apply the downloaded cover art to the properly tagged album info.
This way, I always get a very nice library in my Hero, complete with album art & info.
Thank you so much for your help. Will try it now.
Download "Album Art Grabber" from the Market and it'll grab all the albums and store them in your SD card.

[Q] associate album picture in music player

Hi everybody
first of all i want to say TNX to all the wonderful people here, who make my HD2 experience so much better
i have a good question which i bet other HD2 owners are struggling with:
i keep my mp3 files stored on my SD card.
Q: i can't seem to find a way to set a certain picture to a certain song in the music player (instead of the default picture of the note icon).
what i'v tried up until now:
- i went to My Device\MUSIC and saw the way the original (crappy) song is set with its own picture, and tried to set my mp3 file the same way with it's own picture, but - no luck, still the annoying note icon..
so.. i give up for now, hopefully someone knows the answer to my question here
thanks allot guys
I think I've got the solution:
Settings -> Manage Applications -> Media Storage and choose clear data, this will wipe the media library database from the phone.
you then have to power down and reboot. Now when you open the music app it will rebuild its database.
Click to expand...
Click to collapse
retrieved from this site
SORTED! tnx to Wilco!
Wilco you are the man
i didn't find a way to delete the media library database from the phone, the solution presented in the thread is meant to work with another HTC device which has different settings, BUT - the issue was the same -
in order to show a photo instead of the default note icon in the music player htc devices require an image called "folder.jpg" located in every folder which contains mp3's, this is the picture which will be shown as the album picture. so in order to show a different picture for every album the albums must be in different folders.
there is a certain BUG which occures when there is no folder.jpg file in the folder containing the mp3 file and you try to add it later, the device has a DB that records every folder you create and it doesn't remember a folder.jpg file in that particular folder so it will not show a picture even if you add one, i still havn't figured out way to clean that DB, anyway, by simply putting a folder.jpg with your choice of image and changing the folder's name to another one, the device will recognize this as a brand new folder and tada! album picture is presented
hope we helped you guys!
thanks!!

[Q] Hidden folders through Android MTP

Hey !
I've searched the web as well as the forum but i didn't find any solution and it seems i'm not the only one wanting to do that.
Is it possible to see hidden folders of internal sdcard through MTP ?
I really talk about hidden folder like ".android_secure", not the photos that aren't yet scanned by the media scanner service.
In my windows environment i already set the view all hidden files/folders as well as view system files.
If i have to change folders permissions through terminal what are the correct permissions i should put ?
Thanks for the help !!
Am i the only having that problem ?
Do you guys see the hidden folders through mtp connexion ?
If you'd bother reading a bit before asking questions, you might have the answer already.
http://en.wikipedia.org/wiki/Media_Transfer_Protocol
MTP and PTP specifically overcome this issue by making the unit of managed storage a local file rather than an entire (possibly very large) unit of mass storage at the block level. In this way, MTP works like a transactional file system - either the entire file is written/read or nothing.
More or less, it is designed to keep hidden what should be hidden stick to USB storage or FTP/SCP.
PS: can't believe we're using a transfer protocol designed by Microsoft in a Linux-based system mastered by Google. The horror, the pain... no wonder it doesn't work on my Mac!
VAXXi said:
If you'd bother reading a bit before asking questions, you might have the answer already.
http://en.wikipedia.org/wiki/Media_Transfer_Protocol
MTP and PTP specifically overcome this issue by making the unit of managed storage a local file rather than an entire (possibly very large) unit of mass storage at the block level. In this way, MTP works like a transactional file system - either the entire file is written/read or nothing.
More or less, it is designed to keep hidden what should be hidden stick to USB storage or FTP/SCP.
PS: can't believe we're using a transfer protocol designed by Microsoft in a Linux-based system mastered by Google. The horror, the pain... no wonder it doesn't work on my Mac!
Click to expand...
Click to collapse
Thx for the link ! I knew what mtp is but its always good to refresh things up
I read the whole article and unfortunately it doesn't answer my question.
I understood that its the same for all of us meaning that we are not able to see hidden folders.
But the main question is if there is a way to bypass this behavior ? Where is this defined exactly ?
It seems according to the article that its not on the file permission layer ? Should it be at partition level ? How can mtp know what to share with the host ?
It's not a "behaviour" per se, but more/less a database. Remember that media scanner program which wakes up every time you change something on your SD card, be it internal or external ? it simply keeps a "database" of files which are presented to the MTP client (your computer) and hides away the phone's internal folders which are not supposed to be seen by the end-user.
Theoretically, this is done in order to have the iPhone-like behaviour: seeing the entire device memory as one big unified storage which you can fill as you want (no more of those partition size limitations which brought us the app2sd hacks). In my opinion, it's more or less just a small step done in order to "secure" phones for DRM protected content.
Studios and media companies require devices to have such measures of protection in order to allow you to sell media content (like movies, books, etc) and since Google wants to push its business further with the Play Store, it needs to cave in to the studios' demands. In the future, it will probably even become illegal (DMCA-style) for me to give you the information below
Back to the technical part of our show now.
At the first boot in the life of the device, Media Scanner will look under /system/media and index everything there. After that, it will scan everything under /mnt/sdcard (hence your external SD card too, if you have one, as it's mounted under /mnt/sdcard/external_sd). On some devices, you have an "internal.db" file and one "external-123xyz.db" file; that's a unique ID of the SD card which was scanned. The idea here is you might have 2-3 SD cards which you swap often, and it's not nice to do a full rescan each time you change the SD card. These databases are in /dbdata/databases/com.android.providers.media (on my phone, there is only one "external.db" for example).
So what you're looking for is a way to populate this database with all the files found by the Media Scanner. But Media Scanner doesn't want you to see the hidden folders you mentioned above. So, you get an application which doesn't ignore them, like Rescan SD Card! or SDrescan.
Happy now ?
Thank you very much i really enjoyed reading the explanation as it answers completely my questions and it makes sense !
Ill give a try to the apps but i'm also curious to investigate on those files
Cheers
PS. Is this a disguised way to support non open source protocols ?
Well, you could poke around inside the database with sqlite if you want. But don't really see what's so interesting about them.
It is just another protocol which is supported, which happens to be designed by Microsoft (and probably licensed/paid by Google to be used in Android). I understand the technical explanation behind this decision, but I'm also wary that someday UMS will be disabled by default and enabling it will disable content purchasing for that device (just like having a rooted phone now disables some "sensitive" apps, like banking and online TV).
As a system admin its interesting to know whats happening on my system
As a hobby its interesting for my personal knowledge
And from a development point of view it gives me some ideas for maybe future apps
You say that its just another protocol which is supported but to my understanding there are not so many of them ! So i would say that Google was kind of forced to use the MTP method, first from a hardware point of view and second to be compliant with the rest of the world.
Is there any other protocol that could suite their needs ? Since USB mass storage is not usable on some devices and MTP is well spead.
.HiddenAndroid folders in Win - Here Yesterday, Gone Tomorrow
<Win 7 and GN2>
What's curious and a bit frustrating to me is that, yesterday, when I mounted my device ALL of the hidden (.folders and .files) were visible and searchable. Today, when I went to explore some more, all are gone. I understand that I can use a 3rd party app, just can't figure out why it was visible yesterday and not today.
Hmmph
Did you ever resolve this issue? I really hate MTP for several reasons but this is one of the reasons why! I need to back up all my directories on the SDCard because some apps store them as hidden files in hidden directories. Furthermore, I came across the Play Store bug that requires me to delete a "temp.asec" file in the ".android_secure" directory, but of course it is not visible.
In a post further up it was suggested to use a "Rescan" app to force the DB to include hidden files/directories, but I have tried no less than 4 of these apps, and all they do is trigger the built-in android media scan, which is the problem in the first place!
So has anyone ever been able to access hidden files and directories using MTP?
EDIT: I have an HTC phone that actually shows hidden files and directories, so they have obviously implemented their own media scan. The problem I am currently having is on a Samsung phone (Epic 4G touch)
It may depend on the implementation. For example, using stock rom for the phone doesn't show some files and folders, for example folders starting with dot. But if you use Neatrom Lite it will show all files and folders.
Flash forward about 6 years and Samsung still does not show hidden folders/files when viewing the phone contents in Windows File Explorer, but HTC does.
The reason this is still a problem for me, is that I want to backup the contents of a particular directory (WhatsApp) which contains some hidden folders, so I can restore it anytime on a new phone or the same phone.
I recently switched from HTC to Samsung and alas, it seems the problem with this implementation still exists. Anyone found a workaround to this to allow File Explorer to see the hidden folders?
Update: It appears that hidden .nomedia files (and probably others) appear under regular folders, so the problem is limited to hidden folders themselves

[XPOSED] Xposed Media Scanner Optimizer v. 1.3

Let me introduce my new Xposed Module. It allows you to customize the way the media scanner works on Android.
It solves several problems that I have with the media scanner. As Xposed module developer one needs to reboot the device quite often. The media scanner runs on each reboot and eating much battery as the device stays awake while the scanner is running and doing lots of I/O.
For non developer the Xposed Media Scanner Optimizer also provides useful functionality.
First of all let me explain how the media scanner works on Android. Each time the device has bootet it runs and scans all volumes/storage. Depending on the size of the storage available on the device and the SD Card and the number of files this usually takes between 5 and 20 minutes. For each file and directory it finds it creates an entry in the so-called Android Media Store. For special file types like images, videos and music files it also scans for meta data like EXIF information for images and mp3 tags for music files. Applications may query the Media Store to find specific files bases on the file type or meta data. Well known applications that do so are the Gallery and the Music Player. Other applications may also do so.
The media scanner runs as a background service and is not visible to the user.
The Xposed Media Scanner Optimizer provides the following tweaks to the media scanner:
The service can be run as a foreground service allowing the user to see when and how long it runs. Foregound services are visible to the user via a notification.
When the scanner has finished details of how long each scan took are shown using a notification.
The scanner can be run in a mode where only specific directories will be scanned. This reduces scan times and thus saves battery. It also allows you to control what shows up in the Gallery or Music Player apps.
It is possible to tell the scanner that only specific file types (e.g. music files) should be scanned on a directory basis.
It is possible to prevent automatic scanning for the external volume. Only triggering the scanner form within the XMSO app will cause the media scanner to run.
It allows you to completely delete the contents of the media store.
It allows you to trigger a scan whenever you want to
On some Android phones the scanner is scheduled to run several times after a boot which is completely unnecessary and in my opinion is a bug. These repetitive scans can be prevented.
All files that will not be scanned will not show up in the Gallery or Music Player. I for myself use this feature to restrict what is shown in the Music Player for example. I only want to see music files from specific directories on my SD card to show up in the music player.
The directories that contain my music files also contain images for the album and the artist. These files would normally show up in the Gallery. There, I only want to see the contents of the directories where I keep my pictures. I don't want to have the gallery cluttered with album artwork or images of artists from the music directories.
The Xposed Media Scanner Optimizer settings application can be started from the launcher and allows you to configure the following settings:
Repetitive Scans: If this preference is checked repetitive scans at boot time will be prevented. Repetitive scans are not necessary and only cause greater battery drain. Depending on the Android version and vendor repetitive scans may occur and can be prevented by checking this preference.
Service Importance: When checked the media scanner will run as foreground service and its operation will be visible to the user via a notification.
Thread Priority: If checked the media scanner will be forced to run with background thread priority even if it is running as a foreground service. This is the suggested setting. If unchecked the thread priority depends on whether it runs as a foreground service or not.
Directories: If checked the media scanner will only scan directories that have a .scanMedia file (i.e. an empty file with a dot as first part of the name similar to the .noMedia file). Use a file explorer app to create this file. This file can be placed in a directory that may contain subdirectories. The subdirectories will be scanned as well. If unchecked all directories will be scanned (except for the ones containing a .noMedia file - this default behavior of the media scanner is not altered by the Xposed Media Scanner Optimizer).
Media Types: If checked only certain file types will be scanned. To define which file types the scanner will scan in a directory create the following files: .scanMusic, .scanVideo and .scanPictures. So for a directory containing a collection of music albums you would need to create a .scanMusic file at the directory that contains all albums if you only want the music files scanned. Images contained in the album directories would then be skipped.
Run automatically: If checked the media scanner will scan whenever it is told to do so by the system. If unchecked it only scans the external volume when triggered from the XMSO app. Requests for the scanning of single files still work in either case.
Result Notifications: If checked a notification will be shown when the scanner has finished including information about the scan time.
Trigger Media Scanner: When touched a media scanner is triggered.
Delete Media Store Contents: When touched the contents of the media store are deleted. This will not delete the actual files on the storage. Trigger a scan or reboot to let the scanner populate the media store after deleting its contents. This is useful if the media stores already contains entries that you do not want like images from all directories in the Gallery. First check the preferences to restrict what will be scanned, empty the media store and trigger a rescan. After the rescan only what has been scanned depending on your preferences will appear in the Gallery.
Android Logging: If this preference is checked details of the media scanner and the Xposed module are written to the Android log. This is useful for development and to troubleshoot. For end users this should stay unchecked.
Xposed Log: If this preference is checked details will be written to the Xposed log. Since the Xposed log is persisted this is also useful for troubleshooting. For end users this should stay unchecked.
Depending on the number of files on your storage media scan times can be reduced significantly.
The Xposed module is available from the Xposed repository.
It should work on Android 4.1.2 (API 16) and up.
If you like the module feel free to donate
Awesome! I was looking for an app or module like this without luck until today, gonna try it ASAP, thanks! :good:
EDIT: it seems that the download isn't working I get the 404 Not found error
EDIT 2: it looks like is some problem related to the downloads from the server because I can't download other modules either :-/
possible alternate location to download this? looks like the Xposed downloads are all down even though Xposed Installer loads up new modules...
Download not working
HGT - Galaxy S3 - S5 - Tesla TTL7 - any KK ROM
Hello,
Wondefull module!
Small question though: can i put .scanmedia and , let's say, .scanvideo together in a directory?
Droidphilev said:
Hello,
Wondefull module!
Small question though: can i put .scanmedia and , let's say, .scanvideo together in a directory?
Click to expand...
Click to collapse
Where did you get the apk from?
Download in xpose not working? Where I can found the app?
I9100 Tapatalk 4, Spirit-Rom 4.4. 4
Droidphilev said:
Hello,
Wondefull module!
Small question though: can i put .scanmedia and , let's say, .scanvideo together in a directory?
Click to expand...
Click to collapse
If you only create the .scanMedia file all media files considered as such by Media Scanner's default will be scanned. If you for example add a .scanPictures and a .scanVideo file images in that directory will not be scanned.
I will look into 404 tomorrow if still the case.
It's not just this module... Several modules are reporting 404 error... So the Xposed repository server may be experiencing some kind of problem!
Holy freakin' glob! Finally! I am SO wanting to get this module on my phone ASAP!
Hope they fix the 404 Error quickly, cause I can't wait to get that module!
:good:
Same thing happened a couple weeks back. Rovo will have to fix whatever it is. If I recall it was something to do with IP addy's hitting his server from 70.xxx.xxx.xxx addresses which was Cox Communications, Verizon, AT&T... basically America.
think the xposed server's down, please upload apk here, thanks
thomashofmann said:
Let me introduce my new Xposed Module. It allows you to customize the way the media scanner works on Android....
Click to expand...
Click to collapse
Could you please share the apk in xda for the time being as it seems that xposed repo is down.
The Xposed download server is provided by XDA, maybe @GermainZ knows who to ask?
In custom rom im using, I found this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Is it same funtion with your module?
no one knows as xda download not working and there is no alternative since now ;(
No it is not the same. I was thinking about adding this feature later so one can decide if the scanner should start after boot at all.
Is it a fake? All downloads from xpose works but only this app not works?
I9100 Tapatalk 4, Spirit-Rom 4.4. 4
Can someone provide direct apk here
Xperia Z1 C6902

Categories

Resources