Media scanning feature is broken in Android 4.4 Kitkat. Someone found out how to fix the bug. Link inside.

1,144 views
Skip to first unread message

supernoob

unread,
Dec 3, 2013, 5:43:52 PM12/3/13
to tas...@googlegroups.com

Pent

unread,
Dec 4, 2013, 2:16:48 AM12/4/13
to tas...@googlegroups.com
Wish they'd just add a permission instead of removing stuff all the time.

It's only the scan of the whole card that will not work anymore.

There is no 'fix' to apply.

The only workaround is for Tasker to recursively scan the whole card and
submit everything it finds for scanning, but that won't pick up deleted files.

Will consider whether to just remove the 'whole card' option for KitKat+
or add the half-workaroun.

Pent

RudeboyX

unread,
Dec 4, 2013, 5:12:44 AM12/4/13
to tas...@googlegroups.com
Apparently system apps can still issue the rescan media card in kitkat, so you could try converting Tasker to a system app (If you'r rooted)

RBX

Robert Gates

unread,
Feb 7, 2014, 7:31:35 AM2/7/14
to tas...@googlegroups.com
Was looking around as to why I couldn't get this to work and came across trickster mods media scan function still working. It's detecting deleted files, moved files, everything seems to work like it should. Not sure if that info can help in any way, just thought I'd share.

Pent

unread,
Feb 7, 2014, 8:22:22 AM2/7/14
to tas...@googlegroups.com
I've made another attempt in the next update, let's wait and see.

Pent

Zsolt Müller

unread,
May 11, 2014, 6:45:59 PM5/11/14
to tas...@googlegroups.com
I've tried the Media / Scan Card action both by leaving the "File" parameter empty, putting "/" in there or putting "/storage/emulated/0" in there ... neither seemed to work.

However from an ADB shell the following worked:
am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///storage/emulated/0

So next I tried the Script / Run Shell action and used this as the "command" parameter:
/system/bin/am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///storage/emulated/0

Still didn't work, but the logcat error message pointed me in the right direction:
W/ActivityManager(  488): Permission Denial: broadcast asks to run as user -1 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS

I've enabled the "Use Root" checkbox and it worked! Finally I've an action that rescans the sdcard (I mean the /sdcard directory ... since it's not a real SD card on my GNex)!

Zsolt Müller

unread,
May 11, 2014, 6:53:44 PM5/11/14
to tas...@googlegroups.com
The "am" command can be even more specific ...
/system/bin/am broadcast -a android.intent.action.MEDIA_MOUNTED -n com.android.providers.media/.MediaScannerReceiver -d file:///storage/emulated/0

Pent

unread,
May 12, 2014, 2:49:22 AM5/12/14
to tas...@googlegroups.com
What it scans depends on what Android reports as 'the external storage' dir.

Pent
Reply all
Reply to author
Forward
0 new messages