yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] Dovidhalevi:
"Media Transfer Protocal" ?? I have a cmtp driver for bluetooth on my Debian box (but no bluetooth) and a snd-mtpav driver but says "no such device." This one probably should connect to the audio media.

So just use adb or the KDE file manager. Will show a nasty error message when trying to connect to the phone but works anyway.
[Xposed Framework Modules] kotey:
This is one tough assignment, breaking things when you know it will :p

Also, it caused fail to reboot, twice, I don't know if it's electronics/voltage/software related but my heart stopped for several minutes when my phone plays dead.

Will do though, if time permits, no laptop now, I'm outstation (and have the nerves). I'll post if I do.

Btw, I'm thinking that the 'adb too' disease might get cured if mtp issue is resolved, methinks (wired issue, posted below).

Guess I'm not alone in both MTP/ADB issue.

Btw, ADB over wifi still works, which means wired connection alone are broken, which affected adb, mtp, ptp...

As for me, I use mtp rarely, only for some files which adb failed to copy at random, happened sometimes (no illegal filenames, no corruptions, just fail, about 5% of time) Never once used ptp.

In this module case, 'safely disconnect' will do nothing when mtp is broken (pc detected device but mtp failed to connect) so I have to force unplug, which I'm not very comfortable doing often (caused fail to boot when powered off, twice during the testings). I'd say not mtp or adb but rather related to wired connection somehow.
[Xposed Framework Modules] thomashofmann:
I don't think that the module breaks mtp or adb in general. I only know that mtp might not show all files (depending on ROM) caused by the media not having all files indexed. In case mtp and adb and the connection to the phone itself is really broken because of xmso this is completely new to me. I would need logcat logs for such a case.
[Xposed Framework Modules] Haldi4803:
It does not connect to the PC at all. i can see my Sony Xperia Z2 in the device Manager, but it shows a Code 10 error and cannot connect..

Using sony stock 4.4.4 and Media scanner 1.3.7

Hope this logcat helps.
[Xposed Framework Modules] thomashofmann:
When you disable the module it works again?
[Xposed Framework Modules] Droidphilev:
For me MTP (pc connection) works again, when module is disabled. I use it allot to transfer large files to/from my devices.
[Xposed Framework Modules] thomashofmann:
Thanks for the log. Unfortunately, I wasn't able to find an error message :(

I have two questions now:

1) You say it does not connect at all. Does it connect once the XMSO module is deactivated?

2) When I plugin my phone (with XMSO) enabled I can browse the phone and SD card storage. A notification is shown telling me that media transfer mode is enabled. When I select it a settings activity opens where I can switch between PTP and MTP. Now, do you also have this notification when XMSO is enabled / disabled and the phone is connected?
[Xposed Framework Modules] The_Steph:
thomashofmann,

Until version 1.3.0, everything was fine on the MTP/ADB side. Any other version afterwards broke them in a way or another.

It took me a lot of time to understand that deactivating the module solved my issue. I think it is not related to the file scan as installing version 1.3 makes everything work fine. I'll try to provide a log file soon.

I personally use MTP to transfer large files (movies or tv shows episodes mainly) on my phone to watch them in the underground as it is twice faster on with my phone than when using ADB.
[Xposed Framework Modules] update-addicted:
Unable to mount storage on pc

HeyHey

At first let me say thanks for this nice X-mod! :cool:

I realy like it, but i have encountered an problem...

