Skip to content

Instantly share code, notes, and snippets.

@NickGeek
Created April 27, 2016 07:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save NickGeek/1e125d7ca6aeff2d4e0e3ac2399bc14c to your computer and use it in GitHub Desktop.
Save NickGeek/1e125d7ca6aeff2d4e0e3ac2399bc14c to your computer and use it in GitHub Desktop.
#!/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