最近做了一个相差时间较久的ota升级包,在升级时出现比较奇怪的现象:
升级包A,下载差分包,升级提示错误
再升级包A,下载差分包,升级成功
再升级包A,下载差分包,升级提示错误
再升级包A,下载差分包,升级成功
目前正在分析中,先记录问题,错误log如下:
loading /cache/recovery/1336c19e9105f5969aabce42a536a875bda7ac75/6f53d98c8004def05b458d7fecdfe9d70a406547
failed to verify blocks (expected 11e05f674731b55707078f22ee4ba83e0be19c93, read a5b5daaae4f7a440737c1cc7335625e66bb699f0)
stat "/cache/recovery/1336c19e9105f5969aabce42a536a875bda7ac75/11e05f674731b55707078f22ee4ba83e0be19c93" failed: No such file or directory
partition has unexpected contents
failed to read blocks for diff
failed to execute command [bsdiff 46245002 1524 xxxxxxxxxxxx]
升级包A,下载差分包,升级提示错误
再升级包A,下载差分包,升级成功
再升级包A,下载差分包,升级提示错误
再升级包A,下载差分包,升级成功
目前正在分析中,先记录问题,错误log如下:
loading /cache/recovery/1336c19e9105f5969aabce42a536a875bda7ac75/6f53d98c8004def05b458d7fecdfe9d70a406547
failed to verify blocks (expected 11e05f674731b55707078f22ee4ba83e0be19c93, read a5b5daaae4f7a440737c1cc7335625e66bb699f0)
stat "/cache/recovery/1336c19e9105f5969aabce42a536a875bda7ac75/11e05f674731b55707078f22ee4ba83e0be19c93" failed: No such file or directory
partition has unexpected contents
failed to read blocks for diff
failed to execute command [bsdiff 46245002 1524 xxxxxxxxxxxx]
解决方案 »
- 虚拟机开不起来
- Red Hat Linux下tomcat启动用户权限问题
- 求救一个opencv移植过程中编译的问题
- 关于Mac下安装的Win10虚拟机,然后在虚拟机上用Xshell或Putty连接遭到Mac拒绝
- ffmpeg编码 avcodec_send_frame中avcodec_encode_audio2卡死,怎么解决的?
- 为什么我的主目录里面总是有一个perl5的空目录?
- 求助:用mv把文件移动到了一个没有权限的文件夹,然后文件就没有啦。怎么找回?
- linux每天自动定时关机问题
- centos7.5环境下keepalived的vip无法ping通
- vm虚拟机安装之后没有网卡,求救啊
- 嵌入式linux开机没有图片
- Ubuntu下修改profile
根本原因也不是这个,是因为生成target_file包的过程中system分区中会增加install-recovery.sh相关文件用于ota升级时更新recovery,这个动作在out目录生成system.img之后进行,导致target_file包中的system.img与out目录下的system.img不一致,即刷机的img和做ota包的img不一致导致升级失败。
解决办法是在Makefile中增加$(hide) ./build/tools/releasetools/replace_img_from_target_files.py $@ $(PRODUCT_OUT),这个处理动作和脚本在mtk的源码中有,大家可以看下。