[Xposed Framework Modules] psaico:
Hi,

this module does not work for me ... I have limited the scanner to a single directory, but at the startup the media scanner process is interrupted.

This is my log at startup:

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

24/nov/2014 14:25:09 UTC

Loading Xposed v54 (for Zygote)...

Running ROM 'KTU84Q' with fingerprint 'oneplus/bacon/A0001:4.4.4/KTU84Q/XNPH44S:user/release-keys'

Loading modules from /data/app/com.oasisfeng.greenify-1.apk

Loading class com.oasisfeng.greenify.pro.FrameworkPatch

Loading class com.oasisfeng.greenify.pro.SettingsPatch

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

Loading class com.thomashofmann.xposed.mediascanneroptimizer.MsoXposedMod

Loaded preferences for com.thomashofmann.xposed.mediascanneroptimizer: {pref_run_media_scanner_as_foreground_service_state=true, pref_prevent_repetetive_scans_state=true, pref_restrict_directories_to_scan_state=true, pref_log_to_xposed_log_state=true, pref_show_results_state=true, pref_logging_enabled_state=true, pref_restrict_to_certain_media_types_state=true, pref_run_media_scanner_with_background_thread_priority_state=true}

init Logger with tag XMSO

XMSO: Going to hook application com.android.providers.media in PID 2.403

XMSO: appInfo in LoadPackageParam is null.

XMSO: Hooking com.android.providers.media.MediaScannerReceiver#onReceive

XMSO: Hooking com.android.providers.media.MediaScannerService#onStartCommand

XMSO: Hooking com.android.providers.media.MediaScannerService#scan

XMSO: Hooking com.android.providers.media.MediaScannerService#scanFile

XMSO: Cannot find method scanFile will now try to hook scanFileOrDirectory.

XMSO: Hooking android.app.Service#stopSelf

XMSO: Hooking android.media.MediaScanner#isNoMediaFile

XMSO: Hooking android.media.MediaScanner#scanMtpFile

XMSO: Hooking android.media.MediaScanner#scanSingleFile

XMSO: Hooking android.media.MediaScanner#scanDirectories

XMSO: Hooking android.media.MediaScanner#prescan

XMSO: Hooking android.media.MediaScanner#processDirectory

XMSO: Hooking android.media.MediaScanner#postscan

XMSO: onReceive is called in MediaScannerReceiver

XMSO: Intent Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.providers.media/.MediaScannerReceiver (has extras) } received.

XMSO: Extras are Bundle[mParcelledData.dataSize=84]

Reloaded preferences: {pref_run_media_scanner_as_foreground_service_state=true, pref_prevent_repetetive_scans_state=true, pref_restrict_directories_to_scan_state=true, pref_log_to_xposed_log_state=true, pref_show_results_state=true, pref_logging_enabled_state=true, pref_restrict_to_certain_media_types_state=true, pref_run_media_scanner_with_background_thread_priority_state=true}

XMSO: onStartCommand is called with Intent Intent { cmp=com.android.providers.media/.MediaScannerService (has extras) }, startId 1, filepath null, mimetype null and volume internal on com.android.providers.media.MediaScannerService@41b0c750

XMSO: Number of start commands for external volume is 0

XMSO: Number of successful runs for external volume is 0

XMSO: onStartCommand is called with Intent Intent { cmp=com.android.providers.media/.MediaScannerService (has extras) }, startId 2, filepath null, mimetype null and volume external on com.android.providers.media.MediaScannerService@41b0c750

XMSO: Number of start commands for external volume is 1

XMSO: Number of successful runs for external volume is 0

XMSO: scan is called for directories [/system/media] on volume internal

XMSO: Set service to foreground

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume internal, subText null

XMSO: The following directories will be scanned by MediaScanner: [/system/media]

XMSO: Changing thread priority in MediaScanner constructor

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Scanning /system/media, subText null

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

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

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

XMSO: stopSelf is called on MediaScannerService

XMSO: scan is called for directories [/storage/emulated/0, /storage/usbdisk] on volume external

