yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] siealex:
Similarly, it does not work too. PA 4.6 beta 6 (4.4.4). Xposed with other modules works normally.

java.lang.NoSuchMethodError: init
at com.thomashofmann.xposed.lib.XposedModule.findAndHookMethodInClassHierarchy(XposedModule.java:283)
at com.thomashofmann.xposed.lib.XposedModule.findAndHookMethodInClassHierarchy(XposedModule.java:279)
at com.thomashofmann.xposed.lib.XposedModule.findAndHookMethodInClassHierarchy(XposedModule.java:279)
at com.thomashofmann.xposed.lib.XposedModule.hookMethod(XposedModule.java:262)
at com.thomashofmann.xposed.lib.XposedModule.hookFirstContextImplInit(XposedModule.java:228)
at com.thomashofmann.xposed.lib.XposedModule.captureApplicationContext(XposedModule.java:185)
at com.thomashofmann.xposed.lib.XposedModule.handleLoadPackage(XposedModule.java:334)
at de.robv.android.xposed.IXposedHookLoadPackage$Wrapper.handleLoadPackage(IXposedHookLoadPackage.java:20)
at de.robv.android.xposed.callbacks.XC_LoadPackage.call(XC_LoadPackage.java:34)
at de.robv.android.xposed.callbacks.XCallback.callAll(XCallback.java:70)
at de.robv.android.xposed.XposedBridge$1.beforeHookedMethod(XposedBridge.java:208)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:611)
at android.app.ActivityThread.handleBindApplication(Native Method)
at android.app.ActivityThread.access$1500(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5059)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
at dalvik.system.NativeStart.main(Native Method)

This appears even with logs disabled in the module.
[Xposed Framework Modules] thomashofmann:
Is there a source code repository for this ROM? Otherwise I will look into CM Source.
[Xposed Framework Modules] eruben:
So I configured app (screenshot 1). I put .ScanMusic, .ScanVideo and .ScanPictures files in folders where i store appropriate files, deleted media store contents and then triggered Media Scanner. It showed 0 sec in notification (screenshot 2).

Now I'm not sure what actually happened, but I still have photos from other directories (where i didn't put .ScanPictures file) in my Gallery. And when I add photo there it shows in Gallery strait away.

