我构建了AOSP源代码树(envsetup,lunch和make),并希望运行在模拟器中构建的图像。我运行了命令
$ emulator-arm -verbose -system system.img -sysdir system -kernel kernel \
-ramdisk ramdisk.img -initdata userdata.img -data data.img -datadir data
模拟器启动并终止,并出现以下错误。
ko:Cannot determine type of userdata partition: no image files!
有谁知道为什么会产生这个错误以及如何解决这个问题?
模拟器的完整详细输出。
emulator: Read property file at system/system/build.prop
emulator: Cannot find boot properties file: system/boot.prop
emulator: Found target API sdkVersion: 17
emulator: virtual device has no config file - no problem
emulator: using core hw config path: system/hardware-qemu.ini
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir (null)
emulator: keyset loaded from: /home/dnivra/.android/default.keyset
emulator: skin name 'HVGA' aliased to '320x480'
emulator: found magic skin width=320 height=480 bpp=16
emulator: Auto-detect: Kernel image requires legacy device naming scheme.
emulator: Auto-detect: Kernel does support YAFFS2 partitions.
emulator: Using initial system image: system.img
emulator: Physical RAM size: 96MB
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 = 96
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.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 = 16
hw.sensors.proximity = yes
hw.sensors.magnetic_field = yes
hw.sensors.orientation = yes
hw.sensors.temperature = yes
hw.useext4 = yes
kernel.path = kernel
kernel.parameters = androidboot.hardware=goldfish android.checkjni=1
kernel.newDeviceNaming = no
kernel.supportsYaffs2 = yes
disk.ramdisk.path = ramdisk.img
disk.systemPartition.initPath = system.img
disk.systemPartition.size = 200m
disk.dataPartition.path = data/data.img
disk.dataPartition.size = 200m
avd.name = <build>
.
QEMU options list:
emulator: argv[00] = "/home/dnivra/Android/Sdk/tools/emulator-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "system/hardware-qemu.ini"
Concatenated QEMU options:
/home/dnivra/Android/Sdk/tools/emulator-arm -android-hw system/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: Using kernel serial device prefix: ttyS
emulator: No fstab.goldfish file in ramdisk image
emulator: Probing system image file for partition type: system.img
emulator: system partition format: yaffs2
emulator: Mapping 'system' partition image to /tmp/android-dnivra/emulator-jgAbkN
emulator: nand_add_dev: system,size=0xc800000,file=/tmp/android-dnivra/emulator-jgAbkN,initfile=system.img
emulator: rounding devsize up to a full eraseunit, now c810000
ko:Cannot determine type of userdata partition: no image files!
emulator: User-config was not changed.
答案 0 :(得分:0)
好的,似乎每次运行build / envsetup.sh之外,lunch命令也应该与之前指定的目标一起运行,以便设置所需的环境变量。之后,模拟器工作正常。