From 618a81e818f8d1be611dfcd552220f11558cd088 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Fri, 25 Mar 2016 15:01:33 -0700 Subject: [PATCH] Remove post-install verification post-install verification calls range_sha1() and checks if the given partition has expected contents. It takes roughly 20 seconds on angler with 2.8G system image. Remove it to speed up OTA update. Also abort the update if block_image_update() fails, as we were relying on post-install verification to capture block_image_update() failures. cherry-picked from commit b2deb220335e1059a3c95d8063705f5706604bdb Bug: 27729678 Change-Id: I8123cd8929295ec26df247acf6bb51df813771d9 --- tools/releasetools/common.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 62ccc452ae..e54bbb0951 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -1446,7 +1446,8 @@ class BlockDifference(object): if progress: script.ShowProgress(progress, 0) self._WriteUpdate(script, output_zip) - self._WritePostInstallVerifyScript(script) + if OPTIONS.verify: + self._WritePostInstallVerifyScript(script) def WriteStrictVerifyScript(self, script): """Verify all the blocks in the care_map, including clobbered blocks. @@ -1570,7 +1571,8 @@ class BlockDifference(object): call = ('block_image_update("{device}", ' 'package_extract_file("{partition}.transfer.list"), ' - '"{partition}.new.dat", "{partition}.patch.dat");\n'.format( + '"{partition}.new.dat", "{partition}.patch.dat") ||\n' + ' abort("Failed to update {partition} image.");'.format( device=self.device, partition=self.partition)) script.AppendExtra(script.WordWrap(call))