在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() <

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





