xt910 android4.04国行sdcard与sdcard-ext互换

来源:互联网 发布:上古卷轴5白狼捏脸数据 编辑:程序博客网 时间:2024/04/28 19:24

xt910 android4.04国行sdcard与sdcard-ext互换 - qidizi - qidizi 的博客


16g卡变成sdcard了

xt910 android4.04国行sdcard与sdcard-ext互换 - qidizi - qidizi 的博客


sdcard-ext变成机身内存卡

xt910 android4.04国行sdcard与sdcard-ext互换 - qidizi - qidizi 的博客

修改文件的路径/system/etc/vold.fstab,记得改前先备份,我就因为乱改,没找到原来的文件差点刷机了.

还好从电脑的垃圾箱中找到.实在没搞明白android的sdcard-ext加载的方式,没办法使用shell进行mount.跑去看vold实现的c代码.一半,感觉应该是改动时出现问题.用上垃圾箱的文件重启竟然真好了.接着赶紧备份它再改动.重启ok.

xt910 android4.04国行sdcard与sdcard-ext互换 - qidizi - qidizi 的博客

copy/open in text editor (这个修改工具好难用,都看不到指针在那个位置,点半天没点中位置)

xt910 android4.04国行sdcard与sdcard-ext互换 - qidizi - qidizi 的博客

里面有二行

就是把

sdcard 改成 sdcard-ext

sdcard-ext 改成 sdcard

注意每行都需要更改二个才有效.


vold功能代码 分析

http://www.linuxidc.com/Linux/2011-12/50395p3.htm


我的vold.fstab文件内容

===========这行不算==========

## Vold 2.0 Generic fstab
## - San Mehat (san@android.com)
## 

#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point[:[asec_point]:[lun_point]]> <part> <sysfs_path1...> 
## label        - Label for the volume
## mount_point  - Where the volume will be mounted
## asec_point   - Whether asec mount is needed for this value, if not, use "none"
##                  Else, supply a folder name under /mnt/secure/
##                  If not supplied, "asec" will used by default
##                  If supplied, /mnt/secure/asec_point will be used
##                    This is for further extension, not needed now
## lun_point    - The target lun device for this volume. If not supplied, will use
##                  /sys/devices/platform/usb_mass_storage/lun0/file
##                  else, will use /sys/devices/platform/usb_mass_storage/lun_point/file
## part         - Partition # (1 based), or 'auto' for first usable partition.
##                  For a disk with only 1 partition, use '1' is different to 'auto'
##                  Using 1, will not re-write its partition table when formatting
## <sysfs_path> - List of sysfs paths to source devices
######################

# external sd card
dev_mount sdcard-ext /mnt/sdcard-ext:none:lun1 auto /devices/platform/goldfish_mmc.0 /devices/platform/omap/omap_hsmmc.0/mmc_host/mmc0
# internal eMMC
dev_mount sdcard /mnt/sdcard:: 25 /devices/platform/omap/omap_hsmmc.1/mmc_host/mmc1

## Example of a dual card setup
# dev_mount left_sdcard  /sdcard1  auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
# dev_mount right_sdcard /sdcard2  auto /devices/platform/goldfish_mmc.1 /devices/platform/msm_sdcc.3/mmc_host/mmc1

## Example of specifying a specific partition for mounts
# dev_mount sdcard /sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1


# flash drive connection through hub connected to USB3
dev_mount usbdisk_1.1.1 /mnt/usbdisk_1.1.1 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.1.1
dev_mount usbdisk_1.1 /mnt/usbdisk_1.1 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.1
dev_mount usbdisk_1.2 /mnt/usbdisk_1.2 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.2
dev_mount usbdisk_1.3 /mnt/usbdisk_1.3 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.3
dev_mount usbdisk_1.4 /mnt/usbdisk_1.4 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.4
dev_mount usbdisk_1.5 /mnt/usbdisk_1.5 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.5
dev_mount usbdisk_1.6 /mnt/usbdisk_1.6 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.6
dev_mount usbdisk_1.7 /mnt/usbdisk_1.7 auto /devices/platform/omap/musb-omap2430/musb-hdrc/usb3/3-1/3-1.7


======这行也不算============

原创粉丝点击