我用命令 Build 了AOSP

source build/envsetup.sh
lunch aosp_x86_64-eng
make -j16

和模拟器共进午餐

emulator -partition-size 4096 -memory 2048 -verbose

但它不起作用,屏幕总是黑色,我找不到一些有用的信息 .

我的电脑系统是MacOS 10.14

AOSP信息是

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=aosp_x86_64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPR1
TARGET_BUILD_APPS=
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_CPU_VARIANT=
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86_64
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-18.2.0-x86_64-i386-64bit
HOST_CROSS_OS=
HOST_CROSS_ARCH=
HOST_CROSS_2ND_ARCH=
HOST_BUILD_TYPE=release
BUILD_ID=OPR5.170623.007
OUT_DIR=out
AUX_OS_VARIANT_LIST=

并且详细输出

emulator -partition-size 4096 -memory 2048 -verbose
emulator:Android emulator version 25.3.0.0 (build_id 3700138)
emulator:Found ANDROID_PRODUCT_OUT: /Volumes/android/aosp/out/target/product/generic_x86_64
emulator:Found build target architecture: x86_64
emulator:argv[0]: 'emulator'; program directory: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64'
emulator:try dir /Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64
emulator:Found target-specific 64-bit emulator binary: /Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/qemu/darwin-x86_64/qemu-system-x86_64
emulator:Adding library search path: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64'
emulator:Adding library search path: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64/gles_swiftshader'
emulator:Adding library search path: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64/gles_angle'
emulator:Adding library search path: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64/gles_angle9'
emulator:Adding library search path: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64/gles_angle11'
emulator: Adding library search path for Qt: '/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64/qt/lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib64/qt/plugins
emulator: Running :/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/qemu/darwin-x86_64/qemu-system-x86_64
emulator: qemu backend: argv[00] = "/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/qemu/darwin-x86_64/qemu-system-x86_64"
emulator: qemu backend: argv[01] = "-partition-size"
emulator: qemu backend: argv[02] = "4096"
emulator: qemu backend: argv[03] = "-memory"
emulator: qemu backend: argv[04] = "2048"
emulator: qemu backend: argv[05] = "-verbose"
emulator: Concatenated backend parameters:
 /Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/qemu/darwin-x86_64/qemu-system-x86_64 -partition-size 4096 -memory 2048 -verbose
emulator: found Android build root: /Volumes/android/aosp
emulator: found Android build out:  /Volumes/android/aosp/out/target/product/generic_x86_64
emulator: Read property file at /Volumes/android/aosp/out/target/product/generic_x86_64/system/build.prop
emulator: Cannot find boot properties file: /Volumes/android/aosp/out/target/product/generic_x86_64/boot.prop

emulator: Found target API sdkVersion: 26

emulator: Invalid int property: 'ro.build.version.incremental:eng.jarvis.20181209.135542'
emulator: virtual device has no config file - no problem
emulator: using core hw config path: /Volumes/android/aosp/out/target/product/generic_x86_64/hardware-qemu.ini
emulator: found skin-specific hardware.ini: /Volumes/android/aosp/development/tools/emulator/skins//HVGA/hardware.ini
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir /Volumes/android/aosp/development/tools/emulator/skins/
emulator: found skin-specific hardware.ini: /Volumes/android/aosp/development/tools/emulator/skins//HVGA/hardware.ini
emulator: autoconfig: -kernel /Volumes/android/aosp/prebuilts/qemu-kernel/x86_64/ranchu/kernel-qemu
emulator: Target arch = 'x86_64'
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /Volumes/android/aosp/out/target/product/generic_x86_64/ramdisk.img
emulator: autoconfig: -sysdir /Volumes/android/aosp/out/target/product/generic_x86_64
emulator: Using initial system image: /Volumes/android/aosp/out/target/product/generic_x86_64/system.img
emulator: autoconfig: -data /Volumes/android/aosp/out/target/product/generic_x86_64/userdata-qemu.img
emulator: autoconfig: -initdata /Volumes/android/aosp/out/target/product/generic_x86_64/userdata.img
emulator: autoconfig: -cache /Volumes/android/aosp/out/target/product/generic_x86_64/cache.img
emulator: Physical RAM size: 2048MB

emulator: VM heap size 48MB is below hardware specified minimum of 192MB,setting it to that value
emulator: System image is read only
emulator: Found 1 DNS servers: 114.114.114.114
emulator: trying to load skin file '/Volumes/android/aosp/development/tools/emulator/skins//HVGA/layout'
emulator: WARNING: encryption is off
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 7.3.2 (4) is installed and usable.
emulator: GPU emulation enabled using 'host' mode
emulator: Using default value for kernel Contiguous Memory Allocation.
emulator: Found 1 DNS servers: 114.114.114.114
Content of hardware configuration file:
  hw.cpu.arch = x86_64
  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.audioInput = true
  hw.audioOutput = true
  hw.sdCard = true
  disk.cachePartition = true
  disk.cachePartition.path = /Volumes/android/aosp/out/target/product/generic_x86_64/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 = true
  hw.gpu.enabled = true
  hw.gpu.mode = host
  hw.gpu.blacklisted = no
  hw.initialOrientation = portrait
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 192
  hw.sensors.light = true
  hw.sensors.pressure = true
  hw.sensors.humidity = true
  hw.sensors.proximity = true
  hw.sensors.magnetic_field = true
  hw.sensors.orientation = true
  hw.sensors.temperature = true
  hw.useext4 = true
  kernel.path = /Volumes/android/aosp/prebuilts/qemu-kernel/x86_64/ranchu/kernel-qemu
  kernel.newDeviceNaming = yes
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = /Volumes/android/aosp/out/target/product/generic_x86_64/ramdisk.img
  disk.systemPartition.initPath = /Volumes/android/aosp/out/target/product/generic_x86_64/system.img
  disk.systemPartition.size = 4g
  disk.dataPartition.path = /Volumes/android/aosp/out/target/product/generic_x86_64/userdata-qemu.img
  disk.dataPartition.size = 4g
  avd.name = <build>
