Android 各分区简介

Android Partitions Overview

https://source.android.com/devices/bootloader/partitions

boot.
This partition contains a kernel image and a ramdisk image combined using mkbootimg.
You can use a virtual partition to flash either image directly without flashing a new boot partition.

    • kernel.
      The virtual kernel partition overwrites the kernel (zImage, zImage-dtb, Image.gz-dtb) by writing the new kernel image over the old kernel image.
      If the development kernel supplied is incompatible, you might need to update the vendor, system, or dtb partition (if present) with associated kernel modules.
    • ramdisk.
      The virtual ramdisk partition overwrites the ramdisk by writing the new ramdisk image over the old ramdisk image.

The overwrite operation determines the start location of the existing image in eMMC and copies the new image to that location.
The new image (kernel or ramdisk) might be larger than the existing one; to make space, the bootloader can move data following the image or abandon the operation with an error.

system.
This partition contains the Android framework.

odm.

This partition contains original design manufacturer (ODM) customizations to system-on-chip (SoC) vendor board-support packages (BSPs).
Such customizations enable ODMs to replace or customize SoC components, and implement kernel modules for board-specific components, daemons, and ODM-specific features on hardware abstraction layers (HALs).
This partition is optional; typically, it's used to contain customizations so that devices can use a single vendor image for multiple hardware SKUs.
For details, see ODM Partitions.

recovery.
This partition stores the recovery image, which is booted during the OTA process.
Devices that support seamless updates can store the recovery images as a ramdisk contained in the boot image (rather than a separate image).

cache.
This partition stores temporary data and is optional if a device uses seamless updates.
The cache partition doesn't need to be writable from the bootloader, but does need to be erasable.
The parition size depends on the device type and the availability of space on userdata; typically, 50 MB–100 MB is sufficient.

misc.
This partition is used by the recovery partition and is 4 KB or larger.

userdata.
This partition contains user-installed apps and data, including customization data.​​​​​​​

metadata.
This partition is used when device is encrypted. The size is 16 MB or larger.​​​​​​​

vendor.
This partition contains any binary that isn't distributable to AOSP.
If the device doesn't contain proprietary information, you can omit this partition.​​​​​​​

radio.
This partition contains the radio image and is needed only for devices that include a radio with radio-specific software in a dedicated partition.​​​​​​​

tos.
This partition stores the binary image of the Trusty OS and is used only if the device includes Trusty.
For details, see TOS Partitions.

Changes in Android 11

Android 11 includes numerous changes to partitions, including restrictions on linking to libraries and new Soong image variants.

  • ​​​​​​​Single System Image (SSI).

A new, conceptual image that contains the system and system_ext images.
When these partitions are common for a set of target devices, those devices can share the SSI and skip building the system and system_ext images.

​​​​​​​

system_ext partition.
A new partition that can use system resources and can include system modules that:

    • Extend AOSP system modules in the system partition.
      We recommend upstreaming such modules to AOSP so they can be installed to the system partition later.
    • Bundle OEM or SoC-specific modules.
      We recommend unbundling such modules so they can be installed to the product or vendor partition.

system partition.
Common system image used for OEM products.
We recommend moving proprietary modules out of the system partition, either by upstreaming them to AOSP or by moving them to the system_ext partition.​​​​​​​

product partition.
This partition can now use permitted interfaces to install product-specific modules that aren't bundled with any other partitions.

vendor_boot

https://source.android.com/devices/bootloader/partitions/vendor-boot-partitions

Vendor Boot Partitions

Android 11 引入了通用内核映像 (Generic Kernel Image, GKI) 的概念。
为了能够使用 GKI 轻松启动任意设备,所有供应商专用信息都已从 boot 分区分离出来并转移到新的 vendor_boot 分区中。
搭载 Android 11 且运行 5.4 版 Linux 内核的 ARM64 设备必须支持 vendor_boot 分区和更新后的 boot 分区格式,才能通过使用 GKI 进行的测试。

Bootloader support

