Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-11952

Emulator occasionally hangs indefinitely on startup, unable to connect adb

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Android-Emulator 1.19-SNAPSHOT (from git)
      Jenkins 1.438
      SDK r15
    • Similar Issues:

      Description

      Sometimes the emulator will fail to start up, this seems to only (or mostly) happen when snapshots are enabled. When this happens, it'll go in a loop of, until it times out:

      $ /opt/android-sdk/platform-tools/adb connect emu:38996,48597
      $ /opt/android-sdk/platform-tools/adb -s emulator-38996 shell getprop dev.bootcomplete

      This seems to be because sometimes the adb server never moves the device from the "offline" to the "online" status. Forcing a reconnect seems to fix this - like restarting the adb server.

        Attachments

          Issue Links

            Activity

            Hide
            jorgenpt Jørgen Tjernø added a comment -

            I've submitted a proposed fix for this here:
            https://github.com/jorgenpt/android-emulator-plugin/commit/4aff0222c3be662cb4e5db11834dc69b79f686c4

            It's a part of this pull request:
            https://github.com/jenkinsci/android-emulator-plugin/pull/8

            The change makes it use TCP connections for the emulators, which can be killed & reconnected.

            Show
            jorgenpt Jørgen Tjernø added a comment - I've submitted a proposed fix for this here: https://github.com/jorgenpt/android-emulator-plugin/commit/4aff0222c3be662cb4e5db11834dc69b79f686c4 It's a part of this pull request: https://github.com/jenkinsci/android-emulator-plugin/pull/8 The change makes it use TCP connections for the emulators, which can be killed & reconnected.
            Hide
            orrc Christopher Orr added a comment -

            Version 2.0 has now been released, which includes your patch.

            Show
            orrc Christopher Orr added a comment - Version 2.0 has now been released, which includes your patch.
            Hide
            randroid Roberto Andrade added a comment -

            Seeing this again with the latest Android Emulator plugin (2.11.1), Jenkins (1.569) and Android SDK (rev 23).

            [android] Using Android SDK: /Users/Shared/Jenkins/Home/tools/android-sdk
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            [android] Erasing existing emulator data...
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -no-boot-anim -ports 5818,5819 -avd jenkins -no-snapshot-load -no-snapshot-save -wipe-data
            * daemon not running. starting it now on port 5820 *
            * daemon started successfully *
            HAX is working and emulator runs in fast virt mode
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            [android] Waiting for emulator to finish booting...
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818
            [android] Timed-out after waiting 720 seconds for emulator
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818
            [android] Stopping Android emulator
            $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb kill-server
            
            Show
            randroid Roberto Andrade added a comment - Seeing this again with the latest Android Emulator plugin (2.11.1), Jenkins (1.569) and Android SDK (rev 23). [android] Using Android SDK: /Users/Shared/Jenkins/Home/tools/android-sdk $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb start-server [android] Starting Android emulator [android] Erasing existing emulator data... $ /Users/Shared/Jenkins/Home/tools/android-sdk/tools/emulator -no-boot-anim -ports 5818,5819 -avd jenkins -no-snapshot-load -no-snapshot-save -wipe-data * daemon not running. starting it now on port 5820 * * daemon started successfully * HAX is working and emulator runs in fast virt mode $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 [android] Waiting for emulator to finish booting... $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb connect emulator-5818 [android] Timed-out after waiting 720 seconds for emulator $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb disconnect emulator-5818 [android] Stopping Android emulator $ /Users/Shared/Jenkins/Home/tools/android-sdk/platform-tools/adb kill-server
            Hide
            oskard Oskar Danielsson added a comment -

            As am I. Android Emulator plugin (2.11.1), Jenkins (1.569) and Android SDK Tools (Rev. 23.0.2)

            [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2
            [android] Starting Android emulator from snapshot
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5718,5719 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio
            * daemon not running. starting it now on port 5720 *
            * daemon started successfully *
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            [android] Waiting for emulator to finish booting...
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718
            [android] Timed-out after waiting 360 seconds for emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718
            [android] Stopping Android emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb kill-server
            Show
            oskard Oskar Danielsson added a comment - As am I. Android Emulator plugin (2.11.1), Jenkins (1.569) and Android SDK Tools (Rev. 23.0.2) [android] Using Android SDK: /Users/Shared/Jenkins/android/adt-bundle/sdk $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2 [android] Starting Android emulator from snapshot $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5718,5719 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio * daemon not running. starting it now on port 5720 * * daemon started successfully * $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 [android] Waiting for emulator to finish booting... $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5718 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5718 [android] Timed-out after waiting 360 seconds for emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5718 [android] Stopping Android emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb kill-server
            Hide
            oskard Oskar Danielsson added a comment - - edited

            I updated Jenkins to 1.571 and retried running the job.

            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2
            [android] Starting Android emulator from snapshot
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5581,5582 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio
            ERROR: Timeout after 5 seconds
            ADB server didn't ACK
            * failed to start daemon *
            * daemon not running. starting it now on port 5583 *
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5581
            

            Nothing else happens after this, it ran over an hour before I stopped it.

            The simulator starts and loads from the snapshot successfully on the server (I enabled "Show emulator window").

            I ran it again after this, and here is the result:

            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2
            [android] Starting Android emulator from snapshot
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5826,5827 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio
            ERROR: Timeout after 5 seconds
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5826
            Show
            oskard Oskar Danielsson added a comment - - edited I updated Jenkins to 1.571 and retried running the job. $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2 [android] Starting Android emulator from snapshot $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5581,5582 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio ERROR: Timeout after 5 seconds ADB server didn't ACK * failed to start daemon * * daemon not running. starting it now on port 5583 * $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5581 Nothing else happens after this, it ran over an hour before I stopped it. The simulator starts and loads from the snapshot successfully on the server (I enabled "Show emulator window"). I ran it again after this, and here is the result: $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2 [android] Starting Android emulator from snapshot $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5826,5827 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio ERROR: Timeout after 5 seconds $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5826
            Hide
            oldelvet Richard Mortimer added a comment -

            I just upgraded to 2.11.1 from my private build of the plugin. 2.11.1 failed to connect to the emulator in the way described above. I haven't investigated the reason why yet but it was definitely working in the private build.

            Show
            oldelvet Richard Mortimer added a comment - I just upgraded to 2.11.1 from my private build of the plugin. 2.11.1 failed to connect to the emulator in the way described above. I haven't investigated the reason why yet but it was definitely working in the private build.
            Hide
            oldelvet Richard Mortimer added a comment -

            I have only managed to reproduce the issue once on 2.11.1 and never on any other version of the emulator. Thus I do not think that the problem is specific to 2.11.1.

            From my knowledge about how emulator startup works I suspect that the emulator is starting up faster than the ADB server. Then when the emulators gets to the stage where it tries to register with the ADB server it fails because ADB is not ready to accept connections on the ADB socket.

            The relevant emulator code in external/qemu/android/qemu-setup.c has a comment that says

            /* send a simple message to the ADB host server to tell it we just started.
             * it should be listening on port 5037. if we can't reach it, don't bother
             */
            

            Looking at the android-emulator-plugin code in AndroidEmulator.java the ADB process is started but the code only waits for it to complete after the emulator has been started. It would seem sensible to not start the emulator until ADB has been confirmed to have started. I have a patch that I am testing now and will submit a pull request later today.

            Show
            oldelvet Richard Mortimer added a comment - I have only managed to reproduce the issue once on 2.11.1 and never on any other version of the emulator. Thus I do not think that the problem is specific to 2.11.1. From my knowledge about how emulator startup works I suspect that the emulator is starting up faster than the ADB server. Then when the emulators gets to the stage where it tries to register with the ADB server it fails because ADB is not ready to accept connections on the ADB socket. The relevant emulator code in external/qemu/android/qemu-setup.c has a comment that says /* send a simple message to the ADB host server to tell it we just started. * it should be listening on port 5037. if we can 't reach it, don' t bother */ Looking at the android-emulator-plugin code in AndroidEmulator.java the ADB process is started but the code only waits for it to complete after the emulator has been started. It would seem sensible to not start the emulator until ADB has been confirmed to have started. I have a patch that I am testing now and will submit a pull request later today.
            Hide
            oldelvet Richard Mortimer added a comment -

            Pull request submitted at
            https://github.com/jenkinsci/android-emulator-plugin/pull/38

            Testing appreciated using the android-emulator-plugin.hpi image from the autobuilder at
            https://jenkins.ci.cloudbees.com/job/plugins/job/android-a-plugin/65/org.jenkins-ci.plugins$android-emulator/

            Show
            oldelvet Richard Mortimer added a comment - Pull request submitted at https://github.com/jenkinsci/android-emulator-plugin/pull/38 Testing appreciated using the android-emulator-plugin.hpi image from the autobuilder at https://jenkins.ci.cloudbees.com/job/plugins/job/android-a-plugin/65/org.jenkins-ci.plugins$android-emulator/
            Hide
            oskard Oskar Danielsson added a comment - - edited

            I would love to test it, but the link to the image from the autobuilder isn't working

            Edit: Here is a working link

            Show
            oskard Oskar Danielsson added a comment - - edited I would love to test it, but the link to the image from the autobuilder isn't working Edit: Here is a working link
            Hide
            oskard Oskar Danielsson added a comment - - edited

            It's still not working with the test build:

            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 5820 *
            * daemon started successfully *
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2
            [android] Starting Android emulator from snapshot
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5818,5819 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            [android] Waiting for emulator to finish booting...
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            etc...

            If I close the emulator during this process, this happens:

            ...
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818
            [android] Emulator was shut down before it finished booting
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818
            [android] Stopping Android emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb kill-server
            Finished: NOT_BUILT

            This happened before as well, but I forgot to mention it

            Show
            oskard Oskar Danielsson added a comment - - edited It's still not working with the test build: $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server * daemon not running. starting it now on port 5820 * * daemon started successfully * $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator-arm -snapshot-list -no-window -avd Nexus-S-2 [android] Starting Android emulator from snapshot $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5818,5819 -avd Nexus-S-2 -snapshot jenkins -no-snapshot-save -noaudio $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 [android] Waiting for emulator to finish booting... $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 etc... If I close the emulator during this process, this happens: ... $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb -s emulator-5818 shell getprop dev.bootcomplete error: device not found error: device not found $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818 $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5818 [android] Emulator was shut down before it finished booting $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb disconnect emulator-5818 [android] Stopping Android emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb kill-server Finished: NOT_BUILT This happened before as well, but I forgot to mention it
            Hide
            oskard Oskar Danielsson added a comment -

            I'm starting to suspect that I have a separate issue considering I have a similar problem when not using snapshots. This is my output without using snapshots:

            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            ERROR: Timeout after 5 seconds
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server
            ERROR: Timeout after 5 seconds
            [android] Starting Android emulator
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5773,5774 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio
            $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5773
            Show
            oskard Oskar Danielsson added a comment - I'm starting to suspect that I have a separate issue considering I have a similar problem when not using snapshots. This is my output without using snapshots: $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server ERROR: Timeout after 5 seconds $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb start-server ERROR: Timeout after 5 seconds [android] Starting Android emulator $ /Users/Shared/Jenkins/android/adt-bundle/sdk/tools/emulator -no-boot-anim -ports 5773,5774 -avd Nexus-S-2 -no-snapshot-load -no-snapshot-save -noaudio $ /Users/Shared/Jenkins/android/adt-bundle/sdk/platform-tools/adb connect emulator-5773
            Hide
            oldelvet Richard Mortimer added a comment -

            Can you open a new JIRA ticket for the non-snapshots issue. The debug from that clearly shows that the adb server is failing to start properly. I think that particular issue needs investigating first. The other failing to connect to adb is likely to be related but lets address them separately first.

            We also need to find a way to make it more reproducible on other systems.

            Does it always happen on your system? Or does it sometime work? Could it be system load related? Is your slave heavily loaded? What OS type/version are you using?

            Show
            oldelvet Richard Mortimer added a comment - Can you open a new JIRA ticket for the non-snapshots issue. The debug from that clearly shows that the adb server is failing to start properly. I think that particular issue needs investigating first. The other failing to connect to adb is likely to be related but lets address them separately first. We also need to find a way to make it more reproducible on other systems. Does it always happen on your system? Or does it sometime work? Could it be system load related? Is your slave heavily loaded? What OS type/version are you using?
            Hide
            oskard Oskar Danielsson added a comment -

            Yes, I will. I will provide the requested information in that issue

            Show
            oskard Oskar Danielsson added a comment - Yes, I will. I will provide the requested information in that issue
            Hide
            nonox Bruno Perel added a comment - - edited

            I have this issue as well. My build log is the following :

            $ /var/lib/jenkins/tools/android-sdk/tools/android list target
            [android] Using Android SDK: /var/lib/jenkins/tools/android-sdk
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            [android] Erasing existing emulator data...
            $ /var/lib/jenkins/tools/android-sdk/tools/emulator64-arm -no-boot-anim -ports 5747,5748 -prop persist.sys.language=fr -prop persist.sys.country=FR -avd hudson_fr-FR_240_WVGA_android-17_armeabi-v7a -no-snapshot-load -no-snapshot-save -wipe-data -no-window -no-audio -gpu off
            * daemon not running. starting it now on port 5749 *
            * daemon started successfully *
            Failed to Initialize backend EGL display
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747
            [android] Waiting for emulator to finish booting...
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5747
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            

            and then continues infinitely. I can reproduce it all the time.

            I run on Debian 3.14.4-1 (headless), Jenkins version 1.574 with Android Emulator plugin version 2.11.1. I configured the emulator to run android-17 with "Reset emulator state at start-up" checked.

            Show
            nonox Bruno Perel added a comment - - edited I have this issue as well. My build log is the following : $ /var/lib/jenkins/tools/android-sdk/tools/android list target [android] Using Android SDK: /var/lib/jenkins/tools/android-sdk $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server [android] Starting Android emulator [android] Erasing existing emulator data... $ /var/lib/jenkins/tools/android-sdk/tools/emulator64-arm -no-boot-anim -ports 5747,5748 -prop persist.sys.language=fr -prop persist.sys.country=FR -avd hudson_fr-FR_240_WVGA_android-17_armeabi-v7a -no-snapshot-load -no-snapshot-save -wipe-data -no-window -no-audio -gpu off * daemon not running. starting it now on port 5749 * * daemon started successfully * Failed to Initialize backend EGL display $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747 [android] Waiting for emulator to finish booting... $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete error: device offline error: device offline $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747 $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete error: device offline error: device offline $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747 $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete error: device offline error: device offline $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5747 $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5747 $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete error: device offline error: device offline and then continues infinitely. I can reproduce it all the time. I run on Debian 3.14.4-1 (headless), Jenkins version 1.574 with Android Emulator plugin version 2.11.1. I configured the emulator to run android-17 with "Reset emulator state at start-up" checked.
            Hide
            oldelvet Richard Mortimer added a comment -

            Are you able to try following android emulator plugin build

            It will be interesting to see if it helps your situation.

            Show
            oldelvet Richard Mortimer added a comment - Are you able to try following android emulator plugin build It will be interesting to see if it helps your situation.
            Hide
            nonox Bruno Perel added a comment - - edited

            Thanks for the advice. I updated the plugin to version 2.12-SNAPSHOT but unfortunately got the exact same error log.

            Show
            nonox Bruno Perel added a comment - - edited Thanks for the advice. I updated the plugin to version 2.12-SNAPSHOT but unfortunately got the exact same error log.
            Hide
            oldelvet Richard Mortimer added a comment -

            Can you post the log please. If the correct build was installed the order of some messages should have changed. I would just like to confirm that before investigating further.

            Does the error always seem to happen for you? Knowing that will be a good data point!

            Show
            oldelvet Richard Mortimer added a comment - Can you post the log please. If the correct build was installed the order of some messages should have changed. I would just like to confirm that before investigating further. Does the error always seem to happen for you? Knowing that will be a good data point!
            Hide
            nonox Bruno Perel added a comment -

            Indeed, some of the error log lines swapped, I didn't think it was important. Here's the new log :

            $ /var/lib/jenkins/tools/android-sdk/tools/android list target
            [android] Using Android SDK: /var/lib/jenkins/tools/android-sdk
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 5885 *
            * daemon started successfully *
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            [android] Erasing existing emulator data...
            $ /var/lib/jenkins/tools/android-sdk/tools/emulator64-arm -no-boot-anim -ports 5883,5884 -prop persist.sys.language=fr -prop persist.sys.country=FR -avd hudson_fr-FR_240_WVGA_android-17_armeabi-v7a -no-snapshot-load -no-snapshot-save -wipe-data -no-window -no-audio -gpu off
            Failed to Initialize backend EGL display
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            [android] Waiting for emulator to finish booting...
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete
            error: device not found
            error: device not found
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883
            [android] Timed-out after waiting 720 seconds for emulator
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883
            [android] Stopping Android emulator
            emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
            $ /var/lib/jenkins/tools/android-sdk/platform-tools/adb kill-server
            

            Yes, it looks like I always reproduce this error.

            Show
            nonox Bruno Perel added a comment - Indeed, some of the error log lines swapped, I didn't think it was important. Here's the new log : $ / var /lib/jenkins/tools/android-sdk/tools/android list target [android] Using Android SDK: / var /lib/jenkins/tools/android-sdk $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb start-server * daemon not running. starting it now on port 5885 * * daemon started successfully * $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb start-server [android] Starting Android emulator [android] Erasing existing emulator data... $ / var /lib/jenkins/tools/android-sdk/tools/emulator64-arm -no-boot-anim -ports 5883,5884 -prop persist.sys.language=fr -prop persist.sys.country=FR -avd hudson_fr-FR_240_WVGA_android-17_armeabi-v7a -no-snapshot-load -no-snapshot-save -wipe-data -no-window -no-audio -gpu off Failed to Initialize backend EGL display $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 [android] Waiting for emulator to finish booting... $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device offline error: device offline $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device offline error: device offline $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device offline error: device offline $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device offline error: device offline $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device offline error: device offline $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device offline error: device offline $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb -s emulator-5883 shell getprop dev.bootcomplete error: device not found error: device not found $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb connect emulator-5883 [android] Timed-out after waiting 720 seconds for emulator $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5883 [android] Stopping Android emulator emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. $ / var /lib/jenkins/tools/android-sdk/platform-tools/adb kill-server Yes, it looks like I always reproduce this error.
            Hide
            ewilson90 Evan Wilson added a comment -

            I am seeing the exact same error as Bruno. The adb documentation says that the "adb connect" command defaults to port 5555. In the console log "adb connect emulator-xxxx" doesn't specify a port #. Could this be fixed by specifying the correct port in that command (adb connect emulator-1234:1234)? Just a thought, not sure if this is the problem.

            Show
            ewilson90 Evan Wilson added a comment - I am seeing the exact same error as Bruno. The adb documentation says that the "adb connect" command defaults to port 5555. In the console log "adb connect emulator-xxxx" doesn't specify a port #. Could this be fixed by specifying the correct port in that command (adb connect emulator-1234:1234)? Just a thought, not sure if this is the problem.
            Hide
            orrc Christopher Orr added a comment -

            Yeah, since the last release (where we moved from host:port to emulator-XXXX), the "connect"/"disconnect" stuff probably doesn't make sense any more — it's just silently failing the whole time in the plugin.

            e.g. If I run it on the command line manually:

            $ ANDROID_ADB_SERVER_PORT=9876 adb devices
            List of devices attached 
            emulator-5799	device
            
            $ ANDROID_ADB_SERVER_PORT=9876 adb connect emulator-5799
            unable to connect to emulator-5799:5555
            
            $ ANDROID_ADB_SERVER_PORT=9876 adb disconnect emulator-5799
            No such device emulator-5799:5555
            

            So we can probably just delete that code; the emulator should be attached to adb with the patch from Richard above (as the adb server will be up and running before the emulator).

            Show
            orrc Christopher Orr added a comment - Yeah, since the last release (where we moved from host:port to emulator-XXXX), the "connect"/"disconnect" stuff probably doesn't make sense any more — it's just silently failing the whole time in the plugin. e.g. If I run it on the command line manually: $ ANDROID_ADB_SERVER_PORT=9876 adb devices List of devices attached emulator-5799 device $ ANDROID_ADB_SERVER_PORT=9876 adb connect emulator-5799 unable to connect to emulator-5799:5555 $ ANDROID_ADB_SERVER_PORT=9876 adb disconnect emulator-5799 No such device emulator-5799:5555 So we can probably just delete that code; the emulator should be attached to adb with the patch from Richard above (as the adb server will be up and running before the emulator).
            Hide
            nonox Bruno Perel added a comment -

            Should we downgrade to some older version then ?

            Show
            nonox Bruno Perel added a comment - Should we downgrade to some older version then ?
            Hide
            orrc Christopher Orr added a comment -

            You could try downgrading to plugin version 2.10 and see whether it makes a difference.

            But the strange part in your most recent log is that you get "device offline" a lot — which is normal, as we're waiting for the emulator to start. But then it switches to "device not found", which indicates that the ADB server has somehow forgotten about the emulator.

            This could happen either because the ADB server crashed, and was then automatically restarted upon the next "adb shell" command (though this won't be visible in the logs as we don't log stdout in this case), or because the emulator itself has crashed.

            For the other cases, where the emulator remains connected to ADB, but remains in the "offline" state (i.e. the original reason for this bug report), since I can't reproduce this, it's hard to say what the fix should be.

            Killing and restarting the ADB server doesn't help, as we (currently) use ports above the usual 5554-5590 range, so the existing emulator won't be auto-detected by the new ADB server instance.
            Since we're no longer using "localhost:12345", we can't use the "adb connect" command either to re-introduce the emulator to ADB.

            However, we can send the ADB protocol command directly to the server to do the same, e.g.
            echo '0012host:emulator:5800' | nc localhost 9876
            Where 5800 is the emulator's ADB port, and 9876 is the ADB server port.

            But again, without being able to reproduce this, it's hard to tell whether this will be helpful. Unless anybody has any other ideas, I can try and create a patch including better logging (to detect adb crashes), and possibly manually reconnecting to the device in place of the now-redundant "adb connect" code.

            Show
            orrc Christopher Orr added a comment - You could try downgrading to plugin version 2.10 and see whether it makes a difference. But the strange part in your most recent log is that you get "device offline" a lot — which is normal, as we're waiting for the emulator to start. But then it switches to "device not found", which indicates that the ADB server has somehow forgotten about the emulator. This could happen either because the ADB server crashed, and was then automatically restarted upon the next "adb shell" command (though this won't be visible in the logs as we don't log stdout in this case), or because the emulator itself has crashed. For the other cases, where the emulator remains connected to ADB, but remains in the "offline" state (i.e. the original reason for this bug report), since I can't reproduce this, it's hard to say what the fix should be. Killing and restarting the ADB server doesn't help, as we (currently) use ports above the usual 5554-5590 range, so the existing emulator won't be auto-detected by the new ADB server instance. Since we're no longer using "localhost:12345", we can't use the "adb connect" command either to re-introduce the emulator to ADB. However, we can send the ADB protocol command directly to the server to do the same, e.g. echo '0012host:emulator:5800' | nc localhost 9876 Where 5800 is the emulator's ADB port, and 9876 is the ADB server port. But again, without being able to reproduce this, it's hard to tell whether this will be helpful. Unless anybody has any other ideas, I can try and create a patch including better logging (to detect adb crashes), and possibly manually reconnecting to the device in place of the now-redundant "adb connect" code.
            Hide
            ewilson90 Evan Wilson added a comment -

            I'm now using the build that Richard posted. Seems to be working more reliably.
            Thanks Richard and Christopher!

            Show
            ewilson90 Evan Wilson added a comment - I'm now using the build that Richard posted. Seems to be working more reliably. Thanks Richard and Christopher!
            Hide
            guillaume Guillaume added a comment - - edited

            I too see this error, and consistently.
            Tried with older platforms (from API 17 on), with older plugin versions (from v2.10), but if fails to connect, with the same pattern as described above (see logs below).
            I also tried v2.12-SNAPSHOT contributed by Richard but it didn't help either.

            I'm building on a Mac mini with the latest Android SDK (tools v23.0.2 and platform / build tools v20).

            As it always reproduces for me (and prevents my existing jobs from running tests) so I'd be more than happy to help with debugging and fixing this issue.

            [android] Using Android SDK: /Users/build/.jenkins/tools/android-sdk
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 5849 *
            * daemon started successfully *
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            $ /Users/build/.jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 5847,5848 -avd hudson_de-DE_480_1200x1920_android-18_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            [android] Waiting for emulator to finish booting...
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847
            [android] Timed-out after waiting 360 seconds for emulator
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847
            [android] Stopping Android emulator
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb kill-server
            

            (and goes on like this until time out).

            Show
            guillaume Guillaume added a comment - - edited I too see this error, and consistently. Tried with older platforms (from API 17 on), with older plugin versions (from v2.10), but if fails to connect, with the same pattern as described above (see logs below). I also tried v2.12-SNAPSHOT contributed by Richard but it didn't help either. I'm building on a Mac mini with the latest Android SDK (tools v23.0.2 and platform / build tools v20). As it always reproduces for me (and prevents my existing jobs from running tests) so I'd be more than happy to help with debugging and fixing this issue. [android] Using Android SDK: /Users/build/.jenkins/tools/android-sdk $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server * daemon not running. starting it now on port 5849 * * daemon started successfully * $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server [android] Starting Android emulator $ /Users/build/.jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 5847,5848 -avd hudson_de-DE_480_1200x1920_android-18_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 [android] Waiting for emulator to finish booting... $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5847 [android] Timed-out after waiting 360 seconds for emulator $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5847 [android] Stopping Android emulator $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb kill-server (and goes on like this until time out).
            Hide
            oldelvet Richard Mortimer added a comment -

            @Guillaume your log looks to be showing a different error. The "error: device offline" message stops appearing meaning that the emulator is correctly connected to adb. You did not show the latter part of the log where the build actually failed but it could be that the failure was due to the emulator being slow to boot and android-emulator-plugin just gave up waiting.

            Show
            oldelvet Richard Mortimer added a comment - @Guillaume your log looks to be showing a different error. The "error: device offline" message stops appearing meaning that the emulator is correctly connected to adb. You did not show the latter part of the log where the build actually failed but it could be that the failure was due to the emulator being slow to boot and android-emulator-plugin just gave up waiting.
            Hide
            guillaume Guillaume added a comment -

            Hi Richard, thanks for checking it.
            I updated my previous comment to show the full log.

            It times out after 360 seconds.
            I tried to start the same AVD manually on the server and it took about 20 seconds to boot up.

            With your patch (2.12-SNAPSHOT), it seems to connect to the emulator as the device offline messages disappear, but somehow fails to go on.

            With the current latest version (2.11), it otuputs the device offline error messages at every attempt up to time out.

            Show
            guillaume Guillaume added a comment - Hi Richard, thanks for checking it. I updated my previous comment to show the full log. It times out after 360 seconds. I tried to start the same AVD manually on the server and it took about 20 seconds to boot up. With your patch (2.12-SNAPSHOT), it seems to connect to the emulator as the device offline messages disappear, but somehow fails to go on. With the current latest version (2.11), it otuputs the device offline error messages at every attempt up to time out.
            Hide
            oldelvet Richard Mortimer added a comment -

            I've added a bit of debug to list connected devices (if any) whilst waiting for the emulator to boot up.

            android-emulator-2.12-SNAPSHOT.hpi

            Can someone who can reproduce this problem please test this and post the build console output.

            The code used to produce this build can be found at
            https://github.com/jenkinsci/android-emulator-plugin/pull/39

            Show
            oldelvet Richard Mortimer added a comment - I've added a bit of debug to list connected devices (if any) whilst waiting for the emulator to boot up. android-emulator-2.12-SNAPSHOT.hpi Can someone who can reproduce this problem please test this and post the build console output. The code used to produce this build can be found at https://github.com/jenkinsci/android-emulator-plugin/pull/39
            Hide
            guillaume Guillaume added a comment -

            This is the output in my case:

            [android] Using Android SDK: /Users/build/.jenkins/tools/android-sdk
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 5874 *
            * daemon started successfully *
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            $ /Users/build/.jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 5872,5873 -avd hudson_de-DE_480_1200x1920_android-18_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            [android] Waiting for emulator to finish booting...
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          offline
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          offline
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l
            List of devices attached 
            emulator-5872          device product:sdk model:sdk device:generic
            
            [android] adb devices returned 0
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872
            [android] Timed-out after waiting 360 seconds for emulator
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872
            [android] Stopping Android emulator
            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb kill-server
            Archiving artifacts
            Notifying upstream projects of job completion
            Finished: NOT_BUILT
            
            Show
            guillaume Guillaume added a comment - This is the output in my case: [android] Using Android SDK: /Users/build/.jenkins/tools/android-sdk $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server * daemon not running. starting it now on port 5874 * * daemon started successfully * $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb start-server [android] Starting Android emulator $ /Users/build/.jenkins/tools/android-sdk/tools/emulator -no-boot-anim -ports 5872,5873 -avd hudson_de-DE_480_1200x1920_android-18_armeabi-v7a -no-snapshot-load -no-snapshot-save -no-window $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 [android] Waiting for emulator to finish booting... $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 offline [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 offline [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete error: device offline error: device offline $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb devices -l List of devices attached emulator-5872 device product:sdk model:sdk device: generic [android] adb devices returned 0 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5872 shell getprop dev.bootcomplete $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb connect emulator-5872 [android] Timed-out after waiting 360 seconds for emulator $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb disconnect emulator-5872 [android] Stopping Android emulator $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb kill-server Archiving artifacts Notifying upstream projects of job completion Finished: NOT_BUILT
            Hide
            oldelvet Richard Mortimer added a comment -

            @Guillaume that output shows that the emulator is starting up and is correctly attaching to adb. For some reason the emulator is then failing to complete the boot.

            I think your scenario should be tracked as a separate issue (to avoid things getting too complex).

            I guess that the build will not have captured any logcat output before failure. The next step in debugging your problem might be to capture it and see if there is anything of interest in the logs.

            Show
            oldelvet Richard Mortimer added a comment - @Guillaume that output shows that the emulator is starting up and is correctly attaching to adb. For some reason the emulator is then failing to complete the boot. I think your scenario should be tracked as a separate issue (to avoid things getting too complex). I guess that the build will not have captured any logcat output before failure. The next step in debugging your problem might be to capture it and see if there is anything of interest in the logs.
            Hide
            orrc Christopher Orr added a comment -

            A reason for the emulator not starting properly could be the high screen resolution. The emulator does not generally deal with this well, and the window server and various system services tend to go into an endless loop of crashing and restarting.

            So I would also try with a smaller screen resolution, and maybe lower screen density.

            We can't do much about the emulator being crappy, but maybe in these cases we should also (somehow) archive the logcat output (or instruct the user how to see the live logcat, or scan the log for system crashes) to better debug startup issues.

            Show
            orrc Christopher Orr added a comment - A reason for the emulator not starting properly could be the high screen resolution. The emulator does not generally deal with this well, and the window server and various system services tend to go into an endless loop of crashing and restarting. So I would also try with a smaller screen resolution, and maybe lower screen density. We can't do much about the emulator being crappy, but maybe in these cases we should also (somehow) archive the logcat output (or instruct the user how to see the live logcat, or scan the log for system crashes) to better debug startup issues.
            Hide
            orrc Christopher Orr added a comment -

            Yeah, I tried the same config as Guillaume above, and got the same failure to boot.

            I ran this on my Jenkins slave while waiting for the emulator startup to time-out:
            ANDROID_ADB_SERVER_PORT=5829 ~/jenkins/tools/android-sdk/platform-tools/adb logcat

            There I saw a loop of /system/bin/surfaceflinger native crashes.

            Show
            orrc Christopher Orr added a comment - Yeah, I tried the same config as Guillaume above, and got the same failure to boot. I ran this on my Jenkins slave while waiting for the emulator startup to time-out: ANDROID_ADB_SERVER_PORT=5829 ~/jenkins/tools/android-sdk/platform-tools/adb logcat There I saw a loop of /system/bin/surfaceflinger native crashes.
            Hide
            oldelvet Richard Mortimer added a comment -

            I extended my patch series to capture logcat output irrespective of whether boot completes or not. The change was quite simple although I did have to put a short delay in to allow the logcat output to be captured before the emulator was killed after a failed boot.

            A test build can be downloaded from
            android-emulator-2.12-SNAPSHOT.hpi

            Pull request at
            https://github.com/jenkinsci/android-emulator-plugin/pull/39

            Note the pull request still contains the devices -l output. For now I think that will be useful in diagnosing the various causes of boot failures that may be out there. I'm not sure whether it just makes the logs too messy to be included long term.

            I'm also considering getting rid of the connect and disconnect operations. I don't think they add anything to the robustness of startup now we are using the emulator-xxxx style device name.

            Show
            oldelvet Richard Mortimer added a comment - I extended my patch series to capture logcat output irrespective of whether boot completes or not. The change was quite simple although I did have to put a short delay in to allow the logcat output to be captured before the emulator was killed after a failed boot. A test build can be downloaded from android-emulator-2.12-SNAPSHOT.hpi Pull request at https://github.com/jenkinsci/android-emulator-plugin/pull/39 Note the pull request still contains the devices -l output. For now I think that will be useful in diagnosing the various causes of boot failures that may be out there. I'm not sure whether it just makes the logs too messy to be included long term. I'm also considering getting rid of the connect and disconnect operations. I don't think they add anything to the robustness of startup now we are using the emulator-xxxx style device name.
            Hide
            guillaume Guillaume added a comment -

            You're right, trying with emulators of different resolution / density I was able to connect to it in some instances (although it still fails sometimes, but I couldn't investigate it much yet).
            Sorry for polluting the thread with an unrelated error. Eventually the patch seems to have solved the current issue for me (again, in some cases, I'll come back if I find out more and it seems directly related to this issue).

            Thanks for helping out.

            Show
            guillaume Guillaume added a comment - You're right, trying with emulators of different resolution / density I was able to connect to it in some instances (although it still fails sometimes, but I couldn't investigate it much yet). Sorry for polluting the thread with an unrelated error. Eventually the patch seems to have solved the current issue for me (again, in some cases , I'll come back if I find out more and it seems directly related to this issue). Thanks for helping out.
            Hide
            tob_11 Tobias Schumacher added a comment -

            Hi. I'm using the 2.12-Snapshot Android Emulator Plugin from the pull 39 link/post on Mac OS X 10.9 and Android SDK Revision 23.0.2

            I'm not sure if my problem is 100% the problem described here. Here my problem: If my Jenkins job starts then the Android Emulator sometimes starts without any problem and sometimes I get the device offline notification. I can't reproduce, when the emulator will work fine or will fail to start. I tried different screen sizes and I was using an existing emulator and I created a new emulator while the Jenkins jobs. I don't know what further steps I can do. So I will post my log and hope you can help me.

             $ /Library/android-sdk-macosx/tools/android list target
            [android] Using Android SDK: /Library/android-sdk-macosx
            [android] Creating Android AVD: /Users/Shared/Jenkins/Home/jobs/(placeholder)/workspace/.android/avd/hudson_de-DE_160_HVGA_Google_Inc._Google_APIs_19_armeabi-v7a.avd
            [android] /Library/android-sdk-macosx/tools/android create avd -f -a -s HVGA -n hudson_de-DE_160_HVGA_Google_Inc._Google_APIs_19_armeabi-v7a -t "Google Inc.:Google APIs:19" --abi armeabi-v7a
            $ /Library/android-sdk-macosx/platform-tools/adb start-server
            * daemon not running. starting it now on port 5897 *
            * daemon started successfully *
            $ /Library/android-sdk-macosx/platform-tools/adb start-server
            [android] Starting Android emulator
            $ /Library/android-sdk-macosx/tools/emulator -no-boot-anim -ports 5895,5896 -prop persist.sys.language=de -prop persist.sys.country=DE -avd hudson_de-DE_160_HVGA_Google_Inc._Google_APIs_19_armeabi-v7a -no-snapshot-load -no-snapshot-save -wipe-data -no-window
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            [android] Waiting for emulator to finish booting...
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb devices -l
            List of devices attached 
            emulator-5895          offline
            
            [android] adb devices returned 0
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete
            error: device offline
            error: device offline
            $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895
            $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 logcat -v time
            [android] Timed-out after waiting 720 seconds for emulator
            $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895
            [android] Stopping Android emulator
            $ /Library/android-sdk-macosx/platform-tools/adb kill-server
            Archiving artifacts
            Finished: NOT_BUILT
            

            If I'm at the wrong place for my request please show me a web side where I can post my problem.
            Thanks for your help.

            Show
            tob_11 Tobias Schumacher added a comment - Hi. I'm using the 2.12-Snapshot Android Emulator Plugin from the pull 39 link/post on Mac OS X 10.9 and Android SDK Revision 23.0.2 I'm not sure if my problem is 100% the problem described here. Here my problem: If my Jenkins job starts then the Android Emulator sometimes starts without any problem and sometimes I get the device offline notification. I can't reproduce, when the emulator will work fine or will fail to start. I tried different screen sizes and I was using an existing emulator and I created a new emulator while the Jenkins jobs. I don't know what further steps I can do. So I will post my log and hope you can help me. $ /Library/android-sdk-macosx/tools/android list target [android] Using Android SDK: /Library/android-sdk-macosx [android] Creating Android AVD: /Users/Shared/Jenkins/Home/jobs/(placeholder)/workspace/.android/avd/hudson_de-DE_160_HVGA_Google_Inc._Google_APIs_19_armeabi-v7a.avd [android] /Library/android-sdk-macosx/tools/android create avd -f -a -s HVGA -n hudson_de-DE_160_HVGA_Google_Inc._Google_APIs_19_armeabi-v7a -t "Google Inc.:Google APIs:19" --abi armeabi-v7a $ /Library/android-sdk-macosx/platform-tools/adb start-server * daemon not running. starting it now on port 5897 * * daemon started successfully * $ /Library/android-sdk-macosx/platform-tools/adb start-server [android] Starting Android emulator $ /Library/android-sdk-macosx/tools/emulator -no-boot-anim -ports 5895,5896 -prop persist.sys.language=de -prop persist.sys.country=DE -avd hudson_de-DE_160_HVGA_Google_Inc._Google_APIs_19_armeabi-v7a -no-snapshot-load -no-snapshot-save -wipe-data -no-window $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 [android] Waiting for emulator to finish booting... $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb devices -l List of devices attached emulator-5895 offline [android] adb devices returned 0 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 shell getprop dev.bootcomplete error: device offline error: device offline $ /Library/android-sdk-macosx/platform-tools/adb connect emulator-5895 $ /Library/android-sdk-macosx/platform-tools/adb -s emulator-5895 logcat -v time [android] Timed-out after waiting 720 seconds for emulator $ /Library/android-sdk-macosx/platform-tools/adb disconnect emulator-5895 [android] Stopping Android emulator $ /Library/android-sdk-macosx/platform-tools/adb kill-server Archiving artifacts Finished: NOT_BUILT If I'm at the wrong place for my request please show me a web side where I can post my problem. Thanks for your help.
            Hide
            oldelvet Richard Mortimer added a comment -

            Tobias thanks for posting your logs. This does look very much like the original problem that has been reported.

            It looks like the emulator does do the initial attach to ADB but then never transitions to online state. I don't think the emulator is crashing/exiting because that would cause the listing in devices -l to go away.

            Did you get a logcat file archived for one of the failed jobs? It doesn't look like it did.

            Do you have access to any of the Mac OS system logs? If so it would be a good idea to have a look in them to see if there are any "interesting" events around the time of the failure. There may be out-of-memory issues or other system resource starvation issues that could cause a strange failure mode.

            Show
            oldelvet Richard Mortimer added a comment - Tobias thanks for posting your logs. This does look very much like the original problem that has been reported. It looks like the emulator does do the initial attach to ADB but then never transitions to online state. I don't think the emulator is crashing/exiting because that would cause the listing in devices -l to go away. Did you get a logcat file archived for one of the failed jobs? It doesn't look like it did. Do you have access to any of the Mac OS system logs? If so it would be a good idea to have a look in them to see if there are any "interesting" events around the time of the failure. There may be out-of-memory issues or other system resource starvation issues that could cause a strange failure mode.
            Hide
            tob_11 Tobias Schumacher added a comment -

            Richard thanks for your very fast reply. I looked into the logcat of the Jenkins job. I compared one log of a failed build and one of a succeeded build. I saw no difference in the log. I uploaded the log for you. Maybe you see something critical. https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/logcat

            I looked into the /var/log/system.log too. I only noticed this:
            vmhost-mac-mini.local launchctl[3904]: launchctl: Dubious ownership on file (skipping): /Library/LaunchAgents/org.jenkins-ci.plist
            This is also shown at a successful build. So I think this is not the problem.

            At the DiagnosticReports I don't see any log from adb or emultor64-arm. The activity log marks the emulator64-arm as not responding after a few seconds and the last system error counter increases with time. Nothing special at all messages of Console too.

            I'm new at the Mac and Android world. So if you know an other log I can lock at, it would be nice you can name it.
            I can't reproduce any steps to say, if I do this the build fails and if I do this the build succeeds. From my perspective, the problem is random.

            Show
            tob_11 Tobias Schumacher added a comment - Richard thanks for your very fast reply. I looked into the logcat of the Jenkins job. I compared one log of a failed build and one of a succeeded build. I saw no difference in the log. I uploaded the log for you. Maybe you see something critical. https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/logcat I looked into the /var/log/system.log too. I only noticed this: vmhost-mac-mini.local launchctl [3904] : launchctl: Dubious ownership on file (skipping): /Library/LaunchAgents/org.jenkins-ci.plist This is also shown at a successful build. So I think this is not the problem. At the DiagnosticReports I don't see any log from adb or emultor64-arm. The activity log marks the emulator64-arm as not responding after a few seconds and the last system error counter increases with time. Nothing special at all messages of Console too. I'm new at the Mac and Android world. So if you know an other log I can lock at, it would be nice you can name it. I can't reproduce any steps to say, if I do this the build fails and if I do this the build succeeds. From my perspective, the problem is random.
            Hide
            oldelvet Richard Mortimer added a comment -

            Tobias can you post a "good" log too. That would be helpful for myself/others to make sense of the various warnings/errors in the log that are just "normal".

            That said around like 2834 of your log the following exists

            D/AlertReceiver( 1323): onReceive: a=android.intent.action.BOOT_COMPLETED Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.calendar/.alerts.AlertReceiver (has extras) }
            I/ActivityManager( 384): Delay finish: com.android.calendar/.alerts.AlertReceiver
            D/AlertUtils( 1323): Flushing old alerts from shared prefs table
            D/AlertService( 1323): 0 Action = android.intent.action.BOOT_COMPLETED
            

            This suggests to me that the emulator thinks that boot has completed but that it is not connected to ADB properly. That would add some weight to the theory that something is going wrong in the early emulator<->ADB communications.

            Show
            oldelvet Richard Mortimer added a comment - Tobias can you post a "good" log too. That would be helpful for myself/others to make sense of the various warnings/errors in the log that are just "normal". That said around like 2834 of your log the following exists D/AlertReceiver( 1323): onReceive: a=android.intent.action.BOOT_COMPLETED Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=com.android.calendar/.alerts.AlertReceiver (has extras) } I/ActivityManager( 384): Delay finish: com.android.calendar/.alerts.AlertReceiver D/AlertUtils( 1323): Flushing old alerts from shared prefs table D/AlertService( 1323): 0 Action = android.intent.action.BOOT_COMPLETED This suggests to me that the emulator thinks that boot has completed but that it is not connected to ADB properly. That would add some weight to the theory that something is going wrong in the early emulator<->ADB communications.
            Hide
            tob_11 Tobias Schumacher added a comment -

            I have added a "good" log now. https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/successful_build_log
            I didn't find the passage you mentioned in the "good" log.

            Show
            tob_11 Tobias Schumacher added a comment - I have added a "good" log now. https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/successful_build_log I didn't find the passage you mentioned in the "good" log.
            Hide
            tob_11 Tobias Schumacher added a comment -

            Hi. I noticed two things. I don't know if these informations are important or not.
            First: If I start a Job and the device is listed as offline, I see the device as offline in the Terminal too. (If I listen to the port of the adb server of Jenkins)
            Second: I tried to use -tcpdump at the emulator settings of Jenkins, but I have no permission to do that. I tried to change the user of Jenkins to admin but it failed. So I can't log the communication. Richard do you have the same problem with tcpdump?

            I tried to log the communication between the emulator and Jenkins with wireshark. I only noticed a few TCP Out-Of-Order notifications. But these are at a failed and a "goog" build. So I think this is not the problem.
            Richard how did you install Jenkins and how are you running it? Maybe it's because of my way using Jenkins which causes the emulator problem. It seems that the plugin is running well at your Jenkins(correct me if this information is false). (Only if you want to share this and it's not to much work. A link to a webside is possible too.)
            I installed it with the jenkins.dmg and created a jenkins user which is running Jenkins with the command "/usr/bin/java -Dfile.encoding=UTF-8 -XX:PermSize=265m -XX:MaxPermSize=512 -Xms256m -Xmx512m -Djava.io.tmpdir=/Users/Shared/Jenkins/tmp -jar /Applications/Jenkins/jenkins.war". My org.jenkins-ci.plist file is located at "/Library/LaunchAgents/".

            Show
            tob_11 Tobias Schumacher added a comment - Hi. I noticed two things. I don't know if these informations are important or not. First: If I start a Job and the device is listed as offline, I see the device as offline in the Terminal too. (If I listen to the port of the adb server of Jenkins) Second: I tried to use -tcpdump at the emulator settings of Jenkins, but I have no permission to do that. I tried to change the user of Jenkins to admin but it failed. So I can't log the communication. Richard do you have the same problem with tcpdump? I tried to log the communication between the emulator and Jenkins with wireshark. I only noticed a few TCP Out-Of-Order notifications. But these are at a failed and a "goog" build. So I think this is not the problem. Richard how did you install Jenkins and how are you running it? Maybe it's because of my way using Jenkins which causes the emulator problem. It seems that the plugin is running well at your Jenkins(correct me if this information is false). (Only if you want to share this and it's not to much work. A link to a webside is possible too.) I installed it with the jenkins.dmg and created a jenkins user which is running Jenkins with the command "/usr/bin/java -Dfile.encoding=UTF-8 -XX:PermSize=265m -XX:MaxPermSize=512 -Xms256m -Xmx512m -Djava.io.tmpdir=/Users/Shared/Jenkins/tmp -jar /Applications/Jenkins/jenkins.war". My org.jenkins-ci.plist file is located at "/Library/LaunchAgents/".
            Hide
            oldelvet Richard Mortimer added a comment -

            Tobias,

            first point

            I would expect adb in the terminal to report offline too. The adb command connects to the adb server to find out that information so it should be consistent.

            I think you just said that there is only one adb server process running but it would be good to confirm that to ensure that the emulator is not managing to talk to another instance of adb.

            tcpdump option

            I have never tried the -tcpdump option so I cannot comment. But I do believe that it only captures the emulator's virtual Ethernet LAN so I would not expect it to capture the communications with ADB.

            Where did you ask -tcpdump to save the PCAP file to? You probably need to specify a full pathname and make sure that it is writable. Maybe try a file in /Users/Share/Jenkins/tmp/ as that is your tmpdir specified in your Jenkins commandline.

            setup

            My master is installed on an Ubuntu 14.04 server using the standard .deb packaging. The android emulator runs on a Ubuntu 14.04 slave connected via jnlp that is launched using

            /usr/bin/java -Xms256m -Xmx512m -jar /usr/share/jenkslav/slave.jar -jnlpUrl file:///opt/jenkins/slave/slave-agent.jnlp

            I have in the past used a Windows 7 slave machine (installed as a service) connecting via jnlp for the emulator. But most of my recent usage/testing has been on Ubuntu 14.04. I've never tried running a slave/emulator on MacOS X so that may explain the different experience that you have.

            wireshark/tcpdump

            If you can try again with wireshark (or commandline tcpdump) to capture the traffic between adb and the emulator that should help to diagnose the problem. The two will communicate via localhost (127.0.0.1) so you will need to make sure that you are capturing on that interface and not on a LAN.

            I would suggest that you capture all traffic and then filter for the ports used by adb/emulator after the build has failed. I'll happily have a look at the filtered capture but I would suggest that you zip/email it direct to me rather than posting somewhere public.

            Show
            oldelvet Richard Mortimer added a comment - Tobias, first point I would expect adb in the terminal to report offline too. The adb command connects to the adb server to find out that information so it should be consistent. I think you just said that there is only one adb server process running but it would be good to confirm that to ensure that the emulator is not managing to talk to another instance of adb. tcpdump option I have never tried the -tcpdump option so I cannot comment. But I do believe that it only captures the emulator's virtual Ethernet LAN so I would not expect it to capture the communications with ADB. Where did you ask -tcpdump to save the PCAP file to? You probably need to specify a full pathname and make sure that it is writable. Maybe try a file in /Users/Share/Jenkins/tmp/ as that is your tmpdir specified in your Jenkins commandline. setup My master is installed on an Ubuntu 14.04 server using the standard .deb packaging. The android emulator runs on a Ubuntu 14.04 slave connected via jnlp that is launched using /usr/bin/java -Xms256m -Xmx512m -jar /usr/share/jenkslav/slave.jar -jnlpUrl file:///opt/jenkins/slave/slave-agent.jnlp I have in the past used a Windows 7 slave machine (installed as a service) connecting via jnlp for the emulator. But most of my recent usage/testing has been on Ubuntu 14.04. I've never tried running a slave/emulator on MacOS X so that may explain the different experience that you have. wireshark/tcpdump If you can try again with wireshark (or commandline tcpdump) to capture the traffic between adb and the emulator that should help to diagnose the problem. The two will communicate via localhost (127.0.0.1) so you will need to make sure that you are capturing on that interface and not on a LAN. I would suggest that you capture all traffic and then filter for the ports used by adb/emulator after the build has failed. I'll happily have a look at the filtered capture but I would suggest that you zip/email it direct to me rather than posting somewhere public.
            Hide
            tob_11 Tobias Schumacher added a comment - - edited

            Hi Richard,

            tcpdump option
            It worked with a full pathname. I have added a "bad" (adb server port 5615, emulator port 5613)
            and a "good" log (adb server port 5613, emulator port 5611)
            https://github.com/ITobiI/Android-Problem-Jenkins/tree/master/EmulatorTcpdump.

            Wireshark
            I recorded some communication and uploaded a "good" (adb server port 5751, emulator port 5749)
            and "bad" (adb server port 5753, emulator port 5751)
            log too https://github.com/ITobiI/Android-Problem-Jenkins/tree/master/Wireshark.

            I tried to look into it but it's hard to compare these files. I hope the logs will help.

            Edit:
            I forgot to say that there are two adb processes at the beginning and after 1 or 2 seconds only 1 left. So there aren't any other adb servers running.

            Show
            tob_11 Tobias Schumacher added a comment - - edited Hi Richard, tcpdump option It worked with a full pathname. I have added a "bad" (adb server port 5615, emulator port 5613) and a "good" log (adb server port 5613, emulator port 5611) https://github.com/ITobiI/Android-Problem-Jenkins/tree/master/EmulatorTcpdump . Wireshark I recorded some communication and uploaded a "good" (adb server port 5751, emulator port 5749) and "bad" (adb server port 5753, emulator port 5751) log too https://github.com/ITobiI/Android-Problem-Jenkins/tree/master/Wireshark . I tried to look into it but it's hard to compare these files. I hope the logs will help. Edit: I forgot to say that there are two adb processes at the beginning and after 1 or 2 seconds only 1 left. So there aren't any other adb servers running.
            Hide
            oldelvet Richard Mortimer added a comment -

            Do you have the console and logcat output logs for each of the good and bad examples? That would help to match things up with events in the packet capture.

            Show
            oldelvet Richard Mortimer added a comment - Do you have the console and logcat output logs for each of the good and bad examples? That would help to match things up with events in the packet capture.
            Hide
            oldelvet Richard Mortimer added a comment -

            I've had a quick look over the Wireshark captures. In the "bad" capture the emulator never responds to the connection (CNXN) request from ADB and at first glance that seems to jam the whole adb<->emulator connection up.

            I haven't worked out whether ADB or the emulator is a fault because ADB only gives the emulator about 0.5 second to respond before it forcefully closes the connection. The emulator doesn't release (TCP FIN) its end of the connection for about another 17 seconds.

            For reference this all occurs in the TCP connection from port 62625 to port 5752 that starts at packet 371 in the bad pcap file.

            Good connection looks like

            00000000  43 4e 58 4e 00 00 00 01  00 10 00 00 07 00 00 00 CNXN.... ........
            00000010  32 02 00 00 bc b1 a7 b1  68 6f 73 74 3a 3a 00    2....... host::.
                00000000  43 4e 58 4e 00 00 00 01  00 10 00 00 5a 00 00 00 CNXN.... ....Z...
                00000010  41 22 00 00 bc b1 a7 b1  64 65 76 69 63 65 3a 3a A"...... device::
                00000020  72 6f 2e 70 72 6f 64 75  63 74 2e 6e 61 6d 65 3d ro.produ ct.name=
                00000030  67 6f 6f 67 6c 65 5f 73  64 6b 3b 72 6f 2e 70 72 google_s dk;ro.pr
                00000040  6f 64 75 63 74 2e 6d 6f  64 65 6c 3d 67 6f 6f 67 oduct.mo del=goog
                00000050  6c 65 5f 73 64 6b 3b 72  6f 2e 70 72 6f 64 75 63 le_sdk;r o.produc
                00000060  74 2e 64 65 76 69 63 65  3d 67 65 6e 65 72 69 63 t.device =generic
                00000070  3b 00                                            ;.
            0000001F  4f 50 45 4e 17 00 00 00  00 00 00 00 1f 00 00 00 OPEN.... ........
            0000002F  ed 0b 00 00 b0 af ba b1  73 68 65 6c 6c 3a 67 65 ........ shell:ge
            0000003F  74 70 72 6f 70 20 64 65  76 2e 62 6f 6f 74 63 6f tprop de v.bootco
            0000004F  6d 70 6c 65 74 65 00                             mplete.
                00000072  4f 4b 41 59 01 00 00 00  17 00 00 00 00 00 00 00 OKAY.... ........
                00000082  00 00 00 00 b0 b4 be a6                          ........ 
                0000008A  57 52 54 45 01 00 00 00  17 00 00 00 02 00 00 00 WRTE.... ........
                0000009A  17 00 00 00 a8 ad ab ba  0d 0a                   ........ ..
            00000056  4f 4b 41 59 17 00 00 00  01 00 00 00 00 00 00 00 OKAY.... ........
            00000066  00 00 00 00 b0 b4 be a6                          ........ 
                000000A4  43 4c 53 45 00 00 00 00  17 00 00 00 00 00 00 00 CLSE.... ........
                000000B4  00 00 00 00 bc b3 ac ba                          ........ 
            0000006E  43 4c 53 45 17 00 00 00  01 00 00 00 00 00 00 00 CLSE.... ........
            0000007E  00 00 00 00 bc b3 ac ba                          ........ 
            ... truncated here because it is uninteresting for our purposes...
            

            Bad connection stream contains

            00000000  43 4e 58 4e 00 00 00 01  00 10 00 00 07 00 00 00 CNXN.... ........
            00000010  32 02 00 00 bc b1 a7 b1  68 6f 73 74 3a 3a 00    2....... host::.
            

            I likely will not get to look at this further for at least the next 36 hours. I will do a bit of digging in the emulator/ADB code to see if my analysis matches what the code does once I get some spare time.

            Show
            oldelvet Richard Mortimer added a comment - I've had a quick look over the Wireshark captures. In the "bad" capture the emulator never responds to the connection (CNXN) request from ADB and at first glance that seems to jam the whole adb<->emulator connection up. I haven't worked out whether ADB or the emulator is a fault because ADB only gives the emulator about 0.5 second to respond before it forcefully closes the connection. The emulator doesn't release (TCP FIN) its end of the connection for about another 17 seconds. For reference this all occurs in the TCP connection from port 62625 to port 5752 that starts at packet 371 in the bad pcap file. Good connection looks like 00000000 43 4e 58 4e 00 00 00 01 00 10 00 00 07 00 00 00 CNXN.... ........ 00000010 32 02 00 00 bc b1 a7 b1 68 6f 73 74 3a 3a 00 2....... host::. 00000000 43 4e 58 4e 00 00 00 01 00 10 00 00 5a 00 00 00 CNXN.... ....Z... 00000010 41 22 00 00 bc b1 a7 b1 64 65 76 69 63 65 3a 3a A"...... device:: 00000020 72 6f 2e 70 72 6f 64 75 63 74 2e 6e 61 6d 65 3d ro.produ ct.name= 00000030 67 6f 6f 67 6c 65 5f 73 64 6b 3b 72 6f 2e 70 72 google_s dk;ro.pr 00000040 6f 64 75 63 74 2e 6d 6f 64 65 6c 3d 67 6f 6f 67 oduct.mo del=goog 00000050 6c 65 5f 73 64 6b 3b 72 6f 2e 70 72 6f 64 75 63 le_sdk;r o.produc 00000060 74 2e 64 65 76 69 63 65 3d 67 65 6e 65 72 69 63 t.device =generic 00000070 3b 00 ;. 0000001F 4f 50 45 4e 17 00 00 00 00 00 00 00 1f 00 00 00 OPEN.... ........ 0000002F ed 0b 00 00 b0 af ba b1 73 68 65 6c 6c 3a 67 65 ........ shell:ge 0000003F 74 70 72 6f 70 20 64 65 76 2e 62 6f 6f 74 63 6f tprop de v.bootco 0000004F 6d 70 6c 65 74 65 00 mplete. 00000072 4f 4b 41 59 01 00 00 00 17 00 00 00 00 00 00 00 OKAY.... ........ 00000082 00 00 00 00 b0 b4 be a6 ........ 0000008A 57 52 54 45 01 00 00 00 17 00 00 00 02 00 00 00 WRTE.... ........ 0000009A 17 00 00 00 a8 ad ab ba 0d 0a ........ .. 00000056 4f 4b 41 59 17 00 00 00 01 00 00 00 00 00 00 00 OKAY.... ........ 00000066 00 00 00 00 b0 b4 be a6 ........ 000000A4 43 4c 53 45 00 00 00 00 17 00 00 00 00 00 00 00 CLSE.... ........ 000000B4 00 00 00 00 bc b3 ac ba ........ 0000006E 43 4c 53 45 17 00 00 00 01 00 00 00 00 00 00 00 CLSE.... ........ 0000007E 00 00 00 00 bc b3 ac ba ........ ... truncated here because it is uninteresting for our purposes... Bad connection stream contains 00000000 43 4e 58 4e 00 00 00 01 00 10 00 00 07 00 00 00 CNXN.... ........ 00000010 32 02 00 00 bc b1 a7 b1 68 6f 73 74 3a 3a 00 2....... host::. I likely will not get to look at this further for at least the next 36 hours. I will do a bit of digging in the emulator/ADB code to see if my analysis matches what the code does once I get some spare time.
            Hide
            tob_11 Tobias Schumacher added a comment -

            I uploaded a new Wireshark log and the Jenkins logcat log. These are matching now (the name of the file should be enough to match the files). At the last Wireshark log I didn't use logcat, so I needed to take a new log. Here the link. https://github.com/ITobiI/Android-Problem-Jenkins/tree/master/WiresharkAndJenkinsLogcat

            I found the CNXN passage at packet number 296 at the bad log (I didn't see any other CNXN) and number 829 at the good log.

            Show
            tob_11 Tobias Schumacher added a comment - I uploaded a new Wireshark log and the Jenkins logcat log. These are matching now (the name of the file should be enough to match the files). At the last Wireshark log I didn't use logcat, so I needed to take a new log. Here the link. https://github.com/ITobiI/Android-Problem-Jenkins/tree/master/WiresharkAndJenkinsLogcat I found the CNXN passage at packet number 296 at the bad log (I didn't see any other CNXN) and number 829 at the good log.
            Hide
            oldelvet Richard Mortimer added a comment - - edited

            Given the error symptoms it looks like we can enable to tracing in ADB to get it to tell more information about what is going on. Just set the environment variable ADB_TRACE to adb,transport for the job (or as a global environment variable in the jenkins configuration). You might need the EnvInject plugin installed to do this.

            Now when the build runs it will log additional information in the console output. The ADB server will also log to /tmp/adb.log. That location is hardcoded and cannot be changed so you need to grab that after the build. Also make sure that you remove it before the next build or it will append the new log onto the end.

            If it is configured right you will see lots of messages similar to the following:

            system/core/adb/adb_client.c::_adb_connect():_adb_connect: return fd 3
            system/core/adb/adb_client.c::adb_connect():adb_connect: return fd 3
            system/core/adb/transport.c::readx():readx: fd=3 wanted=4
            system/core/adb/transport.c::readx():readx: fd=3 wanted=4 got=4
            30303237 0027
            

            I don't really think you need to capture the "good" logs anymore we have enough examples of that so you might as well save some uploading time.

            Show
            oldelvet Richard Mortimer added a comment - - edited Given the error symptoms it looks like we can enable to tracing in ADB to get it to tell more information about what is going on. Just set the environment variable ADB_TRACE to adb,transport for the job (or as a global environment variable in the jenkins configuration). You might need the EnvInject plugin installed to do this. Now when the build runs it will log additional information in the console output. The ADB server will also log to /tmp/adb.log . That location is hardcoded and cannot be changed so you need to grab that after the build. Also make sure that you remove it before the next build or it will append the new log onto the end. If it is configured right you will see lots of messages similar to the following: system/core/adb/adb_client.c::_adb_connect():_adb_connect: return fd 3 system/core/adb/adb_client.c::adb_connect():adb_connect: return fd 3 system/core/adb/transport.c::readx():readx: fd=3 wanted=4 system/core/adb/transport.c::readx():readx: fd=3 wanted=4 got=4 30303237 0027 I don't really think you need to capture the "good" logs anymore we have enough examples of that so you might as well save some uploading time.
            Hide
            tob_11 Tobias Schumacher added a comment -

            First I used adb and transport with adb_trace for my build. I see some errors but these are at a good log too. So I changed the adb_trace to all. I compared a bad and a good log. I noticed at line 228 and line 252 a difference. At line 228 there is "shell@generic:/ & W/surfaceFlinger..." written in the good log. At line 252 there is the "Thread AudioOut_2 cannot connect to the" written in the good log. Apart from that only the order of some commands/notifications is different. I look into the log until the emulator was started at the good log (third time adb devices -l is used).

            Here the bad log: https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/adb_trace%20all

            Show
            tob_11 Tobias Schumacher added a comment - First I used adb and transport with adb_trace for my build. I see some errors but these are at a good log too. So I changed the adb_trace to all. I compared a bad and a good log. I noticed at line 228 and line 252 a difference. At line 228 there is "shell@generic:/ & W/surfaceFlinger..." written in the good log. At line 252 there is the "Thread AudioOut_2 cannot connect to the" written in the good log. Apart from that only the order of some commands/notifications is different. I look into the log until the emulator was started at the good log (third time adb devices -l is used). Here the bad log: https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/adb_trace%20all
            Hide
            oldelvet Richard Mortimer added a comment -

            can you grab /tmp/adb.log too please. That will have the more interesting ADB server side of the story.

            Show
            oldelvet Richard Mortimer added a comment - can you grab /tmp/adb.log too please. That will have the more interesting ADB server side of the story.
            Hide
            tob_11 Tobias Schumacher added a comment -

            Here the log: https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/bad_adb.log

            At the good dab.log there are these two lines:
            setting connection_state to CS_DEVICE
            adb: online

            Show
            tob_11 Tobias Schumacher added a comment - Here the log: https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/bad_adb.log At the good dab.log there are these two lines: setting connection_state to CS_DEVICE adb: online
            Hide
            oldelvet Richard Mortimer added a comment -

            The bad_adb.log file does not look like what I expected at all. It seems to be logging socket level information but not adb or transport. It maybe that things operate differently on OS X but if you could check that you did capture the log at the correct level please. It might also be worth making /tmp/adb.log world writeable, chmod a+x /tmp/adb.log, just in case there is something else creating the log first.

            Show
            oldelvet Richard Mortimer added a comment - The bad_adb.log file does not look like what I expected at all. It seems to be logging socket level information but not adb or transport . It maybe that things operate differently on OS X but if you could check that you did capture the log at the correct level please. It might also be worth making /tmp/adb.log world writeable, chmod a+x /tmp/adb.log , just in case there is something else creating the log first.
            Hide
            tob_11 Tobias Schumacher added a comment -

            adb_trace was first only in the jenkins environment. I changed it to be global. It works now for jenkins and the terminal but not for the adb.log of the adb server. I searched for a solution but I didn't find one. I only read that adb_trace should change the adb client and server log.

            I noticed that the loglevel of the emulator can be changed at the init.rc file. I tried it, but I can't get write permission (download to computer, change file and upload to emulator[last step failed]). Maybe my superuser access is currupted. Would it be helpful to change the loglevel of the emulator? If yes, then I will try it a second time.

            Show
            tob_11 Tobias Schumacher added a comment - adb_trace was first only in the jenkins environment. I changed it to be global. It works now for jenkins and the terminal but not for the adb.log of the adb server. I searched for a solution but I didn't find one. I only read that adb_trace should change the adb client and server log. I noticed that the loglevel of the emulator can be changed at the init.rc file. I tried it, but I can't get write permission (download to computer, change file and upload to emulator [last step failed] ). Maybe my superuser access is currupted. Would it be helpful to change the loglevel of the emulator? If yes, then I will try it a second time.
            Hide
            oldelvet Richard Mortimer added a comment -

            You should only need to set the ADB_TRACE environment variable in Jenkins. The android-emulator-plugin starts ADB from within the job and kills it at the end. Ideally you should make sure that no other ADB server/emulator instance is running outside of jenkins to avoid complicating things. It does make sense to ensure that /tmp/adb.log does not exist before the jenkins job starts to ensure that there are no file permissions issues when the ADB server tries to open the log.

            I don't think that the emulator loglevel change would be useful at this time.

            Show
            oldelvet Richard Mortimer added a comment - You should only need to set the ADB_TRACE environment variable in Jenkins. The android-emulator-plugin starts ADB from within the job and kills it at the end. Ideally you should make sure that no other ADB server/emulator instance is running outside of jenkins to avoid complicating things. It does make sense to ensure that /tmp/adb.log does not exist before the jenkins job starts to ensure that there are no file permissions issues when the ADB server tries to open the log. I don't think that the emulator loglevel change would be useful at this time.
            Hide
            tob_11 Tobias Schumacher added a comment -

            I think my adb is broken. I see the adb start-server two times.

            $ adb start-server

            • failed to start daemon *
            • daemon not running. starting it now on port 5801 *
              $ adb start-server

            The adb log starts with:
            remote local: read terminated (message)
            adb: offline
            check_header(): invalid magic
            bad header: terminated (data)
            adb: offline

            After this output there is only the sockel level log. So at the first adb start-server the log is correct. But not at the second one. I will look into it.

            I can see this at the process too. One adb process appears. Then appears a second one. After 1 second the first (I'm not 100% sure) disappears. This phenomenon started one month ago. The android emulator had the problem befor this change too. Maybe my adb installation is broken. I will reinstall/reconfigure it.
            I'm coming back on Thursday. I can't work on this issue until then.

            Show
            tob_11 Tobias Schumacher added a comment - I think my adb is broken. I see the adb start-server two times. $ adb start-server failed to start daemon * daemon not running. starting it now on port 5801 * $ adb start-server The adb log starts with: remote local: read terminated (message) adb: offline check_header(): invalid magic bad header: terminated (data) adb: offline After this output there is only the sockel level log. So at the first adb start-server the log is correct. But not at the second one. I will look into it. I can see this at the process too. One adb process appears. Then appears a second one. After 1 second the first (I'm not 100% sure) disappears. This phenomenon started one month ago. The android emulator had the problem befor this change too. Maybe my adb installation is broken. I will reinstall/reconfigure it. I'm coming back on Thursday. I can't work on this issue until then.
            Hide
            cuongthai Cuong Thai added a comment - - edited

            I have been around this issue for two days. Here is my configuration that is working at least 4 times continuously.

            Here is the log:
            http://pastebin.com/2fgMhp0S

            Hopefully you guys can find the real cause

            Show
            cuongthai Cuong Thai added a comment - - edited I have been around this issue for two days. Here is my configuration that is working at least 4 times continuously. Here is the log: http://pastebin.com/2fgMhp0S Hopefully you guys can find the real cause
            Hide
            tob_11 Tobias Schumacher added a comment -

            Thank you for your post Cuong.
            Android API 18 is running. I only have problems with API 19. I tested your configuration in different configurations e.g. without emulator options or without emulator executable, but nothing worked.

            I started 32 jobs. At 3 of them the device never appears in the log and one time jenkins had a problem to kill the adb server.
            https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/adb_crash

            Show
            tob_11 Tobias Schumacher added a comment - Thank you for your post Cuong. Android API 18 is running. I only have problems with API 19. I tested your configuration in different configurations e.g. without emulator options or without emulator executable, but nothing worked. I started 32 jobs. At 3 of them the device never appears in the log and one time jenkins had a problem to kill the adb server. https://github.com/ITobiI/Android-Problem-Jenkins/blob/master/adb_crash
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Richard Mortimer
            Path:
            src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java
            http://jenkins-ci.org/commit/android-emulator-plugin/3cbe81898db108f85dcb522bc09bea352667aa73
            Log:
            JENKINS-11952 Wait for ADB start to complete before starting the emulator

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Richard Mortimer Path: src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java http://jenkins-ci.org/commit/android-emulator-plugin/3cbe81898db108f85dcb522bc09bea352667aa73 Log: JENKINS-11952 Wait for ADB start to complete before starting the emulator
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christopher Orr
            Path:
            src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java
            http://jenkins-ci.org/commit/android-emulator-plugin/f2fcd2f7d9c12cfd9b8de7cb3ae18049ef056db7
            Log:
            JENKINS-11952 Remove redundant (dis)connect calls while waiting for startup.

            These shouldn't be required, since emulators are now always started in the port
            range that adb automatically recognises.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java http://jenkins-ci.org/commit/android-emulator-plugin/f2fcd2f7d9c12cfd9b8de7cb3ae18049ef056db7 Log: JENKINS-11952 Remove redundant (dis)connect calls while waiting for startup. These shouldn't be required, since emulators are now always started in the port range that adb automatically recognises.
            Hide
            tob_11 Tobias Schumacher added a comment - - edited

            Hi. I still have this issue. Sometimes the emulator starts correctly. Can you add an option to choose, that the build will fail, if the emulator doesn't start (like a checkbox)?
            I would like to have this feature for the issues "error: device offline" and "error: device not found". I tried to repeat the build with naginator plugin but this is only working with a failed build job (or unstable).
            Or do you know any other way to repeat the build job?

            Thanks

            EDIT: I found the Text-finder plugin. I will work with it to change the job result to unstable. Then I can repeat the build with the naginator plugin.

            Show
            tob_11 Tobias Schumacher added a comment - - edited Hi. I still have this issue. Sometimes the emulator starts correctly. Can you add an option to choose, that the build will fail, if the emulator doesn't start (like a checkbox)? I would like to have this feature for the issues "error: device offline" and "error: device not found". I tried to repeat the build with naginator plugin but this is only working with a failed build job (or unstable). Or do you know any other way to repeat the build job? Thanks EDIT: I found the Text-finder plugin. I will work with it to change the job result to unstable. Then I can repeat the build with the naginator plugin.
            Hide
            buzztaiki Taiki Sugawara added a comment -

            I still have this issue too. Would you add adb connect timeout for workaround of this issue?

            Show
            buzztaiki Taiki Sugawara added a comment - I still have this issue too. Would you add adb connect timeout for workaround of this issue?
            Hide
            tob_11 Tobias Schumacher added a comment - - edited

            Taiki Sugawara: I'm using the text-finder and the naginator plugin. At the text-finder plugin, I search at the console output for the expression "Timed-out after waiting 720 seconds for emulator" (leave "Files" empty). If this expression was found then the build will be unstable (check the unstable if found checkbox).
            At the naginator plugin I checked the "Rerun build for unstable builds as well as failures" checkbox and I try again to run the job after 500 seconds (shorter is possible too). I configuered also that the build will be repeated 5 times.
            I hope this will help you with your problem.

            EDIT: At the naginator plugin you need to open the extended options and check "only rerun build if regular expression is found in output" and paste the time-out message into the "regular expression to search for" field. Without this the build will be repeated even the build is failing because of a source code error.

            @Richard Mortimer: Maybe you can add this workaround to your documentation.

            Show
            tob_11 Tobias Schumacher added a comment - - edited Taiki Sugawara: I'm using the text-finder and the naginator plugin. At the text-finder plugin, I search at the console output for the expression "Timed-out after waiting 720 seconds for emulator" (leave "Files" empty). If this expression was found then the build will be unstable (check the unstable if found checkbox). At the naginator plugin I checked the "Rerun build for unstable builds as well as failures" checkbox and I try again to run the job after 500 seconds (shorter is possible too). I configuered also that the build will be repeated 5 times. I hope this will help you with your problem. EDIT: At the naginator plugin you need to open the extended options and check "only rerun build if regular expression is found in output" and paste the time-out message into the "regular expression to search for" field. Without this the build will be repeated even the build is failing because of a source code error. @Richard Mortimer: Maybe you can add this workaround to your documentation.
            Hide
            orrc Christopher Orr added a comment -

            I was just prompted to look at the connection code again and noticed that — contrary to what I wrote in my commit just above — we're not actually using the same port range that the emulator listens on and that adb checks for emulator-* instances.

            From double-checking the qemu and adb source, the port range should be 5554 to 5681 (the number of concurrent emulators was increased (though not 100% consistently throughout the code) from 16 to 64 a while ago).

            I wonder whether using this port range would help fix the adb amnesia problem where it somehow forgets devices (i.e. changes from "device offline" to "device not found". Perhaps if we use the "blessed" port range, adb will automatically re-connnect?

            Show
            orrc Christopher Orr added a comment - I was just prompted to look at the connection code again and noticed that — contrary to what I wrote in my commit just above — we're not actually using the same port range that the emulator listens on and that adb checks for emulator-* instances. From double-checking the qemu and adb source, the port range should be 5554 to 5681 (the number of concurrent emulators was increased (though not 100% consistently throughout the code) from 16 to 64 a while ago). I wonder whether using this port range would help fix the adb amnesia problem where it somehow forgets devices (i.e. changes from "device offline" to "device not found" . Perhaps if we use the "blessed" port range, adb will automatically re-connnect?
            Hide
            orrc Christopher Orr added a comment -

            Though as ever, I can only rarely reproduce these issues, which makes testing ever-so-slightly difficult. Maybe I need to try it on a Mac or Windows?

            For anybody who has this issue, it would be nice to know what config is being used:

            • OS the Jenkins build is running on
            • Emulator config:
              • API level
              • screen resolution
              • target ABI
              • emulator options
              • emulator executable
            Show
            orrc Christopher Orr added a comment - Though as ever, I can only rarely reproduce these issues, which makes testing ever-so-slightly difficult. Maybe I need to try it on a Mac or Windows? For anybody who has this issue, it would be nice to know what config is being used: OS the Jenkins build is running on Emulator config: API level screen resolution target ABI emulator options emulator executable
            Hide
            thierryd Thierry-Dimitri Roy added a comment - - edited

            I can reproduce the problem rather easily. We run our tests continuously and we get connection error one fifth of the time.

            • OS the Jenkins build is running on: Mac OS X 10.8.5

            Logs:
            02:27:47 [android] Using Android SDK: /android/sdk/
            02:27:47 [android] Creating Android AVD: /Users/jenkins/workspace/replica_dev_stable/.android/avd/hudson_fr-CA_160_WXGA800_android-17_x86.avd
            02:27:47 [android] /android/sdk//tools/android create avd -f -a -c 1024M -s WXGA800 -n hudson_fr-CA_160_WXGA800_android-17_x86 -t android-17 --abi x86
            02:28:06 [android] Setting hardware properties:
            02:28:06 hw.gpu.enabled: yes
            02:28:06 hw.ramSize: 1907M
            02:28:06 vm.heapSize: 128
            02:28:06 hw.lcd.density: 160
            02:28:06 hw.dPad: yes
            02:28:06 hw.mainKeys: yes
            02:28:06 skin.dynamic: no
            02:28:06 skin.name: 1280x800
            02:28:06 skin.path: 1280x800
            02:28:06 $ /android/sdk//platform-tools/adb start-server
            02:28:09 * daemon not running. starting it now on port 5632 *
            02:28:09 * daemon started successfully *
            02:28:09 $ /android/sdk//platform-tools/adb start-server
            02:28:09 [android] Starting Android emulator
            02:28:09 $ /android/sdk//tools/emulator64-x86 -no-boot-anim -ports 5630,5631 -prop persist.sys.language=fr -prop persist.sys.country=CA -avd hudson_fr-CA_160_WXGA800_android-17_x86 -no-snapshot-load -no-snapshot-save -wipe-data
            02:28:14 HAX is working and emulator runs in fast virt mode
            02:28:15 emulator: emulator window was out of view and was recentered
            ...
            02:39:23 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete
            02:39:23 error: device not found
            02:39:37 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete
            02:39:37 error: device not found
            02:39:50 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete
            02:39:50 error: device not found
            02:40:04 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete
            02:40:04 error: device not found
            02:40:18 [android] Timed-out after waiting 720 seconds for emulator
            02:40:18 [android] Stopping Android emulator
            02:40:18 $ /android/sdk//platform-tools/adb kill-server


            Any suggestion? I'm more than willing to help you.
            ...


            [UPDATE] Here's a log with a connection that worked:

            06:11:12 $ /android/sdk//tools/android list target
            06:11:24 [android] Using Android SDK: /android/sdk/
            06:11:24 [android] Creating Android AVD: /Users/jenkins/workspace/replica_dev_stable/.android/avd/hudson_fr-CA_160_WXGA800_android-17_x86.avd
            06:11:24 [android] /android/sdk//tools/android create avd -f -a -c 1024M -s WXGA800 -n hudson_fr-CA_160_WXGA800_android-17_x86 -t android-17 --abi x86
            06:11:44 [android] Setting hardware properties:
            06:11:44 hw.gpu.enabled: yes
            06:11:44 hw.ramSize: 1907M
            06:11:44 vm.heapSize: 128
            06:11:44 hw.lcd.density: 160
            06:11:44 hw.dPad: yes
            06:11:44 hw.mainKeys: yes
            06:11:44 skin.dynamic: no
            06:11:44 skin.name: 1280x800
            06:11:44 skin.path: 1280x800
            06:11:44 $ /android/sdk//platform-tools/adb start-server
            06:11:47 * daemon not running. starting it now on port 5749 *
            06:11:47 * daemon started successfully *
            06:11:47 $ /android/sdk//platform-tools/adb start-server
            06:11:47 [android] Starting Android emulator
            06:11:47 $ /android/sdk//tools/emulator64-x86 -no-boot-anim -ports 5747,5748 -prop persist.sys.language=fr -prop persist.sys.country=CA -avd hudson_fr-CA_160_WXGA800_android-17_x86 -no-snapshot-load -no-snapshot-save -wipe-data
            06:11:53 HAX is working and emulator runs in fast virt mode
            06:11:54 emulator: emulator window was out of view and was recentered
            06:11:54
            06:11:55 $ /android/sdk//platform-tools/adb connect emulator-5747
            06:11:55 [android] Waiting for emulator to finish booting...
            06:11:55 $ /android/sdk//platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            06:11:55 error: device offline
            06:12:09 $ /android/sdk//platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            06:12:09 error: device offline
            06:12:22 $ /android/sdk//platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete
            06:12:22 $ /android/sdk//platform-tools/adb -s emulator-5747 logcat -v time
            06:12:22 [android] Emulator is ready for use (took 35 seconds)

            Show
            thierryd Thierry-Dimitri Roy added a comment - - edited I can reproduce the problem rather easily. We run our tests continuously and we get connection error one fifth of the time. OS the Jenkins build is running on: Mac OS X 10.8.5 Logs: 02:27:47 [android] Using Android SDK: /android/sdk/ 02:27:47 [android] Creating Android AVD: /Users/jenkins/workspace/replica_dev_stable/.android/avd/hudson_fr-CA_160_WXGA800_android-17_x86.avd 02:27:47 [android] /android/sdk//tools/android create avd -f -a -c 1024M -s WXGA800 -n hudson_fr-CA_160_WXGA800_android-17_x86 -t android-17 --abi x86 02:28:06 [android] Setting hardware properties: 02:28:06 hw.gpu.enabled: yes 02:28:06 hw.ramSize: 1907M 02:28:06 vm.heapSize: 128 02:28:06 hw.lcd.density: 160 02:28:06 hw.dPad: yes 02:28:06 hw.mainKeys: yes 02:28:06 skin.dynamic: no 02:28:06 skin.name: 1280x800 02:28:06 skin.path: 1280x800 02:28:06 $ /android/sdk//platform-tools/adb start-server 02:28:09 * daemon not running. starting it now on port 5632 * 02:28:09 * daemon started successfully * 02:28:09 $ /android/sdk//platform-tools/adb start-server 02:28:09 [android] Starting Android emulator 02:28:09 $ /android/sdk//tools/emulator64-x86 -no-boot-anim -ports 5630,5631 -prop persist.sys.language=fr -prop persist.sys.country=CA -avd hudson_fr-CA_160_WXGA800_android-17_x86 -no-snapshot-load -no-snapshot-save -wipe-data 02:28:14 HAX is working and emulator runs in fast virt mode 02:28:15 emulator: emulator window was out of view and was recentered ... 02:39:23 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete 02:39:23 error: device not found 02:39:37 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete 02:39:37 error: device not found 02:39:50 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete 02:39:50 error: device not found 02:40:04 $ /android/sdk//platform-tools/adb -s emulator-5630 shell getprop dev.bootcomplete 02:40:04 error: device not found 02:40:18 [android] Timed-out after waiting 720 seconds for emulator 02:40:18 [android] Stopping Android emulator 02:40:18 $ /android/sdk//platform-tools/adb kill-server — Any suggestion? I'm more than willing to help you. ... — [UPDATE] Here's a log with a connection that worked: 06:11:12 $ /android/sdk//tools/android list target 06:11:24 [android] Using Android SDK: /android/sdk/ 06:11:24 [android] Creating Android AVD: /Users/jenkins/workspace/replica_dev_stable/.android/avd/hudson_fr-CA_160_WXGA800_android-17_x86.avd 06:11:24 [android] /android/sdk//tools/android create avd -f -a -c 1024M -s WXGA800 -n hudson_fr-CA_160_WXGA800_android-17_x86 -t android-17 --abi x86 06:11:44 [android] Setting hardware properties: 06:11:44 hw.gpu.enabled: yes 06:11:44 hw.ramSize: 1907M 06:11:44 vm.heapSize: 128 06:11:44 hw.lcd.density: 160 06:11:44 hw.dPad: yes 06:11:44 hw.mainKeys: yes 06:11:44 skin.dynamic: no 06:11:44 skin.name: 1280x800 06:11:44 skin.path: 1280x800 06:11:44 $ /android/sdk//platform-tools/adb start-server 06:11:47 * daemon not running. starting it now on port 5749 * 06:11:47 * daemon started successfully * 06:11:47 $ /android/sdk//platform-tools/adb start-server 06:11:47 [android] Starting Android emulator 06:11:47 $ /android/sdk//tools/emulator64-x86 -no-boot-anim -ports 5747,5748 -prop persist.sys.language=fr -prop persist.sys.country=CA -avd hudson_fr-CA_160_WXGA800_android-17_x86 -no-snapshot-load -no-snapshot-save -wipe-data 06:11:53 HAX is working and emulator runs in fast virt mode 06:11:54 emulator: emulator window was out of view and was recentered 06:11:54 06:11:55 $ /android/sdk//platform-tools/adb connect emulator-5747 06:11:55 [android] Waiting for emulator to finish booting... 06:11:55 $ /android/sdk//platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete 06:11:55 error: device offline 06:12:09 $ /android/sdk//platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete 06:12:09 error: device offline 06:12:22 $ /android/sdk//platform-tools/adb -s emulator-5747 shell getprop dev.bootcomplete 06:12:22 $ /android/sdk//platform-tools/adb -s emulator-5747 logcat -v time 06:12:22 [android] Emulator is ready for use (took 35 seconds)
            Hide
            tob_11 Tobias Schumacher added a comment -

            Hi.

            Here's my configuration.

            Computer: Mac OS X 10.9.5

            Emulator:

            • API Level: android-18
            • screen density: 160
            • screen resolution: HVGA
            • targetabi: armeabi-v7a
            • emulator options:
            • emulator executable:
            • Delete emulator after build: checked
            • Startup delay: 20 seconds

            Android SDK Manager Revision: 23.0.5
            Android API 18:

            • SDK Platform Revision 3
            • Google API Revision 3

            Jenkins:

            • Version: 1.569
            • Android Emulator Plugin Version: 2.12 (official version from jenkins plugin management)
            Show
            tob_11 Tobias Schumacher added a comment - Hi. Here's my configuration. Computer: Mac OS X 10.9.5 Emulator: API Level: android-18 screen density: 160 screen resolution: HVGA targetabi: armeabi-v7a emulator options: emulator executable: Delete emulator after build: checked Startup delay: 20 seconds Android SDK Manager Revision: 23.0.5 Android API 18: SDK Platform Revision 3 Google API Revision 3 Jenkins: Version: 1.569 Android Emulator Plugin Version: 2.12 (official version from jenkins plugin management)
            Hide
            orrc Christopher Orr added a comment -

            Thanks for the detailed info, Tobias (though your logs show x86, but your config ARMv7a?).

            I'll try these configs for myself, and I'll give it a go on a Mac.

            Show
            orrc Christopher Orr added a comment - Thanks for the detailed info, Tobias (though your logs show x86, but your config ARMv7a?). I'll try these configs for myself, and I'll give it a go on a Mac.
            Hide
            tob_11 Tobias Schumacher added a comment -

            I can only find two files with the name x86 included at the project. At the build log at line 11 I create the emulator with "--abi armeabi-v7a".
            Maybe you looked at the log of Thierry-Dimitri Roy or did you look at this log?

            Show
            tob_11 Tobias Schumacher added a comment - I can only find two files with the name x86 included at the project. At the build log at line 11 I create the emulator with "--abi armeabi-v7a". Maybe you looked at the log of Thierry-Dimitri Roy or did you look at this log?
            Hide
            orrc Christopher Orr added a comment -

            Oops, sorry, you're right! In that case, thanks Thierry for the detailed logs, and thank you for your detailed logs in the past and the info now

            How consistently do you see the failure-to-start problem?

            Show
            orrc Christopher Orr added a comment - Oops, sorry, you're right! In that case, thanks Thierry for the detailed logs, and thank you for your detailed logs in the past and the info now How consistently do you see the failure-to-start problem?
            Hide
            tob_11 Tobias Schumacher added a comment -

            No problem.

            The problem occurs very different. From 10.12.14 (dd.mm.yy) until today I saw this problem 9 times at 48 builds. Sometimes the problem occurs 1 time in 2 weeks (14 builds) and then 6 times in 2 weeks (21 builds) (the build will be repeated automatically after the failure-to-start problem. these builds are included at tht build counter).

            Show
            tob_11 Tobias Schumacher added a comment - No problem. The problem occurs very different. From 10.12.14 (dd.mm.yy) until today I saw this problem 9 times at 48 builds. Sometimes the problem occurs 1 time in 2 weeks (14 builds) and then 6 times in 2 weeks (21 builds) (the build will be repeated automatically after the failure-to-start problem. these builds are included at tht build counter).
            Hide
            thierryd Thierry-Dimitri Roy added a comment -

            I was able to further analyze the problem. I saw the emulator running on port 5763 with the deamon running on the port 5764. But when I ran the command:

            adb -P 5764 devices

            It didn't list any devices.

            Then I tried connecting directly to the emulator with the command:

            adb -P 5764 connect localhost:5763

            It successfully connected! Then the 'devices' command showed the emulator. And running

            adb -P 5764 shell getprop init.svc.bootanim

            return the 'stopped' result. I have modified the jenkins plugin and I no longer see the timeout problem. I have created a pull request. Hope this help other people!

            Show
            thierryd Thierry-Dimitri Roy added a comment - I was able to further analyze the problem. I saw the emulator running on port 5763 with the deamon running on the port 5764. But when I ran the command: adb -P 5764 devices It didn't list any devices. Then I tried connecting directly to the emulator with the command: adb -P 5764 connect localhost:5763 It successfully connected! Then the 'devices' command showed the emulator. And running adb -P 5764 shell getprop init.svc.bootanim return the 'stopped' result. I have modified the jenkins plugin and I no longer see the timeout problem. I have created a pull request. Hope this help other people!
            Hide
            jsotuyod Juan Sotuyo added a comment -

            I too see this with snapshots enabled (and existing, wiping the existing snapshot also works). Once I disabled snapshots it started working again.

            Show
            jsotuyod Juan Sotuyo added a comment - I too see this with snapshots enabled (and existing, wiping the existing snapshot also works). Once I disabled snapshots it started working again.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christopher Orr
            Path:
            src/main/java/hudson/plugins/android_emulator/AndroidEmulatorContext.java
            http://jenkins-ci.org/commit/android-emulator-plugin/7949052acba9181ede1ecfed630b0059f113e9de
            Log:
            JENKINS-11952 Return to the "localhost:XXXX" style of connecting to emulators.

            For some reason, connecting to the emulator in this manner appears to be
            somwehat more reliable than connecting with the regular "emulator-XXXX" style.

            From the various JIRA issues opened against the most recent plugin releases,
            this instability seems to affect Mac OS X more than other operating systems.

            Now we use "localhost:XXXX", while sticking to a four-digit port number, as some
            tools seem to assume that the emulator port is always four-digits.

            While it's still a problem that ddmlib — as used by tools like the Maven Android
            plugin — only recognise emulators with the "emulator-XXXX" scheme, this should
            not be a problem, as the emulator itself at startup registers with adb in this
            style. While this means that running "adb devices" may show two connected
            devices (e.g. "emulator-5554" and "localhost:5555"), libraries like ddmlib will
            use the "emulator" variant, while build steps that call `adb` will automatically
            read the ANDROID_SERIAL environment vairable and use the "localhost" variant.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/AndroidEmulatorContext.java http://jenkins-ci.org/commit/android-emulator-plugin/7949052acba9181ede1ecfed630b0059f113e9de Log: JENKINS-11952 Return to the "localhost:XXXX" style of connecting to emulators. For some reason, connecting to the emulator in this manner appears to be somwehat more reliable than connecting with the regular "emulator-XXXX" style. From the various JIRA issues opened against the most recent plugin releases, this instability seems to affect Mac OS X more than other operating systems. Now we use "localhost:XXXX", while sticking to a four-digit port number, as some tools seem to assume that the emulator port is always four-digits. While it's still a problem that ddmlib — as used by tools like the Maven Android plugin — only recognise emulators with the "emulator-XXXX" scheme, this should not be a problem, as the emulator itself at startup registers with adb in this style. While this means that running "adb devices" may show two connected devices (e.g. "emulator-5554" and "localhost:5555"), libraries like ddmlib will use the "emulator" variant, while build steps that call `adb` will automatically read the ANDROID_SERIAL environment vairable and use the "localhost" variant.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christopher Orr
            Path:
            src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java
            http://jenkins-ci.org/commit/android-emulator-plugin/5bdae99c654d40416a37af1bd3cca30f9db11543
            Log:
            Revert "JENKINS-11952 Remove redundant (dis)connect calls while waiting for startup."

            This reverts commit f2fcd2f7d9c12cfd9b8de7cb3ae18049ef056db7.

            This is required as, per the previous commit, we're using the "localhost" style
            of emulator connection string once again.

            Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/bd2fbec33e6f...5bdae99c654d

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/AndroidEmulator.java http://jenkins-ci.org/commit/android-emulator-plugin/5bdae99c654d40416a37af1bd3cca30f9db11543 Log: Revert " JENKINS-11952 Remove redundant (dis)connect calls while waiting for startup." This reverts commit f2fcd2f7d9c12cfd9b8de7cb3ae18049ef056db7. This is required as, per the previous commit, we're using the "localhost" style of emulator connection string once again. Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/bd2fbec33e6f...5bdae99c654d
            Hide
            orrc Christopher Orr added a comment -

            So.. I switched back to the seemingly more reliable "localhost-XXXX" way of connecting to emulators, while also making sure we stick to four-digit port numbers for compatibility with (older) tools that depend on that.

            While I've often found these problems hard to reproduce, I've been doing lots of testing on a MacBook Pro, as Mac OS X seemed to be the OS worst affected by various "device offline" issues.

            The current code seems to work fairly reliably on OS X (and on Linux), and I've made a bunch of other improvements to the plugin recently. Everything tends to work pretty smoothly in my large test Jenkins jobs, where I set up a matrix of about ten different Android OS versions and get them to start up, and run an adb command.

            However, I still very often see unexplained failures on OS X when making the job do something useful, like installing an APK. I've tried running the jobs in serial, and disabling the background logcat thread (i.e. to minimise any disruptions to the emulator and adb), yet APK installation will either time out, or the adb connection will vanish.

            Anyway, it would be great if as many people as possible could test the latest build of the plugin.
            Download the ".hpi" file from the following link, then you can upload it to your Jenkins instance via the Plugin Manager > Advanced > Upload; you will then need to restart Jenkins:
            https://jenkins.ci.cloudbees.com/job/plugins/job/android-emulator-plugin/lastStableBuild/org.jenkins-ci.plugins$android-emulator/

            I would like to do a plugin release within the next week or so, though the Jenkins infrastructure for releasing is currently down (INFRA-240). All the more reason to get testing.

            Thanks, everyone.

            Show
            orrc Christopher Orr added a comment - So.. I switched back to the seemingly more reliable "localhost-XXXX" way of connecting to emulators, while also making sure we stick to four-digit port numbers for compatibility with (older) tools that depend on that. While I've often found these problems hard to reproduce, I've been doing lots of testing on a MacBook Pro, as Mac OS X seemed to be the OS worst affected by various "device offline" issues. The current code seems to work fairly reliably on OS X (and on Linux), and I've made a bunch of other improvements to the plugin recently. Everything tends to work pretty smoothly in my large test Jenkins jobs, where I set up a matrix of about ten different Android OS versions and get them to start up, and run an adb command. However, I still very often see unexplained failures on OS X when making the job do something useful, like installing an APK. I've tried running the jobs in serial, and disabling the background logcat thread (i.e. to minimise any disruptions to the emulator and adb), yet APK installation will either time out, or the adb connection will vanish. Anyway, it would be great if as many people as possible could test the latest build of the plugin. Download the ".hpi" file from the following link, then you can upload it to your Jenkins instance via the Plugin Manager > Advanced > Upload; you will then need to restart Jenkins: https://jenkins.ci.cloudbees.com/job/plugins/job/android-emulator-plugin/lastStableBuild/org.jenkins-ci.plugins$android-emulator/ I would like to do a plugin release within the next week or so, though the Jenkins infrastructure for releasing is currently down ( INFRA-240 ). All the more reason to get testing. Thanks, everyone.
            Hide
            ppoohh P Oh added a comment -

            Master server:
            ubuntu 14.04
            jenkins version 1.596

            slave:
            ubuntu 14.04
            java version "1.7.0_72"
            Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
            Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)
            android sdk tools 24.0.2
            android platform tools 21
            android sdk build-tools 21.1.2

            It seems to connect at some point but does not validate the connection correctly. Heres my semi-sanitized build log. Let me know where I can locate any other logs which may be of help.

            Started by upstream project "ad-pipeline" build number 36
            originally caused by:
            Started by an SCM change
            [EnvInject] - Loading node environment variables.
            Building remotely on android-slave (android) in workspace *****
            Cloning the remote Git repository
            Cloning repository *****
            > /usr/bin/git init ***** # timeout=10
            Fetching upstream changes from *****
            > /usr/bin/git --version # timeout=10
            using GIT_SSH to set credentials *****
            > /usr/bin/git -c core.askpass=true fetch --tags --progress ***** +refs/heads/:refs/remotes/origin/
            > /usr/bin/git config remote.origin.url ***** # timeout=10
            > /usr/bin/git config remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
            > /usr/bin/git config remote.origin.url ***** # timeout=10
            Fetching upstream changes from *****
            using GIT_SSH to set credentials *****
            > /usr/bin/git -c core.askpass=true fetch --tags --progress ***** +refs/heads/:refs/remotes/origin/
            > /usr/bin/git rev-parse refs/remotes/origin/develop^

            {commit} # timeout=10
            > /usr/bin/git rev-parse refs/remotes/origin/origin/develop^{commit}

            # timeout=10
            Checking out Revision ***** (refs/remotes/origin/develop)
            > /usr/bin/git config core.sparsecheckout # timeout=10
            > /usr/bin/git checkout -f *****
            > /usr/bin/git rev-list ***** # timeout=10
            Allocating TCP port AD_PIPELINE_INSTRUMENTATION_PORT
            -> Assigned 48374
            TCP port allocation complete
            $ /opt/android-sdk-linux/tools/android list target
            [android] Using Android SDK: /opt/android-sdk-linux
            [android] Creating Android AVD: *****/ad-pipeline-instrumentation/19/.android/avd/hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_18_armeabi-v7a_jenkins.avd
            [android] /opt/android-sdk-linux/tools/android create avd -f -a -c 200M -s 1080x1920 -n hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_18_armeabi-v7a_jenkins -t "Google Inc.:Google APIs:18" --abi armeabi-v7a
            [android] Waiting 10 seconds before starting emulator...
            $ /opt/android-sdk-linux/platform-tools/adb start-server

            • daemon not running. starting it now on port 7700 *
            • daemon started successfully *
              $ /opt/android-sdk-linux/platform-tools/adb start-server
              [android] Starting Android emulator
              $ /opt/android-sdk-linux/tools/emulator64-arm -no-boot-anim -ports 7698,7699 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_18_armeabi-v7a_jenkins -no-snapshot-load -no-snapshot-save -no-window -no-audio -gpu off
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              connected to localhost:7699
              [android] Waiting for emulator to finish booting...
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              error: device offline
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              error: device offline
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              error: device offline
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim
              $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699
              [android] Timed-out after waiting 720 seconds for emulator
              $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699
              [android] Stopping Android emulator
              Failed to open lib64EGL_translator
              Failed to init_egl_dispatch
              emulator: ERROR: OpenGLES initialization failed!
              emulator: ERROR: OpenGLES emulation library could not be initialized!
              emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
              $ /opt/android-sdk-linux/platform-tools/adb kill-server
              Finished: NOT_BUILT
            Show
            ppoohh P Oh added a comment - Master server: ubuntu 14.04 jenkins version 1.596 slave: ubuntu 14.04 java version "1.7.0_72" Java(TM) SE Runtime Environment (build 1.7.0_72-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode) android sdk tools 24.0.2 android platform tools 21 android sdk build-tools 21.1.2 It seems to connect at some point but does not validate the connection correctly. Heres my semi-sanitized build log. Let me know where I can locate any other logs which may be of help. Started by upstream project "ad-pipeline" build number 36 originally caused by: Started by an SCM change [EnvInject] - Loading node environment variables. Building remotely on android-slave (android) in workspace ***** Cloning the remote Git repository Cloning repository ***** > /usr/bin/git init ***** # timeout=10 Fetching upstream changes from ***** > /usr/bin/git --version # timeout=10 using GIT_SSH to set credentials ***** > /usr/bin/git -c core.askpass=true fetch --tags --progress ***** +refs/heads/ :refs/remotes/origin/ > /usr/bin/git config remote.origin.url ***** # timeout=10 > /usr/bin/git config remote.origin.fetch +refs/heads/ :refs/remotes/origin/ # timeout=10 > /usr/bin/git config remote.origin.url ***** # timeout=10 Fetching upstream changes from ***** using GIT_SSH to set credentials ***** > /usr/bin/git -c core.askpass=true fetch --tags --progress ***** +refs/heads/ :refs/remotes/origin/ > /usr/bin/git rev-parse refs/remotes/origin/develop^ {commit} # timeout=10 > /usr/bin/git rev-parse refs/remotes/origin/origin/develop^{commit} # timeout=10 Checking out Revision ***** (refs/remotes/origin/develop) > /usr/bin/git config core.sparsecheckout # timeout=10 > /usr/bin/git checkout -f ***** > /usr/bin/git rev-list ***** # timeout=10 Allocating TCP port AD_PIPELINE_INSTRUMENTATION_PORT -> Assigned 48374 TCP port allocation complete $ /opt/android-sdk-linux/tools/android list target [android] Using Android SDK: /opt/android-sdk-linux [android] Creating Android AVD: *****/ad-pipeline-instrumentation/19/.android/avd/hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_18_armeabi-v7a_jenkins.avd [android] /opt/android-sdk-linux/tools/android create avd -f -a -c 200M -s 1080x1920 -n hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_18_armeabi-v7a_jenkins -t "Google Inc.:Google APIs:18" --abi armeabi-v7a [android] Waiting 10 seconds before starting emulator... $ /opt/android-sdk-linux/platform-tools/adb start-server daemon not running. starting it now on port 7700 * daemon started successfully * $ /opt/android-sdk-linux/platform-tools/adb start-server [android] Starting Android emulator $ /opt/android-sdk-linux/tools/emulator64-arm -no-boot-anim -ports 7698,7699 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_320_1080x1920_Google_Inc._Google_APIs_18_armeabi-v7a_jenkins -no-snapshot-load -no-snapshot-save -no-window -no-audio -gpu off $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 connected to localhost:7699 [android] Waiting for emulator to finish booting... $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim error: device offline $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim error: device offline $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim error: device offline $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 $ /opt/android-sdk-linux/platform-tools/adb -s localhost:7699 shell getprop init.svc.bootanim $ /opt/android-sdk-linux/platform-tools/adb connect localhost:7699 [android] Timed-out after waiting 720 seconds for emulator $ /opt/android-sdk-linux/platform-tools/adb disconnect localhost:7699 [android] Stopping Android emulator Failed to open lib64EGL_translator Failed to init_egl_dispatch emulator: ERROR: OpenGLES initialization failed! emulator: ERROR: OpenGLES emulation library could not be initialized! emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. $ /opt/android-sdk-linux/platform-tools/adb kill-server Finished: NOT_BUILT
            Hide
            ppoohh P Oh added a comment -

            forgot to add, plugin version: 2.13-SNAPSHOT (private-5bdae99c-jenkins)

            Show
            ppoohh P Oh added a comment - forgot to add, plugin version: 2.13-SNAPSHOT (private-5bdae99c-jenkins)
            Hide
            akosmaroy akosmaroy added a comment -

            I have similar issues as reported by others:

            $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete
            error: device offline
            

            installing the current snapshot HPI file manually seems to have solved the problem

            Show
            akosmaroy akosmaroy added a comment - I have similar issues as reported by others: $ /Users/build/.jenkins/tools/android-sdk/platform-tools/adb -s emulator-5847 shell getprop dev.bootcomplete error: device offline installing the current snapshot HPI file manually seems to have solved the problem
            Hide
            npaufler Nicholas Paufler added a comment -

            I'm seeing the same thing, even with the latest snapshot plugin (2.13-SNAPSHOT (private-67377031-jenkins). In my case, I wouldn't say it's occasional - i'd say it's more like 90% of the time the emulator will fail to respond. I have Jenkins slaves running on Debian EC2 instances - not using any emulator snapshots, every run is fresh with a clean workspace, so I haven't been able to figure out the difference as to why sometimes they are starting correctly and more often not.

            Here's an example of a sanitized log from a successful startup:
            ------------------------------------

            Deleting project workspace... Cloning the remote Git repository
            Cloning repository git@github.com:####/####.droid.git
            > git init /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test # timeout=10
            Fetching upstream changes from git@github.com:####/####.droid.git
            > git --version # timeout=10
            using GIT_SSH to set credentials
            > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/:refs/remotes/origin/
            > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10
            > git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
            > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10
            Fetching upstream changes from git@github.com:####/####.droid.git
            using GIT_SSH to set credentials
            > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/:refs/remotes/origin/
            > git rev-parse origin/instrumentation-test^

            {commit} # timeout=10
            Checking out Revision #### (origin/instrumentation-test)
            > git config core.sparsecheckout # timeout=10
            > git checkout -f ####
            > git rev-list #### # timeout=10
            Starting xvnc
            [instrumentation-test] $ vncserver :63 -localhost -nolisten tcp

            New 'slave20150223:63 ()' desktop is slave20150223:63

            Starting applications specified in /var/lib/jenkins/.vnc/xstartup
            Log file is /var/lib/jenkins/.vnc/slave20150223:63.log

            $ /var/lib/jenkins/workspace/android-sdk/tools/android list target
            [android] Using Android SDK: /var/lib/jenkins/workspace/android-sdk
            [android] Creating Android AVD: /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test/.android/avd/hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation.avd
            [android] /var/lib/jenkins/workspace/android-sdk/tools/android create avd -f -a -s WVGA800 -n hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -t android-19 --abi armeabi-v7a
            [android] Setting hardware properties:
            hw.audioInput: no
            [android] Waiting 10 seconds before starting emulator...
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server
            * daemon not running. starting it now on port 9881 *
            * daemon started successfully *
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server
            [android] Starting Android emulator
            $ /var/lib/jenkins/workspace/android-sdk/tools/emulator -no-boot-anim -ports 9879,9880 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -no-snapshot-load -no-snapshot-save -no-audio -gpu off
            Failed to create Context 0x3005
            emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
            emulator: emulator window was out of view and was recentered

            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9880
            connected to localhost:9880
            [android] Waiting for emulator to finish booting...
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9880 shell getprop init.svc.bootanim
            error: device offline
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9880
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9880 shell getprop init.svc.bootanim
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9880 logcat -v time
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9880
            [android] Emulator is ready for use (took 20 seconds)
            [Gradle] - Launching build.
            [instrumentation-test] $ /var/lib/jenkins/tools/hudson.plugins.gradle.GradleInstallation/Gradle_2.2.1_####.Droid_/gradle-2.2.1/bin/gradle --debug --info --stacktrace assemble
            Starting Build

            ----------------------------


            And here's it failing:

            ----------------------------

            Deleting project workspace... done

            Cloning the remote Git repository
            Cloning repository git@github.com:####
            > git init /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test # timeout=10
            Fetching upstream changes from git@github.com:####/####.droid.git
            > git --version # timeout=10
            using GIT_SSH to set credentials
            > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/:refs/remotes/origin/
            > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10
            > git config --add remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10
            > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10
            Fetching upstream changes from git@github.com:####/####.droid.git
            using GIT_SSH to set credentials
            > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/:refs/remotes/origin/
            > git rev-parse origin/instrumentation-test^{commit}

            # timeout=10
            Checking out Revision #### (origin/instrumentation-test)
            > git config core.sparsecheckout # timeout=10
            > git checkout -f ####
            > git rev-list #### # timeout=10
            Starting xvnc
            [instrumentation-test] $ vncserver :95 -localhost -nolisten tcp

            New 'slave20150223:95 ()' desktop is slave20150223:95

            Starting applications specified in /var/lib/jenkins/.vnc/xstartup
            Log file is /var/lib/jenkins/.vnc/slave20150223:95.log

            $ /var/lib/jenkins/workspace/android-sdk/tools/android list target
            [android] Using Android SDK: /var/lib/jenkins/workspace/android-sdk
            [android] Creating Android AVD: /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test/.android/avd/hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation.avd
            [android] /var/lib/jenkins/workspace/android-sdk/tools/android create avd -f -a -s WVGA800 -n hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -t android-19 --abi armeabi-v7a
            [android] Setting hardware properties:
            hw.audioInput: no
            [android] Waiting 10 seconds before starting emulator...

            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server

            • daemon not running. starting it now on port 9227 *
            • daemon started successfully *
              $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server
              [android] Starting Android emulator
              $ /var/lib/jenkins/workspace/android-sdk/tools/emulator -no-boot-anim -ports 9225,9226 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -no-snapshot-load -no-snapshot-save -no-audio -gpu off

            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226
            connected to localhost:9226
            [android] Waiting for emulator to finish booting...
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim
            error: device offline
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226

            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim
            error: device offline
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226

            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim
            error: device offline
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb disconnect localhost:9226
            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226

            $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim
            error: device offline

            ------------

            In the failure case, it will sit there repeatedly cycling through the commands and the error: device offline until it times out and the job aborts.

            Show
            npaufler Nicholas Paufler added a comment - I'm seeing the same thing, even with the latest snapshot plugin (2.13-SNAPSHOT (private-67377031-jenkins). In my case, I wouldn't say it's occasional - i'd say it's more like 90% of the time the emulator will fail to respond. I have Jenkins slaves running on Debian EC2 instances - not using any emulator snapshots, every run is fresh with a clean workspace, so I haven't been able to figure out the difference as to why sometimes they are starting correctly and more often not. Here's an example of a sanitized log from a successful startup: ------------------------------------ Deleting project workspace... Cloning the remote Git repository Cloning repository git@github.com:####/####.droid.git > git init /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test # timeout=10 Fetching upstream changes from git@github.com:####/####.droid.git > git --version # timeout=10 using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/ :refs/remotes/origin/ > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/ :refs/remotes/origin/ # timeout=10 > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10 Fetching upstream changes from git@github.com:####/####.droid.git using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/ :refs/remotes/origin/ > git rev-parse origin/instrumentation-test^ {commit} # timeout=10 Checking out Revision #### (origin/instrumentation-test) > git config core.sparsecheckout # timeout=10 > git checkout -f #### > git rev-list #### # timeout=10 Starting xvnc [instrumentation-test] $ vncserver :63 -localhost -nolisten tcp New 'slave20150223:63 ()' desktop is slave20150223:63 Starting applications specified in /var/lib/jenkins/.vnc/xstartup Log file is /var/lib/jenkins/.vnc/slave20150223:63.log $ /var/lib/jenkins/workspace/android-sdk/tools/android list target [android] Using Android SDK: /var/lib/jenkins/workspace/android-sdk [android] Creating Android AVD: /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test/.android/avd/hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation.avd [android] /var/lib/jenkins/workspace/android-sdk/tools/android create avd -f -a -s WVGA800 -n hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -t android-19 --abi armeabi-v7a [android] Setting hardware properties: hw.audioInput: no [android] Waiting 10 seconds before starting emulator... $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server * daemon not running. starting it now on port 9881 * * daemon started successfully * $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server [android] Starting Android emulator $ /var/lib/jenkins/workspace/android-sdk/tools/emulator -no-boot-anim -ports 9879,9880 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -no-snapshot-load -no-snapshot-save -no-audio -gpu off Failed to create Context 0x3005 emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. emulator: emulator window was out of view and was recentered $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9880 connected to localhost:9880 [android] Waiting for emulator to finish booting... $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9880 shell getprop init.svc.bootanim error: device offline $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9880 $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9880 shell getprop init.svc.bootanim $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9880 logcat -v time $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9880 [android] Emulator is ready for use (took 20 seconds) [Gradle] - Launching build. [instrumentation-test] $ /var/lib/jenkins/tools/hudson.plugins.gradle.GradleInstallation/Gradle_2.2.1_####.Droid_/gradle-2.2.1/bin/gradle --debug --info --stacktrace assemble Starting Build ---------------------------- And here's it failing: ---------------------------- Deleting project workspace... done Cloning the remote Git repository Cloning repository git@github.com:#### > git init /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test # timeout=10 Fetching upstream changes from git@github.com:####/####.droid.git > git --version # timeout=10 using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/ :refs/remotes/origin/ > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10 > git config --add remote.origin.fetch +refs/heads/ :refs/remotes/origin/ # timeout=10 > git config remote.origin.url git@github.com:####/####.droid.git # timeout=10 Fetching upstream changes from git@github.com:####/####.droid.git using GIT_SSH to set credentials > git -c core.askpass=true fetch --tags --progress git@github.com:####/####.droid.git +refs/heads/ :refs/remotes/origin/ > git rev-parse origin/instrumentation-test^{commit} # timeout=10 Checking out Revision #### (origin/instrumentation-test) > git config core.sparsecheckout # timeout=10 > git checkout -f #### > git rev-list #### # timeout=10 Starting xvnc [instrumentation-test] $ vncserver :95 -localhost -nolisten tcp New 'slave20150223:95 ()' desktop is slave20150223:95 Starting applications specified in /var/lib/jenkins/.vnc/xstartup Log file is /var/lib/jenkins/.vnc/slave20150223:95.log $ /var/lib/jenkins/workspace/android-sdk/tools/android list target [android] Using Android SDK: /var/lib/jenkins/workspace/android-sdk [android] Creating Android AVD: /var/lib/jenkins/workspace/####.Droid-branches/instrumentation-test/.android/avd/hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation.avd [android] /var/lib/jenkins/workspace/android-sdk/tools/android create avd -f -a -s WVGA800 -n hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -t android-19 --abi armeabi-v7a [android] Setting hardware properties: hw.audioInput: no [android] Waiting 10 seconds before starting emulator... $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server daemon not running. starting it now on port 9227 * daemon started successfully * $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb start-server [android] Starting Android emulator $ /var/lib/jenkins/workspace/android-sdk/tools/emulator -no-boot-anim -ports 9225,9226 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_WVGA_android-19_armeabi-v7a_instrumentation -no-snapshot-load -no-snapshot-save -no-audio -gpu off $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226 connected to localhost:9226 [android] Waiting for emulator to finish booting... $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim error: device offline $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226 $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim error: device offline $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226 $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim error: device offline $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb disconnect localhost:9226 $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb connect localhost:9226 $ /var/lib/jenkins/workspace/android-sdk/platform-tools/adb -s localhost:9226 shell getprop init.svc.bootanim error: device offline ------------ In the failure case, it will sit there repeatedly cycling through the commands and the error: device offline until it times out and the job aborts.
            Hide
            pipen Erik Ingman added a comment -

            We have solved this on our end, it seems to work every time. According to the Android Emulator docs "The console port number must be an even integer between 5554 and 5584, inclusive. <port>+1 must also be free and will be reserved for ADB." So we've created a PR, see https://github.com/jenkinsci/android-emulator-plugin/pull/48

            /Erik @ www.blocket.se

            Show
            pipen Erik Ingman added a comment - We have solved this on our end, it seems to work every time. According to the Android Emulator docs "The console port number must be an even integer between 5554 and 5584, inclusive. <port>+1 must also be free and will be reserved for ADB." So we've created a PR, see https://github.com/jenkinsci/android-emulator-plugin/pull/48 /Erik @ www.blocket.se
            Hide
            orrc Christopher Orr added a comment -

            Erik Ingman: I tried this change a month or so ago after somebody mentioned that documentation to me, but I found that it made no difference.

            From re-reading the Android source code, I couldn't see any obvious technical reason why the ports have to be in that form (and only the "-port" flag, not "-ports" enforces it anyway), the "maximum" port number hasn't been 5584 for a long time, adb does recognise emulators started on high ports, and I also looked through lots of build logs for evidence that the user port being even and in that range makes a difference — I didn't find anything conclusive (in fact, emulator startup was more likely to fail in that case).

            In addition, the code in this pull request doesn't guarantee that the first port will be even, so I'll have to be skeptical about your claims
            But if it turns out that this change nevertheless helps, then that's good to know. So what are the results you are seeing? Which OS are the emulator builds running on, and what is the emulator config? How many builds were failing previously, compared to now, and is that with builds whose user port is actually even?

            Show
            orrc Christopher Orr added a comment - Erik Ingman : I tried this change a month or so ago after somebody mentioned that documentation to me, but I found that it made no difference. From re-reading the Android source code, I couldn't see any obvious technical reason why the ports have to be in that form (and only the "-port" flag, not "-ports" enforces it anyway), the "maximum" port number hasn't been 5584 for a long time, adb does recognise emulators started on high ports, and I also looked through lots of build logs for evidence that the user port being even and in that range makes a difference — I didn't find anything conclusive (in fact, emulator startup was more likely to fail in that case). In addition, the code in this pull request doesn't guarantee that the first port will be even, so I'll have to be skeptical about your claims But if it turns out that this change nevertheless helps, then that's good to know. So what are the results you are seeing? Which OS are the emulator builds running on, and what is the emulator config? How many builds were failing previously, compared to now, and is that with builds whose user port is actually even?
            Hide
            jhansche Joe Hansche added a comment -

            I tend to agree with Christopher Orr. Out of the last ~7 builds that were attempted, these were the results:

            • -ports 5743,5744 – Worked
            • -ports 5849,5850 – Failed to start
            • -ports 5705,5706 – Failed to start
            • -ports 5886,5887 – Worked
            • -ports 5719,5720 – Worked
            • -ports 5619,5620 – Failed to start
            • -ports 5866,5867 – Worked
            • -ports 5822,5823 – Worked

            So this means it does not seem to be affected by the even/odd pairs.

            Show
            jhansche Joe Hansche added a comment - I tend to agree with Christopher Orr . Out of the last ~7 builds that were attempted, these were the results: -ports 5743,5744 – Worked -ports 5849,5850 – Failed to start -ports 5705,5706 – Failed to start -ports 5886,5887 – Worked -ports 5719,5720 – Worked -ports 5619,5620 – Failed to start -ports 5866,5867 – Worked -ports 5822,5823 – Worked So this means it does not seem to be affected by the even/odd pairs.
            Hide
            orrc Christopher Orr added a comment -

            Version 2.13 of the plugin has been released, which includes the updates discussed here.

            Show
            orrc Christopher Orr added a comment - Version 2.13 of the plugin has been released, which includes the updates discussed here.
            Hide
            orrc Christopher Orr added a comment -

            I'm marking this issue as closed, though I'm aware of the likelihood that not everything is working brilliantly on every machine, all the time.

            But if there are still obvious issues in 2.13, let's please open a clean issue.

            Show
            orrc Christopher Orr added a comment - I'm marking this issue as closed, though I'm aware of the likelihood that not everything is working brilliantly on every machine, all the time. But if there are still obvious issues in 2.13, let's please open a clean issue.
            Hide
            andyp1per Andy Piper added a comment -

            This does not work.

            andypiper:platform-tools andy$ ./adb -s localhost:5554 shell getprop init.svc.bootanim
            error: device 'localhost:5554' not found

            Maybe something changed in the latest releases of android, but this mechanism is now invalid as a means of connecting to the emulator

            Show
            andyp1per Andy Piper added a comment - This does not work. andypiper:platform-tools andy$ ./adb -s localhost:5554 shell getprop init.svc.bootanim error: device 'localhost:5554' not found Maybe something changed in the latest releases of android, but this mechanism is now invalid as a means of connecting to the emulator
            Hide
            andyp1per Andy Piper added a comment -

            Does not work on current android releases.

            Android Debug Bridge version 1.0.32
            Revision 57224c5cff69-android

            Show
            andyp1per Andy Piper added a comment - Does not work on current android releases. Android Debug Bridge version 1.0.32 Revision 57224c5cff69-android

              People

              • Assignee:
                orrc Christopher Orr
                Reporter:
                jorgenpt Jørgen Tjernø
              • Votes:
                10 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

                • Created:
                  Updated: