从下面的分区知道哪些分区是启动的,哪个是系统。 是否有任何不同的命令我需要执行读取分区名称。
# cat /proc/partitions major minor #blocks name 253 0 409600 zram0 179 0 15388672 mmcblk0 179 1 12772 mmcblk0p1 179 2 52764 mmcblk0p2 179 3 128 mmcblk0p3 179 4 256 mmcblk0p4 179 5 512 mmcblk0p5 179 6 2048 mmcblk0p6 179 7 512 mmcblk0p7 179 8 512 mmcblk0p8 179 9 16896 mmcblk0p9 179 10 13952 mmcblk0p10 179 11 3072 mmcblk0p11 179 12 3072 mmcblk0p12 179 13 780 mmcblk0p13 179 14 780 mmcblk0p14 179 15 780 mmcblk0p15 179 16 2826240 mmcblk0p16 179 17 8192 mmcblk0p17 179 18 2119680 mmcblk0p18 179 19 6144 mmcblk0p19 179 20 10240 mmcblk0p20 179 21 10240 mmcblk0p21 179 22 10240 mmcblk0p22 179 23 6144 mmcblk0p23 179 24 3072 mmcblk0p24 179 25 8 mmcblk0p25 179 26 9216 mmcblk0p26 179 27 512000 mmcblk0p27 179 28 20480 mmcblk0p28 179 29 9728000 mmcblk0p29 179 32 1921024 mmcblk1 179 33 1920000 mmcblk1p1
用df
命令
root@android:/ # df Filesystem Size Used Free Blksize /dev 910M 80.0K 910M 4096 /mnt/secure 910M 0.00K 910M 4096 /mnt/asec 910M 0.00K 910M 4096 /mnt/obb 910M 0.00K 910M 4096 /persdata/absolute 8.82M 4.26M 4.57M 4096 /system 2.66G 2.25G 417M 4096 /data 9.25G 6.92G 2.33G 4096 /cache 1.99G 39.0M 1.95G 4096 /firmware 86.0M 8.75M 77.2M 16384 /firmware-mdm 86.0M 49.8M 36.2M 16384 /efs 13.4M 4.23M 9.21M 4096 /mnt/shell/emulated 9.15G 6.92G 2.23G 4096 /mnt/shell/container 9.15G 6.92G 2.23G 4096 /storage/extSdCard 1.83G 758M 1.09G 32768
你可以使用df
命令。 这将显示类似的东西:
# df -h Filesystem Size Used Available Use% Mounted on tmpfs 46.9M 0 46.9M 0% /dev tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals /dev/block/mtdblock1 87.5M 87.5M 0 100% /system /dev/block/mtdblock2 1.3M 1.1M 120.0k 91% /userdata /dev/block/mmcblk0p1 944.9M 130.4M 804.9M 14% /data /dev/block/mtdblock5 35.8M 1.6M 34.2M 4% /dbdata /dev/block/mtdblock4 87.5M 4.9M 82.6M 6% /cache /dev/block/vold/180:2 6.6G 2.7G 3.8G 41% /sdcard /dev/block/vold/179:9 7.6G 1.5G 6.1G 19% /sdcard/sd
第二个选项是读取/proc/self/mountinfo
文件。
对于我的设备(Sony Xperia Z2),在目录/dev/block/platform/msm_sdcc.1/by-name
,存在名为system,cache等的文档。每个文件都链接到一个分区。 我得到这张桌子:
major minor #blocks name 179 0 15267840 mmcblk0 179 1 2048 mmcblk0p1 TA 179 2 512 mmcblk0p2 179 3 256 mmcblk0p3 s1sbl 179 4 64 mmcblk0p4 dbi 179 5 512 mmcblk0p5 aboot 179 6 512 mmcblk0p6 rpm 179 7 512 mmcblk0p7 179 8 512 mmcblk0p8 alt_sbl1 179 9 256 mmcblk0p9 alt_s1sbl 179 10 64 mmcblk0p10 alt_dbi 179 11 512 mmcblk0p11 alt_aboot 179 12 512 mmcblk0p12 alt_rpm 179 13 512 mmcblk0p13 alt_tz 179 14 20480 mmcblk0p14 boot 179 15 10240 mmcblk0p15 ramdump 179 16 16384 mmcblk0p16 FOTAcoreel 179 17 32 mmcblk0p17 DDR 179 18 16384 mmcblk0p18 LTALabel 179 19 1536 mmcblk0p19 modemst1 179 20 1536 mmcblk0p20 modemst2 179 21 1536 mmcblk0p21 fsg 179 22 8192 mmcblk0p22 apps_log 179 23 2609152 mmcblk0p23 system 179 24 204800 mmcblk0p24 cache 179 25 12359663 mmcblk0p25 userdata 179 32 4096 mmcblk0rpmb 179 64 30915584 mmcblk1 179 65 30914560 mmcblk1p1