summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio López <turl@tuxfamily.org>2013-09-18 17:22:45 -0300
committerEmilio López <turl@tuxfamily.org>2013-09-18 17:22:45 -0300
commit2a6b146974fba6a8d54c0154cf11ce691e7524b2 (patch)
tree730e450517c83e087025b175b27ccb0a205a0e8c
parent07424d36c4da0afe19af7b646867317b2a35ab80 (diff)
downloadreplicant_build-2a6b146974fba6a8d54c0154cf11ce691e7524b2.zip
replicant_build-2a6b146974fba6a8d54c0154cf11ce691e7524b2.tar.gz
replicant_build-2a6b146974fba6a8d54c0154cf11ce691e7524b2.tar.bz2
build: let TWRP eat zips too
This allows us to sideload zips regardless of the recovery in place. Change-Id: I5e95614e545a617737fcc27fd892f42c29a06f9b
-rw-r--r--envsetup.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 44f847a..30bc60e 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -694,13 +694,20 @@ function eat()
adb root
sleep 1
adb wait-for-device
+ # CWM command
cat << EOF > /tmp/command
--sideload
EOF
- if adb push /tmp/command /cache/recovery/ ; then
+ # TWRP command
+ cat << EOF > /tmp/openrecoveryscript
+sideload
+EOF
+ if adb push /tmp/command /cache/recovery/ && adb push /tmp/openrecoveryscript /cache/recovery/; then
echo "Rebooting into recovery for sideload installation"
adb reboot recovery
+ adb kill-server
adb wait-for-sideload
+ echo "Device back online, trying to sideload"
adb sideload $ZIPPATH
fi
rm /tmp/command