Hello, this problem was posted on StackOverflow; I was asked to direct the 
question here.  see 
http://stackoverflow.com/questions/28401386/jenkins-android-ubuntu-vm-emulator-error-device-offline
 for 
the original.

Overview:

I have an Android development environment using Eclipse in a Lubuntu 
virtual machine on VirtualBox. The vm is running headless, I access it 
using remote desktop from Windows. The development environment is for 
troubleshooting purposes. On this machine I have also installed Jenkins.

To get going with Jenkins I have set up a simple Android application myApp 
and test application with Robotium called myAppTest, the build is using 
Ant. After many hours of careful checking I am stuck on a couple of areas. 
This question is related to the first and the second will be posted 
separately 

The downstream test project I have repeated error: device offline error

[workspace] $ hg --config ******** log --template "<changeset node='{node}' 
author='{author|xmlescape}' rev='{rev}' date='{date}'>
  <msg>{desc|xmlescape}</msg>
  <added>{file_adds|stringify|xmlescape}</added>
  <deleted>{file_dels|stringify|xmlescape}</deleted>
  <files>{files|stringify|xmlescape}</files>
  <parents>{parents}</parents></changeset>\n" --rev default:0 --follow --prune 
3dd48aa576a43c9456bc20bcef4e07ww2f477e66b --encoding UTF-8 --encodingmode 
replace Starting xvnc [workspace] $ vncserver :29 -localhost -nolisten tcp 
xauth: file /var/lib/jenkins/jobs/Android does not exist xauth: (argv):1:
unknown command "myApp" New 'android-sdk:29 (jenkins)' desktop is 
android-sdk:29 Starting applications specified in 
/var/lib/jenkins/.vnc/xstartup Log file is 
/var/lib/jenkins/.vnc/android-sdk:29.log $ 
/home/android/android-sdks/tools/android list target
[android] Using Android SDK: /home/android/android-sdks [android] Adding 250M 
SD card to AVD 'hudson_en-AU_160_WXGA720_android-14'... $ 
/home/android/android-sdks/platform-tools/adb start-server * daemon not 
running. starting it now on port 5892 * * daemon
started successfully * $ /home/android/android-sdks/platform-tools/adb 
start-server $ /home/android/android-sdks/tools/emulator-arm -snapshot-list 
-no-window -avd hudson_en-AU_160_WXGA720_android-14 [android] Starting Android 
emulator and creating initial
snapshot [android] Erasing existing emulator data... $ 
/home/android/android-sdks/tools/emulator -no-boot-anim -ports 5890,5891 -prop 
persist.sys.language=en -prop persist.sys.country=AU -avd 
hudson_en-AU_160_WXGA720_android-14 -no-snapshot-load -no-snapshot-save
-wipe-data -no-window -force-32bit -no-audio -gpu off Failed to Initialize 
backend EGL display $ /home/android/android-sdks/platform-tools/adb connect 
emulator-5890 [android] Waiting for emulator to finish booting... $ 
/home/android/android-sdks/platform-tools/adb
-s emulator-5890 shell getprop dev.bootcomplete error: device offline $ 
/home/android/android-sdks/platform-tools/adb -s emulator-5890 shell getprop 
dev.bootcomplete error: device offline $ 
/home/android/android-sdks/platform-tools/adb -s emulator-5890
shell getprop dev.bootcomplete error: device offline ditto with error until I 
shut down Jenkins

Settings

On the Lubuntu vm I have a user called android and Jenkins has a user 
called jenkins. Jenkins is set to call the Android sdk in 
/home/android/android-sdks.

I have the following jenkins plugins: Android Emulator Plugin Ant Plugin 
Authorize Project Bitbucket Approve Plugin Bitbucket Plugin Bitbucket 
Pullrequest Builder Plugin Copy Artifact Plugin Credentials Plugin 
Mercurial Plugin SSH Credentials Plugin SSH Slaves plugin Xvnc plugin

Device rules in /etc/udev/rules.d/70-android.rules

The config file for myApp is:

SUBSYSTEM=="usb",ATTR{idVendor}=="0bb4",MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="04e8",MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="18d1",MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="22b8",MODE="0666"


<project>
  <actions/>
  <description/>
  <keepDependencies>false</keepDependencies>
  <properties>
    <hudson.plugins.copyartifact.CopyArtifactPermissionProperty 
