I kinda ruled out the timing issue, because I could insert a delay (tried 
10 seconds) before starting the emu and still won't work.
I also found the -avd default, which is ~/.android, and i checked that the 
avd is created there.
So next best guess is that if i start it from command line while logged as 
administrator, it goes to the right place, while jenkins doesn't. However, 
this doesn't make much sense to me, since apparently it is possible to 
change the avd location, but not the ini file pointing to it. So I don't 
expect any env variable to point somewhere else, but at most the login user 
(jenkins?) to look in the wrong place. Still no sense, since administrator 
is the account used to connect to that node, jenkins user should not come 
into play.

Getting pretty frustrated :(

On Thursday, April 3, 2014 8:25:24 PM UTC+2, Diego Costantini wrote:
>
> Hi,
> while introducing the gradle sdk-manager-plugin from Jake Wharton I 
> noticed that on one of my Jenkins slaves I was pointing to the wrong 
> android sdk path.
> That's why I copy the workspace from a previous job on another machine 
> with a different path.
> So I excluded local.properties from the copy and I had to provide 
> ANDROID_HOME in the second machine.
> I thought to do this from the jenkins node configuration, where I noticed 
> already 4 android key-values set (one was wrong, probably a copy-paste 
> issue).
> I fixed the wrong one and for double checking I also set the same 
> ANDROID_PATH from /etc/profiles.
> Unfortunately, this broke my job, and reverting all of it seems to not fix 
> it :(
>
> Here is the log of the broken job:
>
> [android] Using Android SDK: /home/administrator/android-sdk-linux
>> [android] Creating Android AVD: 
>> /home/administrator/.android/avd/hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19.avd
>> [android] /home/administrator/android-sdk-linux/tools/android create avd -f 
>> -a -c 128M -s WXGA800 -n 
>> hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19 -t "Google 
>> Inc.:Google APIs x86:19"
>> [android] Setting hardware properties:
>>      hw.ramSize: 2048
>>      vm.heapSize: 256
>> $ /home/administrator/android-sdk-linux/platform-tools/adb start-server
>> [android] Starting Android emulator
>> $ /home/administrator/android-sdk-linux/tools/emulator64-x86 -no-boot-anim 
>> -ports 32824,51103 -prop persist.sys.language=en -prop 
>> persist.sys.country=US -avd 
>> hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19 -no-snapshot-load 
>> -no-snapshot-save -wipe-data -qemu -m 2048 -enable-kvm
>> emulator: ERROR: unknown virtual device name: 
>> 'hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19'
>> emulator: could not find virtual device named 
>> 'hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19'
>>
>> * daemon not running. starting it now on port 50112 *
>> * daemon started successfully *
>> [android] Emulator did not appear to start; giving up
>> $ /home/administrator/android-sdk-linux/platform-tools/adb disconnect 
>> localhost:51103
>> [android] Stopping Android emulator
>>
>>  
>>
>
> I know this might seem the wrong place to ask, but in order to start 
> troubleshooting, I would like to know where is the path for -avd taken, so 
> I can see if there is a wrong path there.
> Note also that running the same emulator command from terminal during the 
> build (while the avd is present on disk) starts up the emulator, which 
> makes me think that the command is ran by jenkins while the avd is still 
> being created. But that wasn't happening before, as you can see from a 
> previous log:
>
>
> [android] Using Android SDK: /home/administrator/android-sdk-linux
>> [android] Creating Android AVD: 
>> /home/administrator/.android/avd/hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19.avd
>> [android] /home/administrator/android-sdk-linux/tools/android create avd -f 
>> -a -c 128M -s WXGA800 -n 
>> hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19 -t "Google 
>> Inc.:Google APIs x86:19"
>> [android] Setting hardware properties:
>>      hw.ramSize: 2048
>>      vm.heapSize: 256
>> $ /home/administrator/android-sdk-linux/platform-tools/adb start-server
>> [android] Starting Android emulator
>> $ /home/administrator/android-sdk-linux/tools/emulator64-x86 -no-boot-anim 
>> -ports 43073,40598 -prop persist.sys.language=en -prop 
>> persist.sys.country=US -avd 
>> hudson_en-US_160_WXGA800_Google_Inc._Google_APIs_x86_19 -no-snapshot-load 
>> -no-snapshot-save -wipe-data -qemu -m 2048 -enable-kvm
>> * daemon not running. starting it now on port 54643 *
>> * daemon started successfully *
>> $ /home/administrator/android-sdk-linux/platform-tools/adb connect 
>> localhost:40598
>> [android] Waiting for emulator to finish booting...
>> $ /home/administrator/android-sdk-linux/platform-tools/adb -s 
>> localhost:40598 shell getprop dev.bootcomplete
>>
>> ...
>>
> [android] Emulator is ready for use (took 48 seconds)
>>
>>  
>>
>  
>
> As I said, I'd start from checking the default path for -avd.
> Which is it?
> Any other help to offer?
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to