AOSP 6 构建并启动模拟器黑窗

问题描述 投票:0回答:1

行动之前:https://stackoverflow.com/a/78324271/7707781

新问题

现在我使用的是英特尔 macOS

我通过docker构建aosp6成功.

终端 docker 并运行 `$AOSP_PATH/prebuilts/android-emulator/darwin-x86_64/emulator` 模拟器可能会成功午餐。

然后单击 Windows 按钮关闭模拟器。

下次午餐尝试模拟器,运行 `$AOSP_PATH/prebuilts/android-emulator/darwin-x86_64/emulator` 只是黑屏窗口。

我尝试了两种方法:

  1. [未解析] rm -rf `~/.android`

  2. 对比成功和黑窗日志,几乎和没有发现异常一样

    1. diff --git a/emulator.21.success.log b/emulator.22.try.log
      index a654a6a..7bf0090 100644
      --- a/emulator.21.success.log
      +++ b/emulator.22.try.log
      @@ -1,130 +1,129 @@
       emulator: found Android build root: /Volumes/Beyourself/AOSP/android-6.0.0_r1
       emulator: found Android build out:  /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic
       emulator: Read property file at /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/system/build.prop
       emulator: Cannot find boot properties file: /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/boot.prop
      
       emulator: Found target API sdkVersion: 23
      
       emulator: virtual device has no config file - no problem
       emulator: using core hw config path: /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/hardware-qemu.ini
       emulator: found skin-specific hardware.ini: /Volumes/Beyourself/AOSP/android-6.0.0_r1/development/tools/emulator/skins/HVGA/hardware.ini
       emulator: autoconfig: -skin HVGA
       emulator: autoconfig: -skindir /Volumes/Beyourself/AOSP/android-6.0.0_r1/development/tools/emulator/skins
       emulator: found skin-specific hardware.ini: /Volumes/Beyourself/AOSP/android-6.0.0_r1/development/tools/emulator/skins/HVGA/hardware.ini
       emulator: writing default keyset file to /Users/tom/.android/default.keyset
      -emulator: write_default_keyset: could not create file: No such file or directory
       emulator: trying to load skin file '/Volumes/Beyourself/AOSP/android-6.0.0_r1/development/tools/emulator/skins/HVGA/layout'
       emulator: skin network speed: 'full'
       emulator: skin network delay: 'none'
       emulator: autoconfig: -kernel /Volumes/Beyourself/AOSP/android-6.0.0_r1/prebuilts/qemu-kernel/arm/kernel-qemu-armv7
       emulator: Auto-detect: Kernel image requires legacy device naming scheme.
       emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
       emulator: autoconfig: -ramdisk /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/ramdisk.img
       emulator: autoconfig: -sysdir /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic
       emulator: Using initial system image: /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/system.img
       emulator: WARNING: system partition size adjusted to match image file (1536 MB > 200 MB)
      
       emulator: autoconfig: -data /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/userdata-qemu.img
       emulator: autoconfig: -initdata /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/userdata.img
       emulator: WARNING: data partition size adjusted to match image file (550 MB > 200 MB)
      
       emulator: autoconfig: -cache /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/cache.img
       emulator: Physical RAM size: 512MB
      
       emulator: GPU emulation is disabled
       emulator: WARNING: CPU acceleration only works with x86/x86_64 system images.
       emulator: Auto-config: -qemu -cpu cortex-a8
       Content of hardware configuration file:
         hw.cpu.arch = arm
         hw.cpu.model = cortex-a8
         hw.ramSize = 512
         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 = /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/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.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 = /Volumes/Beyourself/AOSP/android-6.0.0_r1/prebuilts/qemu-kernel/arm/kernel-qemu-armv7
         kernel.parameters =  androidboot.hardware=goldfish android.checkjni=1
         kernel.newDeviceNaming = no
         kernel.supportsYaffs2 = no
         disk.ramdisk.path = /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/ramdisk.img
         disk.systemPartition.initPath = /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/system.img
         disk.systemPartition.size = 1536m
         disk.dataPartition.path = /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/userdata-qemu.img
         disk.dataPartition.size = 550m
         avd.name = <build>
       .
       QEMU options list:
       emulator: argv[00] = "/Volumes/Beyourself/AOSP/android-6.0.0_r1/prebuilts/android-emulator/darwin-x86_64/emulator64-arm"
       emulator: argv[01] = "-android-hw"
       emulator: argv[02] = "/Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/hardware-qemu.ini"
       Concatenated QEMU options:
        /Volumes/Beyourself/AOSP/android-6.0.0_r1/prebuilts/android-emulator/darwin-x86_64/emulator64-arm -android-hw /Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/hardware-qemu.ini
       emulator: registered 'boot-properties' qemud service
       emulator: Using kernel serial device prefix: ttyS
       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-tom/emulator-fMZR2U
      -emulator: nand_add_dev: system,size=0x60000000,file=/tmp/android-tom/emulator-fMZR2U,initfile=/Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/system.img,pagesize=512,extrasize=0
      +emulator: Mapping 'system' partition image to /tmp/android-tom/emulator-EpGUj4
      +emulator: nand_add_dev: system,size=0x60000000,file=/tmp/android-tom/emulator-EpGUj4,initfile=/Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/system.img,pagesize=512,extrasize=0
       emulator: userdata partition format: ext4
       emulator: nand_add_dev: userdata,size=0x22600000,file=/Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/userdata-qemu.img,pagesize=512,extrasize=0
       emulator: cache partition format: ext4
       emulator: nand_add_dev: cache,size=0x4200000,file=/Volumes/Beyourself/AOSP/android-6.0.0_r1.tmp/build_out/target/product/generic/cache.img,pagesize=512,extrasize=0
       emulator: registered 'boot-properties' qemud service
       emulator: Adding boot property: 'dalvik.vm.heapsize' = '48m'
       emulator: Adding boot property: 'ro.config.low_ram' = 'true'
       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=ttyS0 android.qemud=ttyS1 androidboot.hardware=goldfish android.checkjni=1 ndns=2
       emulator: autoconfig: -scale 1
       emulator: Forcing ro.adb.qemud to "0".
       emulator: control console listening on port 5554, ADB on port 5555
       emulator: can't connect to ADB server: Socket is not connected (errno = 57)
       emulator: setting up http proxy:  server=127.0.0.1 port=8889
       emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized
      
       emulator: ping program: /Volumes/Beyourself/AOSP/android-6.0.0_r1/prebuilts/android-emulator/darwin-x86_64/ddms
       goldfish_fb_get_pixel_format:170: display surface,pixel format:
         bits/pixel:  16
         bytes/pixel: 2
         depth:       16
         red:         bits=5 mask=0xf800 shift=11 max=0x1f
         green:       bits=6 mask=0x7e0 shift=5 max=0x3f
         blue:        bits=5 mask=0x1f shift=0 max=0x1f
         alpha:       bits=0 mask=0x0 shift=0 max=0x0
       emulator: ### WARNING: /etc/localtime does not point to /usr/share/zoneinfo/, can't determine zoneinfo timezone name
       emulator: _hwFingerprint_connect: connect finger print listen is called
      
       emulator: got message from guest system fingerprint HAL
      
      
      
emulation android-source
1个回答
0
投票

解决链接:https://stackoverflow.com/a/46561887/7707781

尝试擦除数据,我的选项命令

  • 失败的命令:
       emulatorAlias -verbose
  • 成功命令:
     emulatorAlias -verbose  -wipe-data 
© www.soinside.com 2019 - 2024. All rights reserved.