Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor fixes


  • Creating a new Android emulator
    • Its configuration can be parameterised, including OS version, screen size, locale and hardware properties
    • Android SDK dependencies are automatically downloaded and installed
  • Running any Android emulator
    • Waits until the emulator is fully started-up
    • Emulator snapshots can be automatically created
      • This allows a very fast startup time for subsequent builds
      • This ensures subsequent builds will start from the same clean state
    • Logs are automatically captured and saved
    • Emulator will be shut down automatically when the build has finished
    • Multiple instances of the same emulator are prevented from running concurrently
  • Installing an Android package onto an emulator
  • Uninstalling an Android package from an emulator
  • Running the monkey stress-testing tool
  • Parsing output from running monkey
    • The build outcome can be automatically marked as unstable or failed in case a monkey-induced crash is detected



The plugin will automatically download and install the Android SDK, if it's not already installed when a build starts.
This means that no manual effort is required to start running Android emulators with Jenkins.


titleSee how the SDK is located...

Via the main configuration page, you can optionally specify the location where each build node can locate a copy of the Android SDK.

This can either be an absolute path, or can contain environment variables in the format $VARIABLE_NAME. This will be replaced at build time from the node's environment variables (see the "Node Properties" settings for each slave), or from the build's environment.

If no value is entered, or the plugin cannot find a valid SDK under the configured path, it will search under the following environment variables on the build node to try and locate a usable SDK:


If nothing is found, the plugin will search on the PATH to attempt to locate a usable set of SDK tools. If, after all these steps, the required Android SDK tools are not found and auto-installation is disabled, the job will be marked as failed "not built" and will stop.

Job configuration


Known issues

titleView known issues...

Running in a Windows service as "Local System"

New AVDs cannot be generated and run if Jenkins is running as a Windows service, using the "Local System" account (see JENKINS-7355).

  • Workaround: configure the Jenkins service to "run as" a real user

Unexpected timeouts or hanging during build

AVDs can, on occasion, time-out unexpectedly or stop responding during a build, e.g. when trying to install an APK (see JENKINS-7354).

  • This is generally caused by bugs in the ADB process. It can be prone to hanging or crashing. Over time, more safeguards have been added to the plugin, including timing-out after a while and isolating ADB instances, so this shouldn't happen too often.

AVDs may not shut down fully at the end of a build

