From baf936a37343b115898a5fdb8ca88c4ef6fabd3f Mon Sep 17 00:00:00 2001 From: Xin Li Date: Mon, 30 Oct 2017 09:21:28 -0700 Subject: Refuse to flash if fastboot have no knowledge about dtbo. Test: AOSP generate_factory_images Bug: 68330804 Change-Id: Ib9b83109a124ec944c6698cca95b359ed02c84ce --- generate-factory-images-common.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generate-factory-images-common.sh b/generate-factory-images-common.sh index dc1bfcd..a2d81ca 100644 --- a/generate-factory-images-common.sh +++ b/generate-factory-images-common.sh @@ -101,6 +101,10 @@ cat > tmp/$PRODUCT-$VERSION/flash-all.sh << EOF # See the License for the specific language governing permissions and # limitations under the License. +if ! grep -q dtbo.sig \$(which fastboot); then + echo "fastboot too old" + exit 1 +fi EOF if test "$UNLOCKBOOTLOADER" = "true" then @@ -254,6 +258,10 @@ cat > tmp/$PRODUCT-$VERSION/flash-base.sh << EOF # See the License for the specific language governing permissions and # limitations under the License. +if ! grep -q dtbo.sig \$(which fastboot); then + echo "fastboot too old" + exit 1 +fi EOF if test "$XLOADER" != "" then -- cgit v1.2.3