Device Configuration
IN THIS DOCUMENT
- File mappings
- Configuration details
- Android 5.x and earlier
- Android 6.0
External storage is managed by a combination of the vold init service and MountService system service. Mounting of physical external storage volumes is handled by vold, which performs staging operations to prepare the media before exposing it to apps.
File mappings
For Android 4.2.2 and earlier, the device-specific vold.fstab configuration file defines mappings from sysfs devices to filesystem mount points, and each line follows this format:
dev_mount <label> <mount_point> <partition> <sysfs_path> [flags]
<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
- .
Configuration details
External storage interactions at and above the framework level are handled through MountService. Due to configuration changes in Android 6.0 (like the removal of the storage_list.xml resource overlay), the configuration details are split into two categories.
Android 5.x and earlier

# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard <source_path> <dest_path> 1023 1023
class late_startWhere source_path is the backing internal storage and dest_pathWhen configuring a device-specific init.rc script, the EXTERNAL_STORAGE environment variable must be defined as the path to the primary external storage. The /sdcard
Android 6.0

/devices/platform/mtk-msdc.1/mmc_host* auto auto defaults
voldmanaged=sdcard1:auto,encryptable=userdata
/devices/*/xhci-hcd.0.auto/usb* auto auto defaults
voldmanaged=usb:autoThe platform uses blkid to detect filesystem types before mounting, and users can choose to format the media when the filesystem is unsupported.










