yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] dstruct2k:
Caused the Media Server to crash on my TW-based 4.4.2 Galaxy S5 (klte / SM-G900W8) during boot the first few times. In the process of getting a logcat app setup and ADB working, it stopped crashing! Dunno which of the 4 reboots did the trick. ;)

Good work! If I get any more crashes, I'll make sure to get a report in. :)
[Xposed Framework Modules] thomashofmann:
I don't see any crashed from Media Scanner Optimizer.

It scanned and did not crash. The relevant log entries are:

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Postscan, subText null

XMSO: scan(String[] directories, String volumeName) has finished scanning external

XMSO: createBigTextStyleNotification with title Media Scanner Optimizer, text Scan directories time 00:08, subText Volume external (Expand for details), inboxSummary Volume external

XMSO: stopSelf is called on MediaScannerService
[Xposed Framework Modules] thomashofmann:
Please provide the full log. It seems to be a problem with the Context.
[Xposed Framework Modules] shivadow:
Sorry i meant the android media scanner crashed not the mod. There is another samsung device doing the same a post or two back..
[Xposed Framework Modules] thomashofmann:
Logcat would be good in this case.
[Xposed Framework Modules] thomashofmann:
I have uploaded version 1.1.2 to the Xposed Repository which is working again. This version should fix problems on CM-based ROMs.

Please continue to provide feedback based on this version.
[Xposed Framework Modules] siealex:
1.1.2 still does not start on PA.
[Xposed Framework Modules] dic1911:
I just successfully downloaded the APK from xposed repo

You can just go and try
[Xposed Framework Modules] n0j0e:
I have this in my init.d from custom ViperOne Rom 7.0.1 (HTC M7):

#killall -9 android.process.media
#killall -9 mediaserver

Can anyone explain and possibly interfering with this module?

[size=-4]Send with much love & Android.[/size]
[Xposed Framework Modules] t3khe4d:
Working great!

version 1.1.2 working well on ViperOneM8 3.1.0 :good:

no troubles thus far

excellent module

Thank you :highfive:
[Xposed Framework Modules] nss357:
No it won't. Having that symbol (#) in front means the whole line is commented out, it didn't get executed. So it doesn't do anything.
[Xposed Framework Modules] Haldi4803:
seems to work fine on Sony Xperia Z2 with 4.4.4 ROM

After a reboot it scanned for 30 seconds.

Deleted 22'000 entries and rescanned my 128gb MicroSD card xD 27 Minutes !

Finally no more Album Arts from my Music in the Album! Gotta love it!

The next thing could be a browser ? i mean... manually creating .nomedia .scanMovie files and stuff is working! But having a Browser where you can browse your SD card and select folder Settings "Scan this folder for: Audio, Pictures, Videos" with tick boxes surely would be awesome!
[Xposed Framework Modules] Magissia:
Hello, how the module treat media from read only memory ? (/system for example) Shouldn't the media scanner be able to scan system's media folder ? What if we reset the media database and we don't add a scanmedia file inside the concerned system folders ? To prevent foolish things, I think some path should be hard coded to be scanned if there's no "nomedia" files. For example, all the previous list, and from internal /data/media the folder "Music" for the musics, "Video" for videos, Ringstones for audio, Music for audio etc.

Interesting module.
[Xposed Framework Modules] kruga:
Interesting module. Installing this gives me an error "Unfortunately android.process.media has stopped" every time I reboot using default options. Any suggestions?
[Xposed Framework Modules] 089man:
Here I think module without function... Device s2 I 9100 Spirit-Rom 1.7, kitkat 4.4 4

If I boot no notification, features if I push nothing do, nothing message, no doing? Cm 11 based rom...

I9100 Tapatalk 4, Spirit-Rom 4.4. 4
[Xposed Framework Modules] thomashofmann:
The module only influences the way media on the external volumes are handled. External meaning the volume on the phone which is not the system partition and the SD Card. So for example if your phone has 16 GB of built-in storage around 12 GB might be free to use. This 12 GB partition is seen as an external volume to Android. If you have an SD Card in addition it will also be seen as external volume.

There is no need to put any .scanMedia files on the system partition.

When the media scanner starts after booting you will see that both the internal volume (system partition) and the external volume (internal storage and SD Card) are scanned. On the other hand if you trigger a scan using the Media Scanner Optimizer only a scan for the external volume will be run.

