OTA 升级时,概率性失败,提示Not enough free space on /cache to apply patches。
这是升级时会对cache 分区进行校验,可以跳过校验catche分区规避此问题。
+++ b/build/tools/releasetools/edify_generator.py
@@ -184,14 +184,14 @@ 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 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.
diff --git a/build/tools/releasetools/ota_from_target_files.py b/build/tools/releasetools/ota_from_target_files.py
index 6aa14d2..7590b8d 100755
--- a/build/tools/releasetools/ota_from_target_files.py
+++ b/build/tools/releasetools/ota_from_target_files.py
@@ -1059,10 +1059,10 @@ 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))
+# if size:
+# script.CacheFreeSpaceCheck(max(size))
- device_specific.IncrementalOTA_VerifyEnd()
+# device_specific.IncrementalOTA_VerifyEnd()
if OPTIONS.two_step:
# Stage 1/3: (b) Write recovery image to /boot.
@@ -1727,10 +1727,10 @@ 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))
+# if size:
+# script.CacheFreeSpaceCheck(max(size))
- device_specific.IncrementalOTA_VerifyEnd()
+# device_specific.IncrementalOTA_VerifyEnd()
添加GMS包 OTA升级提示Not enough free space on /cache to apply patches
build\tools\releasetools\ota_from_target_files
OPTIONS = common.OPTIONS
OPTIONS.package_key = None
OPTIONS.incremental_source = None
OPTIONS.verify = False
OPTIONS.require_verbatim = set(("system/priv-app/GmsCore/oat/arm/GmsCore.odex",)) //modify
OPTIONS.prohibit_verbatim = set(("system/build.prop",))