在命令行中运行它产生了一个分段错误:
$模拟器-avd nexus_s
分割故障(核心转储)
但是,在运行模拟器臂直接如下,做工精细。
$仿真臂-avd nexus_s
我怀疑它试图运行MIPS或模拟器的x86版本。 有没有一种方法来配置仿真器可执行文件来启动?
更新到Android SDK中17后,这一切都开始了。
添加-verbose标志提供了以下输出(我不认为增加任何信息):
$模拟器-verbose -avd nexus_s
模拟器:发现SDK的根在/ opt / SDK
仿真器:在Android的虚拟设备文件:/home/grebulon/.android/avd/nexus_s.ini
模拟器:在/home/grebulon/.android/avd/nexus_s.avd虚拟设备内容
仿真器:虚拟设备的配置文件:/home/grebulon/.android/avd/nexus_s.avd/config.ini
仿真器:使用核心硬件配置路径:/home/grebulon/.android/avd/nexus_s.avd/hardware-qemu.ini
仿真器:找到AVD目标API级别:17
模拟器:魔力的皮肤格式检测:480×800
仿真器:自动配置:-skin 480×800
仿真器:自动配置:-skindir(空)
仿真器:从密钥集装:/home/grebulon/.android/default.keyset
模拟器:发现神奇的皮肤宽度= 480高度= 800 BPP = 16
仿真器:自动配置:-kernel的/ opt / SDK /系统映像/ Android为17 / armeabi-V7A //内核QEMU
仿真器:自动配置:-ramdisk /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//ramdisk.img
仿真器:使用初始系统映像:/opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//system.img
仿真器:自动配置: - 数据/home/grebulon/.android/avd/nexus_s.avd/userdata-qemu.img
仿真器:自动配置:-initdata /home/grebulon/.android/avd/nexus_s.avd/userdata.img
仿真器:自动配置:-cache /home/grebulon/.android/avd/nexus_s.avd/cache.img
模拟器:物理内存大小:343MB
硬件配置文件的内容:
hw.cpu.arch =手臂
hw.cpu.model = Cortex-A8的
hw.ramSize = 343
hw.screen =触摸
hw.mainKeys = YES
hw.trackBall =无
hw.keyboard =无
hw.keyboard.lid =无
hw.keyboard.charmap = qwerty2
hw.dPad =无
hw.gsmModem = YES
hw.gps = YES
hw.battery =无
hw.accelerometer = YES
hw.audioInput = YES
hw.audioOutput = YES
hw.sdCard = YES
disk.cachePartition = YES
disk.cachePartition.path = /home/grebulon/.android/avd/nexus_s.avd/cache.img
disk.cachePartition.size =66米
hw.lcd.width = 480
hw.lcd.height = 800
hw.lcd.depth = 16
hw.lcd.density = 240
hw.lcd.backlight = YES
hw.gpu.enabled = YES
hw.camera.back =无
hw.camera.front =无
vm.heapSize = 32
hw.sensors.proximity = YES
hw.sensors.magnetic_field = YES
hw.sensors.orientation = YES
hw.sensors.temperature = YES
kernel.path = /选择/ SDK /系统映像/ Android为17 / armeabi-V7A //内核QEMU
kernel.parameters = android.checkjni = 1
disk.ramdisk.path = /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//ramdisk.img
disk.systemPartition.initPath = /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//system.img
disk.systemPartition.size =200米
disk.dataPartition.path = /home/grebulon/.android/avd/nexus_s.avd/userdata-qemu.img
disk.dataPartition.size =209米
avd.name = nexus_s
。
QEMU选项列表:
仿真器:是的argv [00] =/选择/ SDK /工具/ emulator64臂
仿真器:是的argv [01] =-Android-HW
仿真器:是的argv [02] =/home/grebulon/.android/avd/nexus_s.avd/hardware-qemu.ini
级联QEMU选项:
/选择/ SDK /工具/ emulator64臂-Android-HW /home/grebulon/.android/avd/nexus_s.avd /hardware-qemu.ini
仿真器:注册的引导性qemud服务
模拟器:nand_add_dev: system,size=0xc800000,initfile=/opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//system.img
模拟器:映射系统NAND映像到/ tmp / Android的grebulon /仿真器,RSuUtb
模拟器:四舍五入devsize到一个完整的eraseunit,现在c810000
模拟器:nand_add_dev:用户数据,大小= 0xd100000,文件= /家庭/ grebulon / .android / AVD / nexus_s.avd /用户数据,qemu.img
模拟器:四舍五入devsize到一个完整的eraseunit,现在d116000
仿真器:注册的引导性qemud服务
仿真器:将引导属性:dalvik.vm.heapsize'='32米
仿真器:将引导属性:qemu.sf.lcd_density'='240'
仿真器:将引导属性:qemu.hw.mainkeys'='1'
仿真器:将引导属性:qemu.sf.fake_camera'='无'
模拟器:nand_add_dev:缓存大小= 0x4200000,文件= /家庭/ grebulon / .android / AVD / nexus_s.avd / cache.img
仿真器:初始化硬件OpenGLES仿真支持
分割故障(核心转储)
解决方案
我终于找到以下CommonsWare的提示后的解决方案。 重命名libOpenglRender.so使问题消失。
MV tools / lib目录/ libOpenglRender.so tools / lib目录/ libOpenglRender.so.xxx
Running it from the command line resulted in a segmentation fault:
$ emulator -avd nexus_s
Segmentation fault (core dumped)
However, running emulator-arm directly as follows, works fine.
$ emulator-arm -avd nexus_s
I suspect it's trying to run the mips or x86 version of the emulator. Is there a way to configure the emulator which executable to start?
All this started after updating to android sdk 17.
Adding the -verbose flag gives the following output (which I don't think adds any info):
$ emulator -verbose -avd nexus_s
emulator: found SDK root at /opt/sdk
emulator: Android virtual device file at: /home/grebulon/.android/avd/nexus_s.ini
emulator: virtual device content at /home/grebulon/.android/avd/nexus_s.avd
emulator: virtual device config file: /home/grebulon/.android/avd/nexus_s.avd/config.ini
emulator: using core hw config path: /home/grebulon/.android/avd/nexus_s.avd/hardware-qemu.ini
emulator: Found AVD target API level: 17
emulator: 'magic' skin format detected: 480x800
emulator: autoconfig: -skin 480x800
emulator: autoconfig: -skindir (null)
emulator: keyset loaded from: /home/grebulon/.android/default.keyset
emulator: found magic skin width=480 height=800 bpp=16
emulator: autoconfig: -kernel /opt/sdk/system-images/android-17/armeabi-v7a//kernel-qemu
emulator: autoconfig: -ramdisk /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//ramdisk.img
emulator: Using initial system image: /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//system.img
emulator: autoconfig: -data /home/grebulon/.android/avd/nexus_s.avd/userdata-qemu.img
emulator: autoconfig: -initdata /home/grebulon/.android/avd/nexus_s.avd/userdata.img
emulator: autoconfig: -cache /home/grebulon/.android/avd/nexus_s.avd/cache.img
emulator: Physical RAM size: 343MB
Content of hardware configuration file:
hw.cpu.arch = arm
hw.cpu.model = cortex-a8
hw.ramSize = 343
hw.screen = touch
hw.mainKeys = yes
hw.trackBall = no
hw.keyboard = no
hw.keyboard.lid = no
hw.keyboard.charmap = qwerty2
hw.dPad = no
hw.gsmModem = yes
hw.gps = yes
hw.battery = no
hw.accelerometer = yes
hw.audioInput = yes
hw.audioOutput = yes
hw.sdCard = yes
disk.cachePartition = yes
disk.cachePartition.path = /home/grebulon/.android/avd/nexus_s.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
hw.gpu.enabled = yes
hw.camera.back = none
hw.camera.front = none
vm.heapSize = 32
hw.sensors.proximity = yes
hw.sensors.magnetic_field = yes
hw.sensors.orientation = yes
hw.sensors.temperature = yes
kernel.path = /opt/sdk/system-images/android-17/armeabi-v7a//kernel-qemu
kernel.parameters = android.checkjni=1
disk.ramdisk.path = /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//ramdisk.img
disk.systemPartition.initPath = /opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//system.img
disk.systemPartition.size = 200m
disk.dataPartition.path = /home/grebulon/.android/avd/nexus_s.avd/userdata-qemu.img
disk.dataPartition.size = 209m
avd.name = nexus_s
.
QEMU options list:
emulator: argv[00] = "/opt/sdk/tools/emulator64-arm"
emulator: argv[01] = "-android-hw"
emulator: argv[02] = "/home/grebulon/.android/avd/nexus_s.avd/hardware-qemu.ini"
Concatenated QEMU options:
/opt/sdk/tools/emulator64-arm -android-hw /home/grebulon/.android/avd/nexus_s.avd /hardware-qemu.ini
emulator: registered 'boot-properties' qemud service
emulator: nand_add_dev: system,size=0xc800000,initfile=/opt/sdk/add-ons/addon-google_apis-google-17/images/armeabi-v7a//system.img
emulator: mapping 'system' NAND image to /tmp/android-grebulon/emulator-RSuUtb
emulator: rounding devsize up to a full eraseunit, now c810000
emulator: nand_add_dev: userdata,size=0xd100000,file=/home/grebulon/.android/avd/nexus_s.avd/userdata-qemu.img
emulator: rounding devsize up to a full eraseunit, now d116000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'dalvik.vm.heapsize' = '32m'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '240'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '1'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'none'
emulator: nand_add_dev: cache,size=0x4200000,file=/home/grebulon/.android/avd/nexus_s.avd/cache.img
emulator: Initializing hardware OpenGLES emulation support
Segmentation fault (core dumped)
解决方案
I finally found a solution after following CommonsWare's tip. Renaming libOpenglRender.so made the problem go away.
mv tools/lib/libOpenglRender.so tools/lib/libOpenglRender.so.xxx