When deleting contents from the Media Store using the Media Scanner Optimizer only the data for the external volume is deleted. Messing with the internal volume is not a good idea and is not happening.
[Xposed Framework Modules] thomashofmann:
It seems like Xposed Media Scanner Optimizer is not configured to log to Xposed Log. Please use the application scroll down and check the Xposed Log preference and then post the Xposed Log again.
[Xposed Framework Modules] thomashofmann:
No it does not help. Please check the Xposed Log preference in the Media Scanner Optimizer app and then post the Xposed Log from Xposed Installer Log section which should then contain more information.
[Xposed Framework Modules] thomashofmann:
What is written to Xposed Log? Please enable Xposes Logging in Media Scanner Optimizer, reboot and post the Xposed log.
[Xposed Framework Modules] thomashofmann:
If you delete the media store contents the first time after deletion the scanner will create a new entry for each file scanned. This takes some time. After that it will be much faster as only changes will be written to the Media Store. So if you have your SD Card scanned now and trigger a rescan it should be much faster.

Yes I wanted to add a filesystem browser too but it is lots of work to do so I concentrated on the baseic feature set first. Maybe in the future.
[Xposed Framework Modules] Droidphilev:
Hello,

On 1.1.2 i get 58 seconds for external volume but 0 seconds for internal. This is normal? (default settings)
[Xposed Framework Modules] n0j0e:
Ok, but when i first tap "Trigger Media Scanner" nothing happens. No notification or anything. Only a notification when i tap "Delete Media Store Contents". When i first tap "Delete Media Store Contents" after reboot and then tap "Trigger Media Scanner" then comes a toast that's a Media Scan is in progress but no notification.

Can't send a log. Tried some log apps, setting log in Venom Tweaks on, also in Media Scanner Optimizer, restart phone but no log. Ok, that's another problem. ?

[size=-4]Send with much love & Android.[/size]
[Xposed Framework Modules] Droidphilev:
I guess even this amazing module cannot prevent from user installed ringtones to show up in music player, correct? It seems the ringtone chooser in setting relies on mediascanner.
[Xposed Framework Modules] thomashofmann:
Yes 0 for internal is normal. There are only very few files and almost never changes.
[Xposed Framework Modules] thomashofmann:
Actually, I currently do not know. Where do you put the custom ringtones?
[Xposed Framework Modules] Droidphilev:
well... i use the structure that's needed for ringtone chooser to find them (media>audio>notifications/ringtones. Will test this out later on and report.

---------- Post added at 09:30 AM ---------- Previous post was at 09:23 AM ----------

Hi,

Tested it. "Directories" and "Mediatypes" is enabled. no "." files in folder "Media". All apps lost their sounds and ringtone is gone in system too (i don't use any build-in sounds). Also they cannot be chosen anymore so system indeed relies on scanner to find ringtones.
[Xposed Framework Modules] xdadevnube:
That would be excellent. I sometimes use the app Android Tweaker, or at least the old version of it anyways. I despise that scanner, heh.
[Xposed Framework Modules] Droidphilev:
Hi again :)

Small warning for users:

If you scan only certain directories and you use custom ringtones be sure that also this directory is scanned (normally "media" on internal sd). Also, if you set up this way and you delete media content in the module and rescan all apps with custom tones will lose sound settings. You have to set up sounds again in these apps. Just a matter of setting things up right of course :)
[Xposed Framework Modules] n0j0e:
.scanMedia

.scanMusic

.scanPictures

.scanVideo

Capital letter!

[size=-4]Send with much love & Android.[/size]
[Xposed Framework Modules] thomashofmann:
Thanks, this is the kind of log file I need to see. The cause is simple but I wasn't aware of the restriction anymore :). When the the SD Card is scanned the module only descents into the first level of directories. This is why the marker file is found in DCIM but not in the other directories because they are not at the top level.

So if you move them to the top level it will work.

In my code I see that there was code to descent deeper into the directory structure but this code is comment out. I need to rethink why I did that. It might have had a cause:)

I will look into this but for the time being it would be sufficient to move the directories to the top level or add the .scanMedia file to the MyGalaxyNote directory only.
[Xposed Framework Modules] thomashofmann:
That's funny because I need to said the case must match but actually it does not. File.exists API seems not to care about case so I was wrong :(
[Xposed Framework Modules] Droidphilev:
This only count for .scanmedia, correct? .scanVideo etc can be in lower level on my device it seems.
[Xposed Framework Modules] Spere:
Thank you!!