由于 vendor_boot 分区包含以前存在于 boot 分区中的信息(例如闪存页面大小、内核、ramdisk 加载地址、DTB 本身),因此 bootloader 必须访问 boot 和 vendor_boot 这两个分区才能获得足以完成启动的数据。

bootloader 必须将通用 ramdisk 紧跟在供应商 ramdisk 之后加载到内存中(CPIO、Gzip 和 lz4 格式均支持这种串联)。
请勿对齐通用 ramdisk image 的页面,也不要在内存中通用 ramdisk image 与供应商 ramdisk 末尾之间引入任何其他空间。
内核解压缩后,它会将串联的文件提取到 initramfs 中,这样做所得到的文件结构是通用 ramdisk 叠加在供应商 ramdisk 之上的文件结构。

由于通用 ramdisk 和供应商 ramdisk 已串联,它们必须具有相同的格式。
GKI boot image 使用经 lz4 压缩的通用 ramdisk,因此符合 GKI 要求的设备必须使用经 lz4 压缩的供应商 ramdisk。

system_ext

https://source.android.com/devices/bootloader/partitions/shared-system-image#sys-ext-partition

Android 11 中引入了 /system_ext 分区作为可选分区。
(该分区是放置 /system 分区中与 AOSP 定义的组件紧密耦合的非 AOSP 组件的位置。)
/system_ext 分区被视为是 /system 分区特用于 OEM 的扩展,且未在两个分区间定义接口。
/system_ext 分区中的组件可以对 /system 分区进行私有 API 调用,反之,/system 分区中的组件也可以对 /system_ext 分区进行私有 API 调用。

由于两个分区紧密耦合,Android 新版本发布时,这两个分区也会一起升级。
为上一个 Android 版本创建的 /system_ext 分区不需要与下一个 Android 版本的 /system 分区兼容。

dtbo

https://source.android.com/devices/architecture/dto

https://source.android.com/devices/architecture/dto/partitions

DTBO: Device Tree Blob for Overlay

MTK 平台分区

partitions in MT_R_NA_DEV

preloader

pgpt

boot_para

recovery

para

expdb

vbmeta_system

vbmeta_vendor

frp

nvcfg

nvdata

md_udc

metadata

protect1

protect2

seccfg

persist

sec1

proinfo

md1img

spmfw

scp1

scp2

sspm_1

sspm_2

gz1

gz2

nvram

lk

lk2

boot

vendor_boot

logo

dtbo

tee1

tee2

super

vbmeta

cache

carrier

userdata

otp

flashinfo

sgpt

MTK platform partition meaning

[FAQ03559] [Storage]MTK platform partition meaning

https://online.mediatek.com/FAQ#/SW/FAQ03559

内容 (2019-05-07)

不同平台、版本分区布局并不一致,本篇 FAQ 仅是分区信息的汇总,具体分区布局请参考分区表,名称如:partition_table_[xxxxxxx] (其中 [xxxxxxx] 与平台、版本有关)。

不同分区的使用者不同,分区的实际内容由对应使用模块负责。因此,如果参考下面分区信息仍然有疑问,请针对特定分区单独提eservice处理,需要对应模块人员解答。

mark means:
+ : appeared in MT_R_NA_DEV
++ : appeared in MT_R_NA_DEV, but not appeared in this FAQ, which is new added partition in Android update

refer :
https://online.mediatek.com/FAQ#/SW/FAQ22330 [FAQ22330] OTA (P to Q)分区怎么调整?

mark

partition name

description

+

preloader

Store the first-stage bootloader.

DSP_BL

DSP Boot Loader.

MBR,EBR1,EBR2

Ext4 file system partition index table.

PMT

Partition management table.

+

pgpt

Store the Primary Guid Partition Table.

+

boot_para

MTK in house parameter for boot up sequence.

+

recovery

Store the kernel and ramdisk for recovery boot.

recovery_ramdisk

Store recovery_ramdisk image.

recovery_vendor

Store recovery_vendor image.

+

para

