Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have transferred some mp3s onto my sdcard using samba but the operating system doesn't seem to automatically detect them as it would if you copied it using MTP or whatever. How can I force it to detect them?

share|improve this question
1  
do they show up after a reboot? If so you probably just need to get the media scanner to run. See the answer to this question: android.stackexchange.com/questions/9449/… –  FoamyGuy Jul 21 '12 at 18:06

1 Answer 1

Run the following shell script on the command line, either via SSH or adb.

#!/system/bin/sh<br/>

export ANDROID_ASSETS=/system/app
export ANDROID_CACHE=/cache
export ANDROID_DATA=/data
export ASEC_MOUNTPOINT=/mnt/asec
export ANDROID_ROOT=/system
export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar
export EXTERNAL_STORAGE=/mnt/sdcard
export LD_LIBRARY_PATH=/vendor/lib:/system/lib

am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard

Source: Can I trigger a media scan via the the command line?

Alternatively if you prefer a UI I find Force Media Scan ideal. You do not have to reboot your device for these.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.