.
QEMU options list:
emulator: argv[00] = "/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/qemu/darwin-x86_64/qemu-system-x86_64"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "114.114.114.114"
emulator: argv[03] = "-serial"
emulator: argv[04] = "null"
emulator: argv[05] = "-cpu"
emulator: argv[06] = "android64"
emulator: argv[07] = "-enable-hax"
emulator: argv[08] = "-smp"
emulator: argv[09] = "cores=2"
emulator: argv[10] = "-m"
emulator: argv[11] = "2048"
emulator: argv[12] = "-lcd-density"
emulator: argv[13] = "160"
emulator: argv[14] = "-kernel"
emulator: argv[15] = "/Volumes/android/aosp/prebuilts/qemu-kernel/x86_64/ranchu/kernel-qemu"
emulator: argv[16] = "-initrd"
emulator: argv[17] = "/Volumes/android/aosp/out/target/product/generic_x86_64/ramdisk.img"
emulator: argv[18] = "-object"
emulator: argv[19] = "iothread,id=disk-iothread"
emulator: argv[20] = "-drive"
emulator: argv[21] = "if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=/Volumes/android/aosp/out/target/product/generic_x86_64/system.img.qcow2,read-only"
emulator: argv[22] = "-device"
emulator: argv[23] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify"
emulator: argv[24] = "-drive"
emulator: argv[25] = "if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=/Volumes/android/aosp/out/target/product/generic_x86_64/cache.img.qcow2,l2-cache-size=1048576"
emulator: argv[26] = "-device"
emulator: argv[27] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify"
emulator: argv[28] = "-drive"
emulator: argv[29] = "if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=/Volumes/android/aosp/out/target/product/generic_x86_64/userdata-qemu.img.qcow2,l2-cache-size=1048576"
emulator: argv[30] = "-device"
emulator: argv[31] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify"
emulator: argv[32] = "-netdev"
emulator: argv[33] = "user,id=mynet"
emulator: argv[34] = "-device"
emulator: argv[35] = "virtio-net-pci,netdev=mynet"
emulator: argv[36] = "-netdev"
emulator: argv[37] = "user,id=mynet2,net=10.0.3.0/24"
emulator: argv[38] = "-device"
emulator: argv[39] = "virtio-net-pci,netdev=mynet2"
emulator: argv[40] = "-show-cursor"
emulator: argv[41] = "-L"
emulator: argv[42] = "/Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib/pc-bios"
emulator: argv[43] = "-soundhw"
emulator: argv[44] = "hda"
emulator: argv[45] = "-vga"
emulator: argv[46] = "none"
emulator: argv[47] = "-append"
emulator: argv[48] = "qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=1"
emulator: argv[49] = "-android-hw"
emulator: argv[50] = "/Volumes/android/aosp/out/target/product/generic_x86_64/hardware-qemu.ini"
Concatenated QEMU options:
 /Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/qemu/darwin-x86_64/qemu-system-x86_64 -dns-server 114.114.114.114 -serial null -cpu android64 -enable-hax -smp cores=2 -m 2048 -lcd-density 160 -kernel /Volumes/android/aosp/prebuilts/qemu-kernel/x86_64/ranchu/kernel-qemu -initrd /Volumes/android/aosp/out/target/product/generic_x86_64/ramdisk.img -object iothread,id=disk-iothread -drive if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=/Volumes/android/aosp/out/target/product/generic_x86_64/system.img.qcow2,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=/Volumes/android/aosp/out/target/product/generic_x86_64/cache.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=/Volumes/android/aosp/out/target/product/generic_x86_64/userdata-qemu.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -netdev user,id=mynet2,net=10.0.3.0/24 -device virtio-net-pci,netdev=mynet2 -show-cursor -L /Volumes/android/aosp/prebuilts/android-emulator/darwin-x86_64/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=1' -android-hw /Volumes/android/aosp/out/target/product/generic_x86_64/hardware-qemu.ini
emulator: Starting QEMU main loop
Hax is enabled
Hax ram_size 0x80000000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Initializing hardware OpenGLES emulation support
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '192m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.adb.secure' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
HAX is working and emulator runs in fast virt mode.
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-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: android_hw_fingerprint_init: fingerprint qemud listen service initialized

emulator: onGuestSendCommand: [0x7fc6cfbaecc0] Adb connected, start proxing data
emulator: ### WARNING: /etc/localtime does not point to /usr/share/zoneinfo/, can't determine zoneinfo timezone name
2018-12-10 16:08:48.072 qemu-system-x86_64[40666:3398627] -[__NSDictionaryM length]: unrecognized selector sent to instance 0x7fc6ce545330

有谁知道为什么以及如何解决这个问题?

非常感谢您的帮助!

emulator image

PS:几分钟后,模拟器崩溃了