Store Google recovery data, system env and other misc info, which is used in lk and kernel.

custom

Store custom image data.

+

expdb

Store Exception data.

+

frp

Store google factory reset protection info.

+

nvcfg

nvram config which will not be wiped when OTA update or factory reset.

+

nvdata

Store nvram data.

+

metadata

Store the master key for encryption.

oemkeystore

Container to store public key for verified boot.

keystore

Container to store public key for verified boot.

+

protect1 or protect_f

Store SIM_ME lock data.

+

protect2 or protect_s

Store backup copy of SIM_ME lock data.

SEC_RO or SECRO

Reserved for the security platform used.

Misc

Used for the recovery procedure (power loss).

+

seccfg

Store security partition configure information.

+

persist

Store DRM/KeyInstall security data.

+

sec1

Container to store public key for verified boot.

+

proinfo

Store Product Info of Mobile Phone or vendor.

efuse

Store customer effuse bits(mainly security keys) .

+

md1img

Store modem image.

md1dsp

Store modem image.

md1arm7

Store modem image.

md3img

Store modem image.

mcupmfw

MediaTek in-house ASIC for cpu power management.

+

spmfw

MediaTek in-house ASIC for power management.

+

scp1

Store Tinysis SCP image.

+

scp2

Backup for scp1.

+

sspm_1

MediaTek in-house ASIC for power management under secure world.

+

sspm_2

Backup for sspm_1.

cam_vpu1

store camera vpu binary for in-house alg.

cam_vpu2

store camera vpu binary for in-house alg.

cam_vpu3

store camera vpu binary for in-house alg.

+

gz1

Firmware partition for memory management function.

+

gz2

Backup for gz1.

+

nvram

Store Calibration data of IMEI/BT/Wifi.

+

lk

Store Uboot/LK image.

+

lk2

backup for lk.

+

boot

Store the kernel and ramdisk for normal boot.

++

vendor_boot

added in Android 11

+

logo

Store logo data showing during charging.

+

odmdtbo or dtbo

For device tree overlay.

+

tee1

Store ARM trusted firmware and TEE binary. Trusted Excution Environment: What Is Arm TrustZone Technology? - Hardware Based Isolation, TrustZone Trustonic

+

tee2

Backup of tee1.

odm

Store odm image.

vendor

Store vendor image.

system

Store system image.

++

super

Dynamic partition 功能;system、vendor 等分区的集合, added in Android 10

++

product[a/b]

从 system 分出去的,客制化 APP 放到 product 分区, added in Android 10

+

vbmeta

Store vbmeta image used for AVB2.0 .

++

vbmeta_system[a/b]

system img 的 vbmeta data, added in Android 10

++

vbmeta_vendor[a/b]

vendor img 的 vbmeta data, added in Android 10

+

cache

Store Android internal cache data or web cache data.

eng_system

MTK Internal Only.

eng_vendor

MTK Internal Only.

+

userdata

User Storage Area.

++

md_udc

userdata checkpoint 信息, added in Android 10

intsd

Internal sdcard on emmc.

+

otp

Otp(one time program) area on emmc.

+

flashinfo

Flash tool download information.

BMTPOOL

Handles Bad Block Management(nandflash used and reserved on emmc).

ppl

Privacy protection lock,used for mobile phone antitheft.

loader_ext1

Store preloader extension image.

loader_ext2

Backup for loader_ext2.

+

sgpt

Backup of pgpt.

preloader 分区

  physical_start_addr: 0x0

  partition_size: 0x40000

  region: EMMC_BOOT1_BOOT2

从分区表可看到,此分区的 region 为 EMMC_BOOT1_BOOT2,而其它所有分区的 region 均为 EMMC_USER。