Sometimes the emulator process does not shut down fully at the end of a build (requiring a kill -9 on Linux); the plugin sends a console command to terminate the emulator and the UI window closes, but the actual emulator process does not die.

  • This issue will be fixed once JENKINS-11995 is implemented.
  • If your slave is running Linux, you may be running into Android issue #17294
    In this case, there is a workaround assuming your build doesn't need to use the emulator's audio input:
    • Add a custom hardware property called "hw.audioInput" with the value "no"


  • Added automated installation of Android SDK, build tools and OS images
    • Where the SDK is already installed, prerequisites can be automatically installed, e.g. OS images, SDK add-ons
    • Automated installation of Android 4.0 system images will be possible when SDK Tools r17 is released (see Android bug #21880)
    • HTTP proxy support is not yet included
    • Thanks to Raphaël Moll at Google for implementing our feature requests!
  • Each build now runs its own instance of ADB, giving more stability and prevents ADB crashes from affecting parallel builds (JENKINS-10148)
    • Thanks to Jørgen Tjernø for the idea and patch!
  • Added option to delete the emulator when a build ends
  • Added detection of missing ABIs (e.g. required for Android 4.0+) (JENKINS-11516)
  • Added support for Android 4.0.3
  • Relaxed the rules for determining whether a screen resolution alias is valid or not
  • More hints are given at configuration time to help ensure an appropriate screen resolution is entered
  • Fixed variable expansion where an existing environment variable clashed with a build variable
  • Temporary log files are now stored outside of the workspace (JENKINS-11492)
  • Connections to the emulator are now made via TCP, which makes startup from snapshot more stable (JENKINS-11952)
  • Made snapshot more likely to succeed on Windows
titleOlder releasesView older versions...

Version 1.18 (September 12, 2011)

  • Fixed bug introduced by Android SDK Tools r12, where emulator startup was not detected properly on Windows (JENKINS-10815)
  • Fixed bug where build would get stuck during emulator startup if adb hangs (JENKINS-10421)
    • Thanks to Jørgen Tjernø
  • Fixed bug where logcat processes were not always killed at the end of a build (JENKINS-10785)
  • Made emulator shutdown more robust and prevent builds from hanging if the emulator is unresponsive (JENKINS-10778)
    • Thanks for Richard Mortimer for the investigation and fixes

Version 1.17 (August 25, 2011)

  • Added ability to use variables when specifying the package ID to run monkey against
  • Minor monkey fixes and improvements

Version 1.16 (August 19, 2011)

  • Added support for Android 3.2
  • Added ability to specify the psuedo-random seed value used when running monkey (including random and time-based values)
    • Thanks to Jan Berkel
  • Stopped redundant logcat output from being included for each build when using snapshots (JENKINS-9831)
  • Changed startup behaviour to allow manual management of snapshots while the emulator is running (JENKINS-10422)

Version 1.15 (May 20, 2011)

  • Added support for Android 3.1
  • Export ANDROID_SERIAL environment variable, making it easier to use adb (JENKINS-9692)
  • Fixed bug where an APK with spaces in its filename could not be installed (JENKINS-9700)
  • Fixed regression in config UI, where checkbox states weren't shown properly (JENKINS-9747)

Version 1.14 (May 13, 2011)

  • Added logic to ensure multiple builds which need the same AVD will not run in parallel on the same machine (see JENKINS-7353)
    • Thanks to Kohsuke Kawaguchi and Andrew Bayer for the assistance
  • Added new build step that runs the monkey testing tool on an emulator or device
  • Added a result publisher that parses monkey tool output, publishes a summary on the build page and updates the build result accordingly

Version 1.13 (Apr 20, 2011)

  • Fixed bug where snapshots would not function with "Show window" disabled (see JENKINS-9462)
    • Thanks to Valdis Rigdon

Version 1.12 (Apr 08, 2011)

  • Fixed bug which caused creation of a brand new emulator to fail if snapshots were enabled

Version 1.11 (Apr 07, 2011)

  • Added automated reconnection of the emulator to ADB during startup, in case ADB crashes (see JENKINS-7693)
  • Now connects to ADB in the same way that manually-started emulators do, potentially also improving stability

Version 1.10 (Apr 04, 2011)

  • Added automated support for emulator snapshots (added in SDK Tools r9), which enables much faster start-up times
  • Fixed bug which could prevent jobs from starting when SDK Tools version r7 or older was installed

Version 1.9 (Mar 06, 2011)

  • Added new build step that can install an APK on an emulator or device
  • Added new build step that can uninstall an APK from an emulator or device

Version 1.8.1 (Feb 23, 2011)

  • Added support for Android 3.0, including WXGA resolution (1280x800) and new locales

Version 1.8 (Feb 21, 2011)

  • Added ability to set custom hardware properties such as device RAM, Dalvik heap size, keyboard present etc. (see JENKINS-8124)

Version 1.7 (Feb 09, 2011)

  • Added support for Android 2.3.3
  • Improve detection of failures during startup, plus improved logging and minor cleanups

Version 1.6 (Dec 26, 2010)

  • Added ability to set arbitrary command line options when starting the emulator (see JENKINS-8125)

Version 1.5 (Dec 17, 2010)

  • Added support for Android 2.3 and the xhdpi screen density
  • Added detection to handle the new "platform-tools" directory used in SDK Tools r8
  • Added detection of when AVD creation fails due to the desired platform not being installed
  • Improved automated emulator unlocking to be more reliable, particularly on slower machines
  • Fixed bug which could cause build to hang when trying to shut-down the emulator

Version 1.4 (Sep 28, 2010)

  • Added feature to automatically unlock emulator after startup has completed (see JENKINS-7185)
  • Now tries to shut down emulator instances in a cleaner (hopefully more reliable) fashion

Version 1.3.1 (Sep 01, 2010)

  • Fixed bug that prevented custom screen resolutions from being recognised (see JENKINS-7337)
  • When verifying whether an AVD exists, ensure we check the same directory that the android tool creates AVDs in
    • It was possible in some environments (more likely Windows) that this was not the case

Version 1.3 (Jul 18, 2010)

  • Added ability to control whether AVDs have an SD card, and its size
  • Added option to reset emulator to its default state before each build
  • Added option allowing emulator UI to be hidden during a build
  • Added option to delay emulator start-up by a configurable period, e.g. to allow a VNC server to start up (see JENKINS-6912)

Version 1.2 (Jun 17, 2010)

  • Fixed crash that sometimes occurred when creating an emulator.
  • Added more logging and error handling while creating an emulator.
  • Fixed bug that would prevent emulators from starting.
  • Added support for Android 2.2.

Version 1.1 (May 18, 2010)

  • Added ability to create an AVD using platform add-ons (e.g. the Google Maps APIs)
  • Generated AVDs now include a blank SD card image (currently fixed at 16MB)

Version 1.0.3 (Apr 06, 2010)

  • Ensure correct environment variables are used when starting the emulator. Fixes a problem where the emulator may not start under the Xvnc Plugin

Version 1.0.2 (Apr 06, 2010)

  • Added environment variables with ADB identifier, ports and skin being used
  • Ensured correct skins are used for new AVDs

Version 1.0.1 (Apr 06, 2010)

  • Fix minor Java 5 compatibility issue

Version 1.0 (Apr 05, 2010)

  • Initial release