Open SiimKinks opened 7 years ago
Hm, interesting.
Are you sure emulator actually started? Because we use pretty much same check as Travis CI's android-wait-for-emulator which actually works if you start emulator with -no-window
(proof).
Maybe it's the -gpu off
flag, but I believe Travis CI machines don't have GPU on them as well.
Emulator is started in the background
How did you check that? I would suggest adb -s deviceId shell
and adb devices
How did you check that? I would suggest adb -s deviceId shell and adb devices
I ran adb devices
- started emulator was in "device" state. Then checked what state the system property was with adb -e shell getprop init.svc.bootanim
- it returned no values.
If I start emulator with no options the init.svc.bootanim
prop has expected values.
(My test was carried out on a MacOS)
Have you tried to run the exact same input params on your own and it worked?
Hey,
just checked with the same settings - emulator works fully, running tests etc.
Are you able to adb shell
to emulator loaded? Run tests/install apks?
PS what version of android emulator do you have?
I think you're misunderstanding the problem here. My initial issue was created for the problem that swarmer does not detect wether the emulator was started or not and ultimately ends up in TimeoutException.
The defined emulator is started successfully and everything works related to emulator actions (running tests, installing apks, accessing emulator from adb shell, etc). Problem stems from the desire to listen for the script to finish and execute some next actions when it successfully launched all emulators.
The init.svc.bootanim
prop part was directed to pinpoint the exact location where this problem roots from.
Android emulator version is 26.1.2
The thing is - emulator is launched as intended on my machine, its loaded and reports bootanim successfully after 20 or 30 seconds, so the error should not be the swarmer itself but something in the environment. I tried the same emulator and swarmer versions, with the exact same options you provided (copypasted them all), so its really weird. Tested on Macos 10.12.5.
Can there be some error in my config.ini file?
avd.ini.encoding=UTF-8
AvdId=ANDROID_25_x86
PlayStore.enabled=false
abi.type=x86
avd.ini.displayname=ANDROID_25_x86
disk.dataPartition.size=800M
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera.back=emulated
hw.camera.front=emulated
hw.cpu.arch=x86
hw.cpu.ncore=4
hw.dPad=no
hw.device.hash2=MD5:bfb86a1a4ed5eee97e5502f607348e06
hw.device.manufacturer=Google
hw.device.name=pixel
hw.gps=yes
hw.gpu.enabled=yes
hw.gpu.mode=auto
hw.initialOrientation=Portrait
hw.keyboard=yes
hw.lcd.density=480
hw.lcd.height=1920
hw.lcd.width=1080
hw.mainKeys=no
hw.ramSize=1536
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
image.sysdir.1=system-images/android-25/google_apis/x86/
runtime.network.latency=none
runtime.network.speed=full
sdcard.size=100M
showDeviceFrame=yes
skin.dynamic=yes
skin.name=pixel
skin.path=/Users/siim/android/skins/pixel
tag.display=Google APIs
tag.id=google_apis
vm.heapSize=256
Well, if I change skin
options in the config to
skin.dynamic=yes
skin.name=480x854
skin.path=_no_skin
everything is working. Otherwise my emulator isn't even able to start. Tried different skins from $ANDROID_HOME/skins with no success...
And using the following format
skin.name=pixel
skin.path=skins/pixel
pixel skin succeeded to start, too.
When starting emulator with options
-no-audio -no-window -gpu off
TimeoutException will happen while waiting for boot process to finish. Emulator is started in the background, but sinceinit.svc.bootanim
property is not set when starting emulator with provided options the script will result in timeout.Executed command:
Produced output: