Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is Jenkins Android Emulator Plugin recreating my Emulator Snapshots in every build?
    primarykey
    data
    text
    <p>I use Jenkins to build one of my projects. The Android Emulator Plugin automatically starts an emulator with the following configuration: </p> <p><img src="https://i.stack.imgur.com/E8bIC.png" alt="emulator configuration"></p> <p>Configuration of the Emulator Plugin: </p> <p><img src="https://i.stack.imgur.com/yE2Yc.png" alt="emulator plugin configuration">.</p> <p>Every time the job is running I get the following output: </p> <pre><code>Erasing existing emulator data... $ /ci/home/tools/android-sdk//tools/emulator -no-boot-anim -ports 64470,64471 -prop persist.sys.language=de -prop persist.sys.country=DE -avd hudson_de-DE_240_480x720_Google_Inc._Google_APIs_8 -no-snapshot-load -no-snapshot-save -wipe-data . . shell input keyevent 4 [android] Giving the system some time to settle before creating initial snapshot... $ . . localhost:64471 shell log -p v -t Jenkins "Creating snapshot..." [android] Creating snapshot... $ </code></pre> <p>Full log below. </p> <p>It seems that the plugin is creating a new emulator every time and is not using snapshots. This takes something between 2 and 4 minutes depending on the emulator configuration. </p> <p>The plugin creates .avd and .ini files in the .android/avd directory inside the job folder. The avds are not deleted after the run process.</p> <p>If I disable the use snapshots config the emulator needs less then a minute to start. </p> <p>Is this an issue with the emulator plugin or are snapshots not possible because of my configuration? </p> <p>I hope that using snapshots will speed up my building process a lot.</p> <hr> <p>Full log: </p> <pre><code>$ /ci/home/tools/android-sdk//tools/android list target [android] Using Android SDK: /ci/home/tools/android-sdk/ [android] Adding 200M SD card to AVD 'hudson_de-DE_240_480x720_Google_Inc._Google_APIs_8'... [android] Setting hardware properties: hw.ramSize: 512 $ /ci/home/tools/android-sdk//platform-tools/adb start-server $ /ci/home/tools/android-sdk//tools/emulator -snapshot-list -no-window -avd hudson_de-DE_240_480x720_Google_Inc._Google_APIs_8 [android] Starting Android emulator and creating initial snapshot [android] Erasing existing emulator data... $ /ci/home/tools/android-sdk//tools/emulator -no-boot-anim -ports 64470,64471 -prop persist.sys.language=de -prop persist.sys.country=DE -avd hudson_de-DE_240_480x720_Google_Inc._Google_APIs_8 -no-snapshot-load -no-snapshot-save -wipe-data * daemon not running. starting it now on port 64472 * * daemon started successfully * $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 [android] Waiting for emulator to finish booting... $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell getprop dev.bootcomplete error: device offline $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell getprop dev.bootcomplete $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell getprop dev.bootcomplete $ /ci/home/tools/android-sdk//platform-tools/adb disconnect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell getprop dev.bootcomplete $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell getprop dev.bootcomplete $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell getprop dev.bootcomplete $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 logcat -v time $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 [android] Attempting to unlock emulator screen $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell input keyevent 82 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell input keyevent 4 [android] Giving the system some time to settle before creating initial snapshot... $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 logcat -c $ /ci/home/tools/android-sdk//platform-tools/adb -s localhost:64471 shell log -p v -t Jenkins "Creating snapshot..." [android] Creating snapshot... $ /ci/home/tools/android-sdk//platform-tools/adb connect localhost:64471 [android] Emulator is ready for use (took 158 seconds) </code></pre> <hr> <p>Buildfile for an example job: </p> <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;project&gt; &lt;actions/&gt; &lt;description&gt;&lt;/description&gt; &lt;keepDependencies&gt;false&lt;/keepDependencies&gt; &lt;properties/&gt; &lt;scm class="hudson.plugins.git.GitSCM"&gt; &lt;configVersion&gt;2&lt;/configVersion&gt; &lt;userRemoteConfigs&gt; &lt;hudson.plugins.git.UserRemoteConfig&gt; &lt;name&gt;&lt;/name&gt; &lt;refspec&gt;&lt;/refspec&gt; &lt;url&gt;git@project...&lt;/url&gt; &lt;/hudson.plugins.git.UserRemoteConfig&gt; &lt;/userRemoteConfigs&gt; &lt;branches&gt; &lt;hudson.plugins.git.BranchSpec&gt; &lt;name&gt;master&lt;/name&gt; &lt;/hudson.plugins.git.BranchSpec&gt; &lt;/branches&gt; &lt;disableSubmodules&gt;false&lt;/disableSubmodules&gt; &lt;recursiveSubmodules&gt;false&lt;/recursiveSubmodules&gt; &lt;doGenerateSubmoduleConfigurations&gt;false&lt;/doGenerateSubmoduleConfigurations&gt; &lt;authorOrCommitter&gt;false&lt;/authorOrCommitter&gt; &lt;clean&gt;false&lt;/clean&gt; &lt;wipeOutWorkspace&gt;false&lt;/wipeOutWorkspace&gt; &lt;pruneBranches&gt;false&lt;/pruneBranches&gt; &lt;remotePoll&gt;false&lt;/remotePoll&gt; &lt;ignoreNotifyCommit&gt;false&lt;/ignoreNotifyCommit&gt; &lt;useShallowClone&gt;false&lt;/useShallowClone&gt; &lt;buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/&gt; &lt;gitTool&gt;default&lt;/gitTool&gt; &lt;submoduleCfg class="list"/&gt; &lt;relativeTargetDir&gt;&lt;/relativeTargetDir&gt; &lt;reference&gt;&lt;/reference&gt; &lt;excludedRegions&gt;&lt;/excludedRegions&gt; &lt;excludedUsers&gt;&lt;/excludedUsers&gt; &lt;gitConfigName&gt;&lt;/gitConfigName&gt; &lt;gitConfigEmail&gt;&lt;/gitConfigEmail&gt; &lt;skipTag&gt;false&lt;/skipTag&gt; &lt;includedRegions&gt;&lt;/includedRegions&gt; &lt;scmName&gt;&lt;/scmName&gt; &lt;/scm&gt; &lt;canRoam&gt;true&lt;/canRoam&gt; &lt;disabled&gt;false&lt;/disabled&gt; &lt;blockBuildWhenDownstreamBuilding&gt;true&lt;/blockBuildWhenDownstreamBuilding&gt; &lt;blockBuildWhenUpstreamBuilding&gt;true&lt;/blockBuildWhenUpstreamBuilding&gt; &lt;triggers class="vector"&gt; &lt;hudson.triggers.SCMTrigger&gt; &lt;spec&gt;*/5 * * * *&lt;/spec&gt; &lt;/hudson.triggers.SCMTrigger&gt; &lt;/triggers&gt; &lt;concurrentBuild&gt;false&lt;/concurrentBuild&gt; &lt;builders&gt; &lt;hudson.tasks.Ant&gt; &lt;targets&gt;clean debug install&lt;/targets&gt; &lt;antName&gt;(Default)&lt;/antName&gt; &lt;/hudson.tasks.Ant&gt; &lt;hudson.tasks.Ant&gt; &lt;targets&gt;&lt;/targets&gt; &lt;antName&gt;(Default)&lt;/antName&gt; &lt;buildFile&gt;checkstyle-ant.xml&lt;/buildFile&gt; &lt;/hudson.tasks.Ant&gt; &lt;hudson.tasks.Shell&gt; &lt;command&gt;os_opts=&amp;quot;-Djava.awt.headless=true&amp;quot; lint --xml lint-results.xml .&lt;/command&gt; &lt;/hudson.tasks.Shell&gt; &lt;hudson.plugins.android__emulator.monkey.MonkeyBuilder&gt; &lt;packageId&gt;de....&lt;/packageId&gt; &lt;eventCount&gt;1000&lt;/eventCount&gt; &lt;throttleMs&gt;10&lt;/throttleMs&gt; &lt;seed&gt;timestamp&lt;/seed&gt; &lt;/hudson.plugins.android__emulator.monkey.MonkeyBuilder&gt; &lt;hudson.tasks.Shell&gt; ... distribution script &lt;/hudson.tasks.Shell&gt; &lt;/builders&gt; &lt;publishers&gt; &lt;org.jenkinsci.plugins.android__lint.LintPublisher&gt; &lt;healthy&gt;&lt;/healthy&gt; &lt;thresholdLimit&gt;low&lt;/thresholdLimit&gt; &lt;pluginName&gt;[android-lint] &lt;/pluginName&gt; &lt;defaultEncoding&gt;&lt;/defaultEncoding&gt; &lt;canRunOnFailed&gt;false&lt;/canRunOnFailed&gt; &lt;useStableBuildAsReference&gt;false&lt;/useStableBuildAsReference&gt; &lt;useDeltaValues&gt;false&lt;/useDeltaValues&gt; &lt;thresholds&gt; &lt;unstableTotalAll&gt;&lt;/unstableTotalAll&gt; &lt;unstableTotalHigh&gt;&lt;/unstableTotalHigh&gt; &lt;unstableTotalNormal&gt;&lt;/unstableTotalNormal&gt; &lt;unstableTotalLow&gt;&lt;/unstableTotalLow&gt; &lt;unstableNewAll&gt;&lt;/unstableNewAll&gt; &lt;unstableNewHigh&gt;&lt;/unstableNewHigh&gt; &lt;unstableNewNormal&gt;&lt;/unstableNewNormal&gt; &lt;unstableNewLow&gt;&lt;/unstableNewLow&gt; &lt;failedTotalAll&gt;&lt;/failedTotalAll&gt; &lt;failedTotalHigh&gt;&lt;/failedTotalHigh&gt; &lt;failedTotalNormal&gt;&lt;/failedTotalNormal&gt; &lt;failedTotalLow&gt;&lt;/failedTotalLow&gt; &lt;failedNewAll&gt;&lt;/failedNewAll&gt; &lt;failedNewHigh&gt;&lt;/failedNewHigh&gt; &lt;failedNewNormal&gt;&lt;/failedNewNormal&gt; &lt;failedNewLow&gt;&lt;/failedNewLow&gt; &lt;/thresholds&gt; &lt;shouldDetectModules&gt;false&lt;/shouldDetectModules&gt; &lt;dontComputeNew&gt;false&lt;/dontComputeNew&gt; &lt;doNotResolveRelativePaths&gt;false&lt;/doNotResolveRelativePaths&gt; &lt;pattern&gt;&lt;/pattern&gt; &lt;/org.jenkinsci.plugins.android__lint.LintPublisher&gt; &lt;hudson.plugins.checkstyle.CheckStylePublisher&gt; &lt;healthy&gt;&lt;/healthy&gt; &lt;unHealthy&gt;&lt;/unHealthy&gt; &lt;thresholdLimit&gt;low&lt;/thresholdLimit&gt; &lt;pluginName&gt;[CHECKSTYLE] &lt;/pluginName&gt; &lt;defaultEncoding&gt;&lt;/defaultEncoding&gt; &lt;canRunOnFailed&gt;false&lt;/canRunOnFailed&gt; &lt;useStableBuildAsReference&gt;false&lt;/useStableBuildAsReference&gt; &lt;useDeltaValues&gt;false&lt;/useDeltaValues&gt; &lt;thresholds&gt; &lt;unstableTotalAll&gt;&lt;/unstableTotalAll&gt; &lt;unstableTotalHigh&gt;&lt;/unstableTotalHigh&gt; &lt;unstableTotalNormal&gt;&lt;/unstableTotalNormal&gt; &lt;unstableTotalLow&gt;&lt;/unstableTotalLow&gt; &lt;failedTotalAll&gt;&lt;/failedTotalAll&gt; &lt;failedTotalHigh&gt;&lt;/failedTotalHigh&gt; &lt;failedTotalNormal&gt;&lt;/failedTotalNormal&gt; &lt;failedTotalLow&gt;&lt;/failedTotalLow&gt; &lt;/thresholds&gt; &lt;shouldDetectModules&gt;false&lt;/shouldDetectModules&gt; &lt;dontComputeNew&gt;true&lt;/dontComputeNew&gt; &lt;doNotResolveRelativePaths&gt;false&lt;/doNotResolveRelativePaths&gt; &lt;pattern&gt;&lt;/pattern&gt; &lt;/hudson.plugins.checkstyle.CheckStylePublisher&gt; &lt;hudson.plugins.warnings.WarningsPublisher&gt; &lt;healthy&gt;&lt;/healthy&gt; &lt;unHealthy&gt;&lt;/unHealthy&gt; &lt;thresholdLimit&gt;low&lt;/thresholdLimit&gt; &lt;pluginName&gt;[WARNINGS] &lt;/pluginName&gt; &lt;defaultEncoding&gt;&lt;/defaultEncoding&gt; &lt;canRunOnFailed&gt;false&lt;/canRunOnFailed&gt; &lt;useStableBuildAsReference&gt;false&lt;/useStableBuildAsReference&gt; &lt;useDeltaValues&gt;false&lt;/useDeltaValues&gt; &lt;thresholds&gt; &lt;unstableTotalAll&gt;&lt;/unstableTotalAll&gt; &lt;unstableTotalHigh&gt;&lt;/unstableTotalHigh&gt; &lt;unstableTotalNormal&gt;&lt;/unstableTotalNormal&gt; &lt;unstableTotalLow&gt;&lt;/unstableTotalLow&gt; &lt;failedTotalAll&gt;&lt;/failedTotalAll&gt; &lt;failedTotalHigh&gt;&lt;/failedTotalHigh&gt; &lt;failedTotalNormal&gt;&lt;/failedTotalNormal&gt; &lt;failedTotalLow&gt;&lt;/failedTotalLow&gt; &lt;/thresholds&gt; &lt;shouldDetectModules&gt;false&lt;/shouldDetectModules&gt; &lt;dontComputeNew&gt;true&lt;/dontComputeNew&gt; &lt;doNotResolveRelativePaths&gt;true&lt;/doNotResolveRelativePaths&gt; &lt;parserConfigurations/&gt; &lt;consoleParsers&gt; &lt;hudson.plugins.warnings.ConsoleParser&gt; &lt;parserName&gt;Java Compiler (Eclipse)&lt;/parserName&gt; &lt;/hudson.plugins.warnings.ConsoleParser&gt; &lt;/consoleParsers&gt; &lt;/hudson.plugins.warnings.WarningsPublisher&gt; &lt;hudson.plugins.analysis.collector.AnalysisPublisher&gt; &lt;healthy&gt;&lt;/healthy&gt; &lt;unHealthy&gt;&lt;/unHealthy&gt; &lt;thresholdLimit&gt;low&lt;/thresholdLimit&gt; &lt;pluginName&gt;[ANALYSIS-COLLECTOR] &lt;/pluginName&gt; &lt;defaultEncoding&gt;&lt;/defaultEncoding&gt; &lt;canRunOnFailed&gt;false&lt;/canRunOnFailed&gt; &lt;useStableBuildAsReference&gt;false&lt;/useStableBuildAsReference&gt; &lt;useDeltaValues&gt;false&lt;/useDeltaValues&gt; &lt;thresholds&gt; &lt;unstableTotalAll&gt;&lt;/unstableTotalAll&gt; &lt;unstableTotalHigh&gt;&lt;/unstableTotalHigh&gt; &lt;unstableTotalNormal&gt;&lt;/unstableTotalNormal&gt; &lt;unstableTotalLow&gt;&lt;/unstableTotalLow&gt; &lt;failedTotalAll&gt;&lt;/failedTotalAll&gt; &lt;failedTotalHigh&gt;&lt;/failedTotalHigh&gt; &lt;failedTotalNormal&gt;&lt;/failedTotalNormal&gt; &lt;failedTotalLow&gt;&lt;/failedTotalLow&gt; &lt;/thresholds&gt; &lt;shouldDetectModules&gt;false&lt;/shouldDetectModules&gt; &lt;dontComputeNew&gt;true&lt;/dontComputeNew&gt; &lt;doNotResolveRelativePaths&gt;true&lt;/doNotResolveRelativePaths&gt; &lt;isCheckStyleDeactivated&gt;false&lt;/isCheckStyleDeactivated&gt; &lt;isDryDeactivated&gt;true&lt;/isDryDeactivated&gt; &lt;isFindBugsDeactivated&gt;true&lt;/isFindBugsDeactivated&gt; &lt;isPmdDeactivated&gt;true&lt;/isPmdDeactivated&gt; &lt;isOpenTasksDeactivated&gt;true&lt;/isOpenTasksDeactivated&gt; &lt;isWarningsDeactivated&gt;false&lt;/isWarningsDeactivated&gt; &lt;/hudson.plugins.analysis.collector.AnalysisPublisher&gt; &lt;hudson.plugins.android__emulator.monkey.MonkeyRecorder&gt; &lt;failureOutcome&gt;FAILURE&lt;/failureOutcome&gt; &lt;/hudson.plugins.android__emulator.monkey.MonkeyRecorder&gt; &lt;hudson.plugins.cigame.GamePublisher/&gt; &lt;hudson.tasks.Mailer&gt; &lt;recipients&gt;&lt;/recipients&gt; &lt;dontNotifyEveryUnstableBuild&gt;false&lt;/dontNotifyEveryUnstableBuild&gt; &lt;sendToIndividuals&gt;true&lt;/sendToIndividuals&gt; &lt;/hudson.tasks.Mailer&gt; &lt;/publishers&gt; &lt;buildWrappers&gt; &lt;hudson.plugins.locksandlatches.LockWrapper&gt; &lt;locks&gt; &lt;hudson.plugins.locksandlatches.LockWrapper_-LockWaitConfig&gt; &lt;name&gt;AndroidEmulator&lt;/name&gt; &lt;/hudson.plugins.locksandlatches.LockWrapper_-LockWaitConfig&gt; &lt;/locks&gt; &lt;/hudson.plugins.locksandlatches.LockWrapper&gt; &lt;hudson.plugins.android__emulator.AndroidEmulator&gt; &lt;osVersion&gt;Google Inc.:Google APIs:8&lt;/osVersion&gt; &lt;screenDensity&gt;240&lt;/screenDensity&gt; &lt;screenResolution&gt;480x720&lt;/screenResolution&gt; &lt;deviceLocale&gt;de_DE&lt;/deviceLocale&gt; &lt;sdCardSize&gt;200M&lt;/sdCardSize&gt; &lt;hardwareProperties&gt; &lt;hudson.plugins.android__emulator.AndroidEmulator_-HardwareProperty&gt; &lt;key&gt;hw.ramSize&lt;/key&gt; &lt;value&gt;512&lt;/value&gt; &lt;/hudson.plugins.android__emulator.AndroidEmulator_-HardwareProperty&gt; &lt;/hardwareProperties&gt; &lt;wipeData&gt;false&lt;/wipeData&gt; &lt;showWindow&gt;true&lt;/showWindow&gt; &lt;useSnapshots&gt;true&lt;/useSnapshots&gt; &lt;deleteAfterBuild&gt;false&lt;/deleteAfterBuild&gt; &lt;startupDelay&gt;0&lt;/startupDelay&gt; &lt;commandLineOptions&gt;&lt;/commandLineOptions&gt; &lt;/hudson.plugins.android__emulator.AndroidEmulator&gt; &lt;/buildWrappers&gt; &lt;/project&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload