gpt4 book ai didi

android - 如何识别分区的名称

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:55:25 25 4
gpt4 key购买 nike

从下面的分区如何知道哪些分区是引导分区,哪些分区是系统分区。是否需要执行任何不同的命令来读取分区名称。

# 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 文件。

关于android - 如何识别分区的名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20218852/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com