The file system is a means to store, retrieve and update data on the device and is controlled by the Device Storage API.
No visible file system
- Application oriented access to documents.
- The user, rather then finding a file and opening it (eg. in finder or explorer), instead opens the application first, then is presented with the files that are compatible and can be read by the application whether it is a photo, music file or document.
- Application indexes and organizes files themselves.
- File meta data indexed and organized by application
Transferring files to-and-from the device
- User can copy files to and from the device using USB to computer connection.
- User can copy files to and from SD card manually
- The device when enabled for USB, shows as a mass storage device.
- The ability to send and receive files via Bluetooth File Transfer Profile.
- User can monitor available storage on the device
- portable (sd card)
v2 Add MTP support
Based on bug 1142450 comment 15,
The AutoMounter does switch to UMS mode (for technical reasons) but that should only happen when the USB cable is unplugged.
When in UMS mode, what's important is whether a volume is shared with the PC or not.
When MTP is enabled, then the AutoMounter mode should be changing like the following:
- Phone is unplugged - AutoMounter should be in UMS mode
- Phone is plugged in but has never been unlocked - AutoMounter should be in UMS mode
- Phone is plugged in and has been unlocked at least once - AutoMounter should be in MTP mode
- When the phone is unplugged or USB Sharing is disabled, then the AutoMounter will switch back to UMS mode.
For both UMS and MTP, nothing should be shared with the PC until the phone is unlocked for the first time. Once something is shared with the PC, then it should stay shared with the PC even if the phone is locked, until USB sharing is explicitly disabled, or the phone is unplugged from the PC.
So there are really 3 modes that the AutoMounter has:
- In UMS mode and no volumes are being shared with the PC
- In UMS mode and volumes are being shared with the PC
- In MTP mode and volumes are being shared with the PC
MTP doesn't have a notion of being in MTP mode and not sharing volumes (well, I suppose we could have the MTP server running awith no volumes). When I wrote it I decided to instead switch to UMS mode and have no volumes shared - this allows us to reclaim all of the memory used by the MTP server.
If the phone was in MTP mode with no volumes being shared, then it would still show up as a device to the PC, and it would look like there were no volumes, which I thought would be confusing to the user.
- Transfer files to and from devices from cloud based services such as Dropbox, SkyDrive, MozCloud.
- Moving and copying files to or from SD card storage.
- backup capability for preserving contents of device in the event of device loss, corruption, etc. Possible implementations could include:
- External computer (usb)
- Internal storage
- Removable storage (sd card)
- Cloud services (Dropbox, SkyDrive, MozCloud or similar)
- Transaction records (eg: reinstall previously purchased apps, as per manifest of transactions preserved by Marketplace service)
Device Storage API
For the latest UX specifications, please visit https://mozilla.box.com/system