Start the emulator from the command line

The Android SDK includes an Android device emulator — a virtual device that runs on your computer. The Android Emulator lets you develop and test Android apps without using a physical device.

This page describes command-line features that you can use with the Android Emulator. For information about using the Android Emulator UI, see Run Apps on the Android Emulator.

Starting the emulator

Use the emulator command to start the emulator, as an alternative to running your project or starting it through the AVD Manager.

Here's the basic command-line syntax for starting a virtual device from a terminal prompt:

For example, if you launch the emulator from within Android Studio running on a Mac, the default command line will be similar to the following:

$ /Users/janedoe/Library/Android/sdk/emulator/emulator -avd Nexus_5X_API_23 -netdelay none -netspeed full

You can specify startup options when you start the emulator, but not later on.

For a list of AVD names, enter the following command:

emulator -list-avds

When you use this option, it displays a list of AVD names from your Android home directory. Note that you can override the default home directory by setting the ANDROID_SDK_HOME environment variable: the root of the user-specific directory where all configuration and AVD content is stored. You could set the environment variable in the terminal window before launching a virtual device, or you could set it through your user settings in the operating system; for example, in your .bashrc file on Linux.

To stop the Android Emulator, just close the emulator window.