因为我以前做过bootloader的OTA,所以这个对我来说不算太难一个知识点,主要是现在设备动不动就分区,里面有很多迷惑的地方。还是稍微总结一下下吧。
flash的分区其实和电脑硬盘分区有一些类似,但是也有不同。电脑硬盘的分区都是在操作系统之后加载的,用盘符来划分。而flash的分区则不是,有一些在操作系统运行之前就会使用。比如bootloader,secure等等。然后有的分区是用来保存数据的,也不会给操作系统用。最后嵌入式linux的分区,是挂载到某个文件夹,并不是盘符,这些都是和windows电脑分区的区别。
flash大概整体如下:
来看一个最近项目中的分区
panda:/ # lsblk /system/bin/sh: lsblk: inaccessible or not found 127|panda:/ # ls -l /dev/block/bootdevice/by-name/
total 0
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 abl_a -> /dev/block/mmcblk0p34
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 abl_b -> /dev/block/mmcblk0p35
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 apdp -> /dev/block/mmcblk0p62
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 bluetooth_a -> /dev/block/mmcblk0p37
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 bluetooth_b -> /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 boot_a -> /dev/block/mmcblk0p11
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 boot_b -> /dev/block/mmcblk0p12
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 catecontentfv -> /dev/block/mmcblk0p78
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 catefv -> /dev/block/mmcblk0p77
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 cateloader -> /dev/block/mmcblk0p68
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 cmnlib64_a -> /dev/block/mmcblk0p23
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 cmnlib64_b -> /dev/block/mmcblk0p25
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 cmnlib_a -> /dev/block/mmcblk0p22
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 cmnlib_b -> /dev/block/mmcblk0p24
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 ddr -> /dev/block/mmcblk0p36
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 devcfg_a -> /dev/block/mmcblk0p52
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 devcfg_b -> /dev/block/mmcblk0p53
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 devinfo -> /dev/block/mmcblk0p60
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 dip -> /dev/block/mmcblk0p61
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 dsp_a -> /dev/block/mmcblk0p32
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 dsp_b -> /dev/block/mmcblk0p33
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 dtbo_a -> /dev/block/mmcblk0p40
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 dtbo_b -> /dev/block/mmcblk0p41
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 featenabler_a -> /dev/block/mmcblk0p54
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 featenabler_b -> /dev/block/mmcblk0p55
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 frp -> /dev/block/mmcblk0p58
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 fsc -> /dev/block/mmcblk0p83
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 fsg -> /dev/block/mmcblk0p82
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 hyp_a -> /dev/block/mmcblk0p9
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 hyp_b -> /dev/block/mmcblk0p10
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 imagefv_a -> /dev/block/mmcblk0p42
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 imagefv_b -> /dev/block/mmcblk0p43
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 init_boot_a -> /dev/block/mmcblk0p48
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 init_boot_b -> /dev/block/mmcblk0p49
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 keymaster_a -> /dev/block/mmcblk0p20
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 keymaster_b -> /dev/block/mmcblk0p21
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 keystore -> /dev/block/mmcblk0p51
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 limits -> /dev/block/mmcblk0p65
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 logdump -> /dev/block/mmcblk0p69
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 logfs -> /dev/block/mmcblk0p67
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 mdtp_a -> /dev/block/mmcblk0p28
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 mdtp_b -> /dev/block/mmcblk0p29
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 mdtpsecapp_a -> /dev/block/mmcblk0p26
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 mdtpsecapp_b -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 metadata -> /dev/block/mmcblk0p47
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 misc -> /dev/block/mmcblk0p50
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 modem_a -> /dev/block/mmcblk0p30
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 modem_b -> /dev/block/mmcblk0p31
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 modemst1 -> /dev/block/mmcblk0p80
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 modemst2 -> /dev/block/mmcblk0p81
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 multiimgoem_a -> /dev/block/mmcblk0p73
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 multiimgoem_b -> /dev/block/mmcblk0p74
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 multiimgqti -> /dev/block/mmcblk0p75
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 persist -> /dev/block/mmcblk0p46
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 qupfw_a -> /dev/block/mmcblk0p56
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 qupfw_b -> /dev/block/mmcblk0p57
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 rawdump -> /dev/block/mmcblk0p59
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 recovery_a -> /dev/block/mmcblk0p18
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 recovery_b -> /dev/block/mmcblk0p19
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 rpm_a -> /dev/block/mmcblk0p7
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 rpm_b -> /dev/block/mmcblk0p8
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 secdata -> /dev/block/mmcblk0p76
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 splash -> /dev/block/mmcblk0p64
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 spunvm -> /dev/block/mmcblk0p63
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 ssd -> /dev/block/mmcblk0p39
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 storsec -> /dev/block/mmcblk0p72
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 super -> /dev/block/mmcblk0p13
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 toolsfv -> /dev/block/mmcblk0p66
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 tz_a -> /dev/block/mmcblk0p5
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 tz_b -> /dev/block/mmcblk0p6
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 uefisecapp_a -> /dev/block/mmcblk0p44
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 uefisecapp_b -> /dev/block/mmcblk0p45
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 uefivarstore -> /dev/block/mmcblk0p79
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 userdata -> /dev/block/mmcblk0p84
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 vbmeta_a -> /dev/block/mmcblk0p70
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 vbmeta_b -> /dev/block/mmcblk0p71
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 vbmeta_system_a -> /dev/block/mmcblk0p14
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 vbmeta_system_b -> /dev/block/mmcblk0p15
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 vendor_boot_a -> /dev/block/mmcblk0p16
lrwxrwxrwx 1 root root 21 1970-01-01 00:00 vendor_boot_b -> /dev/block/mmcblk0p17
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 xbl_a -> /dev/block/mmcblk0p1
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 xbl_b -> /dev/block/mmcblk0p2
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 xbl_config_a -> /dev/block/mmcblk0p3
lrwxrwxrwx 1 root root 20 1970-01-01 00:00 xbl_config_b -> /dev/block/mmcblk0p4
一共大概80个分区。。。
在烧写分区时候,比如设备树,fastboot flash dtbo dtbo.img。但是看块信息的时候里面有两个。dtbo_a和dtbo_b。这个就是OTA的A/B分区了,互为备份。应该是有一个标志位,指示哪一个是活动分区,然后烧写到活动分区。这里就不多说了。
然后看挂载的分区
panda:/ # mount /dev/block/dm-2 on / type ext4 (ro,seclabel,relatime,discard)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1863204k,nr_inodes=465801,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600,ptmxmode=000)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=invisible)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755,gid=1000)
/dev/block/dm-7 on /mnt/scratch type f2fs (rw,sync,lazytime,seclabel,noatime,background_gc=on,nodiscard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=reuse,checkpoint_merge,fsync_mode=posix,discard_unit=block,memory=normal)
tmpfs on /mnt/installer type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755,gid=1000)
tmpfs on /mnt/androidwritable type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755,gid=1000)
/dev/block/mmcblk0p47 on /metadata type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=reuse,checkpoint_merge,fsync_mode=posix,discard_unit=block,memory=normal)
/dev/block/dm-4 on /system_ext type ext4 (ro,seclabel,relatime,discard)
overlay on /system_ext type overlay (ro,seclabel,noatime,lowerdir=/system_ext,upperdir=/mnt/scratch/overlay/system_ext/upper,workdir=/mnt/scratch/overlay/system_ext/work,userxattr,override_creds=off)
/dev/block/dm-5 on /vendor type ext4 (ro,seclabel,relatime,discard)
overlay on /vendor type overlay (ro,seclabel,noatime,lowerdir=/vendor,upperdir=/mnt/scratch/overlay/vendor/upper,workdir=/mnt/scratch/overlay/vendor/work,userxattr,override_creds=off)
/dev/block/dm-6 on /vendor_dlkm type ext4 (ro,seclabel,relatime,discard)
overlay on /vendor_dlkm type overlay (ro,seclabel,noatime,lowerdir=/vendor_dlkm,upperdir=/mnt/scratch/overlay/vendor_dlkm/upper,workdir=/mnt/scratch/overlay/vendor_dlkm/work,userxattr,override_creds=off)
/dev/block/dm-3 on /system_dlkm type ext4 (ro,seclabel,relatime,discard)
overlay on /system_dlkm type overlay (ro,seclabel,noatime,lowerdir=/system_dlkm,upperdir=/mnt/scratch/overlay/system_dlkm/upper,workdir=/mnt/scratch/overlay/system_dlkm/work,userxattr,override_creds=off)
/dev/block/dm-0 on /odm type ext4 (ro,seclabel,relatime,discard)
overlay on /odm type overlay (ro,seclabel,noatime,lowerdir=/odm,upperdir=/mnt/scratch/overlay/odm/upper,workdir=/mnt/scratch/overlay/odm/work,userxattr,override_creds=off)
/dev/block/dm-1 on /product type ext4 (ro,seclabel,relatime,discard)
overlay on /product type overlay (ro,seclabel,noatime,lowerdir=/product,upperdir=/mnt/scratch/overlay/product/upper,workdir=/mnt/scratch/overlay/product/work,userxattr,override_creds=off)
overlay on /system type overlay (ro,seclabel,noatime,lowerdir=/system,upperdir=/mnt/scratch/overlay/system/upper,workdir=/mnt/scratch/overlay/system/work,userxattr,override_creds=off)
tmpfs on /apex type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755)
tmpfs on /linkerconfig type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755)
none on /dev/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,memory_recursiveprot)
none on /dev/cpuctl type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
none on /dev/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent)
none on /dev/memcg type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
tracefs on /sys/kernel/tracing type tracefs (rw,seclabel,relatime,gid=3012)
none on /config type configfs (rw,nosuid,nodev,noexec,relatime)
binder on /dev/binderfs type binder (rw,relatime,max=1048576,stats=global)
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,nosuid,nodev,noexec,relatime)
/dev/block/mmcblk0p46 on /mnt/vendor/persist type ext4 (rw,seclabel,nosuid,nodev,noatime)
/dev/block/mmcblk0p30 on /vendor/firmware_mnt type vfat (ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
/dev/block/mmcblk0p32 on /vendor/dsp type ext4 (ro,seclabel,nosuid,nodev,relatime)
/dev/block/mmcblk0p37 on /vendor/bt_firmware type vfat (ro,context=u:object_r:bt_firmware_file:s0,relatime,uid=1002,gid=3002,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro)
tmpfs on /storage type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755,gid=1000)
/dev/block/dm-43 on /data type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
tmpfs on /linkerconfig type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755)
tmpfs on /data_mirror type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=700,gid=1000)
/dev/block/dm-43 on /data_mirror/data_ce/null type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/dm-43 on /data_mirror/data_de/null type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/dm-43 on /data_mirror/misc_ce/null type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/loop6 on /apex/com.android.healthfitness@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-43 on /data_mirror/misc_de/null type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/loop6 on /apex/com.android.healthfitness type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-43 on /data_mirror/cur_profiles type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/loop5 on /apex/com.android.virt@2 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop5 on /apex/com.android.virt type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop7 on /apex/com.android.os.statsd@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop7 on /apex/com.android.os.statsd type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-43 on /data_mirror/ref_profiles type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/loop8 on /apex/com.android.rkpd@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop11 on /apex/com.android.i18n@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop12 on /apex/com.android.sdkext@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop8 on /apex/com.android.rkpd type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop12 on /apex/com.android.sdkext type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop11 on /apex/com.android.i18n type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop13 on /apex/com.android.devicelock@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop10 on /apex/com.android.tzdata@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop14 on /apex/com.android.apex.cts.shim@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop10 on /apex/com.android.tzdata type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop13 on /apex/com.android.devicelock type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop14 on /apex/com.android.apex.cts.shim type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop18 on /apex/com.android.vndk.v34@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop16 on /apex/com.android.runtime@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop17 on /apex/com.android.vndk.v31@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop18 on /apex/com.android.vndk.v34 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop17 on /apex/com.android.vndk.v31 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop16 on /apex/com.android.runtime type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop15 on /apex/com.android.vndk.v30@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop15 on /apex/com.android.vndk.v30 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop19 on /apex/com.android.vndk.v32@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop19 on /apex/com.android.vndk.v32 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-29 on /apex/com.android.permission@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-29 on /apex/com.android.permission type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop39 on /apex/com.android.vndk.v33@1 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/loop39 on /apex/com.android.vndk.v33 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-15 on /apex/com.android.appsearch@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-15 on /apex/com.android.appsearch type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-36 on /apex/com.android.media@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-41 on /apex/com.android.ondevicepersonalization@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-36 on /apex/com.android.media type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-41 on /apex/com.android.ondevicepersonalization type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-39 on /apex/com.android.neuralnetworks@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-39 on /apex/com.android.neuralnetworks type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-28 on /apex/com.android.resolv@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-28 on /apex/com.android.resolv type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-16 on /apex/com.android.wifi@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-16 on /apex/com.android.wifi type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-37 on /apex/com.android.mediaprovider@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-37 on /apex/com.android.mediaprovider type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-18 on /apex/com.android.media.swcodec@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-18 on /apex/com.android.media.swcodec type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-31 on /apex/com.android.conscrypt@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-31 on /apex/com.android.conscrypt type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-13 on /apex/com.android.uwb@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-13 on /apex/com.android.uwb type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-23 on /apex/com.android.adservices@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-23 on /apex/com.android.adservices type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-17 on /apex/com.android.adbd@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-17 on /apex/com.android.adbd type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-12 on /apex/com.android.extservices@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-12 on /apex/com.android.extservices type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-11 on /apex/com.android.configinfrastructure@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-11 on /apex/com.android.configinfrastructure type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-30 on /apex/com.android.art@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-30 on /apex/com.android.art type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-9 on /apex/com.android.scheduling@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-9 on /apex/com.android.scheduling type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-25 on /apex/com.android.tethering@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-25 on /apex/com.android.tethering type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-38 on /apex/com.android.cellbroadcast@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-38 on /apex/com.android.cellbroadcast type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-10 on /apex/com.android.ipsec@340090000 type ext4 (ro,dirsync,seclabel,nodev,noatime)
/dev/block/dm-10 on /apex/com.android.ipsec type ext4 (ro,dirsync,seclabel,nodev,noatime)
tmpfs on /apex/apex-info-list.xml type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=1863204k,nr_inodes=465801,mode=755)
/dev/block/dm-43 on /data_mirror/data_ce/null/0 type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
/dev/block/dm-43 on /data/user/0 type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
diag on /dev/ffs-diag type functionfs (rw,relatime)
diag_mdm on /dev/ffs-diag-1 type functionfs (rw,relatime)
diag_mdm2 on /dev/ffs-diag-2 type functionfs (rw,relatime)
mtp on /dev/usb-ffs/mtp type functionfs (rw,relatime)
ptp on /dev/usb-ffs/ptp type functionfs (rw,relatime)
/dev/fuse on /mnt/installer/0/emulated type fuse (rw,lazytime,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other)
/dev/fuse on /mnt/androidwritable/0/emulated type fuse (rw,lazytime,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other)
/dev/fuse on /mnt/user/0/emulated type fuse (rw,lazytime,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other)
/dev/fuse on /storage/emulated type fuse (rw,lazytime,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other)
/dev/block/dm-43 on /mnt/pass_through/0/emulated type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=1065,inlinecrypt,alloc_mode=default,checkpoint_merge,fsync_mode=nobarrier,discard_unit=block,memory=normal)
里面有一些奇怪的地方,比如/dev/block/dm-*,/dev/fuse,selinuxfs,overlay,binder。这些是哪里来的?
查了一下,/dev/block/dm-*: 这些是设备映射(Device Mapper)设备,其它都是一些虚拟分区或者特殊用途的。
第二点就是super -> /dev/block/mmcblk0p13,super这个,照理说这个是最大的分区,却没有看到挂载,再查了一下。
super 分区通常是 Android 系统的一部分,用于实现动态分区布局。在 Android 设备上,super 分区是一个包含多个逻辑分区的容器。这些逻辑分区通过设备映射器(Device Mapper)设备来表示。动态分区是 Android 10 引入的一项功能,旨在改进分区管理,使系统更新和维护更加灵活。它使用了一种称为设备映射器(Device Mapper, dm)的技术,将一个大的物理分区(即 super 分区)映射为多个独立的逻辑分区。这些逻辑分区可以在运行时进行调整、扩展或缩减。super 分区本质上是一个容器,里面包含了多个逻辑分区。这个容器使用了一种特定的格式(通常是基于 Android 的动态分区格式),能够定义和管理这些逻辑分区。
通过dmsetup命令,好像是可以看到不同分区在/dev/block/mmcblk0p13上面的映射位置。
好吧,确实很多东西还不懂。。。