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

Seeing two devices with "adb devices" after upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 1.580.3.4
      running on Cloudbees
      with Android Emulator Plugin 2.13.1
    • Similar Issues:

      Description

      With plugin 2.13.1 we now see two devices pointing to the same emulator instance which caused our test runner (spoon) to think there are two distinct devices and fail no matter what. Here is the console output:
      ===begin copy & paste ===
      [android] Using Android SDK: /opt/android/android-sdk-linux
      [android] Creating Android AVD: /scratch/jenkins/workspace/Android Integration (DEV)/label/android/node_index/1/.android/avd/hudson_en-US_240_WVGA_android-16_armeabi-v7a_1.avd
      [android] /opt/android/android-sdk-linux/tools/android create avd -f -a -c 64M -s WVGA800 -n hudson_en-US_240_WVGA_android-16_armeabi-v7a_1 -t android-16 --abi armeabi-v7a
      $ /opt/android/android-sdk-linux/platform-tools/adb start-server

      • daemon not running. starting it now on port 5938 *
      • daemon started successfully *
        $ /opt/android/android-sdk-linux/platform-tools/adb start-server
        [android] Starting Android emulator
        $ /opt/android/android-sdk-linux/tools/emulator64-arm -ports 5936,5937 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_240_WVGA_android-16_armeabi-v7a_1 -no-snapshot-load -no-snapshot-save -no-window -no-audio -gpu off
        $ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:5937
        connected to localhost:5937
        [android] Waiting for emulator to finish booting...
        $ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:5937 shell getprop init.svc.bootanim
        error: device offline
        $ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:5937
        $ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:5937 shell getprop init.svc.bootanim
        $ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:5937
        $ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:5937 shell getprop init.svc.bootanim
        $ /opt/android/android-sdk-linux/platform-tools/adb disconnect localhost:5937
        $ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:5937
        $ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:5937 shell getprop init.svc.bootanim
        $ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:5937
        $ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:5937 shell getprop init.svc.bootanim
        $ /opt/android/android-sdk-linux/platform-tools/adb -s localhost:5937 logcat -v time
        $ /opt/android/android-sdk-linux/platform-tools/adb connect localhost:5937
        [android] Emulator is ready for use (took 59 seconds)
        Copied 3 artifacts from "Android Compile (DEV)" build number 165
        [1] $ /bin/sh -xe /tmp/hudson8490616504917756558.sh
        + date
        Fri Jun 5 10:37:35 PDT 2015
        + adb devices
        List of devices attached
        emulator-5936 device
        localhost:5937 device
        ===end of copy & paste ===

      I believe in older plugin, it used the emulator-port convention, but newer build uses localhost:port and somehow this caused adb to think there are two different devices.

      Is this issue with this plugin? Or should really be issue with adb?

        Attachments

          Activity

          Hide
          yenchi Yenchi Lin added a comment -

          Lowering to minor as I found a workaround with newer spoon release that supports running tests only on specific device serial

          Show
          yenchi Yenchi Lin added a comment - Lowering to minor as I found a workaround with newer spoon release that supports running tests only on specific device serial
          Hide
          orrc Christopher Orr added a comment -

          This should be working in version 2.14 of the plugin, which was released last week.

          Show
          orrc Christopher Orr added a comment - This should be working in version 2.14 of the plugin, which was released last week.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              yenchi Yenchi Lin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: