Last active
January 30, 2018 18:41
-
-
Save vchimev/969b0c495ac3c259eccc77445edb7852 to your computer and use it in GitHub Desktop.
A script to update android emulators.
This file contains 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/bash | |
var=$(android -h) | |
print_and_execute() { | |
echo "sdkmanager $1" # print | |
yes | $ANDROID_HOME/tools/bin/sdkmanager "$1" # execute | |
} | |
if [[ $var == *"Usage:"* ]]; then | |
echo "Old SDK Tools!" | |
exit 1 | |
else | |
echo "New SDK Tools!" | |
print_and_execute "extras;intel;Hardware_Accelerated_Execution_Manager" | |
sudo $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh | |
print_and_execute "system-images;android-27;google_apis;x86" | |
print_and_execute "system-images;android-26;google_apis;x86" | |
print_and_execute "system-images;android-25;google_apis;x86" | |
print_and_execute "system-images;android-24;default;x86" | |
print_and_execute "system-images;android-23;default;x86" | |
print_and_execute "system-images;android-22;default;x86" | |
print_and_execute "system-images;android-22;google_apis;x86" | |
print_and_execute "system-images;android-21;default;x86" | |
print_and_execute "system-images;android-21;google_apis;x86" | |
print_and_execute "system-images;android-19;default;x86" | |
print_and_execute "system-images;android-19;google_apis;x86" | |
print_and_execute "system-images;android-18;default;x86" | |
print_and_execute "system-images;android-17;default;x86" | |
# print_and_execute --list # debug | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment