使用Android模拟器“-scale”选项的有损图片

时间:2011-07-08 08:08:56

标签: android linux android-emulator qemu

我在启动模拟器时遇到问题,缩放选项介于0.4和1之间,不包括。

  

$ emulator -avd avd10 -verbose -scale 0.8

仿真器看起来像http://img225.imageshack.us/i/avdm.png/

它似乎正常工作(我可以解锁屏幕,调用菜单等),但由于有损耗的图片而无法使用。使用其他比例选项,不在0.4和1之间,它看起来很好。

技术信息:
Android的sdk_r12
X.Org X Server 1.10.2

  

$ uname -a
  Linux笔记本电脑2.6.39-ARCH#1 SMP PREEMPT周一6月27日21:26:22 CEST 2011 x86_64 Intel(R)Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU / Linux

模拟器输出相同,带有比例选项,没有它。

emulator: found SDK root at /opt/android-sdk
emulator: Android virtual device file at: /home/a4e6/.android/avd/avd10.ini
emulator: virtual device content at /home/a4e6/.android/avd/avd10.avd
emulator: virtual device config file: /home/a4e6/.android/avd/avd10.avd/config.ini
emulator: using core hw config path: /home/a4e6/.android/avd/avd10.avd/hardware-qemu.ini
emulator: Found AVD target API level: 10
emulator: found skin 'WVGA800' in directory: /opt/android-sdk/platforms/android-10/skins
emulator: autoconfig: -skin WVGA800
emulator: autoconfig: -skindir /opt/android-sdk/platforms/android-10/skins
emulator: keyset loaded from: /home/a4e6/.android/default.keyset
emulator: trying to load skin file '/opt/android-sdk/platforms/android-10/skins/WVGA800/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: autoconfig: -kernel /opt/android-sdk/platforms/android-10/images//kernel-qemu
emulator: autoconfig: -ramdisk /opt/android-sdk/platforms/android-10/images//ramdisk.img
emulator: Using initial system image: /opt/android-sdk/platforms/android-10/images//system.img
emulator: autoconfig: -data /home/a4e6/.android/avd/avd10.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/a4e6/.android/avd/avd10.avd/userdata.img
emulator: autoconfig: -cache /home/a4e6/.android/avd/avd10.avd/cache.img
emulator: autoconfig: -sdcard /home/a4e6/.android/avd/avd10.avd/sdcard.img
emulator: Physical RAM size: 256MB

Content of hardware configuration file:
  hw.cpu.arch = arm
  hw.cpu.model = 
  hw.ramSize = 256
  hw.touchScreen = yes
  hw.trackBall = yes
  hw.keyboard = yes
  hw.keyboard.lid = yes
  hw.dPad = yes
  hw.gsmModem = yes
  hw.camera = no
  hw.camera.maxHorizontalPixels = 640
  hw.camera.maxVerticalPixels = 480
  hw.gps = yes
  hw.battery = yes
  hw.accelerometer = yes
  hw.audioInput = yes
  hw.audioOutput = yes
  hw.sdCard = yes
  hw.sdCard.path = /home/a4e6/.android/avd/avd10.avd/sdcard.img
  disk.cachePartition = yes
  disk.cachePartition.path = /home/a4e6/.android/avd/avd10.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 480
  hw.lcd.height = 800
  hw.lcd.depth = 16
  hw.lcd.density = 240
  hw.lcd.backlight = yes
  vm.heapSize = 24
  hw.sensors.proximity = yes
  kernel.path = /opt/android-sdk/platforms/android-10/images//kernel-qemu
  kernel.parameters =  android.checkjni=1
  disk.ramdisk.path = /opt/android-sdk/platforms/android-10/images//ramdisk.img
  disk.systemPartition.initPath = /opt/android-sdk/platforms/android-10/images//system.img
  disk.systemPartition.size = 89m
  disk.dataPartition.path = /home/a4e6/.android/avd/avd10.avd/userdata-qemu.img
  disk.dataPartition.size = 66m
  disk.snapStorage.path = 
  avd.name = avd10
.
QEMU options list:
emulator: argv[00] = "./emulator-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/home/a4e6/.android/avd/avd10.avd/hardware-qemu.ini"
Concatenated QEMU options:
 ./emulator-arm -android-hw /home/a4e6/.android/avd/avd10.avd/hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0x5900000,initfile=/opt/android-sdk/platforms/android-10/images//system.img
emulator: mapping 'system' NAND image to /tmp/android-a4e6/emulator-cD8TVY
emulator: rounding devsize up to a full eraseunit, now 5913000

emulator: nand_add_dev: userdata,size=0x4200000,file=/home/a4e6/.android/avd/avd10.avd/userdata-qemu.img
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '24m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '240'
emulator: nand_add_dev: cache,size=0x4200000,file=/home/a4e6/.android/avd/avd10.avd/cache.img
emulator: Kernel parameters: qemu=1 console=ttyS0 android.qemud=ttyS1 android.checkjni=1 ndns=2
emulator: Trace file name is not set

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/tools/ddms
emulator: ping command: /opt/android-sdk/tools/ddms ping emulator 12.0
goldfish_fb_get_pixel_format:167: 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

1 个答案:

答案 0 :(得分:0)

有人已经通过谷歌提出这个问题并且修复工作正在进行中。

http://code.google.com/p/android/issues/detail?id=18299

感谢Mark Murphy(commonsware)早些时候对此发推文!