Android does not see music files copied with FreeFileSync

Get help for specific problems
Posts: 8
Joined: 20 Feb 2016

ffs2016

Hi,

I am a great fan of FFS for doing backups and when MTP support was added some months ago, I thouhgt I could use it for keeping my music library on my phone up-to-date.

The first FFS versions with MTP support did not really work well for me, but I saw that Zenju is constantly fixing issues in that area, so I was confident, that ecentually it would work.

It *has* improved a lot since then and diffing between phone and PC works fine as well as letting the phone being updated. *But*, the files are not added to the phone's media library. I can see them e.g. in PowerAmp, which indexes the media files itself, but all players who rely on Android's media server do not see the copied files.

This somehow seems to be an issue with how FFS creates the files, because the very same file copied with Windows explorer are immediately found by the Android's media server.

It also is not limited to my phone (a Oneplus Two running OxygenOS 2.2.0) but also behaves exactly the same on my daughter's S3 mini running CM12.1.

Is there any explanation for the above issues? If I can be of any help tracking down this problem, I would love to do that.

Thanks for this great software and best regards,
Mo
User avatar
Site Admin
Posts: 7282
Joined: 9 Dec 2007

Zenju

This seems to be an Android bug. The workaround is to reboot:
http://android.stackexchange.com/questions/46315/not-all-files-are-visible-over-mtp
Posts: 8
Joined: 20 Feb 2016

ffs2016

Hi,

it doesn't seem to be this issue. I had found such articles and tried everything after your first version with MTP came out, RescanSD, rebooting, etc.

I also found hints on forums that the media scanner would fail on non-US special characters in file names. Was also not the reason.

And as I said in my original question, when I copy the exact same files with Windows explorer (it is reproducible with 1 file alone!), then it becomes immediately visible in the Android media library.

So something explorer does differently than FFS and being it a bug or not, Android doesn't handle files copied by FFS the same way as those copied by explorer.

Thanks,
Mo
User avatar
Site Admin
Posts: 7282
Joined: 9 Dec 2007

Zenju

I'm seeing a slight difference in metadata between FreeFileSync and Explorer that could explain this. Which file types are causing problems for you?
Posts: 8
Joined: 20 Feb 2016

ffs2016

Music files. *.mp3
User avatar
Site Admin
Posts: 7282
Joined: 9 Dec 2007

Zenju

Music files. *.mp3ffs2016
The problem seems to be that FreeFileSync currently doesn't set the "Album" metadatum. I'll add this as a todo.
Posts: 8
Joined: 20 Feb 2016

ffs2016

Sounds great!
Posts: 8
Joined: 20 Feb 2016

ffs2016

Hi @zenju,

I assume that the change "Set content format metadata when copying to an MTP device" of version 8.0 is supposed to address the issue I reported here.

It definitely is a step in the right direction, although not fully fixing the issue.

If the files are copied with 8.0, the music players on Android see them, but without metadata... No track or album title, no cover.

Thanks,
Mo
User avatar
Site Admin
Posts: 7282
Joined: 9 Dec 2007

Zenju

FFS 8.0 implemented metadata primarily for image file types. Album metadata for mp3 is still a todo.
Posts: 8
Joined: 20 Feb 2016

ffs2016

I see.
User avatar
Site Admin
Posts: 7282
Joined: 9 Dec 2007

Zenju

After more testing it looks like the root of the problem is a different one: Even if FFS sets the missing metadata, Android discards it and sets its own according to an internal determination based on the file extension. FFS uses .ffs_tmp files for the "fail-safe copy" feature and Android's internal determination is then based on this "unknown" extension. The internal determination is not triggered again when FFS renames the .ffs_tmp file to its actual name, hence for Android the mp3 files are still considered non-audio just like the ffs_tmp files!

The workaround therefore is to disable "fail-safe copy" in global settings. Can you test this and report if this fixes the problem of mp3 not being recognized?
Posts: 8
Joined: 20 Feb 2016

ffs2016

I just saw this. Will check tomorrow.
Posts: 8
Joined: 20 Feb 2016

ffs2016

Sorry for the delay. Yes, if I switch off fail-safe copy, the files are recognized as music files.

I could live with that, but using a temporary name having the original extension would be a trivial fix I guess.

Thanks for your effort.
Mo
User avatar
Site Admin
Posts: 7282
Joined: 9 Dec 2007

Zenju

using a temporary name having the original extension would be a trivial fix I guess.ffs2016
Unfortunately not quite. Android's hard-wired file determination takes the file extension and based on that automatically retrieves further metadata from the file content. The part before the file extension will become the object name and that's permanent, no matter if the file is renamed afterwards.

Therefore copying to the device using a file name like "Music.ffs_tmp.mp3" will be shown as "Music.ffs_tmp" when browsing the smart phone with no possibility to change it.
Posts: 1
Joined: 18 Feb 2022

Suna

I have the same problem, so still no change in Android's code. Is there a way to switch off fail-safe copy only on a session or configuration level? At the moment I have to turn it off globally in the options, but sometimes I am missing to reactivate it after syncing my android device. I have configurations for HDD backup and for android backup / sync.

This really would be a big relieve.