I thought this is the reason but just wanted to be sure. I hope it's possible to add sub-dir scanning for marker file also, I kinda need to have them so.
[Xposed Framework Modules] Droidphilev:
Hi,

Strange.... after a while pictures that are in a non '.scanmedia' folder start to show up again in gallery. It seems to be folder only coming from internal storage. There is no .scan media in these folder nor in the root for internal storage. Cleaning the data of "gallery" doesn't fix this. (these folder do not have .nomedia either. Among them there's a folder with whatsapp pictures and a folder i created to put icons in (which are not used at all).

EDIT: made a folder and put a picture in internal sd without putting any "." files in it. Scanner gets triggered and picture is shown in gallery. It seems to work half for internal sd on my device (as i lost my ringtones before because of not putting .scanmedia and .scanmusic) in my ringtone folder).
[Xposed Framework Modules] Spere:
At least for me on /storage/extSdCard/Folder1/Folder2/ containing .scanmusic is not scanned.

Don't know if it scans lower directories from internal memory, but not from external what I see. Log shows no to find marker file from there.

Like thomashofmann said, he got code to scan deeper but it's commented out, so it shouldnt scan them, lol?
[Xposed Framework Modules] thomashofmann:
Case of all marker files seems to be irrelevant.
[Xposed Framework Modules] thomashofmann:
I'll keep it on my todo list
[Xposed Framework Modules] thomashofmann:
Not sure if I understood. Did you change settings of "Restrict to certain directories" at some time? If so .scanMedia would be irrelevant and the contents added.
[Xposed Framework Modules] Droidphilev:
"Directories" and "mediatypes" are still enabled. So gallery should not show the picture i created on interna sd as i didnt put any

Marker files in it. Still the picture is shown in gallery immediatelly.

About my earlier question: i mean that only .scanmedia will work max 1 level down? Or all markers?
[Xposed Framework Modules] eruben:
Seems like app is not working at all on Archi Droid's 3.0 Experimental (4.4.4).
[Xposed Framework Modules] thomashofmann:
I might have an idea why this happens. An app can request a scan for a single file and I am not sure right now if this would be caught by the module. How did you put the file there? Try it with TotalCommander or some other file manager or both please and see if it makes a difference. Take a look at the log for something like "scanSingleFile is called for"

Yes you should be able to have different markes in different subdirectories. If markers are found in a subdirectory they will be used. Ohtherwise the parent directories are searched until a marker file is found. So it is sufficient to have a .scanPictures at the directory where all pictures are. Subdirectories do not need them. If you have a subdirectory and you want pictures and video to be scanned there you would need to put .scanPictures and .scanVideo there. If you would only like to scan videos in that subdir .scanVideo should do the trick. Maybe you can check if it works for you like this.
[Xposed Framework Modules] Droidphilev:
Argh, my english.....

I mean: you wrote before that you commented something out in your code and that .scanmedia wont work in 2th level folders. My question was if this is only the case for .scanmedia marker or for all markers like .scanpictures etc also not work in folders lower than second level?
[Xposed Framework Modules] Spere:
This case is for all the marker files. You can try it yourself, it wont do harm, only waste your time. (I tried it already)
[Xposed Framework Modules] tyfoxx:
Just in time

Brilliant!

One question -

Will this shorten Boot Times - or just saves battery on boot, and scan when the device is less power hungry after other processes are done, in that; if you are not careful you can get some FCs do to the unavailability of called media?

I have a ROM that i love but the boot time is Long and I'm considering the trade-off (guess i just have to play until i find that balance)

Please advise.

tyfoxx
[Xposed Framework Modules] thomashofmann:
I think it is only the case for .scanmedia. If you tried with the others and it did not work I need to have a look.
[Xposed Framework Modules] thomashofmann:
It can shorten the time it takes the media scanner to do its work. It is not delaying it.
[Xposed Framework Modules] thomashofmann:
Do you have .scanmedia in /storage/extSdCard/MyGalaxyNote? If so I would expect it to work if .scanmusic lives in Music subdir.

.scanmedia goes with preference "Directories" whether or not a directory (and its children will be scanned at all)

and .scanMusic, .scanPictures, .scanVideo determines what is scanned -> Restrict to certain media types preference.

Maybe this is confusing some people.
[Xposed Framework Modules] Spere:
No I didn't, because that folder have foders in it and I don't want every of them scanned.

So are you saying this is right way to play with .scan files:

/root/Folder/Music/

