android P OTA差分升级时报错记录

在Android P版本中,制作并执行差分升级包时遇到错误,包括无法打开boot分区和system分区校验失败。问题分别在于分区节点不存在和系统映像不匹配。解决方案包括修改fstab配置以解决分区问题,以及替换编译时的system.img和vendor.img以修复系统校验错误。使用特定脚本可以自动化替换编译目标文件中的映像。

在android P版本中制作出了差分升级包和差分降级包,在执行差分升级时报错,日志如下:

[    7.974280] Verifying current system...
[    7.974298] failed to open emmc partition "/dev/block/platform/0.soc/fa507000.sdhci/by-name/boot": **No such file or directory**
[    8.356131] file "EMMC:/dev/block/platform/0.soc/fa507000.sdhci/by-name/boot:11044864:59b6b0595c184367de46d97fa567e620ad20b3c1:11044864:de5a6f5bbac9abd332a21416144f75537223b5e7" doesn't have any of expected sha1 sums; checking cache
[    8.356168] failed to stat "/cache/saved.file": No such file or directory
[    8.356209] failed to load cache file
[    8.356230] script aborted: E3005: "EMMC:/dev/block/platform/0.soc/fa507000.sdhci/by-name/boot:11044864:59b6b0595c184367de46d97fa567e620ad20b3c1:11044864:de5a6f5bbac9abd332a21416144f75537223b5e7" has unexpected contents.
[    8.356254] E:Error in /data/upgrade.zip (Status 7)

对应的updater-script脚本内容

ui_print("Verifying current system...");
apply_patch_check("EMMC:/dev/block/platform/0.soc/fa507000.sdhci/by-name/boot:11044864:59b6b0595c184367de46d97fa567e620ad20b3c1:11044864:de5a6f5bbac9abd332a21416144f75537223b5e7") 
|| abort("E3005: \"EMMC:/dev/block/platform/0.soc/fa507000.sdhci/by-name/boot:11044864:59b6b0595c184367de46d97fa567e620ad20b3c1:11044864:de5a6f5bbac9abd332a21416144f75537223b5e7\" has unexpected contents.");

代码打印异常的地方在android/boot/recovery/中的applypatch.cpp

static int LoadPartitionContents(const std::string& filename, FileContents* file) {
   
   
  std::vector<std::string> pieces = android::base::Split(filename, ":");
  if (pieces.size() <
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值