summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorAlan Orth <alan.orth@gmail.com>2012-08-26 16:33:51 +0300
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-17 17:56:51 +0000
commitcb7220e171eaf3d77fc0922552ef7ed8516a39d2 (patch)
treebb80510fb0e74b2d7efd01f1b18707dbb92abb92 /envsetup.sh
parent521a5150e87933f26a926037b8e84916a5941d07 (diff)
downloadbuild-cb7220e171eaf3d77fc0922552ef7ed8516a39d2.zip
build-cb7220e171eaf3d77fc0922552ef7ed8516a39d2.tar.gz
build-cb7220e171eaf3d77fc0922552ef7ed8516a39d2.tar.bz2
envsetup: Make eat restart adbd as root before pushing the recovery command
Without adbd running as root we can't write to /cache/recovery and eat fails with a permission denied. Change-Id: I015b50f29c001605cdc1a0088f68296b62809b56
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 019d52e..5753250 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -674,6 +674,10 @@ function eat()
done
echo "Device Found.."
fi
+ # if adbd isn't root we can't write to /cache/recovery/
+ adb root
+ sleep 1
+ adb wait-for-device
echo "Pushing $ZIPFILE to device"
if adb push $ZIPPATH /storage/sdcard0/ ; then
cat << EOF > /tmp/command