问题描述
增量升级失败,查看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 的软件
博客围绕安卓增量升级失败问题展开。通过查看日志和脚本,发现是升级前后 syste/etc/recovery-resource.dat 文件的 sha1 校验码检查失败。原因是首次烧录软件只全编未 make otapackage,而增量包 base.zip 经过该操作。解决办法是给客户的软件要全编并 make otapackage。
1471

被折叠的 条评论
为什么被折叠?



