本文主要是介绍ota升级过程提示cache分区太小导致升级失败,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
解决方法:可以取消对cache分区的校验
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 9cbc2a7..a570b36 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -184,15 +184,6 @@ class EdifyGenerator(object):
"".join([', "%s"' % (i,) for i in sha1]) +
'));')
- def CacheFreeSpaceCheck(self, amount):
- """Check that there's at least 'amount' space that can be made
- available on /cache."""
- self._required_cache = max(self._required_cache, amount)
- self.script.append(('apply_patch_space(%d) || abort("E%d: Not enough free '
- 'space on /cache to apply patches.");') % (
- amount,
- common.ErrorCode.INSUFFICIENT_CACHE_SPACE))
-
def Mount(self, mount_point, mount_options_by_format=""):
"""Mount the partition with the given mount_point.
mount_options_by_format:
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index d409d94..c7a6a34 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1059,11 +1059,6 @@ else if get_stage("%(bcb_dev)s") != "3/3" then
target_boot.size, target_boot.sha1))
size.append(target_boot.size)
- if size:
- script.CacheFreeSpaceCheck(max(size))
-
- device_specific.IncrementalOTA_VerifyEnd()
-
if OPTIONS.two_step:
# Stage 1/3: (b) Write recovery image to /boot.
_WriteRecoveryImageToBoot(script, output_zip)
@@ -1722,11 +1717,6 @@ else if get_stage("%(bcb_dev)s") != "3/3" then
so_far += source_boot.size
size.append(target_boot.size)
- if size:
- script.CacheFreeSpaceCheck(max(size))
-
- device_specific.IncrementalOTA_VerifyEnd()
-
if OPTIONS.two_step:
# Stage 1/3: (b) Write recovery image to /boot.
_WriteRecoveryImageToBoot(script, output_zip)
--
1.9.1
另外还有一点如果在OTA升级过程很慢的话,可以适当提高cache分区的大小,可以极大提高升级的速度。
这篇关于ota升级过程提示cache分区太小导致升级失败的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!