下面说说如何实现(以下操作需要取得Root权限才能进行,请用手机使用RE管理器进行修改或替换操作)
/etc目录下有一个文件vold.fstab (/system/etc/vold.fstab 两个文件实际都是同一个来的). 而vold.fstab文件就是用来挂载SD卡的.通过修改这个文件就能实现内外SD的位置交换啦.
(注意:千万不要用记事本来修改vold.fstab,机油验证会导致内外卡都找不到的)
## Vold 2.0 Generic fstab
## - San Mehat (san@android.com)
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# internal sdcard
{
mount_deep = 1
ums_path = /sys/devices/platform/musb_hdrc/gadget/lun0/file
asec = enable
mbr_policy = overwrite
}
dev_mount sdcard /mnt/sdcard/external_sd 1 /devices/platform/mmci-omap-hs.1/mmc_host/mmc0
# externel sdcard
{
mount deep = 0
ums_path = /sys/devices/platform/musb_hdrc/gadget/lun1/file
asec = disable
discard = enable
mbr_policy = skip
}
dev_mount sdcard1 /mnt/sdcard 1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
#end line ## keep this line
好吧,我是搬运过来的,自己没有偷过,小心为上
