Android模拟器“-scale”的有损图片选项
我在启动模拟器时遇到问题,比例选项在 0.4 到 1 之间(不包括)。
$ 模拟器 -avd avd10 -verbose -scale 0.8
模拟器看起来像 http://img225.imageshack .us/i/avdm.png/
它似乎可以工作(我可以解锁屏幕,呼叫菜单等),但由于图片有损,它不可用。使用其他比例选项(不在 0.4 和 1 之间)看起来不错。
技术信息:
android-sdk_r12
X.Org X 服务器 1.10.2
$ uname -a
Linux 笔记本电脑 2.6.39-ARCH #1 SMP PREEMPT Mon Jun 27 21:26:22 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux
Emulator 输出相同,具有规模选项和没有它。
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
I have problem with starting emulator with scale option between 0.4 and 1, not including.
$ emulator -avd avd10 -verbose -scale 0.8
And the emulator looks like http://img225.imageshack.us/i/avdm.png/
It seems working (I can unlock the screen, call menu, etc.), but it is not usable due to lossy picture. With other scale options, not between 0.4 and 1 it looks fine.
Technical info:
android-sdk_r12
X.Org X Server 1.10.2
$ uname -a
Linux laptop 2.6.39-ARCH #1 SMP PREEMPT Mon Jun 27 21:26:22 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux
Emulator output is the same, with the scale option and without it.
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有人已经向谷歌提出了这个问题,并且正在修复中。
http://code.google.com/p/android/issues/detail ?id=18299
感谢 Mark Murphy(commonsware)早些时候发布的推文!
Someone's already raised this with google and a fix is in the works.
http://code.google.com/p/android/issues/detail?id=18299
Thanks to Mark Murphy (commonsware) for tweeting about this earlier!