Implement Internal partition and SD-card Partition
PURPOSE: 查看Settings->Storage如何调用&显示storage分区信息
DATE : 20130117
FILE : BYD47/vendor/BYD/app/Settings/res/values/strings.xml
LINE : 2126
CONTEXT:
-
<!-- SD card & phone storage settings screen, label for check
box to erase SD card [CHAR LIMIT=30] -->
<string name="erase_external_storage" product ="default"> Erase
Internal Storage</string>
<!--
SD card & phone storage settings screen, description for check box to erase USB storage [CHAR LIMIT=NONE] -->
<string name="erase_external_storage_description" product ="nosdcard"> Erase
all the data on the internal USB storage, such as music or photos</ string>
<!--
SD card & phone storage settings screen, description for check box to erase USB storage [CHAR LIMIT=NONE] -->
<string name="erase_external_storage_description" product ="default"> Erases
all data on the Internal Storage, such as music or photos</ string>
-
--------------------------------------------------------------------------
Search the "erase_external_storage" keyword,
got the Settings source code
is: BYD 未公开settings source code
--------------------------------------------------------------------------
PURPOSE: Thinking..
COMMAND: adb shell
NOTE: 插入sdcard状况下,此时没有/mnt/sdcard_ext分区
-
# df
/data 1G 119M 916M 4096
/mnt/asec 485M 0K 485M 4096
/mnt/obb 485M 0K 485M 4096
/factory 7M 4M 3M 4096
/mnt/sdcard 1G 4M 1G 4096
/mnt/asec 485M 0K 485M 4096
/mnt/obb 485M 0K 485M 4096
/factory 7M 4M 3M 4096
/mnt/sdcard 1G 4M 1G 4096
-
/data -> volume object
COMMAND: cat /proc/mounts
#cat /proc/mounts
/dev/block/mmcblk0p8 /data ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=1,dat
a=ordered,noauto_da_alloc 0 0
a=ordered,noauto_da_alloc 0 0
/dev/block/vold/179:7 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,u
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
-
"block partition -> volumes", vold接收管理8支partition,其中:
- partition 8对应着/data分区(FileSystem),对应着Application Storage(AS)
- partition 7对应着/sdcard分区(FileSystem),对应着Internal Storage(AS)
- partition 10,11对应着/sdcard_ext分区(FileSystem),未插入sdcard,故未显示之
-
DEVICE: XT920
COMMAND: df
shell@android:/ $ df
df
Filesystem Size Used Free Blksi
/dev 488M 84K 488M 4096
/mnt/asec 488M 0K 488M 4096
/mnt/obb 488M 0K 488M 4096
/system 504M 384M 119M 4096
/data 2G 838M 1G 4096
/cache 293M 5M 288M 4096
/flex 252M 173M 78M 4096
/misc/phone 252M 173M 78M 4096
/storage/sdcard0 2G 838M 1G 4096
/storage/sdcard1 7G 5G 2G 32768
df
Filesystem Size Used Free Blksi
/dev 488M 84K 488M 4096
/mnt/asec 488M 0K 488M 4096
/mnt/obb 488M 0K 488M 4096
/system 504M 384M 119M 4096
/data 2G 838M 1G 4096
/cache 293M 5M 288M 4096
/flex 252M 173M 78M 4096
/misc/phone 252M 173M 78M 4096
/storage/sdcard0 2G 838M 1G 4096
/storage/sdcard1 7G 5G 2G 32768
-