Android emulator segmentation fault

前端 未结 7 1728
傲寒
傲寒 2020-12-05 10:19

Running it from the command line resulted in a segmentation fault:

$ emulator -avd nexus_s
Segmentation fault (core dumped)

However, runnin

相关标签:
7条回答
  • 2020-12-05 10:37

    On my Ubuntu 12.04 system, I solved this problem by making sure "Use Host GPU" was not turned on in the AVD configuration.

    0 讨论(0)
  • 2020-12-05 10:48

    Type command

    $ emulator-arm @nexus_s

    Hope this helps :-)

    0 讨论(0)
  • 2020-12-05 10:50

    wiping data and cold booting device through android studio solved this issue in ubuntu 16.04

    0 讨论(0)
  • 2020-12-05 10:52

    If you don't find the answer here you should subscribe to:

    1. Issue 34233: Emulator start produces segmentation fault after upgrading to r20
    2. Issue 55325: Emulator crashing with segfault
    3. Issue 20952: Emulator segfault on startup (unrelated to audio)

    There you will receive updates about this issue and find some workarounds (like renaming lib*.* files).

    0 讨论(0)
  • 2020-12-05 10:55

    I had the same problem on Debian Wheezy. The grebulon's answer kind-of worked for me, however the emulator was sloooooow so I set out to fix it The Right Way (tm).

    In this case Segmentation fault probably indicates problems with OpenGL. (note that last line of log is "emulator: Initializing hardware OpenGLES emulation support")

    In my case, searching for 'GL' through /var/log/Xorg.0.log showed some NVidia GLX driver (from old video card which went to digital heaven). Given the fact that I have AMD Radeon I uninstalled every package with 'nvidia' in it (list: apt-get search nvidia | grep ^i) and installed:

    # apt-get install libgl1-fglrx-glx
    

    After reboot emulator complained about missing libOpenglRender.so and libGL.so, which I solved like this:

    # echo "/opt/adt/sdk/tools/lib" > /etc/ld.so.conf.d/android_stuff.conf
    # ldconfig
    # cd /opt/adt/sdk/tools/lib
    # ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 libGL.so
    

    Note that my situation is probably unique (problems started when I went from NVidia to AMD), but the root of the problem is probably similar (OpenGL). I hope it helps someone.

    UPDATE: still doesn't work, it looks like my drivers do not support 16-bit colors in OpenGL... will investigate further.

    0 讨论(0)
  • 2020-12-05 10:56

    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
    
    0 讨论(0)
提交回复
热议问题