ci/android: Fix intermittent adb root failures

The combined $ADB wait-for-device root command can be flaky with
Cuttlefish, sometimes failing with:
"adb: unable to connect for root: closed"

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41314>
This commit is contained in:
Valentine Burley 2026-05-01 11:01:06 +02:00
parent f34c18cb4f
commit d7c3362752

View file

@ -8,8 +8,18 @@ set -uex
: "${ADB:=adb}"
$ADB wait-for-device root
sleep 1
$ADB wait-for-device
for i in $(seq 1 5); do
if $ADB root; then
break
fi
if [ "$i" -eq 5 ]; then
echo "Failed to get adb root after 5 attempts"
exit 1
fi
sleep 2
done
$ADB wait-for-device
# overlay