aboutsummaryrefslogtreecommitdiff
path: root/envsetup.sh
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2023-04-17 17:21:01 +0000
committerSteven Moreland <smoreland@google.com>2023-04-17 17:22:41 +0000
commit7275a19b5fa4db557c7487f686b5bcd1f4eb3361 (patch)
tree418fb947e883e9f3471f061b16e4668f95f18dcb /envsetup.sh
parent42bc8b9809bef1d70c5d97afbebf5b716407336b (diff)
envsetup: syswrite - wait after rooting
adb root sometimes takes a second, and the next command will fail. Bug: N/A Test: syswrite on device which isn't already rooted Change-Id: I91754c31c74bf0589ea8cbae77c10e5a120bdce5
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 905635c890..17d8a5d3b9 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -1096,12 +1096,12 @@ function qpid() {
#
# Easy way to make system.img/etc writable
function syswrite() {
- adb wait-for-device && adb root || return 1
+ adb wait-for-device && adb root && adb wait-for-device || return 1
if [[ $(adb disable-verity | grep -i "reboot") ]]; then
echo "rebooting"
- adb reboot && adb wait-for-device && adb root || return 1
+ adb reboot && adb wait-for-device && adb root && adb wait-for-device || return 1
fi
- adb wait-for-device && adb remount || return 1
+ adb remount || return 1
}
# coredump_setup - enable core dumps globally for any process