I met a problem when I launched the android emulator after build aosp successfully, emulator showed a black screen. Have you met this problem before?
this is my environment
CPU: AMD Ryzen 7 4800H MEM: 32GB DDR 3200 MHZ Build in: VMWare with AMD-V enabled (Windows 10 without Hyper-v): Ubuntu 20.04 Branch: android-11.0.0_r17 Target: aosp_cf_x86_phone-userdebug PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 TARGET_PRODUCT=aosp_cf_x86_phone TARGET_BUILD_VARIANT=userdebug TARGET_BUILD_TYPE=release TARGET_ARCH=x86 TARGET_ARCH_VARIANT=x86 HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-5.4.0-56-generic-x86_64-Ubuntu-20.04.1-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=RP1A.201105.002 OUT_DIR=out PRODUCT_SOONG_NAMESPACES=device/generic/goldfish-opengl hardware/google/camera hardware/google/camera/devices/EmulatedCamera external/mesa3d
This is emulator logs:
dvdface@ubuntu:~/Source/aosp$ emulator -verbose emulator: Android emulator version 30.0.21.0 (build_id 6647651) (CL:N/A) emulator: Found ANDROID_PRODUCT_OUT: /home/dvdface/Source/aosp/out/target/product/vsoc_x86 emulator: Found build target architecture: x86 emulator: argv[0]: 'emulator'; program directory: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64' emulator: emuDirName: '/home/dvdface/Source/aosp/prebuilts/android-emulator/emulator' emulator: Probing for /home/dvdface/Source/aosp/out/target/product/vsoc_x86/kernel-ranchu-64: file missing emulator: try dir /home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64 emulator: Trying emulator path '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386' emulator: Found target-specific 64-bit emulator binary: /home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386 emulator: Adding library search path: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64' emulator: Adding library search path: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/gles_angle' emulator: Adding library search path: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/gles_angle9' emulator: Adding library search path: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/gles_angle11' emulator: Adding library search path: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/gles_swiftshader' emulator: Adding library search path: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/libstdc++' emulator: Adding library search path for Qt: '/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/lib' emulator: Silencing all qWarning(); use qCWarning(...) instead: QT_LOGGING_RULES=default.warning=false emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/plugins emulator: Setting Qt to use software OpenGL: QT_OPENGL=software emulator: Setting QML to use software QtQuick2D: QMLSCENE_DEVICE=softwarecontext emulator: Overriding pre-existing bad Qt high dpi settings... emulator: Setting LD_PRELOAD to /home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/lib/libfreetype.so.6 emulator: Running :/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386 emulator: qemu backend: argv[00] = "/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386" emulator: qemu backend: argv[01] = "-verbose" emulator: Concatenated backend parameters: /home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386 -verbose emulator: found Android build root: /home/dvdface/Source/aosp emulator: found Android build out: /home/dvdface/Source/aosp/out/target/product/vsoc_x86 emulator: Cannot find boot properties file: /home/dvdface/Source/aosp/out/target/product/vsoc_x86/boot.prop
emulator: Found target API sdkVersion: 30
emulator: Invalid int property: 'ro.build.version.incremental:eng.dvdfac.20201204.223437' emulator: autoconfig: -skin HVGA emulator: autoconfig: -skindir /home/dvdface/Source/aosp/development/tools/emulator/skins/ emulator: autoconfig: -kernel /home/dvdface/Source/aosp/prebuilts/qemu-kernel/x86/ranchu/kernel-qemu 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/dvdface/Source/aosp/out/target/product/vsoc_x86/ramdisk.img emulator: autoconfig: -sysdir /home/dvdface/Source/aosp/out/target/product/vsoc_x86 emulator: Using initial system image: /home/dvdface/Source/aosp/out/target/product/vsoc_x86/system.img emulator: Using initial vendor image: /home/dvdface/Source/aosp/out/target/product/vsoc_x86/vendor.img emulator: autoconfig: -data /home/dvdface/Source/aosp/out/target/product/vsoc_x86/userdata-qemu.img emulator: autoconfig: -initdata /home/dvdface/Source/aosp/out/target/product/vsoc_x86/userdata.img emulator: autoconfig: -cache /home/dvdface/Source/aosp/out/target/product/vsoc_x86/cache.img emulator: Increasing RAM size to 2048MB emulator: VM heap size 48MB is below hardware specified minimum of 512MB,setting it to that value emulator: System image is read only emulator: Found 1 DNS servers: 127.0.0.53 emulator: trying to load skin file '/home/dvdface/Source/aosp/development/tools/emulator/skins//HVGA/layout' emulator: WARNING: encryption is off emulator: CPU Acceleration: working emulator: CPU Acceleration status: KVM (version 12) is installed and usable. emulator: GPU emulation enabled using 'host' mode emulator: Initializing hardware OpenGLES emulation support emulator: VERBOSE: MultiDisplay.cpp:304: create display 0 emulator: VERBOSE: MultiDisplay.cpp:394: setDisplayPose 0 x 0 y 0 w 320 h 480 dpi 0 emulator: VERBOSE: load_config.cpp:242: Verified boot params were not found. emulator: Found 1 DNS servers: 127.0.0.53 Content of hardware configuration file: hw.cpu.arch = x86 hw.cpu.model = qemu32 hw.cpu.ncore = 2 hw.ramSize = 2048 hw.screen = multi-touch hw.mainKeys = true hw.trackBall = true hw.keyboard = false hw.keyboard.lid = false hw.keyboard.charmap = qwerty2
hw.dPad = true hw.rotaryInput = false hw.gsmModem = true hw.gps = true hw.battery = true hw.accelerometer = true hw.gyroscope = true hw.audioInput = true hw.audioOutput = true hw.sdCard = true disk.cachePartition = true disk.cachePartition.path = /home/dvdface/Source/aosp/out/target/product/vsoc_x86/cache.img
disk.cachePartition.size = 66m test.quitAfterBootTimeOut = -1
test.delayAdbTillBootComplete = 0 test.monitorAdb = 0 hw.lcd.width = 320 hw.lcd.height = 480 hw.lcd.depth = 16 hw.lcd.density = 160 hw.lcd.backlight = true hw.lcd.vsync = 60 hw.gltransport = pipe
hw.gltransport.asg.writeBufferSize = 1048576
hw.gltransport.asg.writeStepSize = 4096
hw.gltransport.asg.dataRingSize = 32768
hw.gltransport.drawFlushInterval = 800 hw.displayRegion.0.1.xOffset = -1 hw.displayRegion.0.1.yOffset = -1 hw.displayRegion.0.1.width = 0 hw.displayRegion.0.1.height = 0 hw.display1.width = 0 hw.display1.height = 0 hw.display1.density = 0 hw.display1.xOffset = -1 hw.display1.yOffset = -1 hw.display1.flag = 0 hw.display2.width = 0 hw.display2.height = 0 hw.display2.density = 0 hw.display2.xOffset = -1 hw.display2.yOffset = -1
hw.display2.flag = 0 hw.display3.width = 0 hw.display3.height = 0 hw.display3.density = 0 hw.display3.xOffset = -1
hw.display3.yOffset = -1 hw.display3.flag = 0 hw.gpu.enabled = true hw.gpu.mode = host hw.initialOrientation = portrait
hw.camera.back = emulated hw.camera.front = none vm.heapSize = 512 hw.sensors.light = true hw.sensors.pressure = true
hw.sensors.humidity = true hw.sensors.proximity = true
hw.sensors.magnetic_field = true
hw.sensors.magnetic_field_uncalibrated = true
hw.sensors.gyroscope_uncalibrated = true hw.sensors.orientation = true hw.sensors.temperature = true hw.sensor.hinge = false
hw.sensor.hinge.count = 0 hw.sensor.hinge.type = 0 hw.useext4 = true hw.arc = false hw.arc.autologin = false kernel.path = /home/dvdface/Source/aosp/prebuilts/qemu-kernel/x86/ranchu/kernel-qemu kernel.newDeviceNaming = yes kernel.supportsYaffs2 = no
disk.ramdisk.path = /home/dvdface/Source/aosp/out/target/product/vsoc_x86/ramdisk.img
disk.systemPartition.initPath = /home/dvdface/Source/aosp/out/target/product/vsoc_x86/system.img
disk.systemPartition.size = 800m disk.vendorPartition.initPath = /home/dvdface/Source/aosp/out/target/product/vsoc_x86/vendor.img
disk.vendorPartition.size = 800m disk.dataPartition.path = /home/dvdface/Source/aosp/out/target/product/vsoc_x86/userdata-qemu.img disk.dataPartition.size = 800m PlayStore.enabled = false avd.name = avd.id = fastboot.forceColdBoot = false android.avd.home = /home/dvdface/.android/avd . QEMU options list: emulator: argv[00] = "/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386" emulator: argv[01] = "-dns-server" emulator: argv[02] = "127.0.0.53" emulator: argv[03] = "-serial" emulator: argv[04] = "null" emulator: argv[05] = "-device" emulator: argv[06] = "goldfish_pstore,addr=0xff018000,size=0x10000,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/build.avd/data/misc/pstore/pstore.bin" emulator: argv[07] = "-cpu" emulator: argv[08] = "android32" emulator: argv[09] = "-enable-kvm" emulator: argv[10] = "-smp" emulator: argv[11] = "cores=2" emulator: argv[12] = "-m" emulator: argv[13] = "2048" emulator: argv[14] = "-lcd-density" emulator: argv[15] = "160" emulator: argv[16] = "-object" emulator: argv[17] = "iothread,id=disk-iothread" emulator: argv[18] = "-nodefaults" emulator: argv[19] = "-kernel" emulator: argv[20] = "/home/dvdface/Source/aosp/prebuilts/qemu-kernel/x86/ranchu/kernel-qemu" emulator: argv[21] = "-initrd" emulator: argv[22] = "/home/dvdface/Source/aosp/out/target/product/vsoc_x86/ramdisk.img" emulator: argv[23] = "-drive" emulator: argv[24] = "if=none,index=0,id=system,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/system.img,read-only" emulator: argv[25] = "-device" emulator: argv[26] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify" emulator: argv[27] = "-drive" emulator: argv[28] = "if=none,index=1,id=cache,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576" emulator: argv[29] = "-device" emulator: argv[30] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify" emulator: argv[31] = "-drive" emulator: argv[32] = "if=none,index=2,id=userdata,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576" emulator: argv[33] = "-device" emulator: argv[34] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify" emulator: argv[35] = "-drive" emulator: argv[36] = "if=none,index=3,id=vendor,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/vendor.img,read-only" emulator: argv[37] = "-device" emulator: argv[38] = "virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify" emulator: argv[39] = "-netdev" emulator: argv[40] = "user,id=mynet" emulator: argv[41] = "-device" emulator: argv[42] = "virtio-net-pci,netdev=mynet" emulator: argv[43] = "-device" emulator: argv[44] = "virtio-rng-pci" emulator: argv[45] = "-show-cursor" emulator: argv[46] = "-L" emulator: argv[47] = "/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib/pc-bios" emulator: argv[48] = "-soundhw" emulator: argv[49] = "hda" emulator: argv[50] = "-vga" emulator: argv[51] = "none" emulator: argv[52] = "-append" emulator: argv[53] = "qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X0X21X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=131072 cma=4M@0-4G androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ loop.max_part=7 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=512m qemu.camera_protocol_ver=1" emulator: argv[54] = "-android-hw" emulator: argv[55] = "/home/dvdface/Source/aosp/out/target/product/vsoc_x86/hardware-qemu.ini" Concatenated QEMU options: /home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386 -dns-server 127.0.0.53 -serial null -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/build.avd/data/misc/pstore/pstore.bin -cpu android32 -enable-kvm -smp cores=2 -m 2048 -lcd-density 160 -object iothread,id=disk-iothread -nodefaults -kernel /home/dvdface/Source/aosp/prebuilts/qemu-kernel/x86/ranchu/kernel-qemu -initrd /home/dvdface/Source/aosp/out/target/product/vsoc_x86/ramdisk.img -drive if=none,index=0,id=system,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/system.img,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,index=1,id=cache,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,index=2,id=userdata,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,index=3,id=vendor,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/vendor.img,read-only -device virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -device virtio-rng-pci -show-cursor -L /home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X0X21X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=131072 cma=4M@0-4G androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ loop.max_part=7 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=512m qemu.camera_protocol_ver=1' -android-hw /home/dvdface/Source/aosp/out/target/product/vsoc_x86/hardware-qemu.ini emulator: Android qemu version 30.0.21.0 (build_id 6647651) (CL:N/A)emulator: Starting QEMU main loop emulator: registered 'boot-properties' qemud service emulator: Adding boot property: 'ro.opengles.version' = '131072' emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back' emulator: Adding boot property: 'dalvik.vm.heapsize' = '512m' emulator: Adding boot property: 'qemu.hw.mainkeys' = '1' emulator: Adding boot property: 'qemu.sf.lcd_density' = '160' emulator: goldfish_events.have-dpad: true emulator: goldfish_events.have-trackball: true emulator: goldfish_events.have-camera: true emulator: goldfish_events.have-keyboard: false emulator: goldfish_events.have-lidswitch: false emulator: goldfish_events.have-tabletmode: false emulator: goldfish_events.have-touch: false emulator: goldfish_events.have-multitouch: true emulator: control console listening on port 5554, ADB on port 5555 Not using any http proxy emulator: Adding boot property: 'qemu.timezone' = 'America/Los_Angeles' emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
emulator: VERBOSE: GrpcServices.cpp:279: Started GRPC server at 127.0.0.1:8554, security: Local emulator: emulator_window_fb_rotate
emulator: VERBOSE: AdbInterface.cpp:355: no root specified: emulator: VERBOSE: AdbInterface.cpp:355: no root specified: emulator: VERBOSE: AdbInterface.cpp:385: Found: 1 adb executables emulator: VERBOSE: AdbInterface.cpp:387: Adb: /home/dvdface/Source/aosp/out/soong/host/linux-x86/bin/adb emulator: No acpi ini file provided, using default
emulator: VERBOSE: AdbInterface.cpp:408: Path:/home/dvdface/Source/aosp/out/soong/host/linux-x86/bin/adb protocol version: 41 emulator: Adding boot property: 'ro.opengles.version' = '131072' emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back' emulator: Adding boot property: 'dalvik.vm.heapsize' = '512m' emulator: Adding boot property: 'qemu.hw.mainkeys' = '1' emulator: Adding boot property: 'qemu.sf.lcd_density' = '160' emulator: Adding boot property: 'qemu.timezone' = 'America/Los_Angeles' emulator: No acpi ini file provided, using default
emulator: No acpi ini file provided, using default
emulator: No acpi ini file provided, using default
emulator: No acpi ini file provided, using default