android 如何知道partition的分隔情形

常用有

mount
cat /proc/mtd
cat /proc/mounts
cat /proc/partitions
cat /proc/emmc

busybox fdisk -l /dev/block/mmcblk0
parted -l /dev/block/mmcblk0
gdisk -l /dev/block/mmcblk0

dmesg |grep “mmc”
dmesg |grep “partition”
cat /proc/kmesg >/path-to-your-writeable-area/kmesg.log

其他如下
可參考 http://forum.xda-developers.com/showthread.php?t=1959445

root@xxx:/ # df
df
Filesystem Size Used Free Blksize
/dev 910.6M 128.0K 910.5M 4096
/sys/fs/cgroup 910.6M 12.0K 910.6M 4096
/mnt/asec 910.6M 0.0K 910.6M 4096
/mnt/obb 910.6M 0.0K 910.6M 4096
/system 1.5G 349.8M 1.1G 4096
/data 25.6G 280.9M 25.3G 4096
/cache 251.8M 4.0M 247.8M 4096
/persist 4.9M 4.1M 804.0K 4096
/firmware 64.0M 58.0M 6.0M 16384
/fota 688.2M 10.9M 677.3M 4096
/carrier 31.4M 4.0M 27.4M 4096
/hidden 61.0M 15.2M 45.8M 4096
/BBSYS 7.8M 5.1M 2.8M 4096
/mnt/shell/emulated 25.6G 280.9M 25.3G 4096
/storage/emulated/legacy 25.6G 280.9M 25.3G 4096

root@xxx:/proc # cat partitions
cat partitions
major minor #blocks name
7 1 11458 loop1
179 0 30535680 mmcblk0
179 1 512 mmcblk0p1
179 2 32 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 1024 mmcblk0p5
179 6 32 mmcblk0p6
179 7 5551 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 3072 mmcblk0p9
179 10 3072 mmcblk0p10
179 11 3072 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 3072 mmcblk0p13
179 14 1 mmcblk0p14
179 15 32 mmcblk0p15
179 16 8 mmcblk0p16
179 17 8151 mmcblk0p17
179 18 8192 mmcblk0p18
179 19 1024 mmcblk0p19
179 20 1024 mmcblk0p20
179 21 24576 mmcblk0p21
179 22 22528 mmcblk0p22
179 23 8192 mmcblk0p23
179 24 16384 mmcblk0p24
179 25 131072 mmcblk0p25
179 26 32768 mmcblk0p26
179 27 16384 mmcblk0p27
179 28 16384 mmcblk0p28
179 29 131072 mmcblk0p29
179 30 32768 mmcblk0p30
179 31 65536 mmcblk0p31
259 0 131072 mmcblk0p32
259 1 716800 mmcblk0p33
259 2 4096 mmcblk0p34
259 3 32768 mmcblk0p35
259 4 1572864 mmcblk0p36
259 5 262144 mmcblk0p37
259 6 27275247 mmcblk0p38
179 32 4096 mmcblk0rpmb

