goldfish
goldfish copied to clipboard
Emulator failed and stuck on black screen.
The emulator -verbose shows that:
emulator: found Android build root: /home/ju/Workspace/mirror
emulator: found Android build out: /home/ju/Workspace/mirror/out/target/product/x86emu
emulator: Read property file at /home/ju/Workspace/mirror/out/target/product/x86emu/system/build.prop
emulator: Cannot find boot properties file: /home/ju/Workspace/mirror/out/target/product/x86emu/boot.prop
emulator: Found target API sdkVersion: 25
emulator: virtual device has no config file - no problem
emulator: using core hw config path: /home/ju/Workspace/mirror/out/target/product/x86emu/hardware-qemu.ini
emulator: found skin-specific hardware.ini: /home/ju/Workspace/mirror/development/tools/emulator/skins/HVGA/hardware.ini
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir /home/ju/Workspace/mirror/development/tools/emulator/skins
emulator: found skin-specific hardware.ini: /home/ju/Workspace/mirror/development/tools/emulator/skins/HVGA/hardware.ini
emulator: keyset loaded from: /home/ju/.android/default.keyset
emulator: trying to load skin file '/home/ju/Workspace/mirror/development/tools/emulator/skins/HVGA/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /home/ju/Workspace/mirror/out/target/product/x86emu/kernel
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /home/ju/Workspace/mirror/out/target/product/x86emu/ramdisk.img
emulator: autoconfig: -sysdir /home/ju/Workspace/mirror/out/target/product/x86emu
emulator: Using initial system image: /home/ju/Workspace/mirror/out/target/product/x86emu/system.img
emulator: WARNING: system partition size adjusted to match image file (1536 MB > 200 MB)
emulator: autoconfig: -data /home/ju/Workspace/mirror/out/target/product/x86emu/userdata-qemu.img
emulator: autoconfig: -initdata /home/ju/Workspace/mirror/out/target/product/x86emu/userdata.img
emulator: WARNING: data partition size adjusted to match image file (550 MB > 200 MB)
emulator: autoconfig: -cache /home/ju/Workspace/mirror/out/target/product/x86emu/cache.img
emulator: WARNING: Increasing RAM size to 1GB
emulator: Physical RAM size: 1024MB
emulator: GPU emulation is disabled
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: KVM (version 12) is installed and usable.
Content of hardware configuration file:
hw.cpu.arch = x86
hw.cpu.model = qemu32
hw.ramSize = 1024
hw.screen = touch
hw.mainKeys = yes
hw.trackBall = yes
hw.keyboard = no
hw.keyboard.lid = no
hw.keyboard.charmap = qwerty2
hw.dPad = yes
hw.gsmModem = yes
hw.gps = yes
hw.battery = yes
hw.accelerometer = yes
hw.audioInput = yes
hw.audioOutput = yes
hw.sdCard = yes
disk.cachePartition = yes
disk.cachePartition.path = /home/ju/Workspace/mirror/out/target/product/x86emu/cache.img
disk.cachePartition.size = 66m
hw.lcd.width = 320
hw.lcd.height = 480
hw.lcd.depth = 16
hw.lcd.density = 160
hw.lcd.backlight = yes
hw.gpu.enabled = no
hw.gpu.mode = auto
hw.initialOrientation = portrait
hw.camera.back = emulated
hw.camera.front = none
vm.heapSize = 48
hw.sensors.proximity = yes
hw.sensors.magnetic_field = yes
hw.sensors.orientation = yes
hw.sensors.temperature = yes
hw.useext4 = yes
kernel.path = /home/ju/Workspace/mirror/out/target/product/x86emu/kernel
kernel.parameters = androidboot.hardware=goldfish clocksource=pit android.checkjni=1
kernel.newDeviceNaming = yes
kernel.supportsYaffs2 = no
disk.ramdisk.path = /home/ju/Workspace/mirror/out/target/product/x86emu/ramdisk.img
disk.systemPartition.initPath = /home/ju/Workspace/mirror/out/target/product/x86emu/system.img
disk.systemPartition.size = 1536m
disk.dataPartition.path = /home/ju/Workspace/mirror/out/target/product/x86emu/userdata-qemu.img
disk.dataPartition.size = 550m
avd.name = <build>
.
QEMU options list:
emulator: argv[00] = "/home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/emulator64-x86"
emulator: argv[01] = "-enable-kvm"
emulator: argv[02] = "-android-hw"
emulator: argv[03] = "/home/ju/Workspace/mirror/out/target/product/x86emu/hardware-qemu.ini"
Concatenated QEMU options:
/home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/emulator64-x86 -enable-kvm -android-hw /home/ju/Workspace/mirror/out/target/product/x86emu/hardware-qemu.ini
emulator: Starting QEMU main loop
emulator: trying to find: /home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/lib/ca-bundle.pem
emulator: registered 'boot-properties' qemud service
emulator: Using kernel serial device prefix: ttyGF
emulator: Ramdisk image contains fstab.goldfish file
emulator: Found format of system partition: 'ext4'
emulator: Found format of userdata partition: 'ext4'
emulator: Found format of cache partition: 'ext4'
emulator: system partition format: ext4
emulator: Mapping 'system' partition image to /tmp/android-ju/emulator-OOzv0l
emulator: nand_add_dev: system,size=0x60000000,file=/tmp/android-ju/emulator-OOzv0l,initfile=/home/ju/Workspace/mirror/out/target/product/x86emu/system.img,pagesize=512,extrasize=0
emulator: userdata partition format: ext4
emulator: nand_add_dev: userdata,size=0x22600000,file=/home/ju/Workspace/mirror/out/target/product/x86emu/userdata-qemu.img,pagesize=512,extrasize=0
emulator: cache partition format: ext4
emulator: nand_add_dev: cache,size=0x4200000,file=/home/ju/Workspace/mirror/out/target/product/x86emu/cache.img,pagesize=512,extrasize=0
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Kernel parameters: qemu.gles=0 qemu=1 console=ttyGF0 android.qemud=ttyGF1 androidboot.hardware=goldfish clocksource=pit android.checkjni=1 ndns=1
emulator: trying to find: /home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/bios.bin
emulator: trying to find: /home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/lib/pc-bios/bios.bin
emulator: trying to find: /home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/vgabios-cirrus.bin
emulator: trying to find: /home/ju/Workspace/mirror/prebuilts/android-emulator/linux-x86_64/lib/pc-bios/vgabios-cirrus.bin
emulator: autoconfig: -scale 1
emulator: Forcing ro.adb.qemud to "0".
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
emulator: Failed to parse .AndroidStudio preferences file usage.statistics.xml
emulator: Defaulting user crash-report opt-in to false
emulator: Skipping metrics reporting: No user opt-in.
emulator: UpdateChecker: skipped version check
emulator: Done with QEMU main loop
emulator: User configuration saved to /home/ju/.android/emulator-user.ini
My manifest.xml likes this:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp"
fetch=".." />
<remote name="shugaoye"
fetch="https://github.com/shugaoye/" />
<default revision="refs/tags/android-7.1.1_r4"
remote="aosp"
sync-j="4" />
<!-- Android system programming -->
<project path="kernel"
name="goldfish"
remote="shugaoye"
revision="refs/tags/android-7.1.1_r4_x86emu_ch04_r1" />
<project path="device/generic/x86emu"
name="x86emu"
remote="shugaoye"
revision="refs/tags/android-7.1.1_r4_x86emu_ch04_r1" />
Also i found the emulator can be lunched successfuly when i set kernel argument as the prebuilts one. i.e. emulator -verbose -debug all -system ${OUT}/system.img -kernel /home/ju/Workspace/mirror/prebuilts/qemu-kernel/x86/kernel-qemu -ramdisk ${OUT}/ramdisk.img -data ${OUT}/userdata-qemu.img -cache ${OUT}/cache.img
So i am wonding if this error is about the goldfish? Please help. Thanks.
FYI: Had several issue getting this to work on the device a25x86, but if we do not specify any device, then it picks up the config from build.avd in $OUT. That seems to be working fine!
~/Android/sdk/emulator/emulator -verbose -show-kernel -selinux disabled -shell -system ~/aosp/out/target/product/x86emu/system.img -cache ~/aosp/out/target/product/x86emu/cache.img -ramdisk ~/aosp/out/target/product/x86emu/ramdisk.img -data ~/aosp/out/target/product/x86emu/userdata.img -kernel $OUT/kernel