環境
- OS - OS X EI Caption
- Android Studio - 2.0 Beta 7
- Java - 1.8.0_20, x86_64: "Java SE 8"
Problem
ターミナルからemulatorを起動しようとすると、Segmentation faultが発生する。
$ /Users/hoge/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_4_API_21
Segmentation fault: 11
Solution
同じコマンドをsudoで実行したところ、起動した。
# avdの一覧を取得
$ emulator -list-avds
Nexus_4_API_21
Nexus_5_API_21_x86
Nexus_6_API_21
Nexus_6_API_22
Nexus_6_API_23
Nexus_9_API_21
Nexus_S_API_23
# エミュレータ起動
$ sudo /Users/hoge/Library/Android/sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_4_API_21
Password:
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored.
Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
HAXM is working and emulator runs in fast virt mode
...