XMSO: Set service to foreground

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume external, subText null

XMSO: Searching directories to scan in /storage/emulated/0

XMSO: Going to hook application com.android.providers.media in PID 3.512

XMSO: appInfo in LoadPackageParam is null.

XMSO: Hooking com.android.providers.media.MediaScannerReceiver#onReceive

XMSO: Hooking com.android.providers.media.MediaScannerService#onStartCommand

XMSO: Hooking com.android.providers.media.MediaScannerService#scan

XMSO: Hooking com.android.providers.media.MediaScannerService#scanFile

XMSO: Cannot find method scanFile will now try to hook scanFileOrDirectory.

XMSO: Hooking android.app.Service#stopSelf

XMSO: Hooking android.media.MediaScanner#isNoMediaFile

XMSO: Hooking android.media.MediaScanner#scanMtpFile

XMSO: Hooking android.media.MediaScanner#scanSingleFile

XMSO: Hooking android.media.MediaScanner#scanDirectories

XMSO: Hooking android.media.MediaScanner#prescan

XMSO: Hooking android.media.MediaScanner#processDirectory

XMSO: Hooking android.media.MediaScanner#postscan

XMSO: onStartCommand is called with Intent Intent { cmp=com.android.providers.media/.MediaScannerService (has extras) }, startId 2, filepath null, mimetype null and volume external on com.android.providers.media.MediaScannerService@41a385d0

XMSO: Number of start commands for external volume is 1

XMSO: Number of successful runs for external volume is 0

XMSO: scan is called for directories [/storage/emulated/0, /storage/usbdisk] on volume external

XMSO: Set service to foreground

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume external, subText null

XMSO: Searching directories to scan in /storage/emulated/0

XMSO: Going to hook application com.android.providers.media in PID 3.787

XMSO: appInfo in LoadPackageParam is null.

XMSO: Hooking com.android.providers.media.MediaScannerReceiver#onReceive

XMSO: Hooking com.android.providers.media.MediaScannerService#onStartCommand

XMSO: Hooking com.android.providers.media.MediaScannerService#scan

XMSO: Hooking com.android.providers.media.MediaScannerService#scanFile

XMSO: Cannot find method scanFile will now try to hook scanFileOrDirectory.

XMSO: Hooking android.app.Service#stopSelf

XMSO: Hooking android.media.MediaScanner#isNoMediaFile

XMSO: Hooking android.media.MediaScanner#scanMtpFile

XMSO: Hooking android.media.MediaScanner#scanSingleFile

XMSO: Hooking android.media.MediaScanner#scanDirectories

XMSO: Hooking android.media.MediaScanner#prescan

XMSO: Hooking android.media.MediaScanner#processDirectory

XMSO: Hooking android.media.MediaScanner#postscan

XMSO: Going to hook application com.android.providers.media in PID 5.060

XMSO: appInfo in LoadPackageParam is null.

XMSO: Hooking com.android.providers.media.MediaScannerReceiver#onReceive

XMSO: Hooking com.android.providers.media.MediaScannerService#onStartCommand

XMSO: Hooking com.android.providers.media.MediaScannerService#scan

XMSO: Hooking com.android.providers.media.MediaScannerService#scanFile

XMSO: Cannot find method scanFile will now try to hook scanFileOrDirectory.

XMSO: Hooking android.app.Service#stopSelf

XMSO: Hooking android.media.MediaScanner#isNoMediaFile

XMSO: Hooking android.media.MediaScanner#scanMtpFile

XMSO: Hooking android.media.MediaScanner#scanSingleFile

XMSO: Hooking android.media.MediaScanner#scanDirectories

XMSO: Hooking android.media.MediaScanner#prescan

XMSO: Hooking android.media.MediaScanner#processDirectory

XMSO: Hooking android.media.MediaScanner#postscan

XMSO: onReceive is called in MediaScannerReceiver

