summaryrefslogtreecommitdiff
authoryanpingw <yanpingw@google.com>2018-10-23 21:52:36 (GMT)
committer yanpingw <yanpingw@google.com>2018-10-24 17:07:03 (GMT)
commit50fe53ad2c6b9dd715dc907cec3a4657864ce4e2 (patch)
tree4c78bd894e989277e40391a05f741b7b490dcd44
parent09d46f101fbe805b38af01cc3f2fe7f29c014868 (diff)
downloadcommon-50fe53ad2c6b9dd715dc907cec3a4657864ce4e2.zip
common-50fe53ad2c6b9dd715dc907cec3a4657864ce4e2.tar.gz
common-50fe53ad2c6b9dd715dc907cec3a4657864ce4e2.tar.bz2
Flash system.img again when there is FAILED
When flashing system.img in lab, it could fail with the following message generated. Also see b/113497732 FAILED (status malformed (0 bytes)) this CL is to try flashing system.img again when it happens. Bug: 117216244 Test: ./flash-all.sh Change-Id: I89aab68f284faf5ad90c4665b89c4118dbb668fc
Diffstat
-rwxr-xr-xflash-all.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/flash-all.sh b/flash-all.sh
index 0efe224..cace8fd 100755
--- a/flash-all.sh
+++ b/flash-all.sh
@@ -50,7 +50,11 @@ fastboot $sern flash vbmeta vbmeta.img
fastboot $sern flash odm odm.img
fastboot $sern flash logo logo.img
fastboot $sern flash boot boot.img
-fastboot $sern flash system system.img
+if fastboot $sern flash system system.img 2>&1 | grep -q 'FAILED'; then
+ echo "Flashing system.img is not done properly. Try it again."
+ sleep 3
+ astboot $sern flash system system.img
+fi
fastboot $sern flash vendor vendor.img
fastboot $sern flash recovery recovery.img
fastboot $sern flash product product.img