pass blobs to applypatch in incremental OTAs
applypatch now takes patches as blob-valued arguments instead of just
filenames, eliminating the need to unpack all patches to /tmp before
starting to apply them.
Revert the last change I made where sha1_check(read_file(...)) was
substituted for apply_patch_check(...). apply_patch_check() knows to
check /cache/saved.file if the original source file is missing or has
a bad checksum, which is important if the device loses power or
otherwise restarts during patching.
Change-Id: Ia5b761474b0f809a5a5eed29455b1b145145699e
diff --git a/tools/releasetools/amend_generator.py b/tools/releasetools/amend_generator.py
index f3dceca..b543bf7 100644
--- a/tools/releasetools/amend_generator.py
+++ b/tools/releasetools/amend_generator.py
@@ -100,6 +100,10 @@
self.script.append("".join(out))
self.included_files.add(("applypatch_static", "applypatch"))
+ # Not quite right since we don't need to check /cache/saved.file on
+ # failure, but shouldn't hurt.
+ FileCheck = PatchCheck
+
def CacheFreeSpaceCheck(self, amount):
"""Check that there's at least 'amount' space that can be made
available on /cache."""