With XMSO v1.3 enabled, i´m unable to mount the device storage on my pc! Nighter internal, nor externel SD :(

Tried MTP, PTP and MS - on Windows 7 (ErrorCode=10), Ubuntu 14.04 and Kali-Linux 1.0.9a :silly:

But ADB is still working...

After disabling the module and an reboot, everything works fine.

Thank´s in advance for fixing it! :laugh:

SPECS:

Device = Samsung Galaxy S3 NEO (GT-I9301I)

ROM = CM11 (4.4.4)

Kernel = 3.4.0-cyanogenmod-[...]

GApps = PA_Stock

XPosed (app_process) = 58

Xposed (Bridge.jar) = 54

Module-Version = 1.3.7
[Xposed Framework Modules] daniu:
Hi,

really took some effort to find out but after 10 pages in this thread (the first couple of pages discussed that the apk was not available right after the module was launched - how interesting now ... why can't people just wait?) I gave up (I guess I don't need to mention all the time that I think this kind of discussion with all topics mixed in one thread is quite confusing - but I still keep mentioning :D):

This module seems really great but in my opinion 2 things are not really clear:

-do I need to put .scanMedia AND .scanPictures etc. or would .scanPictures be enough? I assume that the settings done with the files apply to all directories plus subdirectories unless the sub-directory has its own file?

-what means top level directory? right below root or one level down - top in sdcardx?

At the moment I put:

.scanMedia in sdcard0 and sdcard1 - is that were they are supposed to be or do I not need them there at all?

.scanPictures in a subdirectory of sdcardx called DCIM

.scanMusic in a subdirectory of sdcardy called Music

unfortunately nothing gets scanned ... (Pre-scan, Scan, Post-Scan all 0 and no files in galery or music player) I ticked "Directories" and "Media Types"

Would be great to get this module working!
[Xposed Framework Modules] Portgas D. Ace:
Put the .scanMedia files in those directories, which you want to have scanned. In your case, put a .scanMedia file and a .scanPictures file into DCIM and a .scanMedia file and a .scanMusic file into Music. This worked for me.

Regarding "top folder": I assume, a folder, which contains one or more subfolders is called "top folder". For example, if you have a folder for different media files, e.g. MyMedia, which includes several subfolders like MyMusic, MyPictures, MyVideos, then the MyMedia folder is the top folder and you should put the .scanMedia file there. The scanner will now recognize this folder (and all subfolders including a corresponding .scanXY file) to be scanned. All other folders need to include the corresponding .scanXY file that you want to have scanned (e.g. .scanMusic file in MyMusic). If this does not work, you might also include a .scanMedia file in each subfolder (MyMusic, MyPictures, MyVideos) and give this a try.

Hope this makes some things more clear.
[Xposed Framework Modules] SeriousGeorge:
Should version 1.4.0 work with 4.0.4? I get the incompatible message from xposed or there is a problem parsing the package if I try manually installing the apk.
[Xposed Framework Modules] thomashofmann:
Yes it should. I saw one other user having a problem installing. I did not get much feedback about installation on older ROMs so maybe someone else reading this can step up an post a reply?
[Xposed Framework Modules] itandy:
[MENTION=3542212]thomashofmann[/MENTION], any luck on resolving issue with Xperia phones? I previously posted my issues that many folders are not scanned by media scanner and you said it might be an isolated case for Xperia devices.
[Xposed Framework Modules] Product F(RED):
With this enabled on my Note 3, volume buttons can't work as media keys with the screen on, and neither do my Bose headset controls. I have WanamXposed and Gravity Box both set to enable it, but once this module is active, media controls don't work. Any reason why this is happening?
[Xposed Framework Modules] daniu:
Hi

Thanks for this.

That means if I want to use the special folder files I still always need a .scanMedia file? In my opinion that should be somewhere in the description and is not clear there atm. At the same time I wonder: does it need to be like that? Would not 1 file be enough? Is there any benefit concerning the programming?

The other point was a mistake: wanted to ask about "top level folders" since it is quite important to know what that means if you want to check "performance"

BTW: maybe its only me but I am always confused when there are checkboxes plus descriptions that are changed by checking the checkbox in settings: I always wonder: is the current description what I have or what I get ... here it seems like what I have but ... what's the use of the checkbox why not just have the user click the text?

Regards
[Xposed Framework Modules] daniu:
Hi,

well - nowhere in the quoted text is any hint that you need both a .scanMedia file PLUS a .scanPictures file. At least I would assume that a .scanPictures file might be enough. BTW: it might be a good idea to add the hint here that it is important to take care of upper/lower case. I guess the more people use the module the more people will also make mistakes here and definitely ask in the forum :p

I guess that Thomas Hofmann can also explain whether top level folders means something like:

/sdcard - that would mean: top level under root or

/sdcard/DCIM - which would mean: top level under sdcard - which makes more sense since - what I found out later - the module only applies to "external memory" (that means internal or external SDcards) anyways.

Besides that details: I really love that module - if you reboot often this saves more battery than many battery saving apps ...

regards
[Xposed Framework Modules] thomashofmann:
.scanMedia is related to the Directories preferences. It is used to mark directories to scan when the scanner should be restricted to certain directories only.

.scanPictures on the other hand is related to restricting to certain media types. These are orthogonal options.

As I found out case is not relevant because the file system is not case sensitive.

Yes, the second is correct. Top level meaning DCIM for example.
[Xposed Framework Modules] ripp2003:
Hi, on my Xperia M2, when your module is activated, mtp doesn't work anymore..... my phone is detected by computer but driver failed to start (code 10).
[Xposed Framework Modules] w0rinal:
I'm experiencing two things which appear strange to me:

First, even if "prevent repetitive scans" is checked, there are two notifications saying external media was scanned.

Second, when "service importance" is checked, the result notification shows the scans took about 6 times as long as when unchecked (30 seconds when unchecked and 3 minutes when checked)

Three minutes is completely acceptable for me, just wanted to inform you.

If you want I can provide logs.

Sent from my Boeffla powered Slim GT-I9300
[Xposed Framework Modules] manos78:
Me too! I'm using Android 4.4 KitKat with MTK6589, and when I enable this module then MPT and PTP don't work. :(
[Xposed Framework Modules] TassMetal:
Hi, thanks for the module :)

I'm having some trouble with it, after reading and testing a lot, I think is related to the module itself more than me :angel:

I'm on a LG G2 with a stock 4.4.2.

I mark the options to scan only folders with .scanMedia and just media with the .scanMusic, etc files.

Then I have this folder structure.

Level 1: .................................................................SD

Level 2 (in SD): ............................................Folder1

Level 3 (in SD/Folder1): Folder 2 Folder 3 Folder 4​

Folder 1 has no media, folder2 music, folder3 video, folder4 pictures.

I put .scanMedia in folder1 and everything is scanned even when there are no scanMusic, Video or Pictures files in folders 2, 3 and 4.

The only way to stop them folders2,3,4 from been scanned is puting .noMedia file.

I'm not sure if the module is not working or if the normal scan is enable at the same time that the module so it scans the files even when the module doesn't.

Any help please? Thanks :)
[Xposed Framework Modules] thomashofmann:
What are you trying to achieve? Sounds correct to me. With .scanMedia you tell to scan folder1 and below. You can use .scanPictures in folder4 and only pictures from there will bei scanned. Again, .scanMedia tells the scanner that IT should include the directory and the other files are used to restrict to certain media types.