/root/Folder/Photos/

/root/Folder/Pictures/

/root/Folder/Videos/

/root/Folder/DoNotScan/

This case you should:

1. Add .scanMedia file under "Folder" to scan everything from there

2. Add .scanMusic under "Music" to restrict .scanMedia scanning photos and videos from here

3. Add .nomedia file under "DoNotScan" folder, if you don't want to scan that one. Or will this be anyway scanned as long as "Folder" got .scanMedia in it?

This is getting so confusing my brains hurt lol.

Also check my earlier post, added one log there.
[Xposed Framework Modules] Droidphilev:
Found "scansinglefile' in log but how does this explain files being shown in folders that were there long before?
[Xposed Framework Modules] Spere:
Yep, had to do some test and look logs to understand how this works.

I just thought from start that I can throw any .scan file to any folder I like and that gets scanned (with subdirs), but I was wrong.

Can you make an setting to make it work like this? I'll see this more better way for user point of view.
[Xposed Framework Modules] PiggyFlooper:
Can you make it work with 4.0.3 API 15?

Sent from above using XDA Premium
[Xposed Framework Modules] erikrh:
great module, however I was wondering if it's possible to add an option to disable media scan on boot or make it optional like in some custom roms? :fingers-crossed:
[Xposed Framework Modules] milojoseph:
Can you put a unlock key ? on Google play store plz. Thank like how GravityBox did
[Xposed Framework Modules] dimm0k:
not sure if this is the normal behavior, but with this module on my SGS5 stock 4.4.2 ROM I see two notifications from this module during boot for the internal and external SD cards. The weird thing is right after I also get a notification from saying the Android Media Scanner is looking for new files. I know for a fact that this last notification is made visible with my media player, Rocket Player so that I know when the scanner is running. shouldn't this module prevent the latter from happening?
[Xposed Framework Modules] Droidphilev:
i *think* that this is normal. The module is not made for preventing scans but only to decide what exactly is scanned.
[Xposed Framework Modules] eruben:
Sorry, but will it work with ArchiDroid KK 3.0? It's not running, it's not deleting and even log is empty.
[Xposed Framework Modules] siealex:
IT does not work with most KK roms. WTF?
[Xposed Framework Modules] chw9999:
Hi, I use ICS on my trusted EVO 3D, and the ICS media scanner has the obnoxious attitude (bug) to scan every folder even though it might contain a .nomedia file in it. After tedious scanning it just doesn't display those folders in album or player. You mentioned the standard scanning behavior for .nomedia folders is not changed by your module, is it true for this bug as well?

Reason:

I had >50.000 jpg files on my phone (my self made pictures), that blew up the db to more than 60MB and took more than 20min of scanning... regardless of .nomedia files, pics in hidden dot-foldernames and what not. I was actually forced to remove them - by media scanner [emoji6] Would be great if "standard behavior" is without bug [emoji1]

On a side note: only version 1.0 can be installed on ICS, 1.1.2 gives a package incompatibility warning....

Thanks so much!
[Xposed Framework Modules] ahac85:
Can anyone confirm this works on htc one m8,coz i can't seem to tell?:confused:

Sent from my HTC One_M8
[Xposed Framework Modules] chw9999:
update: seems to NOT hooking on ICS...

Thanks...
[Xposed Framework Modules] magnamentis:
my impression too

suggestion, perhaps if those where it works post there rom also so that we can get a pictures as to on which roms it's working.

for me none of the functions work on:

OnePlus1 _ CM11 _ latest nigthly _ boeffla kernel

N7100 _ CM11 _ latest nightly _ default kernel

Nexus 5 _ CM11 _ latest nightly _ elemtalX kernel

2x Samsung Galaxy Sll _ CM11 _ older nightlies _ default kernel

other devices i did not test yet cause my wife took them on a business trip but hope this will be solved before she'll be back :)

right now i get the impression that albeit we can consider that most people here are using a rooted rom with xposed installed that

the users go across custom roms and therefore it will not work for most of them. exactly as [MENTION=1097461]siealex[/MENTION] said.

i would feel a bit more confident if i got the impression that these problems with rom compatibility would be given it's proper attention

since i believe that this is a majority. if more people where it works would name their basic config we others could better consider whether

it's someting on our side, albeit after reading through this thread i don't give that possibility much hope anymore.
[Xposed Framework Modules] thomashofmann:
Yes that is planned.
[Xposed Framework Modules] dingolino:
Will we get a unlock key after donating?

