[Q] Your music library is empty [SOLVED]

Search This thread

cybermage1

Senior Member
Nov 19, 2010
207
19
www.humanoidapps.com
I've tried placing MP3 files on my external_sd card under a folder called "Music". For some reason the "Music" app provided by Google refuses to see any of it.

Has anyone successfully placed music on the external SD card and if so, what stupid trick am I missing to make this work?

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

Edit: Just to save everyone the trouble of scanning through a ton of debug steps in the thread below. Here's the solution I had:

Eject the SD Card. Reformat with a new name. Pop it back in. MediaScanner scanned it immediately and voila! No more problems finding media on the external card!
 
Last edited:
  • Like
Reactions: AzulmArinO

cybermage1

Senior Member
Nov 19, 2010
207
19
www.humanoidapps.com
Yes, tried that first, then installed Rescan Media and used it to trigger a rescan. No luck. It only finds media on the "internal" sdcard. I also checked from shell to make sure a .nomedia file doesn't exist. It just refuses to scan the external_sd.
 

talltimbers

New member
May 4, 2011
4
0
Music Files

Not all music players can find the external SD storage. I had the same problem initially. Finally found Power Amp which will recognize the external sd storage using its built in file selection system.
 

deedub334

Member
Aug 11, 2010
35
2
Northern Virginia
I've tried placing MP3 files on my external_sd card under a folder called "Music". For some reason the "Music" app provided by Google refuses to see any of it.

Has anyone successfully placed music on the external SD card and if so, what stupid trick am I missing to make this work?

I had the exact same issue. The other issue I had was no matter how I tried, I could only transfer music files to the internal SD space via USB connection to my PC. I had to remove the micro SD from the A500, mount it directly to the PC using a card reader, and then I transferred my music files to the card. This worked fine but what a pain, I would much rather just be able to have the PC see the external SD like I can do with my EVO.

I have the paid version of Power Amp music player, and it has settings which allow the user to choose where it looks for music files. When I installed the app on my A500, it was default set to the internal SD, but when I changed the settings to the external SD card, it saw all of the music I had transferred and the player is operating perfectly.

Hope this helps.
 

Neoprimal

Senior Member
Apr 20, 2007
452
60
Alexandria, VA
Not all music players can find the external SD storage. I had the same problem initially. Finally found Power Amp which will recognize the external sd storage using its built in file selection system.

+1

From the reading I've done, it's pretty common on both tablets and phones with large amounts of accessible built in storage. Something about deciding to make the mount point the root vs. a partition. Keep in mind, I'm not speaking in terms of mounting the filesystem here, just using mount as a layman's term for the area the Android file system is using as read/write and allowing us to read/write.

On our phones in general, the mount point and where all our apps and such install the bulk of their files is what we call the external SD card. Only some things are moved to the internal storage area which we can't see on our PC unless we run adb. This is why when you plug the phone into a PC, generally the sd card contents will pop up. In this scenario, we can't easily directly access or use any of the internal storage. Some apps will use it, but that's it. On these devices, the mount point is SDCard and is our external SD Card. This is not the optimum process because as we all know, these cards can easily become corrupt especially if we move them around a lot and it's also not the best idea to use the phone without it, but it IS required to be hotswappable so it creates an issue for some apps.

Some manuf. have changed this so that the internal storage is the mount point, and that is what will pop up. This is generally the case for phones with big storage (8GB+) and for tablets. In this case, there's a partition that android and os files sit on and the rest of the drive is called SDCard. Technically this is the same with phones, except that now we're able to see and use the rest of the internal storage space. This IS the optimum, because internal storage can't be swapped out or moved around and a failure of this drive is likely catastrophic anyway. It's the best place to put your apps.
Various ways are then found to deal with the external sd card. I think really, laziness is why some phones/tablets can't access both areas from a PC or recognize files from it within the device easily.

