Status Update
Comments
am...@google.com <am...@google.com>
ya...@google.com <ya...@google.com>
bo...@google.com <bo...@google.com> #2
what are your environment variables ?
such as
ANDROID_SDK_HOME
ANDROID_HOME
ANDROID_AVD_HOME ?
could you list the /home/coder/.android/ folder ?
do you have /home/coder/.android/emulator-avd/config.ini ?
if so, could you post it here ?
ws...@gmail.com <ws...@gmail.com> #3
This is in a docker container. The ~/.android dir doesn't exist, but ANDROID_AVD_HOME points to the AVD directory and ANDROID_SDK_ROOT points to the SDK dir (/android-emulator-sdk).
The "/home/coder/.android/./config.ini" bit is suspicious -- it's like it's reading the AVD path relative to the default AVD home, not our configured AVD Home.
bo...@google.com <bo...@google.com> #4
what is the value of the ANDROID_AVD_HOME ? and what is the content of emulator-avd.ini ?
could you run emulator with -verbose option and post it here ?
ws...@gmail.com <ws...@gmail.com> #5
ANDROID_AVD_HOME is something like /export/workspace/our-app/build/emulators/30-atd
emulator-avd.ini contains:
avd.ini.encoding=UTF-8
path.rel=.
path=/export/workspace/our-app/build/emulators/30-atd
target=android-30
It's a little unique in that we point ANDROID_AVD_HOME directly to the AVD dir, and put the .ini inside that dir (so it's a portable bundle), but it previously worked just fine this way.
ws...@gmail.com <ws...@gmail.com> #6
Also the samples above are using -verbose I believe, I can post more if you need it later.
bo...@google.com <bo...@google.com> #7
/export/workspace/our-app/build/emulators/30-atd/emulator-avd/confing.ini ?
bo...@google.com <bo...@google.com> #8
with 31.2.10
emulator -avd emulator-avd -verbose
and post the full output here
do the same for 31.3.10
and post the full output here as well
ws...@gmail.com <ws...@gmail.com> #9
$ pwd
/export/workspace/our-app/build/emulators/30-atd
$ ls -p
cache.img config.ini emulator-user.ini encryptionkey.img hardware-qemu.ini read-snapshot.txt sdcard.img.qcow2 system/ userdata-qemu.img.qcow2
cache.img.qcow2 emulator-avd.ini emu-launch-params.txt encryptionkey.img.qcow2 multiinstance.lock sdcard.img snapshots/ userdata-qemu.img version_num.cache
(yes, we have both config.ini
and emulator-avd.ini
in the same folder... ANDROID_AVD_HOME points directly to the AVD directory, /export/workspace/our-app/build/emulators/30-atd)
emulator-avd.ini
avd.ini.encoding=UTF-8
path.rel=.
path=/export/workspace/our-app/build/emulators/30-atd
target=android-30
config.ini
abi.type = x86
avd.ini.encoding = UTF-8
disk.dataPartition.size = 6442450944
hw.accelerometer = yes
hw.audioInput = yes
hw.battery = yes
hw.camera.back = none
hw.camera.front = none
hw.cpu.arch = x86
hw.cpu.ncore = 1
hw.dPad = no
hw.device.manufacturer = Google
hw.device.name = Nexus 5
hw.gps = yes
hw.gpu.enabled = no
hw.keyboard = yes
hw.lcd.backlight = no
hw.lcd.density = 160
hw.lcd.vsync = 488
hw.mainKeys = no
hw.ramSize = 2048
hw.sdCard = yes
hw.sensors.orientation = yes
hw.sensors.proximity = yes
hw.trackBall = no
image.sysdir.1 = /export/workspace/our-app/build/emulators/30-atd/system/x86
runtime.network.latency = none
runtime.network.speed = full
runtime.scalefactor = auto
sdcard.size = 128M
snapshot.present = no
tag.display = Default
tag.id = default
vm.heapSize = 512
Emulator 31.3.10:
$ ANDROID_SDK_ROOT=/android-emulator-sdk ANDROID_AVD_HOME="$(pwd)" /android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
WARNING | Failed to process .ini file /home/coder/.android/./config.ini for reading.
WARNING | Found AVD target architecture: arm
INFO | Found AVD target architecture: arm
INFO | argv[0]: '/android-emulator-sdk/emulator/emulator'; program directory: '/android-emulator-sdk/emulator'
emulator: INFO: Use user provided system path ./system/x86
INFO | emuDirName: '/android-emulator-sdk/emulator'
emulator: INFO: Use user provided system path ./system/x86
INFO | Probing for ./system/x86/kernel-ranchu-64: file exists
INFO | try dir /android-emulator-sdk/emulator
INFO | Trying emulator path '/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless'
INFO | Found target-specific 64-bit emulator binary: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/gles_swiftshader'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/libstdc++'
VERBOSE | emulator: Running :/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless
VERBOSE | qemu backend: argv[00] = "/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless"
VERBOSE | qemu backend: argv[01] = "-avd"
VERBOSE | qemu backend: argv[02] = "emulator-avd"
VERBOSE | qemu backend: argv[03] = "-no-boot-anim"
VERBOSE | qemu backend: argv[04] = "-read-only"
VERBOSE | qemu backend: argv[05] = "-no-window"
VERBOSE | qemu backend: argv[06] = "-verbose"
VERBOSE | qemu backend: argv[07] = "-skin"
VERBOSE | qemu backend: argv[08] = "320x640"
VERBOSE | qemu backend: argv[09] = "-port"
VERBOSE | qemu backend: argv[10] = "5554"
VERBOSE | qemu backend: argv[11] = "-partition-size"
VERBOSE | qemu backend: argv[12] = "2048"
VERBOSE | qemu backend: argv[13] = "-memory"
VERBOSE | qemu backend: argv[14] = "1024"
VERBOSE | qemu backend: argv[15] = "-gpu"
VERBOSE | qemu backend: argv[16] = "swiftshader_indirect"
VERBOSE | qemu backend: argv[17] = "-sysdir"
VERBOSE | qemu backend: argv[18] = "./system/x86"
VERBOSE | qemu backend: argv[19] = "-system"
VERBOSE | qemu backend: argv[20] = "./system/x86/system.img"
VERBOSE | qemu backend: argv[21] = "-ramdisk"
VERBOSE | qemu backend: argv[22] = "./system/x86/ramdisk.img"
VERBOSE | qemu backend: argv[23] = "-qemu"
VERBOSE | qemu backend: argv[24] = "-enable-kvm"
VERBOSE | Concatenated backend parameters: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
VERBOSE | autoconfig: -skindir (null)
ERROR | This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
ERROR | ANDROID_SDK_ROOT is defined (/android-emulator-sdk) but cannot find kernel file in /android-emulator-sdk/system-images/ sub directories
Emulator 31.2.10:
$ ANDROID_SDK_ROOT=/android-emulator-sdk ANDROID_AVD_HOME="$(pwd)" /android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
INFO | Found AVD target architecture: x86
INFO | argv[0]: '/android-emulator-sdk/emulator/emulator'; program directory: '/android-emulator-sdk/emulator'
INFO | emuDirName: '/android-emulator-sdk/emulator'
INFO | Probing for ./system/x86/kernel-ranchu-64: file exists
INFO | try dir /android-emulator-sdk/emulator
INFO | Trying emulator path '/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless'
INFO | Found target-specific 64-bit emulator binary: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/gles_swiftshader'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/libstdc++'
VERBOSE | emulator: Running :/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless
VERBOSE | qemu backend: argv[00] = "/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless"
VERBOSE | qemu backend: argv[01] = "-avd"
VERBOSE | qemu backend: argv[02] = "emulator-avd"
VERBOSE | qemu backend: argv[03] = "-no-boot-anim"
VERBOSE | qemu backend: argv[04] = "-read-only"
VERBOSE | qemu backend: argv[05] = "-no-window"
VERBOSE | qemu backend: argv[06] = "-verbose"
VERBOSE | qemu backend: argv[07] = "-skin"
VERBOSE | qemu backend: argv[08] = "320x640"
VERBOSE | qemu backend: argv[09] = "-port"
VERBOSE | qemu backend: argv[10] = "5554"
VERBOSE | qemu backend: argv[11] = "-partition-size"
VERBOSE | qemu backend: argv[12] = "2048"
VERBOSE | qemu backend: argv[13] = "-memory"
VERBOSE | qemu backend: argv[14] = "1024"
VERBOSE | qemu backend: argv[15] = "-gpu"
VERBOSE | qemu backend: argv[16] = "swiftshader_indirect"
VERBOSE | qemu backend: argv[17] = "-sysdir"
VERBOSE | qemu backend: argv[18] = "./system/x86"
VERBOSE | qemu backend: argv[19] = "-system"
VERBOSE | qemu backend: argv[20] = "./system/x86/system.img"
VERBOSE | qemu backend: argv[21] = "-ramdisk"
VERBOSE | qemu backend: argv[22] = "./system/x86/ramdisk.img"
VERBOSE | qemu backend: argv[23] = "-qemu"
VERBOSE | qemu backend: argv[24] = "-enable-kvm"
VERBOSE | Concatenated backend parameters: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
VERBOSE | autoconfig: -skindir (null)
VERBOSE | autoconfig: -kernel ./system/x86/kernel-ranchu-64
VERBOSE | Target arch = 'x86'
VERBOSE | Auto-config: -qemu -cpu qemu32
VERBOSE | Auto-detect: Kernel image requires new device naming scheme.
VERBOSE | Auto-detect: Kernel does not support YAFFS2 partitions.
VERBOSE | Using initial system image: ./system/x86/system.img
VERBOSE | Using initial vendor image: ./system/x86/vendor.img
VERBOSE | autoconfig: -data /export/workspace/our-app/build/emulators/30-atd/userdata-qemu.img
VERBOSE | autoconfig: -initdata (null)
VERBOSE | autoconfig: -cache /export/workspace/our-app/build/emulators/30-atd/cache.img
VERBOSE | autoconfig: -sdcard /export/workspace/our-app/build/emulators/30-atd/sdcard.img
VERBOSE | Increasing RAM size to 2048MB
VERBOSE | System image is read only
...
<continues to boot from here, let me know if you need more...>
You can see the differences in the logs in the first few lines, so I'm not sure why all these verbose logs are necessary...
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
WARNING | Failed to process .ini file /home/coder/.android/./config.ini for reading.
WARNING | Found AVD target architecture: arm
vs
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
INFO | Found AVD target architecture: x86
Not sure what's happening in 31.3.10 to pick up /home/coder/.android/./config.ini
. It seems like the path lookup from emulator-avd.ini
is broken.
bo...@google.com <bo...@google.com> #10
that is why it was trying (unsuccessfully) to read $HOME/.android/./config.ini
ws...@gmail.com <ws...@gmail.com> #11
ANDROID_HOME is set to the same thing as ANDROID_SDK_ROOT. Doesn't help.
bo...@google.com <bo...@google.com> #12
could you remove the path.rel=. and try again?
ws...@gmail.com <ws...@gmail.com> #13
Yes, that worked. Thanks! Any idea why this changed? This is still a bug, right?
bo...@google.com <bo...@google.com> #14
explanation:
emulator 31.2 takes absolute path first, and 31.3 take relative path first.
it turned out relative path code path ignores the ANDROID_AVD_HOME (both 31.2 and 31.3 ignore), and that only
works for default ANDROID_HOME setup (/home/user/.android)
will fix this
sorry for the inconvenience and thanks for reporting the bug to us.
ws...@gmail.com <ws...@gmail.com> #15
That makes sense. Thank you!
ws...@gmail.com <ws...@gmail.com> #17
Yes, this artifact works fine. Any idea when this could be released?
de...@google.com <de...@google.com> #19
to...@gmail.com <to...@gmail.com> #20
tonyvg2013@gmail.com
Tony if you want to contact me for some questions or related topic it would be great.
I have been a whitness for the activity of my friends and others over 35 individual cases of the same MO.
Description
We're running the
emulator
CLI, using the latestAPI 30 AOSP ATD x86
image, on an x86_64 host, like this:/android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -verbose -no-window -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
On emulator 31.2.10:
and the emulator starts successfully.
On emulator 31.3.10:
Eventually failing with this:
(Note: we pass the
-sysdir
arg explicitly, since our system images are not stored in the SDK directory.)Found AVD target architecture: arm, thus trying to run qemu-system-aarch64-headless, seems likely to be the root cause?