XMSO: Intent Intent { act=android.intent.action.MEDIA_SCANNER_SCAN_FILE dat=file://com.thomashofmann.xposed.mediascanneroptimizer.SCAN_EXTERNAL flg=0x10 cmp=com.android.providers.media/.MediaScannerReceiver (has extras) } received.

XMSO: Extras are Bundle[mParcelledData.dataSize=140]

Reloaded preferences: {pref_run_media_scanner_as_foreground_service_state=true, pref_prevent_repetetive_scans_state=true, pref_restrict_directories_to_scan_state=true, pref_log_to_xposed_log_state=true, pref_show_results_state=true, pref_logging_enabled_state=true, pref_restrict_to_certain_media_types_state=true, pref_run_media_scanner_with_background_thread_priority_state=true}

XMSO: Request to rescan external volume.

XMSO: onStartCommand is called with Intent Intent { cmp=com.android.providers.media/.MediaScannerService (has extras) }, startId 1, filepath null, mimetype null and volume external on com.android.providers.media.MediaScannerService@41bbf888

XMSO: Number of start commands for external volume is 1

XMSO: Number of successful runs for external volume is 0

XMSO: scan is called for directories [/storage/emulated/0, /storage/usbdisk] on volume external

XMSO: Set service to foreground

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume external, subText null

XMSO: Searching directories to scan in /storage/emulated/0

XMSO: Going to hook application com.android.providers.media in PID 5.749

XMSO: appInfo in LoadPackageParam is null.

XMSO: Hooking com.android.providers.media.MediaScannerReceiver#onReceive

XMSO: Hooking com.android.providers.media.MediaScannerService#onStartCommand

XMSO: Hooking com.android.providers.media.MediaScannerService#scan

XMSO: Hooking com.android.providers.media.MediaScannerService#scanFile

XMSO: Cannot find method scanFile will now try to hook scanFileOrDirectory.

XMSO: Hooking android.app.Service#stopSelf

XMSO: Hooking android.media.MediaScanner#isNoMediaFile

XMSO: Hooking android.media.MediaScanner#scanMtpFile

XMSO: Hooking android.media.MediaScanner#scanSingleFile

XMSO: Hooking android.media.MediaScanner#scanDirectories

XMSO: Hooking android.media.MediaScanner#prescan

XMSO: Hooking android.media.MediaScanner#processDirectory

XMSO: Hooking android.media.MediaScanner#postscan

XMSO: onStartCommand is called with Intent Intent { cmp=com.android.providers.media/.MediaScannerService (has extras) }, startId 1, filepath null, mimetype null and volume external on com.android.providers.media.MediaScannerService@41a41040

XMSO: Number of start commands for external volume is 1

XMSO: Number of successful runs for external volume is 0

XMSO: scan is called for directories [/storage/emulated/0, /storage/usbdisk] on volume external

XMSO: Set service to foreground

XMSO: createSimpleNotification with title Media Scanner Optimizer, text Processing volume external, subText null

XMSO: Searching directories to scan in /storage/emulated/0

XMSO: Going to hook application com.android.providers.media in PID 5.772

XMSO: appInfo in LoadPackageParam is null.

XMSO: Hooking com.android.providers.media.MediaScannerReceiver#onReceive

XMSO: Hooking com.android.providers.media.MediaScannerService#onStartCommand

XMSO: Hooking com.android.providers.media.MediaScannerService#scan

XMSO: Hooking com.android.providers.media.MediaScannerService#scanFile

XMSO: Cannot find method scanFile will now try to hook scanFileOrDirectory.

XMSO: Hooking android.app.Service#stopSelf

XMSO: Hooking android.media.MediaScanner#isNoMediaFile

XMSO: Hooking android.media.MediaScanner#scanMtpFile

XMSO: Hooking android.media.MediaScanner#scanSingleFile

XMSO: Hooking android.media.MediaScanner#scanDirectories

XMSO: Hooking android.media.MediaScanner#prescan

XMSO: Hooking android.media.MediaScanner#processDirectory

XMSO: Hooking android.media.MediaScanner#postscan

Tnx!