Music app not detecting newly added music files


I use the Music app to listen to mp3 files I have stored on an external SD-card. Recently, I added some new music files to the SD-card, and saw that those new music files never showed up in the app.

After some searching on the internet, I found out that one possible solution was to reset the cache of the Media Storage service and then to restart the phone. Even though this worked, I was wondering if there isn’t another way to get the Music app to detect the new files.

Has anyone else experienced this issue, and if so, do you know of another way to fix this?

Best regards,

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

You can trigger a rescan from Development Tools / Media Provider.

Where do I find that in the OS? Can’t find it in settings.

You may have to enable the Developer mode.
-> [HOWTO] Enable developer options and ADB/USB debugging (no need for USB debugging for you)

1 Like

Thanks! I did find the option and tried to click on the “Scan SD card” button. But it didn’t find the music files I have on the external SD-card. Any music that is added to the main card shows up automatically, though.

Do any of these issues apply to you ?

I did that, but on my GS290, /e/ android 10, after enabling Developer mode, there is no such setting, at least not in Development Tools :frowning:

Sorry I’m on Pie, don’t know about Q :frowning:

This is quite old, but maybe still works :

1 Like

I did have a quick look at the existing issues before I posted here, but even though some of them seemed to overlap in some aspects, to me they seemed to describe a different issue.

So my FP3 phone will not pick up any changes to the music library I have on the external SD-card, unless I clear the Media Storage cache and restart the phone.

In this case, it could be the media scanner hanging with a corrupt entry or some trouble accessing your files.
You better file an issue in /e/ Gitlab with details : logcat and media database (when scanning doesn’t work, of course).
I can help locating this database, but not tonight :beers: :wink:

Just to be sure : could you please confirm that a simple reboot, without clearing cache/data, will not work ?
And that, after a clear+reboot, ALL your files are listed in Media ?

No worries, no database finding tonight. :slight_smile:

As soon as I have tried what you suggest, I will come back with my findings.

Thank you for your time.

Ok, I could make some tests.

Nothing wrong with the database itself, I was misleading.
Not event a problem with Music app (Eleven from LineageOS).

Let me clarify :

  • I added 2 mp3 files, one in internal storage, another in SDCard :
  • Internal file (Early Bird) shows immediately in Music and plays fine :
  • rebooted my test device, SDCard file (Glen Campbell) won’t still show :frowning:
  • checked against Android media database to verify it’s not a problem with Music app :

C:\adb>adb root

C:\adb>adb shell
santoni:/ # cd /data/data/
santoni:/data/data/ # sqlite3 external.db
SQLite version 3.22.0 2019-09-03 18:36:11
Enter ".help" for usage hints.
sqlite> select title from files where is_music=1;
Early Bird - It's Only Temporary
sqlite> .quit 

Only Early Bird !

  • I guess that the media scanner is not triggered when adding a file to SDCard storage, as it should be using intent or activity … Let’s keep this in a corner for a future GitLab issue :wink:
  • as the database can be very large, it may take time to reconstruct at a reboot… So let’s see if we can find another solution ! Digging in XDA i came up with this [MOD]Enable/Disable Media Scanning at boot | XDA Forums
  • It definitively worth a try :

C:\adb>adb root

C:\adb>adb shell
santoni:/ # pm enable
Component {} new state: enabled
santoni:/ # ^D

C:\adb>adb reboot system

C:\adb>adb root

C:\adb>adb shell
santoni:/ # sqlite3 /data/data/
SQLite version 3.22.0 2019-09-03 18:36:11
Enter ".help" for usage hints.
sqlite> select title from files where is_music=1;
Early Bird - It's Only Temporary
Glen Campbell - Rhinestone Cowboy
sqlite> .quit
santoni:/ #

  • it’s not perfect, but at least we’ve got a solution here :slight_smile:
  • :skull_and_crossbones: if you wish to try this, please be aware that you will face the same behavior when deleting file ! For example (I deleted “Glen Campbell” from SDCard using my Windows computer, but didn’t reboot my testing device) :
  • file disappears after a reboot :
1 Like

GitLab issue :

And, by the way, please forget about “forced” scan in Development Tools : it won’t work.


Thanks. This just worked for me on HTC M8

Still no joy getting Android File Transfer to work though…

1 Like
  • I have SM_G965F phone with brand new e/os installation (newbie)
  • I copy music files from my computer to mtp://Samsung_Android_blabla/InternalStorage/Music
  • then I open the e/os music player (lineageOS Music), it shows no music file.
  • I can see the music file from the e/OS file browser, but unfortunately they are not visible for the music brower!

What is the procedure to make music file visible for lineageOS Music ?

Partially solved: the music files are visible after rebooting the smartphone.