https://online.mediatek.com/_layouts/15/mol/dcc/ext/SingleDownload.aspx?id=DCC63451

  • The 1st boot loader load by boot ROM
  • Necessary hardware initialization and environment preparation to load and execute following software.
    • Timer, PLL, UART, GPIO, PMIC wrapper, I2C, PMIC
    • Mem/Storage init, and memory self-test.
  • Boot reason detection
    • Check device power on reasons (RTC, WDT, Power Key, USB), then check whether if latch BB Power.
  • Boot mode detection
    • Check boot modes requested from tools (Flash Tool, Meta Tool, Factory Tool).
    • Notify following software to the corresponding boot mode (Normal, Meta, Factory).
  • 2nd boot loader checking and loading
    • Check and load LK from storage devices(NAND/eMMC) to RAM.
    • Jump to LK when preloader finished.

Build Preloader only

source build/envsetup.sh

lunch [PROJECT]

source mbldenv.sh

make pl 2>&1 | tee build.log

or

cd alps/bootable/bootloader/preloader

TARGET_PRODUCT=[PROJECT]

./build.sh 2>&1 | tee build.log

Qualcomm 平台分区

partitions in SPF3.0.1_R11_8.0

"modem"       

"fsc"         

"ssd"         

"sbl1"        

"sbl1bak"     

"rpm"         

"rpmbak"      

"tz"          

"tzbak"       

"devcfg"      

"devcfgbak"   ?

"dsp"         

"modemst1"    

"modemst2"    

"DDR"         

"fsg"         

"tng"         ?

"sec"         

"splash"      

"aboot"       

"abootbak"    

"boot"        

"recovery"    

"devinfo"     

"system"      

"vendor"      ?

"cache"       

"persist"     

"tnpersist"   ?

"security"    ?

"tnkey"       ?

"misc"        

"misc2"       ?

"keystore"    

"config"      

"oem"         

"limits"      

"mota"        

"dip"         

"mdtp"        

"syscfg"      

"mcfg"        

"cmnlib"      

"cmnlibbak"   

"cmnlib64"    

"cmnlib64bak"

"keymaster"   

"keymasterbak"

"apdp"        

"msadp"       

"dpo"         

"logdump"     

"userdata"    

"PrimaryGPT"  ?

"BackupGPT"   ?

what is each partition for

kba-160613223233_16_what_is_each_partition_for_.pdf

mark means:
+ : appeared in SPF3.0.1_R11_8.0

mark

Label

Purpose of this partition

+

Modem

Partition for modem

+

Fsc

Cookie partition to store Modem File System's cookies.

+

Ssd

Partition for ssd diag module. stores the encrypted RSA keys

+

sbl1

Partition for secondary boot loader

+

sbl1bak

Back up Partition for secondary boot loader

+

Rpm

Partition for rpm image

+

Rpmbak

Back up Partition for rpm image

+

Tz

Partition for tz image

+

tzbak

Back up Partition for tz image

Hyp

Partition for hypervisor image

hypbak

Back up Partition for hypervisor image

+

Dsp

Partition for adsp dymanic loaders image

+

modemst1

Copy of Modem File System (Encrypted)

+

modemst2

Copy of Modem File System (Encrypted)

+

DDR

Partition for DDR.

+

Fsg

Golden copy or backup of Modem File System (Encrypted). Also used to pre-populate the file system.

+

Sec

Sec.dat contains fuse settings,mainly for secure boot and oem setting

+

splash

The splash screen is displayed during the apps bootloader (also called the LK). The display driver in LK will read the splash image data from a separate eMMC partition named as splash

+

aboot

Partition for apps boot loader

+

abootbak

Back up Partition for apps boot loader

+

boot

This is the boot partition of your Android device, It includes the android kernel and the ramdisk.

+

recovery

This is specially designed for backup. The recovery partition can be considered as an alternative boot partition

+

devinfo

Device information including:iis_unlocked, is_tampered, is_verified, charger_screen_enabled, display_panel, bootloader_version, radio_version. 

All these attirbutes are set based on some specific conditions and written on devinfo partition.

+

system

This partition contains the entire Android OSother than the kernel and the ramdisk. This includes the Android GUI and all the system applications that come pre-installed on the device

+

cache

This is the partition where Android stores frequently accessed data and app components

