summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-07-10 02:31:24 -0700
committerAdnan Begovic <adnan@cyngn.com>2015-10-09 17:11:27 -0700
commitec4627ca742f0a7ccd51b04f50d02f7aa68c4743 (patch)
treeda20bb3bed738ba3287fb7624a4fc2aa870cc52e /envsetup.sh
parent3a13433ac8c3f97e84b93aa716f6985d8ac78cba (diff)
downloadbuild-ec4627ca742f0a7ccd51b04f50d02f7aa68c4743.zip
build-ec4627ca742f0a7ccd51b04f50d02f7aa68c4743.tar.gz
build-ec4627ca742f0a7ccd51b04f50d02f7aa68c4743.tar.bz2
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
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh8
1 files changed, 4 insertions, 4 deletions
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]+' \