Actually all I want is to trigger Media Scanner by demand and never let it run automatically (at least not in a folders where I didn't put .Scan files). So question is whether I managed to do it?

Thanks.
[Xposed Framework Modules] rrrrrrredbelly:
Would love to see this, thanks for putting this together.
[Xposed Framework Modules] Droidphilev:
Hi,

Sadly also not working on mine. I use Dirty Unicorns 4.4.4 (CM based AFAIK)

Not able to create logs now, sorry.
[Xposed Framework Modules] thomashofmann:
If it took 0 seconds there is a problem. Please turn on logging to Xposed log and see if there is an error logged there.
[Xposed Framework Modules] siealex:
This can be the same problem as with XInstaller (look at its topic here about 5..7 days ago) on many custom roms.
[Xposed Framework Modules] thomashofmann:
Make sure to have the correct case for the special files: .scanMedia, .scanMusic, .scanVideo, .scanPictures, i.e. with a lower case S

Other than that please have a lool at the log again while deleting the media store contents. Gallery should not show anything after the notification with the number of deleted files shows up. In case there is no such notification the log should show some problem.
[Xposed Framework Modules] thomashofmann:
Yes because it is a severe problem.
[Xposed Framework Modules] Valiceemo:
+1

Get rid of the in your face donation request. Makes me less inclined to donate

---------- Post added at 22:09 ---------- Previous post was at 22:03 ----------

Repetitive scans checked

Service importance checked

Thread priority checked

Directories unchecked

Media type unchecked

Run automatically checked
[Xposed Framework Modules] thomashofmann:
What device and Rom? Can you check xposed logging and then post The xposed log here?
[Xposed Framework Modules] Valiceemo:
LG G2 CloudyG3 v2.1
[Xposed Framework Modules] chrisnz1947:
connecting phone widows PC via USB after optimizer scan

Hi, I am using the 1.3.4 version of your software and have a problem you may be able to assist with.

Phone HTC One M8 developer – firmware 3.28.1504.5, Rom ViperOneM8 3.2.1.

The problem is not with the scan but with what I see if I connect my phone to windows PC via USB (I have USB debug enabled on my phone).

So with your module not active (not selected in Xpopsed Installer) via windows explorer with the phone connected via USB I see all directories on both my internal and external SD cards.

On the phone I have only 3 directories with the .media files these are;

External SD - Wallpapers (.scanMedia , .scanPictures) at the top level , and DCIM (.scanMedia) and DCIM/100MEDIA(.scanPictures), DCIM/.thumbnails(.noMedia).

So if I activate your software and reboot I get your notifications.

Initially all is ok, If I connect via USB I see all directories on both my internal and external SD cards.

If I Delete Media Store Contents (shows 15000+ entries deleted) and then Trigger Media Scan, I get your notifications OK, however now via USB all I see is Wallpapers and the DCIM directories on the external SD card, internal SD shows no directories, even if I wait 15/20 minutes after Trigger Media scan.

To get back, I need to deselect your program and reboot, if I wait 15 minutes and then reconnect I then again see all directories on both my internal and external SD cards.

whilst I like the idea of your module being able to also copy to/from the phone from my PC is also a must.

Any suggestions help would be appreciated
[Xposed Framework Modules] lorrinator:
Rescan Media ROOT

Does anyone know if Rescan Media ROOT does the same thing as this app? Is it necessary to keep both?

https://play.google.com/store/apps/details?id=com.addz.mediascannerroot&hl=en
[Xposed Framework Modules] Droidphilev:
Hi Thomas,

I went from TW to pacrom on my tablet and i also get the media process popup. Will try to send you a log later today.
[Xposed Framework Modules] Dovidhalevi:
What app "owns" the notifications? Would like to have floatifications intercept them.
[Xposed Framework Modules] Valiceemo:
Still getting 2 notifications on boot ....
[Xposed Framework Modules] thomashofmann:
Yes one for internal volume one for external. Since internal will almost always be fast Immer could remove it or make it optional but this hasn't been implemented yet.
[Xposed Framework Modules] Dovidhalevi:
What about three!! notifications and no reboot?
[Xposed Framework Modules] thomashofmann:
What do you mean to say?
[Xposed Framework Modules] RedDemon:
Looks like they achieve similar things, although I'd say XMSO has greater functionality with the ability to notify the user when a scan is being performed etc. I can't see the benefit in having both installed together but there may be a valid reason that I've overlooked.

Selecting "App Info" from the notifications generated by XMSO brings up the info for "Media Storage", so it looks like this owns the notifications. Hopefully floatifications will allow you to intercept from this app.
[Xposed Framework Modules] RedDemon:
Have downloaded v1.3.4 and turned on logging functions on my TF700T, logs attached. Any way to stop it from FCing?
[Xposed Framework Modules] Dovidhalevi:
Just that. Out of the blue, three notifications. Happened twice.

Unfortunately, not offered. Might try that root-app.
[Xposed Framework Modules] thomashofmann:
You can turn off notifications in XMSO app.
[Xposed Framework Modules] Beakhole:
Playlists

This module is amazing! One problem that I'm looking for help in resolving, though. My music app isn't recognizing my previously-created playlists. I placed a .scanMedia and .scanMusic file in my /storage/sdcard0/Playlists directory but it's not finding them. I can see all the .pla playlist files in that directory. :confused:

Any help will be appreciated!!
[Xposed Framework Modules] nhmanas:
When I installed this module android's media scanner gives fc on i9100 cm11
[Xposed Framework Modules] teraßyte:
Same here, I had to disable it since I needed to restart my phone quite a few times the other day.
[Xposed Framework Modules] Alexandr.K:
Bugs?

Sony Xperia Z. XMSO-1.3.4.

I deleted Media store contents and run Trigger media scanner. Item Directories have flag. Folder /storege/emulated/0/MyDmitrrov is not file .scanMedia, but Album have files in this folder. These files are created by program MyDmitrrov (mydmitrov.ru). Why? Bug?
[Xposed Framework Modules] thomashofmann:
The problems with cm11 based ROMs are caused by the Xposed Framework not handling resource replacements for the Theme Engine APIs in cm11. I now have a cm11 device and I am working on a solution / workaround.
[Xposed Framework Modules] thomashofmann:
On cm11 based ROMs disable foreground service (service importance) and result notifications.
[Xposed Framework Modules] HorstiG:
Is there a way to remove the donations clue? Donation has been made.

HGT - Galaxy S3 - S5 - Tesla TTL7 any AOSP ROM
[Xposed Framework Modules] thomashofmann:
Not yet. Based on feedback here I will remove some of it in next version.
[Xposed Framework Modules] HorstiG:
Schade

HGT - Galaxy S3 - S5 - Tesla TTL7 any AOSP ROM
[Xposed Framework Modules] dreccon:
I know it has been mentioned before and I know it's not the developer's priority, but I can mention two devices that would benefit a lot if ICS were to be supported, namely the HTC Evo 3D and the LG Optimus 3D. Especially the Optimus 3D has severe problems with its media scanner on ICS. Both vendors have left those phones with no further updates and, although there are several custom ROMs even with lollipop being developed as we speak, 3D frameworks are closed-source, so there is no 3D support if you decide to dump the stock ROM.

Don't get me wrong, I'm in no position to demand anything. Just thought it was worth mentioning. I'll be watching this thread in case you change your mind.

BTW, kudos for addressing this problem that has plagued Android for so long!
[Xposed Framework Modules] bonny_k-9:
What I throw a log file, so you decided to drop a media server error at startup CM11?
[Xposed Framework Modules] thomashofmann:
Version 1.3.6 is out

Hi there, I just uploaded version 1.3.6. It took me some time to find a workaround for problems caused by the theming engine included in CM11 based ROMs. Notifications should now work. I was testing this on an experimental CM11 based ROM for an older device I have. I still get a single media process crash after startup but this could be related to the experimental nature of the ROM so I am posting this version now. It should work much better now. No need to disable service importance and result notifications.

I also added an option / preference that lets you disable the donation actions on the notifications.
[Xposed Framework Modules] thomashofmann:
What do you mean?
[Xposed Framework Modules] thomashofmann:
There is with version 1.3.6
[Xposed Framework Modules] thomashofmann:
No longer necessary with 1.3.6
[Xposed Framework Modules] bonny_k-9:
Error media server at system startup.
[Xposed Framework Modules] RedDemon:
Great work, no longer FCes for me on my CM11-based ROM.

Donation made, keep up the great work!

I've also noticed that when I try to "Trigger MediaScanner", I'm notified that "A scan for the external volume is already in progress. Please try again later." This happens even though there is no current scan being notified in the notification bar! Xposed Log attached if this is of interest.
[Xposed Framework Modules] amit.bagaria:
+1

Same issue observed in Samsung ROM 4.4.2. "Trigger MediaScannner" not working with the toast msg already reported.
[Xposed Framework Modules] thomashofmann:
So this worked for you in previous versions?
[Xposed Framework Modules] amit.bagaria:
Yes, everything worked perfectly till version 1.3.4.
[Xposed Framework Modules] thomashofmann:
Thank you and thanks for the error report. Please test again with 1.3.7.
[Xposed Framework Modules] amit.bagaria:
Thanks. The issue is fixed now. Everything works fine again.
[Xposed Framework Modules] thomashofmann:
Does the latest version 1.3.7 fix The problems on Cm11 ROMs for all?
[Xposed Framework Modules] qwerty22:
Is it possible to configure the module so that it would not change anything, but only logged the scanner work?
[Xposed Framework Modules] thomashofmann:
Sure, uncheck the following preferences:

Repetitive Scans

Directories

Media Types

and check:

Run automatically

If you want to see (not only have log) when the scanner runs also check:

Service Importance

Thread Priority
[Xposed Framework Modules] qwerty22:
Ok. I uncheck:

Repetitive Scans

Directories

Media Types

Check:

Run automatically

Service Importance

Thread Priority

After reboot the phone, I see 2 alerts in status bar but i can`t expand for details.

View attachment 3086282

After 2 minutes I see 5 alerts. I can`t expand any alert for analyze details. After unplug USB from computer I see 7 unclicable alerts:

View attachment 3086294

P.S. Sorry for my English.
[Xposed Framework Modules] qwerty22:
Where to find Xposed Media Scanner Optimizer Log?
[Xposed Framework Modules] thomashofmann:
Dr

Put two fingers on the notifcation area and Turn them a bit. It should then expand.

The time the scan took is already shown.

The media scanner ran 6 times for the external volume and once for the internal. Aber scan time of a few seconds is pretty low. Either you do not have much stored on The phone or you have the Directories option checked on the XMSO app and scanning is restricted to only a few directories.
[Xposed Framework Modules] thomashofmann:
The log entries are written to The Android log and The xposed log depending on what you choose in the XMSO app.
[Xposed Framework Modules] RedDemon:
Installed v1.3.7 and no scans are occurring now at all.

Seems to be a naming issue, the following appears in the log.

Loading modules from /data/app/com.thomashofmann.xposed.mediascanneroptimizer-1.apk

File does not exist

(full log attached)

Have tried renaming the existing mediascanneroptimizer-2.apk to match what is being loaded and reinstalled to refresh any app version references, but to no avail.

Am a bit stumped. Any ideas?
[Xposed Framework Modules] Paul_Bags:
*facepalm*, was planning to use .scanMedia and just not create any. Oh well, still better than thousands of pointless entries.

Anywhere else I might "need" .scanMedia?
[Xposed Framework Modules] thomashofmann:
Strange indeed. Does The XMSO app work? You might want to uninstall the app, open xposed installer module list (should not appear there anymore) reboot and install again.
[Xposed Framework Modules] Kyonex:
after latest update (1.37) XMSO broke my MTP USB connection (smartphone - Pantech Vega LTE-A A880S). After uninstalling XMSO and rebooting everything is OK. Fix that please (PM me if any information needed).
[Xposed Framework Modules] RedDemon:
Thanks, I'd already tried that but was too impatient to reboot in between uninstall and reinstall [emoji37] Have done with the reboot and all working again. Thanks again for a great module.
[Xposed Framework Modules] qwerty22:
I uploaded file "photo.png" to phone and add the photo to contact. I see 4 alerts with "Pre-scan", "Scan" and "Post-scan" time.

View attachment 3087661

In Xposed log I see only "Reloaded preferences".

View attachment 3087662

Where I see that MediaScanner to treat the "photo.png"?
[Xposed Framework Modules] thomashofmann:
Did you check the checkbox Xposed Log Debug Level? If Not try it. There should be more log entries.

You should see it in the log and also in the notifcation while the scanner runs but since it only takes two seconds that will be difficult.
[Xposed Framework Modules] SuperSimian:
cause of MTP not working

after 2 days of testing this module, changing kernel, reverting to stock rom, restoring, freezing apps, i conclude that this module is responsible for MTP not working on my STOCK Moto g 2014. using kitkat 4.4.4
[Xposed Framework Modules] qwerty22:
Difficult?.. Under what conditions Xposed Media Scanner Optimizer displays the media files?
[Xposed Framework Modules] thomashofmann:
It displays what it is scanning while it is scanning in a notification.
[Xposed Framework Modules] thomashofmann:
Yes this is a known issue but not on all ROMs. I will implement a solution for this. Meanwhile you will need to make sure the directories you need to access using MTP are being scanned.
[Xposed Framework Modules] qwerty22:
Unfortunately, it did not work on my Galaxy S5 G900F, Android 4.4.2, rooted. Example for photo.png I presented above.
[Xposed Framework Modules] thomashofmann:
Ich don't get what you think is not working. From the screenshots all looks good.
[Xposed Framework Modules] qwerty22:
Hm, may be... Where I see link on photo.png file wich I upload on the phone by MTP? I see alerts with time only without any additional information about MediaScanner action.
[Xposed Framework Modules] bonny_k-9:
The new version fixes a bug at startup CM11. Why in the status bar displays two notifications?
[Xposed Framework Modules] thomashofmann:
One for the internal volume that is being scanned and one for the external. Take a close look. IT ist written on the notification.
[Xposed Framework Modules] Portovelo:
Hi

"Tap to trigger a media scan"

still broken in motorola razr i, stock rom jb 4.1.2, mexico
[Xposed Framework Modules] thomashofmann:
Logs please
[Xposed Framework Modules] thomashofmann:
If you have checked "Service Importance" the Media Scanner will run as so called foreground service, that is a service that is visible to the user through an icon in the status bar. While the scanner runs (and is in foreground mode) a notification will be shown along with the icon. In that notification the text changes while the scanner does different things.

Once the scanner finished this icon and the notification will be gone. If you have checked the Result Notification preference you will see a new notification that shows how much time the three different phases of the scan have taken.
[Xposed Framework Modules] qwerty22:
Happy New Year!

My settings:

View attachment 3092842

I checked "Service Importance" and "Result Notification". I see how much time the three different phases of the scan have taken, thanks! Can I see which mediafile (path and file name) scanned Media Scanner?
[Xposed Framework Modules] thomashofmann:
Yes in logcat with the XMSO tag or in the xposed log. This depends on whether the preferences to log to logcat or xposed log are checked.
[Xposed Framework Modules] xstahsie:
MTP and PTP broke in the latest update

The latest update also broke MTP and PTP on my LG G3. Already tried uninstalling and reinstalling--rebooted between uninstall and reinstall.
[Xposed Framework Modules] qwerty22:
I added "Android Logging" and "Xposed Log" settings without debug options:

Uploaded "FUSION-TWRP-2.8.3.0-lp-2.tar.md5.png" to phone by MTP. In logcat

View attachment logcat.zip

I see 22779 (23 thousand without debug options!) log entry:

XMSO: Not restricting scan to certain media types

and 2 log entry with "FUSION-TWRP-2.8.3.0-lp-2.tar.md5.png":

V/XMSO ( 1582): Executing hook MediaScanner#isNoMediaFile called with values /storage/extSdCard/FUSION-TWRP-2.8.3.0-lp-2.tar.md5.png

Xposed log does not contain "FUSION-TWRP-2.8.3.0-lp-2.tar.md5.png". /data/data/de.robv.android.xposed.installer/log/error.log:

View attachment error.zip

Please add a compact log entry about MediaFile.
[Xposed Framework Modules] MixEcoSystem:
At last Android Media Scanner done right
[Xposed Framework Modules] subworx:
Same for me, 1.3.7 broke MTP and PTP on my G3 and Lenovo Yoga Tablet 2 Pro as well.

Please let me know if/how I can provide logs.

Otherwise, thank you for this lovely module.

Regards,

sub
[Xposed Framework Modules] thomashofmann:
Please try version 1.4.0 experimental for Gingerbread support and report back here.
[Xposed Framework Modules] thomashofmann:
Version 1.4.0 experimental is out

It includes support for API Level back to 4 and a restructured settings UI.
[Xposed Framework Modules] dreccon:
It won't install on 4.0.3.

Downloaded straight from the repository but Android installer says "There is a problem parsing the package".

Also tried from Xposed installer and it says " Not a valid APK (or incompatible) ".
[Xposed Framework Modules] thomashofmann:
That is strange. It installs on my devices. I also installed on a gingerbread emulator and it is running fine. Let's see what others might report.
[Xposed Framework Modules] HorstiG:
Works great on S5 G900F KK 4.4 AllianceROM.

HGT - Galaxy S3 - S5 - Tesla TTL7 - AllianceROM
[Xposed Framework Modules] w0rinal:
Installation of 1.4.0 is working fine for me on SlimKat 4.4.4

Sent from my Boeffla powered Slim GT-I9300
[Xposed Framework Modules] Droidphilev:
Same for me with 1.3.7. Connection with PC is broken. With the module enabled my pc sees my phone as a new device and cannot find a driver. Without module everything is fine. Does 1.4.0 change anything in this directions Thomas?
[Xposed Framework Modules] thomashofmann:
No it only tries to work on older ROMs. MTP support will be next.
[Xposed Framework Modules] kotey:
ASUS Zenfone 5 (4.3)

Broke MTP/PTP, and also ADB randomly.

I was working over ADB and deleted some files which might trigger mediascanner, then suddenly ADB disconnected and can no longer connect.

TBH, its quite a disaster. Caused me headache for two hours replacing cables, reinstalling drivers, rebooting pc and phone more than I can count. Solved by disabling xposed and then re-enable modules one by one until confirmed that this module is the cause :(

MTP for sure is broken. ADB might work or not, randomly.

I can't figure what to log, and what to expect in the logs, so if some logs are needed, please tell.

P/S: I'm on 1.3.7. Older versions didn't work at all, neither on my other phone, SGS2 (4.1.2)

----------------------------

Edit:

Sorry, I overlooked this post. Looks like its been mentioned before. My bad.
[Xposed Framework Modules] Droidphilev:
Hi,

Congrats Thomas, you made it to the frontpage (which is most deserved of course)!

http://www.xda-developers.com/5-tweaks-for-a-less-annoying-android/
[Xposed Framework Modules] thomashofmann:
Well, I can hardly image how the module would break adb. Anyway, I would need a complete logcat. Maybe you can record logcat using catlog while reproducing the problem.

We
[Xposed Framework Modules] Maximus1a:
same here. ADB and MTP stop working when your module is active.

i´m on KK 4.4.2
[Xposed Framework Modules] gargeya_369:
MTP is broken on Oneplus One whem this module is enabled..:(

After disabling the module in Xposed, MTP is back again....
[Xposed Framework Modules] thomashofmann:
I for myself never use MTP. I would be interested to know what everyone is using it for.
[Xposed Framework Modules] subworx:
For everything you most probably do with adb push/pull instead :)

Pushing/pulling more than one file at once is quite a pain, most "comfortable" way would be to zip the files on pc and unzip on phone, or tar on phone and untar on pc, especially if it's something big as Titanium Backup's backup folder.

Or you can simply open a new file browser, select everything, drag&drop and that's it.
[Xposed Framework Modules] Haldi4803:
Sony phones don't have USB mode anymore :( so when you connect the USB cable it is MTP mode or nothing to transfer files.

P.S Also broken on Sony Z2 with 4.4.4 .167 firmware
[Xposed Framework Modules] thomashofmann:
I use networking if I need to transfer files which is not very often.
[Xposed Framework Modules] Primokorn:
Dev with Eclipse and several adb commands.