There are two decisions being made:

1. Scan or don't Scan a directory tree.

2. Scan a file based on its Media Type.
[Xposed Framework Modules] TassMetal:
That's the idea, but when I put .scanPictures in folder 4, and nothing in folders 2 and 3, folders 2 and 3 are also scanned and any media added and any media on folder 4 (not only pics) is added too.

I think the correct behaviour should be, just pictures in folder 4 are added and any media in folders 1, 2 and 3 should not be added as mediafile as not been specified.
[Xposed Framework Modules] Obsesseivecustomizer:
Galaxy Nexus running AOKP 4.0.4, unable to install v1.40. Package installer reports parsing error.
[Xposed Framework Modules] shawek:
It looks like its working on Htc m7 5.0.2 lollipop sense 6
[Xposed Framework Modules] Beakhole:
Suggestion

I'd like to make a suggestion for a future update:

Put two widgets in there-- One for Triggering the Media Scanner manually and one for Deleting Media Store Contents.

What do you think?
[Xposed Framework Modules] mithundperfect:
By mustache I tap on delete media store contents, and now nothing is showing in my gallery, music and video. Triggering media scanner is also not working. I've tried reinstalling the middle too. What should I do? I'm using Samsung Galaxy Note II, dn4 rom.
[Xposed Framework Modules] palmuse:
Is it reasonable to ask for the ability to delay the scan for a set period of time after a reboot or start up?

I have an app the creates links from folders on the external card to the internal. These do not get scanned properly because the media scanner runs before the links are set up. I suppose a delay in the scan might fix this issue. Doing a manual rescan does.
[Xposed Framework Modules] yogesh324:
[MENTION=3542212]thomashofmann[/MENTION] hello as u know a alpha 2 version of xposed framework is released now for lollipo so can u pls update it to support lollipop cm12 as it causes media.process to fc
[Xposed Framework Modules] Portgas D. Ace:
As you have stated above, Xposed is currently in an early alpha phase, so there will be many changes in the future (especially with Android 5.1 arriving). So it would be quite work intensive to adjust this module for Android 5.0+. The update will come when [MENTION=3542212]thomashofmann[/MENTION] has fixed all bugs (if he is willing to continue), so please be patient and don't ask for an ETA.
[Xposed Framework Modules] yogesh324:
hi i m not asking for a eta i was posting a request to make this module compatible with lollipop anyway thank u
[Xposed Framework Modules] intika:
Hello

Thanks a lot for your module it's useful :)

Question : is it possible to provide the sources code ?

Suggestion : you should add an option to enable/disable scanning /system/media/ for the moment it does not seems to be scanned...

Thanks
[Xposed Framework Modules] tangcla:
Will it be possible in a future version, to schedule scans on a time basis, rather than on boot each time? e.g. schedule it to run at 1am every day and not on each reboot.
[Xposed Framework Modules] w0rinal:
If there is a specific intent to run the media scanner this could be done with Tasker

