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?
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.
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
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 ?
rebooted my test device, SDCard file (Glen Campbell) won’t still show
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/com.android.providers.media/databases
santoni:/data/data/com.android.providers.media/databases # 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
C:\adb>adb root
C:\adb>adb shell
santoni:/ # sqlite3 /data/data/com.android.providers.media/databases/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
Glen Campbell - Rhinestone Cowboy
sqlite> .quit
santoni:/ #
it’s not perfect, but at least we’ve got a solution here
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) :