+

persist

Partition entry for persist image. which contains data which shouldn't be changed after the device shipped for example: calibration data of chips(wifi, bt, camera, etc.)certificates and other security related files.

+

misc

This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and etc.

+

config

certain hardware settings etc

+

oem

"It is meant for storing OEM specific info. Customer in this case can decide whether he wants to keep this partition or not typically reserved partitions are kept for future use

+

limits

Partition to store LMh params on 8976 and 8998 target. LMh (Limits management) driver in SBL writes the LMh HW trimmed data into separate partition and uses the same data for later reboots.

+

mota

Backup partition for M ota upgrade

+

devcfg

Partition needed by TZ for M upgrades.

+

Dip

Partition needed for SafeSwitch, feature (FR26255) designed to allow OEMs and carriers to address new smartphone theft bill issues. DIP(Device Integrity Partition) is for data used by MDTP.

+

mdtp

Partition needed for SafeSwitch, feature (FR26255) designed to allow OEMs and carriers to address new smartphone theft bill issues. MDTP(Mobile Device Theft Prevention) partition accommodates mdtp.img and this file is used to display the recovery UI.

mdtpsecapp

Partifion for mdtpsecapp.mbn. 

mdtpsecapp is MDTP QSEE app which interacts with HLOS and bootloader(UEFI, on 8998). 

Partition is required to allow access for the QSEE app from the bootloader.

mdtpsecappbak

Back up partition for mdtpsecapp

+

userdata

Partition for userdata image

+

keystore

Keystore partition was added to accommodate the Google's initial version of Verified Boot implementation. But, later when Google revised the Verified Boot specification Google removed user keystore completely. 

So starting with Android M(post Android L) this partition is not used.

+

cmnlib

Verified boot feature introduced in M needLK to load cmnlib corresponding partitions

+

cmnlibbak

Back up partition for cmnlib

+

cmnlib64

64bit based cmnlib

+

cmnlib64bak

Back up partition for cmnlib64

+

keymaster

Verified boot feature introduced in M needs LK to load keymaster from corresponding partitions

+

keymasterbak

Back up partition for keymaster

+

syscfg

Syscfg is internal testing for Vmin and CPR characterization

+

mcfg

All MBNs place holder in flash. Specific MBN would be loaded by mcfg image based on the SIM/Carrier.

+

msadp

used for modem debug policy

+

apdp

used for persisting the debug policy. "Debug policy" is used to better support development and debug on secure/fuse-blown devices One instance of the debug policy will be signed for the AP

+

dpo

This partition will store a policy override

frp

Partition for Google's Factory Reset Protection

bluetooth

Partition to store BTFM.bin. BTFM.bin is like Non-Volatile settings. This is used for BT/FM of QCA solution

toolsfv

Toolsfv is used to mount QcomTestPkg and QcomToolsPkg. 

QcomTestPkg contains UEFI test applications.

QcomToolsPkg contains tools that ease development -such as BDS menu, UEFI Shell etc.

This is for debug tools and should not be present in retail device. Even if this is present, UEFI does not mount this in retail builds.

logfs

logfs is for debug purpose partition.(To save UEFI log buffer to storage device). 

This should not be present in retail device. Even if this is present, UEFI does not mount this in retail builds.

sti

STI partition is for system test image. This is only for testing.

xbl

Partition for xbl image

xblbak

Back up partition for xbl image

pmic

Partition for pmic image

pmicbak

Back up partition for pmic image

abl

Partition for Application Boot Loader

ablbak

Back up partition for abl image

cdt

Partition to store Configuration Data Table. 

A CDT provides platform/device-dependent data, such as Platform ID, DDR hardware parameters, etc.

storsec/storsecbak

This is for the storage secure application. The current use case is for secure write protect only, but it can be expanded for other storage use cases in the future

+

logdump

Reclaim logdump partition, User Space Log Extraction from RAM Dump.

vendor_a/b

This partition is added for Android O vendor partition

spunvm

