Created
April 27, 2016 07:05
-
-
Save NickGeek/1e125d7ca6aeff2d4e0e3ac2399bc14c to your computer and use it in GitHub Desktop.
A AVD launcher solving this problem: http://stackoverflow.com/questions/36189393/android-studio-avd-error-launching
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
import os | |
print("AVD Launcher with replaced libs\nBy Nick Webster http://nick.geek.nz\n====================\n") | |
print("Note: You should be in your Android SDK tools folder when running this script.") | |
AVDs = [file.split('.')[0] for file in os.listdir(os.path.expanduser('~/.android/avd/')) if file.split('.')[len(file.split('.'))-1] == 'ini'] | |
i = 0 | |
for avd in AVDs: | |
i += 1 | |
print("{0}. {1}".format(i, avd)) | |
selection = int(input("Type in the number of the AVD you wish to launch: ")) | |
os.system("LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 ./emulator -avd {}".format(AVDs[selection-1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment