2

Whenever I try to copy files onto my phone, depending on file type they almost immediately disappear. I noticed this when trying to copy music files (mp3 and flac) from my PC to the phone via the USB cable, using total commander.

  • What works: png, doc, pdf, xlsx

  • What gets deleted: mp3, flac, wav, somefile.someextension

I copy the file(s), and they disappear. Sometimes it happens immediately, sometimes it needs a few seconds, a couple of refreshes, or navigating away from the folder and back in again. Sometimes I can see the file from my PC but not on the phone screen for a while (up to a minute). But the end result is always the same, the files soon disappear.

I don't think the files are being moved anywhere on the phone, as I tried searching the entire phone for the missing files and found nothing (no mp3 files on the entire phone), while I can still find other file types just fine.

The phone only has internal storage, no SD card. I can browse its contents just fine from the PC, and like I said this only affects certain file types.

I've also tried copying from a USB stick (one that has a mini-usb on one end so it plugs into the phone), and I also tried several file managers to do the copying, the results are always the same.

I tried copying to the Music folder, and to another custom folder, no change in behavior.

I tried adding a .nomedia file to the folder I'm copying to, it didn't help.

I tried using MTP or PTP connections.

I don't know if any apps are doing this, but I tried disabling the built-in "Files by Google" app, and stopping all other apps. I really don't have a lot of apps on this phone, and I have no idea which one could be doing something like this and why.

The only somewhat relevant question I found was this one , but that's about bluetooth, and I'm using a USB connection to a PC.

Please someone let me know how to use a modern smartphone to provide the functionality of a fifteen year old mp3 player.

Edit:

I did a factory reset, then tried developer mode and adb. I tried both before and after the system has updated.

ls doesn't show any of the files that I tried to copy. Here is what I think is the relevant part of adb logcat while copying a file called Gemini.mp3: https://pastebin.com/bmTaLfgk

Basically there are a couple of these:

Access denied finding property "media.stagefright.extractremote"
Access denied finding property "media.metrics.enabled"
Access denied finding property "media.metrics.enabled"

and these:

mediaserver: type=1400 audit(0.0:524): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=8498 scontext=u:r:mediaserver:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=0
Binder:1257_2: type=1400 audit(0.0:525): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=8498 scontext=u:r:mediaextractor:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=0
Binder:1257_2: type=1400 audit(0.0:526): avc: denied { read } for name="u:object_r:media_prop:s0" dev="tmpfs" ino=8498 scontext=u:r:mediaextractor:s0 tcontext=u:object_r:media_prop:s0 tclass=file permissive=0

And then something called MediaSorter decides to remove the file.

MediaSorter: Removing /storage/emulated/0/Music/Gemini.mp3
6
  • 2
    You should activate developer options and ADB. An ls via ADB is the only way to truly see the content of a directory on device. Check if the files you copy are really missing. because based on your description my guess would be that the files you upload can't be added to the media database (because of a content) and therefore are not visible to most apps and MTP/PTP.
    – Robert
    Commented Aug 30, 2020 at 16:12
  • @Robert What could cause files not being added to the media database? I tried many different files. What do you mean by "because of a content"? Does Android care what's inside a file? None of the files I've tried are protected in any way AFAIK, and I have the right to use them. I guess I could go down the ADB rabbit hole, but I'm not seeing where it would lead me, how it'd fix anything. I don't need to personally "truly see" what's there, I need android to see it. Commented Aug 31, 2020 at 9:14
  • Yes Android cares what is inside. The media database stores not only file-name path and size of a file but also meta-data like exif data for pictures or mp3 ID3 tags for mp3 files. Therefore if the media database encounters a known file type with unexpected data it might run into problems and crash. The first step of solving a problem is understanding it. Therefore I suggest to you to use ADB. What I wrote is still a theory unless you prove it via ADB. You can also check adb logcat while copying the files onto the device via e.g. MTP. You may see a crash report (stack trace) of the media db
    – Robert
    Commented Aug 31, 2020 at 10:21
  • @Robert ls doesn't show anything. I've updated the question with my findings, but I'm not getting any closer to a solution. I may reflash the OS as I can't think of anything else. Thanks for your time anyway. Commented Sep 5, 2020 at 12:40
  • This MediaSorter is not known to me. Also the AOSP sources don't contain this keyword. Therefore it may be added by the manufacturer. As the process-ID seems to be the same as the MtpServer is running on this would be my guess. You never mentioned your device and manufacturer.
    – Robert
    Commented Sep 5, 2020 at 13:29

0

You must log in to answer this question.

Browse other questions tagged .