title: andorid emulator displays black screen after build aosp
body: <p>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?</p>
  <p>this is my environment</p>
  <blockquote>
  <pre><code>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
  </code></pre>
  </blockquote>
  <p>This is emulator logs:</p>
  <blockquote>
  <p>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] =
  &quot;/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386&quot;
  emulator: qemu backend: argv[01] = &quot;-verbose&quot; 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</p>
  <p>emulator: Found target API sdkVersion: 30</p>
  <p>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<br />
  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<br />
  disk.cachePartition.size = 66m   test.quitAfterBootTimeOut = -1<br />
  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<br />
  hw.gltransport.asg.writeBufferSize = 1048576<br />
  hw.gltransport.asg.writeStepSize = 4096<br />
  hw.gltransport.asg.dataRingSize = 32768<br />
  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<br />
  hw.display2.flag = 0   hw.display3.width = 0   hw.display3.height = 0
  hw.display3.density = 0   hw.display3.xOffset = -1<br />
  hw.display3.yOffset = -1   hw.display3.flag = 0   hw.gpu.enabled =
  true   hw.gpu.mode = host   hw.initialOrientation = portrait<br />
  hw.camera.back = emulated   hw.camera.front = none   vm.heapSize = 512
  hw.sensors.light = true   hw.sensors.pressure = true<br />
  hw.sensors.humidity = true   hw.sensors.proximity = true<br />
  hw.sensors.magnetic_field = true<br />
  hw.sensors.magnetic_field_uncalibrated = true<br />
  hw.sensors.gyroscope_uncalibrated = true   hw.sensors.orientation =
  true   hw.sensors.temperature = true   hw.sensor.hinge = false<br />
  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<br />
  disk.ramdisk.path =
  /home/dvdface/Source/aosp/out/target/product/vsoc_x86/ramdisk.img<br />
  disk.systemPartition.initPath =
  /home/dvdface/Source/aosp/out/target/product/vsoc_x86/system.img<br />
  disk.systemPartition.size = 800m   disk.vendorPartition.initPath =
  /home/dvdface/Source/aosp/out/target/product/vsoc_x86/vendor.img<br />
  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] =
  &quot;/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/qemu/linux-x86_64/qemu-system-i386&quot;
  emulator: argv[01] = &quot;-dns-server&quot; emulator: argv[02] = &quot;127.0.0.53&quot;
  emulator: argv[03] = &quot;-serial&quot; emulator: argv[04] = &quot;null&quot; emulator:
  argv[05] = &quot;-device&quot; emulator: argv[06] =
  &quot;goldfish_pstore,addr=0xff018000,size=0x10000,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/build.avd/data/misc/pstore/pstore.bin&quot;
  emulator: argv[07] = &quot;-cpu&quot; emulator: argv[08] = &quot;android32&quot; emulator:
  argv[09] = &quot;-enable-kvm&quot; emulator: argv[10] = &quot;-smp&quot; emulator:
  argv[11] = &quot;cores=2&quot; emulator: argv[12] = &quot;-m&quot; emulator: argv[13] =
  &quot;2048&quot; emulator: argv[14] = &quot;-lcd-density&quot; emulator: argv[15] = &quot;160&quot;
  emulator: argv[16] = &quot;-object&quot; emulator: argv[17] =
  &quot;iothread,id=disk-iothread&quot; emulator: argv[18] = &quot;-nodefaults&quot;
  emulator: argv[19] = &quot;-kernel&quot; emulator: argv[20] =
  &quot;/home/dvdface/Source/aosp/prebuilts/qemu-kernel/x86/ranchu/kernel-qemu&quot;
  emulator: argv[21] = &quot;-initrd&quot; emulator: argv[22] =
  &quot;/home/dvdface/Source/aosp/out/target/product/vsoc_x86/ramdisk.img&quot;
  emulator: argv[23] = &quot;-drive&quot; emulator: argv[24] =
  &quot;if=none,index=0,id=system,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/system.img,read-only&quot;
  emulator: argv[25] = &quot;-device&quot; emulator: argv[26] =
  &quot;virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify&quot;
  emulator: argv[27] = &quot;-drive&quot; emulator: argv[28] =
  &quot;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&quot;
  emulator: argv[29] = &quot;-device&quot; emulator: argv[30] =
  &quot;virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify&quot;
  emulator: argv[31] = &quot;-drive&quot; emulator: argv[32] =
  &quot;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&quot; emulator: argv[33] = &quot;-device&quot; emulator: argv[34] =
  &quot;virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify&quot;
  emulator: argv[35] = &quot;-drive&quot; emulator: argv[36] =
  &quot;if=none,index=3,id=vendor,if=none,file=/home/dvdface/Source/aosp/out/target/product/vsoc_x86/vendor.img,read-only&quot;
  emulator: argv[37] = &quot;-device&quot; emulator: argv[38] =
  &quot;virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify&quot;
  emulator: argv[39] = &quot;-netdev&quot; emulator: argv[40] = &quot;user,id=mynet&quot;
  emulator: argv[41] = &quot;-device&quot; emulator: argv[42] =
  &quot;virtio-net-pci,netdev=mynet&quot; emulator: argv[43] = &quot;-device&quot; emulator:
  argv[44] = &quot;virtio-rng-pci&quot; emulator: argv[45] = &quot;-show-cursor&quot;
  emulator: argv[46] = &quot;-L&quot; emulator: argv[47] =
  &quot;/home/dvdface/Source/aosp/prebuilts/android-emulator/linux-x86_64/lib/pc-bios&quot;
  emulator: argv[48] = &quot;-soundhw&quot; emulator: argv[49] = &quot;hda&quot; emulator:
  argv[50] = &quot;-vga&quot; emulator: argv[51] = &quot;none&quot; emulator: argv[52] =
  &quot;-append&quot; emulator: argv[53] = &quot;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&quot; emulator:
  argv[54] = &quot;-android-hw&quot; emulator: argv[55] =
  &quot;/home/dvdface/Source/aosp/out/target/product/vsoc_x86/hardware-qemu.ini&quot;
  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)</p>
  <p>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</p>
  <p>emulator: VERBOSE: GrpcServices.cpp:279: Started GRPC server at
  127.0.0.1:8554, security: Local emulator: emulator_window_fb_rotate</p>
  <p>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</p>
  <p>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</p>
  <p>emulator: No acpi ini file provided, using default</p>
  <p>emulator: No acpi ini file provided, using default</p>
  <p>emulator: No acpi ini file provided, using default</p>
  </blockquote>