Android Q动态分区相关初步整理

本文深入探讨了Android10中引入的动态分区机制,详细分析了super.img的生成过程,包括编译阶段的参数设置与差分包的生成逻辑。通过对super.img的解包,揭示了动态分区在设备上的具体布局。

Android 10上刷机使用了super.img,差分包多了dynamic_partitions_op_list,大致查询了下是新增了动态分区,从编译到生成差分包都做了一些修改,本次先整理大致分析,对这个更新点有初步的认识

 

一、编译方面

1.super.img的生成

通过编译的log可以看到,super.img的生成

 

make

build/make/core/Makefile

# If BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT is set, super.img is built from images in the
# $(PRODUCT_OUT) directory, and is built to $(PRODUCT_OUT)/super.img. Also, it will
# be built for non-dist builds. This is useful for devices that uses super.img directly, e.g.
# virtual devices.
ifeq (true,$(BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT))
$(INSTALLED_SUPERIMAGE_TARGET): $(INSTALLED_SUPERIMAGE_DEPENDENCIES)
    $(call pretty,"Target super fs image for debug: $@")
    $(call build-superimage-target,$(INSTALLED_SUPERIMAGE_TARGET),\
      $(call intermediates-dir-for,PACKAGING,superimage_debug)/misc_info.txt)

 

编译log

[100% 1686/1686] Target super fs image for debug: out/target/product/k61v1_64_bsp/super.img
2020-01-06 16:14:22 - build_super_image.py - INFO    : Building super image from info dict...
2020-01-06 16:14:22 - sparse_img.py - INFO    : Total of 370303 4096-byte output blocks in 21 input chunks.
2020-01-06 16:14:22 - sparse_img.py - INFO    : Total of 383438 4096-byte output blocks in 19 input chunks.
2020-01-06 16:14:22 - sparse_img.py - INFO    : Total of 83534 4096-byte output blocks in 11 input chunks.
2020-01-06 16:14:22 - common.py - INFO    :   Running: "lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:4294967296 --group main:4292870144 --partition product:readonly:1516761088:main --image product=out/target/product/k61v1_64_bsp/product.img --partition system:readonly:1570562048:main --image system=out/target/product/k61v1_64_bsp/system.img --partition vendor:readonly:342155264:main --image vendor=out/target/product/k61v1_64_bsp/vendor.img --sparse --output out/target/product/k61v1_64_bsp/super.img"
2020-01-06 16:15:34 - common.py - INFO    : lpmake I 01-06 16:14:22   697   697 builder.cpp:937] [liblp]Partition product will resize from 0 bytes to 1
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值