From ec4627ca742f0a7ccd51b04f50d02f7aa68c4743 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Fri, 10 Jul 2015 02:31:24 -0700 Subject: build: Fix device detection for a few of the envsetup commands * Edge case where a certain developer ended up with a blank system partition in recovery. Wonder how that happened? Change-Id: I17854a53bf18d07c98c4b7f53df252d6f1d7113d --- envsetup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'envsetup.sh') diff --git a/envsetup.sh b/envsetup.sh index 57f3d5c..f8b13b0 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -742,7 +742,7 @@ function eat() done echo "Device Found.." fi - if (adb shell cat /system/build.prop | grep -q "ro.cm.device=$CM_BUILD"); + if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD"); then # if adbd isn't root we can't write to /cache/recovery/ adb root @@ -1734,7 +1734,7 @@ function installboot() sleep 1 adb wait-for-online shell mount /system 2>&1 > /dev/null adb wait-for-online remount - if (adb shell cat /system/build.prop | grep -q "ro.cm.device=$CM_BUILD"); + if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD"); then adb push $OUT/boot.img /cache/ for i in $OUT/system/lib/modules/*; @@ -1779,7 +1779,7 @@ function installrecovery() sleep 1 adb wait-for-online shell mount /system 2>&1 >> /dev/null adb wait-for-online remount - if (adb shell cat /system/build.prop | grep -q "ro.cm.device=$CM_BUILD"); + if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD"); then adb push $OUT/recovery.img /cache/ adb shell dd if=/cache/recovery.img of=$PARTITION @@ -2159,7 +2159,7 @@ function dopush() echo "Device Found." fi - if (adb shell cat /system/build.prop | grep -q "ro.cm.device=$CM_BUILD") || [ "$FORCE_PUSH" == "true" ]; + if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD") || [ "$FORCE_PUSH" == "true" ]; then # retrieve IP and PORT info if we're using a TCP connection TCPIPPORT=$(adb devices | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+[^0-9]+' \ -- cgit v1.1