spunvm partition is used by SPU

ImageFv

Used to store uefi image

mibib

The partition file of NAND flash

qdsp

Modem image partition for nand flash

efs

EFS partition(Embedded File System)

tz_devcfg

The same as devcfg partition, contains config data of TZ

apps

The APPS image partition

loader_sti

The same as sti(System Test Image)

multi_image

multi image of OEM for MISC feature of secure-boot 3.0

multi_image_qti

multi image of QTI for MISC feature of secure-boot 3.0

scrub

The SCRUB partition for nand flash . The Flash Scrub feature is intended to enable the NAND Flash and the data stored in the NAND Flash in MDM targets to survive 15 years of use.

secdata

The same as Sec partition for secure boot.

cache

The cache partition for FOTA

efs2apps

The efs partition for APPS

metadata

The key file for FDE/FBE

qupfw

The firmware for QUP(I2C/SPI/UART)

QDSP_SWAP

This partition is used to save the swapped context between GPS & LTE at run time in this partition as we only have single antenna.

QDSP_Paging

QDSP_Paging image is for the external paging purposes to load specific tech related code in DDR for memory saving.

QDSP_TINY

This partition is used to load modem image during ideal state scenarios after PCM cycle to save power.

mdcompress

This is for minidump compression feature. Refer to 80-P8754-71 and 80-PD126-58 for minidump feature details. Customers not using minidump can ignore this partition.

connsec

This is for the ability to OEMs to disable cellular countermeasures running in the Modem. This TA routes messages to the modem via the TZSC TA. 

Customers not wishing to disable countermeasures in modem nor enable the connection security suite can ignore this.

tzsc

This is for the general purpose secure channel between Trustzone and the modem. It enables Qualcomm and 3rd parties to communicate between the AP and Modem using encryption. On 8350, the TZSC image can be embedded inside of the TZ image.

qmcs

It is used for Demura functionality. 

Demura is a display feature to correct OLED panel non-uniform panel responses. Raise case to display team to know details.

qweslicstore

Store QWES license info. 

QWES is Qualcomm® wireless edge services and it is a Set of Trusted Services rooted on hardware to securely connect & manage devices

CPUCP

The firmware of CPU coprocessor. Provides APPS CPU coprocessor firmware for operating state managemen.

vendor_boot

That is for follow Android R's GKI specification. 

Some vendor specific services/modules that are used for boot, are split out of boot image.

shrm

SHRM firmware partition

slpc

SLPC firmware 

SLPC is a hardware block which interfaces with the QDSP6v4 and the SAW to manage interrupt and core isolation when entering SPM(SAW) managed low power modes

"vm-bootsys_a", "vm-data"

vm-bootsys partition would hold trusted VM boot and system image (packaged as one vm-bootsys.img). This VM is for trusted UI use case. 

And vm-data is a placeholder for any user-data.

xbl_config

XBL configuration image, it is used by XBL for bring up option.

aop

AOP firmware partition

rawdump

It is used to save the full/mini dump into flash. Please ensure the size of this partition is big enough to contain the full/mini dump.

uefisecapp

uefisecapp is TZ application which is used by UEFI to access RPMB for some critical data access in secure world.

core_nhlos

non-hlos firmware image used by UEFI for subsystem image loading.

featenabler

featenabler is TZ application used by display team for some display feature enablement.

uefivarstore

This partition is used to save some variables by UEFI in non-secure world, for secure device it will store variables to RPMB.

catefv

Used internally, customer can remove it from partiton.xml

usb_qti

Used for improving USB enumeration boot KPI, Linux kernel needs USB composition information.Since this information needs to be available during every boot up consistently, USB composition information needs to be saved in persistent storage. usb_qti is reserved for this USB composition information.

IPA_FW

IPA_FW is a proprietary binary used in IPA HW, IPA_FW is built as part of apps images, mounted on apps after kernel drivers are loaded.

This partition is to store IPA HW's firmware. 

IPA HW will help AP data package route to modem.

  • 20
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值