Some have made it so you can see both with a custom file system - Samsung, as an example and finally, some have workarounds that loop the external SD card through the internal storage like a 'link'. I believe the Asus TF does this. That's the most elegant solution since the scanner should see the external SD card as a folder within the sd card and be able to use it's contents.

In the end, I believe Android inherently scans the storage area named/mounted as SD card or whatever the main mount point is for media by default. Honeycomb I believe does the same. So if device software devs. or app devs don't write in something to explicitly state that media files may also be on the external SD then you get apps that can't find them there. Some apps will inherently have their own file scanner and should be able to find media wherever it is on there.
 

cybermage1

Senior Member
Nov 19, 2010
207
19
www.humanoidapps.com
Well here's the thing - the MediaScanner isn't scanning the external SD at ALL on my A500 no matter what.


D/MediaScannerService(13926): start scanning volume external: [/mnt/sdcard]
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): prescan time: 62ms
D/MediaScanner(13926): scan time: 235ms
D/MediaScanner(13926): postscan time: 1ms
D/MediaScanner(13926): total time: 298ms
D/MediaScannerService(13926): done scanning volume external

As you can see, it only scans the internal /mnt/sdcard and completely ignores the /mnt/external_sd directory.

Is there any way to change this behavior?
 

cybermage1

Senior Member
Nov 19, 2010
207
19
www.humanoidapps.com
Do you have a .nomedia file on the root of your external sd?

I also checked from shell to make sure a .nomedia file doesn't exist. It just refuses to scan the external_sd.

And just to clarify that I do have a clue:

$ cd /mnt/external_sd
$ ls -l -a
d---rwxr-x system sdcard_rw 2010-05-03 21:24 .Trash-1000
d--------- root root 2011-05-11 13:57 .android_secure
d---rwxr-x system sdcard_rw 2011-04-30 14:59 .dataviz
d---rwxr-x system sdcard_rw 2011-04-29 17:46 DCIM
d---rwxr-x system sdcard_rw 2010-12-23 17:09 LOST.DIR
d---rwxr-x system sdcard_rw 2011-05-10 15:11 Music
d---rwxr-x system sdcard_rw 2011-01-31 15:00 TitaniumBackup
----rwxr-x system sdcard_rw 1570023 2010-12-15 14:12 TitaniumBackup_latest.apk
d---rwxr-x system sdcard_rw 2010-12-25 14:02 backups
d---rwxr-x system sdcard_rw 2011-05-04 10:29 openvpn
d---rwxr-x system sdcard_rw 2010-12-25 10:53 pictures
d---rwxr-x system sdcard_rw 2010-05-03 21:37 videos
$

Not to mention - from the debug output it's obvious it's not even attempting to scan anything except /mnt/sdcard


D/MediaScannerService(13926): start scanning volume external: [/mnt/sdcard]
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): prescan time: 67ms
D/MediaScanner(13926): scan time: 263ms
D/MediaScanner(13926): postscan time: 12ms
D/MediaScanner(13926): total time: 342ms
D/MediaScannerService(13926): done scanning volume external
D/MediaScannerService(13926): start scanning volume external: [/mnt/sdcard]
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): prescan time: 71ms
D/MediaScanner(13926): scan time: 161ms
D/MediaScanner(13926): postscan time: 11ms
D/MediaScanner(13926): total time: 243ms
D/MediaScannerService(13926): done scanning volume external
D/MediaScannerService(13926): start scanning volume external: [/mnt/sdcard]
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): found .nomedia, skipping directory
D/MediaScanner(13926): prescan time: 100ms
D/MediaScanner(13926): scan time: 192ms
D/MediaScanner(13926): postscan time: 11ms
D/MediaScanner(13926): total time: 303ms
D/MediaScannerService(13926): done scanning volume external

Best I can figure, it's not specific to my device, but is inherent to Android only supporting ONE external storage directory.

When the apps (including MediaScannerService) run "getExternalStorageDirectory()" it will only return the "primary" "external" storage which is actually our internal storage of /mnt/sdcard.

