Cómo saber exactamente el estado del emulador: no funciona, cargado, dispositivo

I have a problem and I do not know how to solve it.

Cómo saber exactamente el estado del emulador: no funciona, cargado, dispositivo

I'm creating a build of the application on the server using TeamCity. It describes the steps of the assembly build.

The first step is launching the emulator with the bash script:

Step 1: Emulator start Runner type: Command Line (Simple command execution) Custom script:

DEVICES=`adb devices`
if [[ $DEVICES == *emulator*device* ]]
    echo "Emulator has already been running"
    if [[ $DEVICES == *emulator* ]]
        adb emu kill
        echo "All previous emulator were killed"
    echo "Launching new emulator..."
    emulator @Emul -no-window &
    adb wait-for-device
    sleep 60 #android os should start completely
    echo "Emulator launched"
    adb devices

The problem is that the emulator upon hanging. The script hangs on the statement: “adb wait-for-device” And does not continue its execution. And the build process does not continue. And then everything builds in TeamCity crash. Have to manually connect via VNC and restart emulator.

Can you tell as well:

  • or to receive information from the emulator on his condition; (more than the right decision “adb wait-for-device ” )
  • or how to catch the time delay signal processing response and restart the script is executed within the TeamCity

Thank you for your attention to the issue

preguntado el 09 de marzo de 12 a las 15:03

1 Respuestas

It show only two step of Emulater. 1.Online 2.offline

to know stage of Emulator... Type following command. C:\path to sdks\adb devices
It will show whether your emulator is active or not and show number of active emulator.

Respondido el 21 de junio de 13 a las 05:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.