Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Android SDK Manager CLI tutorial
  1. Download sdktools from google: https://developer.android.com/studio/index.html#command-tools

  2. Extract into [SDK]/sdk-tools

  3. Update tools

$ sdk-tools/bin/sdkmanager "tools"
  1. Delete sdk-tools.

  2. The above command should have created emulator and platform-tools folder. If not run:

$ tools/bin/sdkmanager "emulator" "platform-tools"
  1. Fill up XX to respective platform version (ex: 27 for Oreo)
$ tools/bin/sdkmanager "extras;intel;Hardware_Accelerated_Execution_Manager" \
    "platforms;android-XX" \
    "system-images;android-XX;google_apis;x86"
  1. Make sure to have these folders: emulator, platforms, platform-tools, system-images

  2. Create AVD:

$ tools/bin/avdmanager create avd -n <name> -k "system-images;android-XX;google_apis;x86" [-p <path>]
  1. Install HAXM from extras/intel/haxm-installer

  2. Run AVD:

$ emulator/emulator -avd <name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment