Accessing files on a Samsung Galaxy Note through USB

I have been using a Samsung Galaxy Note smart phone for months and never experienced any real problems with it. Because of that I got bold, rooted it and installed a nightly build of CyanogenMod on it. All worked fine and I lived happily on…

Until today:

I tried to access the files stored on the “internal SD card” (which in reality is a part of the internal storage mounted as /mnt/sdcard) through an USB connection from my Windows computer. This used to work fine. I could just connect the USB cable and a new multimedia device would show up that offered me the internal drive for copying files to and from it. The same seemed to still hold today, until I wanted to copy one particular file in order to print it. It just wasn’t there!

I got really scared because that particular file is very important for me. The first thing I did was fire up ES file explorer on the Note and check whether the file was still accessible from the phone itself. It showed fine, I could open it and the content was correct. I wiped the sweat from my forehead.

So, what went wrong? Apparently after device manufacturers started adding more and more internal flash memory to their devices it got too large to be managed by Android as internal flash. So they just split it and pretended that one part was an sdcard. They also added the MTP (media transfer protocol) to access these “cards” rather than exporting them as USB mass storage. This was probably for the convenience of the user because through MTP the drive was available for access through USB and from the phone at the same time, while previously you had to switch between those kinds of access. Apparently the implementation of MTP on Samsung phones running CyanogenMod is not quite bug free so there are some circumstances where the content for MTP cached somewhere got out of sync with the actual content on the flash drive. And this resulted in the behaviour I observed.

I also learned that the “old” USB mass storage method for accessing the flash drive is still available. You need to go to System Settings / Storage and there press the menu button to access “USB computer connection”. There you can select three methods of access:

  • Media device (MTP)
  • Camera (PTP)
  • Mass Storage

Just enable the last one and everything works as expected.