Android模拟器在启动时挂起

时间:2013-12-22 13:21:42

标签: android linux android-emulator

我正在尝试在带有kvm的Linux 64(内核3.10.0)上使用android模拟器

Android emulator version 22.3.0 (build_id OPENMASTER-887826)

问题在于大多数情况下模拟器在启动时挂起。屏幕是黑色的(不要出现谷歌徽标),我的电脑的CPU显示没有活动。我等了很多分钟但没有任何事情发生。

我说“大部分时间”因为如果我重启PC并重启模拟器有时它启动良好(相同的命令行选项),并且android启动速度非常快,不到一分钟。

我用于启动模拟器的命令行是:

emulator -verbose -avd nx4 -scale 0.50 -qemu -m 512 -enable-kvm

我尝试过禁用主机GPU加速但没有效果。

我在这里粘贴模拟器的输出(当它挂起时)

emulator: found SDK root at /opt/android-sdk-update-manager
emulator: Android virtual device file at: /home/fbn/.android/avd/nx4.ini
emulator: virtual device content at /home/fbn/.android/avd/nx4.avd
emulator: virtual device config file: /home/fbn/.android/avd/nx4.avd/config.ini
emulator: using core hw config path: /home/fbn/.android/avd/nx4.avd/hardware-qemu.ini
emulator: Found AVD target API level: 18
emulator: 'magic' skin format detected: 768x1280
emulator: autoconfig: -skin 768x1280
emulator: autoconfig: -skindir (null)
emulator: keyset loaded from: /home/fbn/.android/default.keyset
emulator: found magic skin width=768 height=1280 bpp=16

emulator: autoconfig: -kernel /opt/android-sdk-update-manager/system-images/android-18/x86//kernel-qemu
emulator: autoconfig: -ramdisk /opt/android-sdk-update-manager/system-images/android-18/x86//ramdisk.img
emulator: Using initial system image: /opt/android-sdk-update-manager/system-images/android-18/x86//system.img
emulator: autoconfig: -data /home/fbn/.android/avd/nx4.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/fbn/.android/avd/nx4.avd/userdata.img
emulator: autoconfig: -cache /home/fbn/.android/avd/nx4.avd/cache.img
emulator: Physical RAM size: 1024MB

Content of hardware configuration file:
  hw.cpu.arch = x86
  hw.ramSize = 1024
  hw.screen = touch
  hw.mainKeys = no
  hw.trackBall = no
  hw.keyboard = yes
  hw.keyboard.lid = no
  hw.keyboard.charmap = qwerty2
  hw.dPad = no
  hw.gsmModem = yes
  hw.gps = yes
  hw.battery = yes
  hw.accelerometer = yes
  hw.audioInput = yes
  hw.audioOutput = yes
  hw.sdCard = no
  disk.cachePartition = yes
  disk.cachePartition.path = /home/fbn/.android/avd/nx4.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 768
  hw.lcd.height = 1280
  hw.lcd.depth = 16
  hw.lcd.density = 320
  hw.lcd.backlight = yes
  hw.gpu.enabled = yes
  hw.camera.back = none
  hw.camera.front = webcam0
  vm.heapSize = 64
  hw.sensors.proximity = yes
  hw.sensors.magnetic_field = yes
  hw.sensors.orientation = yes
  hw.sensors.temperature = yes
  hw.useext4 = no
  kernel.path = /opt/android-sdk-update-manager/system-images/android-18/x86//kernel-qemu
  kernel.parameters =  androidboot.hardware=goldfish clocksource=pit android.checkjni=1
  disk.ramdisk.path = /opt/android-sdk-update-manager/system-images/android-18/x86//ramdisk.img
  disk.systemPartition.initPath = /opt/android-sdk-update-manager/system-images/android-18/x86//system.img
  disk.systemPartition.size = 296m
  disk.dataPartition.path = /home/fbn/.android/avd/nx4.avd/userdata-qemu.img
  disk.dataPartition.size = 211m
  avd.name = nx4
.
QEMU options list:
emulator: argv[00] = "/opt/android-sdk-update-manager/tools/emulator64-x86"
emulator: argv[01] = "-m"
emulator: argv[02] = "512"
emulator: argv[03] = "-enable-kvm"
emulator: argv[04] = "-android-hw"
emulator: argv[05] = "/home/fbn/.android/avd/nx4.avd/hardware-qemu.ini"
Concatenated QEMU options:
 /opt/android-sdk-update-manager/tools/emulator64-x86 -m 512 -enable-kvm -android-hw /home/fbn/.android/avd/nx4.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0x12800000,initfile=/opt/android-sdk-update-manager/system-images/android-18/x86//system.img
emulator: mapping 'system' NAND image to /tmp/android-fbn/emulator-5L1wHA
emulator: rounding devsize up to a full eraseunit, now 12819000

emulator: nand_add_dev: userdata,size=0xd300000,file=/home/fbn/.android/avd/nx4.avd/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now d305000

emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '64m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '320'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'none'
emulator: nand_add_dev: cache,size=0x4200000,file=/home/fbn/.android/avd/nx4.avd/cache.img
emulator: Initializing hardware OpenGLES emulation support
emulator: Kernel parameters: qemu.gles=1 qemu=1 console=ttyS0 android.qemud=ttyS1 androidboot.hardware=goldfish clocksource=pit android.checkjni=1 ndns=1
emulator:     trying to find: /opt/android-sdk-update-manager/tools/bios.bin

emulator:     trying to find: /opt/android-sdk-update-manager/tools/lib/pc-bios/bios.bin

emulator:     trying to find: /opt/android-sdk-update-manager/tools/vgabios-cirrus.bin

emulator:     trying to find: /opt/android-sdk-update-manager/tools/lib/pc-bios/vgabios-cirrus.bin

emulator: Could not open file: (null)/system/build.prop: No such file or directory
emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /opt/android-sdk-update-manager/tools/ddms
emulator: ping command: /opt/android-sdk-update-manager/tools/ddms ping emulator 22.3.0 "NVIDIA Corporation" "GeForce GTS 450/PCIe/SSE2" "4.4.0 NVIDIA 331.20"
emulator: User-config was not changed.

0 个答案:

没有答案