root@xxx:/ # ls -l /dev/block/platform/msm_sdcc.1/by-name/
ls -l /dev/block/platform/msm_sdcc.1/by-name/lrwxrwxrwx root root 1970-01-06 01:52 DDR -> /dev/block/mmcblk0p2lrwxrwxrwx root root 1970-01-06 01:52 aboot -> /dev/block/mmcblk0p5lrwxrwxrwx root root 1970-01-06 01:52 boot -> /dev/block/mmcblk0p27lrwxrwxrwx root root 1970-01-06 01:52 box -> /dev/block/mmcblk0p23lrwxrwxrwx root root 1970-01-06 01:52 cache -> /dev/block/mmcblk0p37lrwxrwxrwx root root 1970-01-06 01:52 carrier -> /dev/block/mmcblk0p35lrwxrwxrwx root root 1970-01-06 01:52 cda -> /dev/block/mmcblk0p32lrwxrwxrwx root root 1970-01-06 01:52 cust_nv -> /dev/block/mmcblk0p10lrwxrwxrwx root root 1970-01-06 01:52 dbi -> /dev/block/mmcblk0p15lrwxrwxrwx root root 1970-01-06 01:52 deviceinfo -> /dev/block/mmcblk0p8lrwxrwxrwx root root 1970-01-06 01:52 fotafs -> /dev/block/mmcblk0p33lrwxrwxrwx root root 1970-01-06 01:52 fotaraw -> /dev/block/mmcblk0p34lrwxrwxrwx root root 1970-01-06 01:52 fsc -> /dev/block/mmcblk0p14lrwxrwxrwx root root 1970-01-06 01:52 fsg -> /dev/block/mmcblk0p13lrwxrwxrwx root root 1970-01-06 01:52 ftmboot -> /dev/block/mmcblk0p24lrwxrwxrwx root root 1970-01-06 01:52 ftmdata -> /dev/block/mmcblk0p26lrwxrwxrwx root root 1970-01-06 01:52 ftmsys -> /dev/block/mmcblk0p25lrwxrwxrwx root root 1970-01-06 01:52 hidden -> /dev/block/mmcblk0p31lrwxrwxrwx root root 1970-01-06 01:52 hwcfg -> /dev/block/mmcblk0p6lrwxrwxrwx root root 1970-01-06 01:52 misc -> /dev/block/mmcblk0p17lrwxrwxrwx root root 1970-01-06 01:52 modem -> /dev/block/mmcblk0p29lrwxrwxrwx root root 1970-01-06 01:52 modemst1 -> /dev/block/mmcblk0p11lrwxrwxrwx root root 1970-01-06 01:52 modemst2 -> /dev/block/mmcblk0p12lrwxrwxrwx root root 1970-01-06 01:52 multisplash -> /dev/block/mmcblk0p22lrwxrwxrwx root root 1970-01-06 01:52 pad -> /dev/block/mmcblk0p7lrwxrwxrwx root root 1970-01-06 01:52 persist -> /dev/block/mmcblk0p30lrwxrwxrwx root root 1970-01-06 01:52 recovery -> /dev/block/mmcblk0p28lrwxrwxrwx root root 1970-01-06 01:52 rf_nv -> /dev/block/mmcblk0p9lrwxrwxrwx root root 1970-01-06 01:52 rpm -> /dev/block/mmcblk0p3lrwxrwxrwx root root 1970-01-06 01:52 sbl1 -> /dev/block/mmcblk0p1lrwxrwxrwx root root 1970-01-06 01:52 securefs -> /dev/block/mmcblk0p18lrwxrwxrwx root root 1970-01-06 01:52 splash -> /dev/block/mmcblk0p21lrwxrwxrwx root root 1970-01-06 01:52 ssd -> /dev/block/mmcblk0p16lrwxrwxrwx root root 1970-01-06 01:52 sutinfo -> /dev/block/mmcblk0p19lrwxrwxrwx root root 1970-01-06 01:52 system -> /dev/block/mmcblk0p36lrwxrwxrwx root root 1970-01-06 01:52 systeminfo -> /dev/block/mmcblk0p20lrwxrwxrwx root root 1970-01-06 01:52 tz -> /dev/block/mmcblk0p4lrwxrwxrwx root root 1970-01-06 01:52 userdata -> /dev/block/mmcblk0p38

關於分割partition:
#dmesg
<6>[ 4.836883] mmc0: BKOPS_EN bit = 0 ==> driver/core/mmc.c
<6>[ 4.850081] mmc0: new HS200 MMC card at address 0001 ==> driver/core/bus.c<6>[ 4.854226] mmcblk0: mmc0:0001 SEM32G 29.1 GiB<6>[ 4.858692] mmcblk0rpmb: mmc0:0001 SEM32G partition 3 4.00 MiB<3>[ 4.864333] qup_i2c f9928000.i2c: QUP: I2C status flags :0xc1300c8, irq:132<3>[ 4.871290] qup_i2c f9928000.i2c: I2C slave addr:0x33 not connected<3>[ 4.877589] lp5523x 6-0033: device detection err: -107<6>[ 4.878370] [bq2419x_charger_read_status] Read Reg08=0x6C, Reg09=0x00, stat_gpio:0/0, pg_gpio:0/0, hiz: 0/0<6>[ 4.882382] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38

發表迴響