-
-
Save clayrisser/ba6d8c4471a7cf464ceeb28987c50683 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 | |
os.system('cd ~/Android/Sdk/tools') | |
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