• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android is Deleting my MP3 Files

JB_User

Newbie
Hi. I'm new to Android phones and I'm having trouble with either Android, or the default Music Player. I copied some MP3 files to the Android phone from my Linux PC (I mounted the phone on the PC, and copied the files from the command line with 'cp'). This was fine and the music files played fine.

However, later I mounted the phone again on the PC and moved some of those files on the Android phone to a different directory. Afterwards, I unmounted the phone and tried to play the same files, they were gone. I mounted the Android phone on the PC and looked, and they were indeed, nowhere to be found.

I did a similar thing later with other files, and this time Android didn't
delete the files, but replaced them with empty 0-byte files.

What am I doing wrong? Why are MP3 files being deleted? Is this a problem with the default Music Player app, or with Android itself (this is version 2.34 of Android)? Is there a manual somewhere I can read that explains why this happens?
 
In both cases, it sounds like the phone was disconnected before the data was safely written to the sd card in the phone.

Next time try this:
1. copy the files
2. give it a minute to finish writing
3. do the "eject" or "safely remove media" or however your OS does it - wait until it it says "safe to remove" or the drive letter disappears.
4. select the usb disconnect on the android screen
5. disconnect the cable
6. rock out to your tunes
 
Thank you for your reply.

However, in both cases the files were copied successfully to the phone, and I was able to play them after the phone was disconnected. It was only when I later mounted the phone and moved the files from one directory to another that Android deleted the files.

In both cases, I used the Linux 'umount' command, which tells you when it's safe to unplug the device. So, that isn't the problem.

Is this the best forum to ask these types of questions? The reason I ask is that I expected this topic be interesting to a lot of people, but I only got one response (yours). Are there better forums for this type of question?

Thanks.
 
I did reboot the device and still, no files. And, I mounted the device on my Linux PC, and I searched the entire filesystem, and could not find the files. So, it isn't an issue with the media scanner. The files are simply not there to be found.

However, when I looked through the filesystem on my Linux PC, I did find an interesting directory: /mnt/usb/LOST.DIR. This appears to contain the mp3 files that I can't find, though Android gave the files new names which consist of arbitrary 5-digit numbers.

Does anyone know what the /mnt/usb/LOST.DIR directory is for? Why did Android move my mp3 files there, and rename them?

Thanks again for the help.
 
I did reboot the device and still, no files. And, I mounted the device on my Linux PC, and I searched the entire filesystem, and could not find the files. So, it isn't an issue with the media scanner. The files are simply not there to be found.

However, when I looked through the filesystem on my Linux PC, I did find an interesting directory: /mnt/usb/LOST.DIR. This appears to contain the mp3 files that I can't find, though Android gave the files new names which consist of arbitrary 5-digit numbers.

Does anyone know what the /mnt/usb/LOST.DIR directory is for? Why did Android move my mp3 files there, and rename them?

Thanks again for the help.
I don't know about Linux, but I know Windows will create a Lost.DIR when it has problems reading a disk / usb drive due to corruption of the file system.
 
However, in both cases the files were copied successfully to the phone, and I was able to play them after the phone was disconnected. It was only when I later mounted the phone and moved the files from one directory to another that Android deleted the files.

Interesting.

What is the order of events:

mv
umount

problem noted
(the likely scenario)

or
mv
problem noted
umount



In both cases, I used the Linux 'umount' command, which tells you when it's safe to unplug the device. So, that isn't the problem.

I don't remember umount warning about dirty writes: it will warn about things fuser (for example) cares about, and I don't know that those things are necessarily the same.

sync; umount instead of just umount would fix a dirty write problem if that were it. The umount would be delayed until any writes were committed. It's free and easy to test at least. And can be included in a script to make it automagic (all my mp3/podcast copying is scripted).

If it were mine I'd test the sync thing first, then if that doesn't fix the issue: back up the data, fsck and/or repartition/reformat the card and lay the data back on. If that doesn't fix it I'd throw in another card for testing, or use it as an excuse to upgrade to a faster/bigger card. :-)

Some hardware (like the Optimus T/500 series) appear to be sensitive to sd card choice. In that case swapping in a class 6 or better card brings joy for most folks experiencing their brand of weirdness (different from this issue).


Is this the best forum to ask these types of questions?

XDA is probably the most technical of the phone-related forums, as it is full of developer and geek types.
 
Does anyone know what the /mnt/usb/LOST.DIR directory is for? Why did Android move my mp3 files there, and rename them?

Oops, missed this part.

Android is noting* that the fs is (to use a technical term) kinda jacked up and is saving the clusters it finds in case you want to get your mitts on the stray data.

From most to least likely:
1. dirty write issue, fixable by sync; umount. Less likely to happen in a mv scenario than in a "copying to the card in the first place" scenario because the window is shorter, but could still be it.
2. filesystem on a partition boogered up, fixable by (maybe) fsck or (more defintitely) by fdisk and remaking the filesystem, or maybe just deleting and recreating that filesystem using recovery, gparted, whatever you prefer.
3. card problem

* either at boot or maybe remount after USB external mount. Maybe it runs fsck.vfat on the fly before remounting? Dunno.
 
Do you use Google Music on your phone or is it the Android Music player or some other player?

Google Music has a weak DRM-ish approach to some stuff. Hiding files it uploads/downloads/creates (like playlists)
 
Back
Top Bottom