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

android.util.AndroidException: Can't connect to activity manager; is the system running?

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • Updated to Android SDK Release 22.6.2
      Ubuntu 12.04

      Jenkins LTS: Jenkins ver. 1.532.2
      Android Emulator Plugin: 2.10

    Description

      Start seeing some weird random failure after upgraded to 22.6.2 Android SDK.

      I don't think `getprop dev.bootcomplete` (https://github.com/jenkinsci/android-emulator-plugin/search?q=%22dev.bootcomplete%22&ref=cmdform) works anymore with the new SDK to determine the android device is boot finished or not.

      Should we use this `adb shell getprop init.svc.bootanim` ?

      http://stackoverflow.com/questions/3634041/detect-when-android-emulator-is-fully-booted

      2014-04-09 11:43:02 2093 KB/s (2968898 bytes in 1.384s)
      2014-04-09 11:43:04 Error: Could not access the Package Manager.  Is the system running?
      2014-04-09 11:43:04  => success!
      2014-04-09 11:43:04 $ adb logcat -c
      2014-04-09 11:43:04  => success!
      2014-04-09 11:43:04 $ adb shell am instrument -w  -e abc.package com.abc -e abc.notAnnotation com.abc.annotations.ExcludeFromDefault, -e abc.stride 3 -e abc.initial 0 -e abc.annotation com.abc.annotations.UnitTest com.abc.tests/com.abc.AbcInstrumentationTestRunner
      2014-04-09 11:43:06 Error type 2
      2014-04-09 11:43:06 android.util.AndroidException: Can't connect to activity manager; is the system running?
      2014-04-09 11:43:06  => success!
      2014-04-09 11:43:06 $ echo '<testsuites></testsuites>' > test-report.xml; adb pull /data/data/com.abc/app_test_report/test-report.xml test-report.xml
      2014-04-09 11:43:06 remote object '/data/data/com.abc/app_test_report/test-report.xml' does not exist
      2014-04-09 11:43:06  => failure: #<Process::Status: pid=30984,exited(1)>
      2014-04-09 11:43:06 Could not fetch JUnit test report from device/emulator. Outputting empty test report
      

      Attachments

        Activity

          I'll take a look, though I have the latest SDK tools installed, but managed to start emulators successfully AFAICT.

          Which Android OS version were you creating the emulator with?

          orrc Christopher Orr added a comment - I'll take a look, though I have the latest SDK tools installed, but managed to start emulators successfully AFAICT. Which Android OS version were you creating the emulator with?

          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/9bfa98a0b1fb90ee811f9f029c041112f520ec14
          Log:
          JENKINS-22555 Switched to using "init.svc.bootanim" to detect boot completion.

          I saw an Android TV system image that did not use "dev.bootcomplete", even
          although it had (apparently) booted correctly. Other tools seem to be using
          the bootanim variant, and it seems to be working in every case I tested.

          Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/3ddf4b3259db...9bfa98a0b1fb

          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/9bfa98a0b1fb90ee811f9f029c041112f520ec14 Log: JENKINS-22555 Switched to using "init.svc.bootanim" to detect boot completion. I saw an Android TV system image that did not use "dev.bootcomplete", even although it had (apparently) booted correctly. Other tools seem to be using the bootanim variant, and it seems to be working in every case I tested. Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/3ddf4b3259db...9bfa98a0b1fb

          Version 2.13 of the plugin has been released, which includes this fix.

          orrc Christopher Orr added a comment - Version 2.13 of the plugin has been released, which includes this fix.

          People

            orrc Christopher Orr
            samxiao Sam Xiao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: