So, it turns out that the Galaxy Nexus doesn't support USB mass storage (UMS), which happened to come as a shock to many users. Anyone who owns a XOOM, Nexus S, Galaxy Tab 10.1, or any device lacking a SD Card slot is familiar this setup, though, as all of the aforementioned device work similarly to the Galaxy Nexus - using MTP instead of UMS.

When one Redditor pointed out the fact that the GN doesn't support UMS, Android Engineer Dan Morrill was quick to jump in and explain the details. What resulted was an impromptu Q&A session with Mr. Morrill, who was cool enough to hang out and answer several questions about the GN, UMS, and why Google chose to do things this way.

We took the time to comb through the entire thread and pick out all the relevant questions and responses and aggregated them here.

Let's just start with the opening question that started it all:

Whoa, whoa. ICS doesn't support USB mass storage?

ICS supports USB Mass Storage (UMS). The Galaxy Nexus does not. This is the same scenario as Honeycomb, as for instance HC supports USB Mass Storage while Xoom does not.

If a given device has a removable SD card it will support USB Mass Storage. If it has only built-in storage (like Xoom and Galaxy Nexus) it will (usually) support only MTP and PTP.

It isn't physically possible to support UMS on devices that don't have a dedicated partition for storage (like a removable SD card, or a separate partition like Nexus S.) This is because UMS is a block-level protocol that gives the host PC direct access to the physical blocks on the storage, so that Android cannot have it mounted at the same time.

With the unified storage model we introduced in Honeycomb, we share your full 32GB (or 16GB or whatever) between app data and media data. That is, no more staring sadly at your 5GB free on Nexus S when your internal app data partition has filled up -- it's all one big happy volume.

However the cost is that Android can no longer ever yield up the storage for the host PC to molest directly over USB. Instead we use MTP. On Windows (which the majority of users use), it has built-in MTP support in Explorer that makes it look exactly like a disk. On Linux and Mac it's sadly not as easy, but I have confidence that we'll see some work to make this better.

On the whole it's a much better experience on the phone.

Since the Galaxy Nexus only has internal storage, how will apps like ASTRO File Manager work without requiring root permission?

Magic. ;)

First we designated a particular directory on internal storage as being the "SD card". Then we implemented a FUSE filesystem that does nothing except re-mount that directory as /sdcard, except discarding all permission checking. Except for permissions, the FUSE filesystem is a straight pass-through, so actual files get read from and written to the directory.

IOW we use a "fake" proxy FUSE filesystem to remount a specific directory to pretend to be an SD card. This is totally transparent to apps, they can't tell they aren't talking directly to a disk.

Wouldn't remounting /sdcard and discarding all permission checking mean that all apps have access to all other app data on the SD card? (I'm probably missing here)

Yes. That is essentially the definition of /sdcard (or as it's called in the API, the "external storage directory".) FAT32 does not support permissions, which was fine since the SD card was originally a free-for-all shared space where any app could access or stomp all over another app's data. It was intended for media like music and photos, not private app data, which lived in app-private internal storage with enforced permissions.

On devices without SD card, the only physical filesystem is internal app-private. So we pick one directory to be the designated free-for-all, and then mount it as a separate FUSE filesystem that declines to enforce permissions, in the same way that they were no-ops on FAT32.

    This, along with the lack of an external SD slot in the Galaxy Nexus, frees up Google to use whatever the hell filesystem they want, rather than being stuck with FAT32.

    Actual functional filesystems for grown ups are a hairy topic if you want to be cross-platform. NTFS is Windows only, ext4 is Linux only, HFS+ is Mac only, exFAT excludes Linux, etc.

    This is true, but this isn't why we did it. We didn't do this because we wanted to use ext3 (although that is a side benefit.) We did it because we wanted to be able to merge the "public shared storage" (i.e. for music and photos) with the internal private app storage.

    We got tired of seeing OEMs include many GB of internal storage for music, while users were still running out of space for apps and data. This approach lets us merge everything on one volume, which is way better.

    I understand this is a benefit, but how much space does a Micro-SD card slot take? I don't see why we can't have both.

    There's no particular hardware reason a device can't have both. The problem is that there is no good UI for it.

    One of the core Android principles is that you never need a file manager. Ever. We wanted to avoid the obnoxious "sneeze and a file picker appears" syndrome of basically every other OS. Local data that apps know how to handle should just be magically available within the apps, or stored in the cloud. You shouldn't have to go spelunking on your SD card to find data.

    The problem with having both internal storage and SD cards is that suddenly that goal gets a whole lot harder to achieve. For a given shot, should the camera save to internal-16GB, or to SD card? Should an app from Market be installed to internal or SD? etc.

    Yes, we can solve this by letting the user choose, or have it be in settings. But then, that's a file picker, or close enough to the file picker experience that we dislike it just as much.

    And besides that, there are API consequences: if you stick in an SD card with photos on it, do you add those to the system media content provider? If you do, you will screw up apps because they aren't designed with the concept that photos can come and go.

    What we will probably do eventually is add an import/export concept to removable storage. So the Camera will always save to internal-16GB, and when you pop in an SD card (or insert a thumb drive on USB host devices) you can start a migration or import/export dialog.

    But until we have that, devices will generally either have an SD card, or a large internal storage, but not both. I totally get that a lot of people like SD cards, and I miss USB Mass Storage myself. But then, that's why it's great that there are so many devices to choose from. :)

    tl;dr: it's a can of worms. We're thinking about compromises for future versions.

    After this, the conversation took on a life of its own, with other Reddit users expanding the discussion much deeper. If you want to check out the conversation in its entirety, head right here.

    One more tidbit came out of the thread that I found particularly cool (but had no relevance to the above Q&A), so I'll just drop it right here at the end.

    Very cool, seriously keep up the great work you guys are doing.

    Thanks. :) Motivation is easy to come by when people love your work.

    And that's what it's all about.

    • Via