This means that anything - including Google Music - that relies on the MediaScanner will never be able to store media on our external SD cards.

Can anyone invalidate that comment?
 
Last edited:

cybermage1

Senior Member
Nov 19, 2010
207
19
www.humanoidapps.com
So I did a bit of testing with manually shoving a file into the MediaScanner database.

Here's the class I wrote / tweaked from examples online:

Code:
public class MediaScannerNotifier implements MediaScannerConnectionClient { 
    private MediaScannerConnection mConnection; 
    private String mPath; 
    private String mMimeType; 
    private Context mContext;
    
    public MediaScannerNotifier(Context context, String path, String mimeType) { 
        mPath = path; 
        mMimeType = mimeType; 
        mContext = context;
        mConnection = new MediaScannerConnection(context, this); 
        mConnection.connect(); 
    } 
    
    @Override
    public void onMediaScannerConnected() { 
        mConnection.scanFile(mPath, mMimeType); 
    } 
    

	@Override
	public void onScanCompleted(String path, Uri uri) {
		Log.w("MediaScannerExtra","Scan Completed Path:" + path + " Uri:" + uri.getPath());
        mConnection.disconnect(); 
	} 
}

And here's what the app does:

Code:
public class mainAct extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        String destination = "/mnt/external_sd/Music/Information Society-Baby Just Wants.mp3";
        new MediaScannerNotifier(this, destination, "audio/mpeg");	
    }
}

Here's the output:
D/MediaScannerService(13926): IMediaScannerService.scanFile: /mnt/external_sd/Music/Information Society-Baby Just Wants.mp3 mimeType: audio/mpeg
W/MediaScannerExtra(15529): Scan Completed Path:/mnt/external_sd/Music/Information Society-Baby Just Wants.mp3 Uri:/internal/audio/media/5

I also scanned it on the /mnt/sdcard path and here's the output:

W/MediaScannerExtra(15351): Scan Completed Path:/mnt/sdcard/Music/Infosoc/Information Society-Baby Just Wants.mp3 Uri:/external/file/505

Note it considers the "external_sd" path to be "internal" storage. Also, the default Android media apps still won't find the file despite being in the MediaScanner database after running this.

I think this is just a failing in Honeycomb. And it pisses me off because I won't be able to use Google Music for playing my MP3 collection off an sdcard.

More importantly - the video editor app recently posted "Movie Studio" won't allow you to use any video files stored on the actual SDcard, despite the fact that the Acer built-in camera records them there.
 

tjb433

Senior Member
Mar 16, 2011
201
31
Well, I don't understand half of the commands and outputs you guys are posting, but I will say this, When I got my tablet home from the store yesterday, I popped in a 2 gig microSD that my gf had laying around just so I could root. It had a few mp3's on it that I didn't know about, and when I opened the stock music player it automatically recognized and played these songs. I hope this doesn't mean that the system now recognizes the external SD as the only media drive(if that's even possible) as I had not opened any media on the internal one except notification sounds before putting in the SD.

Sent from my Inspire 4g using XDA Premium app
 

daveid

Senior Member
Jan 5, 2009
1,892
356
Samsung Galaxy S21 Ultra
I would not have made my comment if I had the same problem as you. My entire music collection resides on my external_sd, picked up perfectly by mediascanner. I also have my video collection split on the internal and external storage with no problems. My apologies for not reading tthe entire thread and asking an obvious question, but in my experiences on XDA the obvious is often overlooked.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I've tried placing MP3 files on my external_sd card under a folder called "Music". For some reason the "Music" app provided by Google refuses to see any of it.

    Has anyone successfully placed music on the external SD card and if so, what stupid trick am I missing to make this work?

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

    Edit: Just to save everyone the trouble of scanning through a ton of debug steps in the thread below. Here's the solution I had:

    Eject the SD Card. Reformat with a new name. Pop it back in. MediaScanner scanned it immediately and voila! No more problems finding media on the external card!