Android Studio emulator can’t start in Kali Linux. The error I get is:
25/12/17 3:01 AM Gradle sync started
3:01 AM Project setup started
3:01 AM Gradle sync finished in 1s 333ms (from cached state)
3:02 AM * daemon not running; starting now at tcp:5037
3:02 AM Emulator: libGL error: unable to load driver: i965_dri.so
3:02 AM Emulator: libGL error: driver pointer missing
3:02 AM Emulator: libGL error: failed to load driver: i965
3:02 AM Emulator: libGL error: unable to load driver: i965_dri.so
3:02 AM Emulator: libGL error: driver pointer missing
3:02 AM Emulator: libGL error: failed to load driver: i965
3:02 AM Emulator: libGL error: unable to load driver: swrast_dri.so
3:02 AM Emulator: libGL error: failed to load driver: swrast
3:02 AM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
3:02 AM Emulator: Major opcode of failed request: 156 (GLX)
3:02 AM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
3:02 AM Emulator: Value in failed request: 0x0
3:02 AM Emulator: Serial number of failed request: 68
3:02 AM Emulator: Current serial number in output stream: 69
3:02 AM Emulator: Process finished with exit code 1
3:02 AM * daemon started successfully
3:02 AM Executing tasks: [:app:assembleDebug]
3:02 AM Emulator: libGL error: unable to load driver: i965_dri.so
3:02 AM Emulator: libGL error: driver pointer missing
3:02 AM Emulator: libGL error: failed to load driver: i965
3:02 AM Emulator: libGL error: unable to load driver: i965_dri.so
3:02 AM Emulator: libGL error: driver pointer missing
3:02 AM Emulator: libGL error: failed to load driver: i965
3:02 AM Emulator: libGL error: unable to load driver: swrast_dri.so
3:02 AM Emulator: libGL error: failed to load driver: swrast
3:02 AM Emulator: X Error of failed request: BadValue (integer parameter out of range for operation)
3:02 AM Emulator: Major opcode of failed request: 156 (GLX)
3:02 AM Emulator: Minor opcode of failed request: 24 (X_GLXCreateNewContext)
3:02 AM Emulator: Value in failed request: 0x0
3:02 AM Emulator: Serial number of failed request: 68
3:02 AM Emulator: Current serial number in output stream: 69
3:02 AM Emulator: Process finished with exit code 1
3:03 AM Gradle build finished in 16s 582ms
Advertisement
Answer
It looks like, in some android studio update, google used a libstdc++ incompatible with the intel driver installed on the system.
Edit your .profile using your favorite text editor
vim ~/.profile Append this at the end of the file
export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
If it doesn’t work try installing lib64stdc++ and mesa-utils libraries:
sudo apt-get install lib64stdc++6 mesa-utils
and making a symlink from the system libstdc++ to the android studio one:
cd ~/Android/Sdk/tools/lib64/libstdc++/ mv libstdc++.so.6 libstdc++.so.6.bak ln -s /usr/lib64/libstdc++.so.6