文章目录
Android A/B System系列
update_engine overview
update engine是A/B update的核心逻辑,这一部分代码在system/update_engine
这里面。
- 在后台运行
- 会调用
bootctrl
HAL接口 - 通过
update_engine.rc
执行 - 不会修改partition table
update_engine_client
- 只是为了debug,进程会获取当前升级状态
update_verifier
- 通过update_verifier.rc执行
- 标记successful_flag,在misc分区
trigger update_engine to start update
升级命令:
python update_device.py --file update.zip
update.zip
里面有以下几个内容,其中脚本需要的是:
payload.bin
payload_properties.txt
通过adb,会传入升级需要的参数:
url
:升级包的位置offset
:payload.bin
在压缩包的偏移size
:payload_properties.txt
的size<