随着android版本升级,升级包越来越大,当升级包无法存储在cache分区的时候,会把升级包下载到data分区,然后从data分区升级,最近从data分区加载升级包升级的时候,遇到了如下错误:
[ 1.945982] Supported API: 3
[ 1.957270] charge_status 1, charged 1, status -2, capacity -9223372036854775808
[ 1.973917] E:Failed to find CPU thermal info in /sys/class/thermal/
[ 1.990514] I:current maximum temperature: -1
[ 2.007184] Finding update package...
[ 2.057199] I:Update location: @/cache/recovery/block.map
[ 2.057251] Opening update package...
[ 2.092148] E:Failed to read /cache/recovery/block.map: No such file or directory
[ 2.107257] E:Map of '@/cache/recovery/block.map' failed
[ 2.140532] E:failed to map file
[ 2.158867] I:current maximum temperature: -1
[ 2.159049] I:@/cache/recovery/block.map
[ 2.159060] I:0
[ 2.159072] I:time_total: 0
[ 2.159079] I:retry: 0
[ 2.159085] I:uncrypt_time: 0
[ 2.159092] I:uncrypt_error: 1
[ 2.159099] I:
[ 2.159108] Installation aborted.
[ 2.223841] I:Saving locale "en-US"
最直接的错误信息就是:E:Failed to read /cache/recovery/block.map: No such file or directory
我们根据提示信息,去查询下cache分区,这个block.map文件是否存在。
busybox mount -t ext4 /dev/block/cache /cache (如果无法挂载,设置selinux权限为 permissive)
# busybox ls -l /cache/recovery/
total 104
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
-rw-r--r-- 1 root root 85 Jan 1 00:01 last_install
-rw------- 1 system system 61634 Jan 1 00:01 last_kms