Skip to content

Commit

Permalink
build: Fix device detection for a few of the envsetup commands
Browse files Browse the repository at this point in the history
 * Edge case where a certain developer ended up with a blank system
   partition in recovery. Wonder how that happened?

Change-Id: I17854a53bf18d07c98c4b7f53df252d6f1d7113d
  • Loading branch information
Steve Kondik authored and Flinny committed Jul 17, 2015
1 parent a71043b commit b0b580f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ function eat()
done
echo "Device Found.."
fi
if (adb shell cat /system/build.prop | grep -q "ro.slim.device=$SLIM_BUILD");
if (adb shell getprop ro.slim.device | grep -q "$SLIM_BUILD");
then
# if adbd isn't root we can't write to /cache/recovery/
adb root
Expand Down Expand Up @@ -1936,7 +1936,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.slim.device=$SLIM_BUILD");
if (adb shell getprop ro.slim.device | grep -q "$SLIM_BUILD");
then
adb push $OUT/boot.img /cache/
for i in $OUT/system/lib/modules/*;
Expand Down Expand Up @@ -1981,7 +1981,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.slim.device=$SLIM_BUILD");
if (adb shell getprop ro.slim.device | grep -q "$SLIM_BUILD");
then
adb push $OUT/recovery.img /cache/
adb shell dd if=/cache/recovery.img of=$PARTITION
Expand Down Expand Up @@ -2065,7 +2065,7 @@ function dopush()
echo "Device Found."
fi

if (adb shell cat /system/build.prop | grep -q "ro.slim.device=$SLIM_BUILD");
if (adb shell getprop ro.slim.device | grep -q "$SLIM_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]+' \
Expand Down

0 comments on commit b0b580f

Please sign in to comment.