OP seems busy lately

[size=-4]Sent from my Boeffla powered Slim (4.4.4) GT-I9300[/size]
[Xposed Framework Modules] beautifulsun:
I have problems with continously crashing media scanner on CM12 (5.0.2). This module can fix it?
[Xposed Framework Modules] daniu:
Hi

I would not expect that ... hut why don't you just try? If your problem comes from media scannner trying to scan some location it cannot reach than this module might help.

Regards
[Xposed Framework Modules] Portgas D. Ace:
Tasker plugin would be awesome. Imagine a profile to scan a folder (e.g. music folder) right after you have copied some stuff in there, for example a new music album. Or run a daily scan only if you have new/changed files in the target folders.
[Xposed Framework Modules] gunde2014:
I've noticed on Note 3 the module only works if I do a soft boot.

Samsung Galaxy Note 3

Kitkat version 4.4.2

Xposed version 2.7

The current module version i'm using is the experimental 1/9/15 update.
[Xposed Framework Modules] eriklion:
MTP fails to work when this module is enabled.

I've got no logs because no errors occur.

The only information i have is that Windows reports it cant communicate with the device after drivers are installed. (something to do with MediaScanner/Media Storage (On CM11 nightlies)

I've verified by reverting to stock to check MTP, worked. Works in TWRP, too. Works on CM11 nightlies when the module is disabled.. so I've determined that its not my USB port/cables/whatever.

Any help is appreciated. :3

Found to be a known issue. Please disregard.

Sent from my Motorola Photon Q (XT897) on the XDA-Developers app
[Xposed Framework Modules] Portgas D. Ace:
It's a known issue, but up to now there is no other fix than to temporarily disable this module if you need MTP.
[Xposed Framework Modules] eriklion:
Thanks, Sorry, I must have glossed over that when reading the OP.
[Xposed Framework Modules] Portgas D. Ace:
It's not stated in the OP but has been reported several times in this thread.
[Xposed Framework Modules] thomashofmann:
Hi that is absolutely true. Unfortunately, I am very busy with private life right now. Nevertheless let me tell you that Tasker can already be used to trigger the scan. Setup Tasker to send an Intent with the following values:

Action: android.intent.action.MEDIA_SCANNER_SCAN_FILE

Data: file://com.thomashofmann.xposed.mediascanneroptimizer.SCAN_EXTERNAL

Extra: com.thomashofmann.xposed.mediascanneroptimizer.SCAN_EXTERNAL:true

Data could in fact be any value. This might change over time but will work currently. Try it!
[Xposed Framework Modules] Portgas D. Ace:
Works great :) :good: Thank you for this hint. It seems that I should try to learn more about sending intents with Tasker.
[Xposed Framework Modules] w0rinal:
Take your time,

IMHO no job should be more important than private life :thumbup:

Will try this later, thank you, sir

[size=-4]Sent from my Boeffla powered Slim (4.4.4) GT-I9300[/size]
[Xposed Framework Modules] yogesh324:
[MENTION=3542212]thomashofmann[/MENTION] hi i would like to request u to pls enable a temporary universal module disable feature so that we can connect to mtp........ as and when u get time

Thank u
[Xposed Framework Modules] J3:16:
This module prevents MTP connections with the computer. I have to disable it and reboot to be able to mount MTP.
[Xposed Framework Modules] tangcla:
What phone? Works fine on my Galaxy S5.
[Xposed Framework Modules] J3:16:
Nexus 5 OmniROM 4.4.4
[Xposed Framework Modules] tapa_t:
If you are root, just run a smb server on your nexus and do a pretend MSC mode.

Faster than a MTP connection.
[Xposed Framework Modules] imzjustplayin:
I'm using an Amaze 4G stock rom, Ice Cream Sandwich and the only version that doesn't give me a parsing error is version 1.0.... Is there a chance that the future version will work??? I don't think any of the versions work on this phone, even 1.0...
[Xposed Framework Modules] J3:16:
This doesn't fix the issue of this module
[Xposed Framework Modules] shaktishekhar:
Am getting again and again log entry

In every media scan and thats annoying

Please remove dis why its coming in the log

Lines are