plugin="copyartifact@1.34">
      <projectNameList>
        <string>Android testApp tests</string>
      </projectNameList>
    </hudson.plugins.copyartifact.CopyArtifactPermissionProperty>
  </properties>
  <scm class="hudson.plugins.mercurial.MercurialSCM" plugin="mercurial@1.51">
    <installation>(Default)</installation>
    <source>ssh://h...@bitbucket.org/myjenkins/myapp</source>
    <modules/>
    <revisionType>BRANCH</revisionType>
    <revision>default</revision>
    <clean>false</clean>
    <browser class="hudson.plugins.mercurial.browser.BitBucket">
      <url>https://bitbucket.org/myjenkins/myapp/</url>
    </browser>
    <credentialsId>8b6fefegh-87b8-7795-n9f0-0ge57aeyyd79</credentialsId>
    <disableChangeLog>false</disableChangeLog>
  </scm>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <jdk>(Default)</jdk>
  <triggers>
    <hudson.triggers.SCMTrigger>
      <spec>0 8 * * 1-5</spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </triggers>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Ant plugin="ant@1.2">
      <targets>clean debug</targets>
      <antName>(Default)</antName>
      <properties>sdk.dir=/home/android/android-sdks</properties>
    </hudson.tasks.Ant>
  </builders>
  <publishers>
    <hudson.tasks.ArtifactArchiver>
      <artifacts>bin/*debug.apk</artifacts>
      <allowEmptyArchive>false</allowEmptyArchive>
      <onlyIfSuccessful>false</onlyIfSuccessful>
      <fingerprint>false</fingerprint>
      <defaultExcludes>true</defaultExcludes>
    </hudson.tasks.ArtifactArchiver>
    <hudson.tasks.BuildTrigger>
      <childProjects>myAppTest</childProjects>
      <threshold>
        <name>FAILURE</name>
        <ordinal>2</ordinal>
        <color>RED</color>
        <completeBuild>true</completeBuild>
      </threshold>
    </hudson.tasks.BuildTrigger>
    <org.jenkinsci.plugins.bitbucket__approve.BitbucketApprover 
plugin="bitbucket-approve@1.0.1">
      <mOwner>Android Tester</mOwner>
      <mSlug>myApp</mSlug>
    </org.jenkinsci.plugins.bitbucket__approve.BitbucketApprover>
    <hudson.tasks.Mailer plugin="mailer@1.11">
      <recipients>androidtes...@mymail.com</recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>false</sendToIndividuals>
    </hudson.tasks.Mailer>
  </publishers>
  <buildWrappers/></project>

The config file for myAppTest is:

<project>
  <actions/>
  <description/>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.plugins.mercurial.MercurialSCM" plugin="mercurial@1.51">
    <installation>(Default)</installation>
    <source>ssh://h...@bitbucket.org/myjenkins/myapptest</source>
    <modules/>
    <revisionType>BRANCH</revisionType>
    <revision>default</revision>
    <clean>false</clean>
    <browser class="hudson.plugins.mercurial.browser.BitBucket">
      <url>https://bitbucket.org/myjenkins/myapptest/</url>
    </browser>
    <credentialsId>8b6fefegh-87b8-7795-n9f0-0ge57aeyyd79</credentialsId>
    <disableChangeLog>false</disableChangeLog>
  </scm>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <jdk>(Default)</jdk>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Ant plugin="ant@1.2">
      <targets>clean debug</targets>
      <antName>(Default)</antName>
    </hudson.tasks.Ant>
    <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.34">
      <project>myApp</project>
      <filter/>
      <target/>
      <excludes/>
      <selector class="hudson.plugins.copyartifact.StatusBuildSelector" />
      <doNotFingerprintArtifacts>false</doNotFingerprintArtifacts>
    </hudson.plugins.copyartifact.CopyArtifact>
    <hudson.plugins.android__emulator.InstallBuilder 
plugin="android-emulator@2.12">
      
<apkFile>/var/lib/jenkins/jobs/myapp/workspace/bin/myapp-debug.apk</apkFile>
      <uninstallFirst>true</uninstallFirst>
      <failOnInstallFailure>true</failOnInstallFailure>
    </hudson.plugins.android__emulator.InstallBuilder>
  </builders>
  <publishers>
    <hudson.tasks.Mailer plugin="mailer@1.11">
      <recipients>androidtes...@mymail.com</recipients>
      <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
      <sendToIndividuals>false</sendToIndividuals>
    </hudson.tasks.Mailer>
  </publishers>
  <buildWrappers>
    <hudson.plugins.xvnc.Xvnc plugin="xvnc@1.21">
      <takeScreenshot>false</takeScreenshot>
      <useXauthority>false</useXauthority>
    </hudson.plugins.xvnc.Xvnc>
    <hudson.plugins.android__emulator.AndroidEmulator 
plugin="android-emulator@2.12">
      <osVersion>android-14</osVersion>
      <screenDensity>160</screenDensity>
      <screenResolution>WXGA720</screenResolution>
      <deviceLocale>en_AU</deviceLocale>
      <sdCardSize>250M</sdCardSize>
      <hardwareProperties/>
      <wipeData>false</wipeData>
      <showWindow>false</showWindow>
      <useSnapshots>true</useSnapshots>
      <deleteAfterBuild>false</deleteAfterBuild>
      <startupDelay>0</startupDelay>
      <commandLineOptions>-force-32bit -no-audio -gpu off</commandLineOptions>
      <executable/>
    </hudson.plugins.android__emulator.AndroidEmulator>
  </buildWrappers></project>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9aed93ac-a5f4-4123-a8af-e16bcceeda5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to