Android vold浅析

The Android system uses vold as the mount daemon, which detects, mounts and monitors the status of sdcard. The mount daemon needs a configuration file to tell it what the sdcard device is. Before Android 2.1 (included), the file is /etc/vold.conf. Since Android 2.2 (froyo), it ships with a new implementation of vold (aka vold2). The configuration is changed to /etc/vold.fstab and its format is also changed. See system/core/rootdir/etc/vold.fstab in the Android source tree for the detailed explanations of the format.

However, a fixed vold.fstab can only support block device with fixed name. It is not suitable for x86 platforms with variable device names.

The Android-x86 project has extended the functions of the new vold to support auto-mount feature without a configuration file. That is, it can automatically detect any USB mass storage or MMC/SD card and mount it as the sdcard. Besides, if you don't have a real USB disk or SD card, it can simulate a fake sdcard to work smoothly with applications that need sdcard.

References

Android source code
older:  development/data/etc/vold.conf
          system/core/vold/*
          system/core/mountd/*         
http://www.android-x86.org

你可能感兴趣的:(Android vold浅析)