title: Android emulator - unable to load driver
body: <p>Running on Ubuntu, I'm getting this error:</p>
  
  <pre><code>Cannot launch AVD in emulator.
  Output:
  libGL error: unable to load driver: i965_dri.so
  libGL error: driver pointer missing
  libGL error: failed to load driver: i965
  libGL error: unable to load driver: swrast_dri.so
  libGL error: failed to load driver: swrast
  X Error of failed request:  GLXBadContext
    Major opcode of failed request:  155 (GLX)
    Minor opcode of failed request:  6 (X_GLXIsDirect)
    Serial number of failed request:  55
    Current serial number in output stream:  54
  </code></pre>
  
  <p>Platform-tools is the latest. </p>
  
  <p>Emulator image uses <code>https://dl.google.com/android/repository/sys-img/google_apis/x86_64-24_r08.zip</code> and it's on Android N.</p>
  
  <p><em>Update (Dec 2, 2016):</em> @Sébastien's solution no longer works but gives:</p>
  
  <pre><code>Cannot launch AVD in emulator.
  Output:
  failed to create drawable
  getGLES2ExtensionString: Could not create GLES 2.x Pbuffer!
  Failed to obtain GLES 2.x extensions string!
  Could not initialize emulated framebuffer
  emulator: Listening for console connections on port: 5554
  emulator: Serial number of this emulator (for ADB): emulator-5554
  emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
  emulator: WARNING: ./android/metrics/metrics_reporter.cpp:142: Failed to get a writable, unused path for metrics. Tried: /home/me/.android/avd/metrics/metrics.17386.yogibear
  </code></pre>
  
  <p>If I disable GPU based rendering and switch to software based GL graphics, there is this runtime error:</p>
  
  <pre><code>Firebase API initialization failure.
                 DeadSystemException: The system died; earlier logs will point to the root cause
  FATAL EXCEPTION: main
                    Process: com.whatever.mobile, PID: 4501
                    DeadSystemException: The system died; earlier logs will point to the root cause
  </code></pre>