Reloaded preferences: {pref_run_media_scanner_as_foreground_service_state=true, pref_log_to_xposed_log_state=false, pref_log_to_xposed_log_verbose_state=false, pref_run_automatically_state=true, pref_restrict_to_certain_media_types_state=false, pref_prevent_repetitive_scans_state=true, pref_log_to_xposed_log_debug_state=false, pref_restrict_directories_to_scan_scan_two_levels_deep_state=false, pref_restrict_directories_to_scan_state=true, pref_hide_donation_actions_state=true, pref_show_results_state=false, pref_logging_enabled_state=false, pref_run_media_scanner_with_background_thread_priority_state=true}

Reloaded preferences: {pref_run_media_scanner_as_foreground_service_state=true, pref_log_to_xposed_log_state=false, pref_log_to_xposed_log_verbose_state=false, pref_run_automatically_state=true, pref_restrict_to_certain_media_types_state=false, pref_prevent_repetitive_scans_state=true, pref_log_to_xposed_log_debug_state=false, pref_restrict_directories_to_scan_scan_two_levels_deep_state=false, pref_restrict_directories_to_scan_state=true, pref_hide_donation_actions_state=true, pref_show_results_state=false, pref_logging_enabled_state=false, pref_run_media_scanner_with_background_thread_priority_state=true}
[Xposed Framework Modules] tapa_t:
Yeah, it does better.

If you don't ever need MTP, there is no reason lack of MTP support is an issue.
[Xposed Framework Modules] J3:16:
If I uninstall it there's no issue as well, but still, the issue remains
[Xposed Framework Modules] yogesh324:
[MENTION=3542212]thomashofmann[/MENTION] hi i think i found the issue for mtp not working in xposed logs when the device is connected to pc in previous version i.e. 1.3 there was no mention for mtp receiver but in latest 1.4 version there r 2 extra lines about mtp reciever 1 indicating that xmso is reciveing a brodcast and returning as null

here is the part of the lod directly related to the issue

05-16 12:40:28.340 I/Xposed (26290): XMSO: Executing hook MtpReceiver#onReceive called with values android.app.ReceiverRestrictedContext@11e00391,Intent { act=android.hardware.usb.action.USB_STATE flg=0x20000010 cmp=com.android.providers.media/.MtpReceiver (has extras) }

05-16 12:40:28.340 I/Xposed (26290): XMSO: MtpReceiver onReceive called.

05-16 12:40:28.340 I/Xposed (26290): XMSO: MtpReceiver#onReceive returns with null

on previous versions these lines r not present

edit: also i tested all the versions from 1.3.0 to 1.4 these lines started appearing after 1.3.6 and mtp stopped working
[Xposed Framework Modules] xuefer:
MTP issue is not just MTP issue, it delay adb & mass_storage from being available/accessible for about 10~20 seconds
[Xposed Framework Modules] RadarNyan:
Can this module provide a similar effect as CM's ".noscanandnomtp"? I'm asking because I can't test this module myself (I'm on AOSP 5.1.1 which doesn't seem compatible yet from the posts I read in this thread)

The main difference between Android's default ".nomedia" and CM's ".noscanandnomtp" is that ".nomedia" still scans that directory (so it would present when connect the device to PC via MTP) but consider everything in that directory "not a media" (so nothing shows up in gallery) while ".noscanandnomtp" makes the directory being skipped completely (so it speeds up the media scanning process a lot - but there's no way to access the directory via MTP)

A while back I was still on CM11, I used to put a ".noscanandnomtp" in all kinds of directories that contain many small files (usually app cache) like /sdcard/Android - I don't need to access them via MTP (in fact I don't use MTP at all) and by doing this I saved a lot battery and my phone won't heat up on reboot anymore. This CM feature is a lifesaver for me.

So, is this module gonna make ".nomedia" work the same as CM's ".noscanandnomtp"? If not, I would really wish to have it. A whitelist method(.scanMedia) may work for some situations, but a blacklist method sure will do some great work as well - considering how many apps create their own folder under /sdcard.
[Xposed Framework Modules] IaKnightHawke:
Reporting my results, on Vzw Lg G3. Running Skydragon Lollipop rom and SD Kernel 4.1. Mod did not work. It shows zeros for running time and files processed(?). Other then Xposed mod I am running LSpeed ver 2.2. Gary
[Xposed Framework Modules] xn0live:
its work but if i make foto from camera fx and look it in the gallery if do not cone there

why?
[Xposed Framework Modules] tqk2811:
error

i have problem with MTP too
[Xposed Framework Modules] Pilot35i:
Hi, since i have installed the APP, my Phone needs a long time (up to 30sec) to activate the Display/Lockscreen by pressing the Powerbutton. Display off -> powerbutton -> large waittime -> display goes on and i can unlock the phone.

Help :)
[Xposed Framework Modules] cybernetus:
This is a known bug