Android OTA 增量升级失败的问题

问题描述


增量升级失败,查看log

cat /cache/recovery/last_log

Installing update...
Verifying current system...file "/system/etc/recovery-resource.dat" doesn't have any of expected sha1 sums; checking cache
failed to stat "/cache/saved.file": No such file or directory
failed to load cache file
script aborted: "/system/etc/recovery-resource.dat" has unexpected contents.

"/system/etc/recovery-resource.dat" has unexpected contents.
E:Error in /mnt/media_rw/udisk/lierda_update.zip
(Status 7)
Installation aborted.

查看 update\META-INF\com\google\android\updater-script

apply_patch_check("/system/etc/recovery-resource.dat", "1074e1187579a9b7113486f2d78e18b5f7c033af", "b55e605cbf5b6500016ca108f2a1069078a6689c") || abort("\"/system/etc/recovery-resource.dat\" has unexpected contents.");

发现是检查由升级前后的 syste/etc/recovery-resource.dat 文件的sha1 校验码失败

原因分析

第一次烧录到机器里的软件只经过了全编,而没有进行 make otapackage,而制作增量包的base.zip 是经过make otapackage的,这就导致的SHA1 校验码检查失败

全编过后的部分文件在经过 make otapackage后会发生改变.

问题解决


以后出给客户的软件是经过全编并且 make otapackage 的软件

你可能感兴趣的:(Android)