Android Emulator from the Command Line

If you ever found yourself setting up an Android Jenkins build you probability needed to create instances of the Android emulator using the command line. Instead of downloading the full Android Studio IDE (which is rather heavy weighing in at > 1GB download), you can download the SDK tools (~150 MB) and use the command line to do the rest

$ cd location/where/unzip/sdktools
$ ./bin/sdkmanager --install "system-images;android-15;google_apis;armeabi-v7a"
$ ./bin/sdkmanager --install "emulator"
$ ./bin/avdmanager create avd -n hd2 -k "system-images;android-15;google_apis;armeabi-v7a"
$ ./emulator 

Paul Soucy

Read more posts by this author.