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)!