Just asking because I just send one. :)

Play would be easier...

Best regards

dingolino

Gesendet von meinem SM-N910F mit Tapatalk
[Xposed Framework Modules] thomashofmann:
It would be useful to get some Xposed Logs for these ROMs to see what the problem is. I think you there will be a NullPointerException in the log but I am not sure. I also have a custom KK ROM and it works on that so I need more details. Of course it should also run on most KK ROMs so don't give up yet :)
[Xposed Framework Modules] kamild_:
This module is like something that Android should already have in stock! Thank you, makes media scanning so much more efficient!

I only noticed that there is a tiny chance when android.media.process "gets unfortunately closed" right after booting up my device but regardless of that it still works flawlessly.

Confirmed to work on Nexus 5, latest SlimKat nightly (currently 8.14-WEEKLY-7930), Franco Kernel. Cooperates perfectly with Stickmount :)
[Xposed Framework Modules] thomashofmann:
Version 1.1.3 is now available in the Xposed Repo. Please see if it fixes issues on custom Kitkat ROMs. Thanks
[Xposed Framework Modules] thomashofmann:
Probably, but this has low priority and I would need to use Compat library.
[Xposed Framework Modules] thomashofmann:
No, I don't think so because these are two different things. The .scanPictures, .scanVideo and .scanMusic files can be used without any .scanMedia file if the scanner is not restricted to specific directories.

Making it work like you suggest would mean that every directory would need to be inspected to determine the directories to scan. This would perhaps be a performance issue - I'm not sure. It would depend on the number of directories. I will keep the idea in my mind. So maybe yes, maybe no.
[Xposed Framework Modules] magnamentis:
error.log

as per your wish, hope it helps or let me know what else i can do

this should do since i've the same config on all devices, means 99% same config except a few device specific settings.

PS: a real lot later only when all important things are running for everyone perfectly i would appreciate if you would consider a dark theme. hehe...

EDIT: attached a second log with changed settings ( in module ) to improve the probability that what you need is there :)
[Xposed Framework Modules] siealex:
V. 1.1.3 causes two android.process.media crashes on boot, also two crashes on "trigger media scanning".
[Xposed Framework Modules] Cyboy:
it does not work on my Xgo 4.1.2 rooted!

should it ask for root permission?it also dident do
[Xposed Framework Modules] thomashofmann:
The log shows that the change in 1.1.3 worked. Don't be confused by the stack traces. They are there for troubleshooting right now. As you say media scanner crashes. Can you provide a logcat for that?
[Xposed Framework Modules] thomashofmann:
No root needed but I need xposed log for troubleshooting.
[Xposed Framework Modules] michaelbaxter:
If your getting: "Unfortunately android.process.media has stopped"

I originally tried v1 and had no results. Then I tried v1.1.2 and on boot I got:

"Unfortunately android.process.media has stopped"

Subsequently I learned from the thread .scanMedia needed to be in a top level directory. I moved them up and I went back to v1.

Only one boot since, but it seems to be working for me now.

I haven't tried v1.1.3 yet.

I'm on a Motorola XT926M with factory 4.4.2.

Awesome, greatly needed module. I'll be donating.
[Xposed Framework Modules] siealex:
Try this one. The last crash occurred approx. 10 seconds before the end of the file.

android.app.RemoteServiceException: Bad notification posted from package com.android.providers.media: Couldn't create icon: StatusBarIcon(pkg=com.android.providers.mediauser=0 id=0x7f02ff01 level=0 visible=true num=0 )

WTF?
[Xposed Framework Modules] HorstiG:
Same Problem on Galaxy S3 Liquid Smooth KK 4.4.4 ROM.

I send you a Log File with PM.
[Xposed Framework Modules] Droidphilev:
Hi,

Strange, last update works fine on my device. I'm also on a custom 4.4.4 rom. No crashes at all.

I am wondering: i use a tablet with multiple users on it. Only the primary user has Xposed installed (which doesn't mean it isn't there for secondary users). The question is: Are these media contents the same for all users? Or do they all have a "database" of their own. (Maybe i'll take some nandroids and try it out also)
[Xposed Framework Modules] PiggyFlooper:
Okay then,

There's media scanners and rescanners available, but nothing like your app. Good stuff sir. I hope you may find time

Sent from above using xparent tapatalk blue
[Xposed Framework Modules] thomashofmann:
Are you using some custom theming engine?