[JIRA] [android-emulator] (JENKINS-22555) android.util.AndroidException: Can't connect to activity manager; is the system running?

360 views
Skip to first unread message

h4xor3r@gmail.com (JIRA)

unread,
Apr 9, 2014, 5:27:04 PM4/9/14
to jenkinsc...@googlegroups.com
Issue Type: Bug Bug
Assignee: Unassigned
Components: android-emulator
Created: 09/Apr/14 9:26 PM
Description:

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

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 lookout.package com.lookout -e lookout.notAnnotation com.lookout.annotations.ExcludeFromDefault, -e lookout.stride 3 -e lookout.initial 0 -e lookout.annotation com.lookout.annotations.UnitTest com.lookout.tests/com.lookout.LookoutInstrumentationTestRunner
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.lookout/app_test_report/test-report.xml test-report.xml
2014-04-09 11:43:06 remote object '/data/data/com.lookout/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
Environment: Updated to Android SDK Release 22.6.2
Ubuntu 12.04

Jenkins LTS: Jenkins ver. 1.532.2
Android Emulator Plugin: 2.10
Project: Jenkins
Priority: Major Major
Reporter: Sam Xiao
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

h4xor3r@gmail.com (JIRA)

unread,
Apr 9, 2014, 5:32:04 PM4/9/14
to jenkinsc...@googlegroups.com

h4xor3r@gmail.com (JIRA)

unread,
Apr 10, 2014, 5:29:04 PM4/10/14
to jenkinsc...@googlegroups.com
Change By: Sam Xiao (10/Apr/14 9:27 PM)
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


{noformat}

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 lookout.package com.lookout -e lookout.notAnnotation com.lookout.annotations.ExcludeFromDefault, -e lookout.stride 3 -e lookout.initial 0 -e lookout.annotation com.lookout.annotations.UnitTest com.lookout.tests/com.lookout.LookoutInstrumentationTestRunner
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.lookout/app_test_report/test-report.xml test-report.xml
2014-04-09 11:43:06 remote object '/data/data/com.lookout/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
{noformat}

h4xor3r@gmail.com (JIRA)

unread,
Apr 10, 2014, 5:33:05 PM4/10/14
to jenkinsc...@googlegroups.com
Change By: Sam Xiao (10/Apr/14 9:31 PM)
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


{noformat}
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  lookout  abc .package com. lookout abc  -e  lookout  abc .notAnnotation com. lookout abc .annotations.ExcludeFromDefault, -e  lookout  abc .stride 3 -e  lookout  abc .initial 0 -e  lookout  abc .annotation com. lookout abc .annotations.UnitTest com. lookout abc .tests/com. lookout abc . LookoutInstrumentationTestRunner 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. lookout abc /app_test_report/test-report.xml test-report.xml
2014-04-09 11:43:06 remote object '/data/data/com.
lookout 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
{noformat}

chris@orr.me.uk (JIRA)

unread,
May 14, 2014, 7:42:04 PM5/14/14
to jenkinsc...@googlegroups.com

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?

scm_issue_link@java.net (JIRA)

unread,
Jan 21, 2015, 12:41:51 PM1/21/15
to jenkinsc...@googlegroups.com

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

chris@orr.me.uk (JIRA)

unread,
Jan 21, 2015, 12:49:52 PM1/21/15
to jenkinsc...@googlegroups.com
Christopher Orr resolved Bug JENKINS-22555 as Fixed
Change By: Christopher Orr (21/Jan/15 5:48 PM)
Status: Open Resolved
Resolution: Fixed

chris@orr.me.uk (JIRA)

unread,
Mar 12, 2015, 5:13:33 AM3/12/15
to jenkinsc...@googlegroups.com
Christopher Orr closed Bug JENKINS-22555 as Fixed

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

Change By: Christopher Orr (12/Mar/15 9:12 AM)
Status: Resolved Closed
Assignee: Christopher Orr
Reply all
Reply to author
Forward
0 new messages