File: wait-for-emulator.sh

package info (click to toggle)
grpc-java 1.26.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 11,852 kB
  • sloc: java: 146,813; cpp: 1,174; xml: 1,037; sh: 662; makefile: 40; python: 40
file content (16 lines) | stat: -rwxr-xr-x 361 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
echo "Waiting for emulator to start..."

bootanim=""
failcounter=0
until [[ "$bootanim" =~ "stopped" ]]; do
   bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
   let "failcounter += 1"
   # Timeout after 5 minutes.
   if [[ $failcounter -gt 300 ]]; then
      echo "Can not find device after 5 minutes..."
      exit 1
   fi
   sleep 1
done