You can launch an Android Studio virtual device from Windows Command Prompt without opening the Android Studio interface. You will need an existing Android Virtual Device (AVD), the Android SDK’s command-line tools, and the AVD’s exact name; the emulator command starts the device and displays its window.
What You’ll Need
- Android Studio installed, or the Android SDK installed separately with the Android Emulator and platform tools.
- At least one AVD already created. Create one in Android Studio’s Device Manager if you do not have one.
- Windows Command Prompt. These instructions use Windows paths and commands; macOS and Linux use different shell syntax and SDK locations.
- The SDK location and AVD name. Android Studio’s SDK Manager shows the SDK location; Device Manager shows your virtual devices.
Step-by-Step
- Check that an AVD exists. Open Android Studio and select Tools > Device Manager. Find the device you want to start. If the list is empty, choose Create device, follow the prompts to select a hardware profile and system image, and finish creating it. An AVD needs a system image before it can run.
- Find your Android SDK folder. In Android Studio, open Tools > SDK Manager and note the Android SDK Location shown near the top. A common Windows location is
%LOCALAPPDATA%\Android\Sdk, but use the path on your computer rather than assuming this default. - Confirm that the emulator executable is present. In File Explorer, open the SDK folder, then the
emulatorsubfolder. Check that it containsemulator.exe. If it does not, return to SDK Manager, open the SDK Tools tab, select Android Emulator, and apply the installation. Wait for it to finish. - Open Command Prompt. Press the Windows key, type
cmd, and open Command Prompt. The current folder does not matter if you use the full path to the emulator executable. - List the available AVD names. Run this command, replacing the example path with your SDK location if it differs:
"%LOCALAPPDATA%\Android\Sdk\emulator\emulator.exe" -list-avds
Press Enter. The output lists AVD names, usually one per line. If you installed the SDK somewhere else, use that folder in place of%LOCALAPPDATA%\Android\Sdk. Copy the desired name exactly, including punctuation and capitalization. - Launch the AVD. Enter the following command, replacing
Pixel_API_35with a name printed by the previous command:"%LOCALAPPDATA%\Android\Sdk\emulator\emulator.exe" -avd Pixel_API_35
Press Enter. Keep the quotation marks around the executable path, especially if any folder name contains spaces. The AVD should boot in an emulator window. Its first startup can take longer while Android initializes. - Wait for the device to finish booting. The emulator window may appear before Android is ready. Wait until the home screen is visible and responsive. You can then use it for testing or connect to it from Android Studio. Leave the Command Prompt open while the emulator runs; closing the window may stop the process started from that prompt.
- Optionally add the emulator folder to PATH. If you want to run
emulatorwithout typing its full location, add the SDK’semulatordirectory to your Windows user or systemPathenvironment variable. Open a new Command Prompt after changing it, then runemulator -list-avdsandemulator -avd Pixel_API_35. Avoid replacing the existing Path entries when editing them.
Common Mistakes
- Using the AVD display label instead of its command name. The name needed by
-avdis the one printed by-list-avds. Copy that exact output rather than guessing from a device model name. - Leaving out quotation marks around a path. A path with spaces can be treated as several separate command arguments. Quote the complete path to
emulator.exe. - Using the wrong SDK location. Android Studio and standalone SDK installations can use different folders. Check SDK Manager instead of relying on a standard location.
- Typing the command in the wrong shell. The examples use Windows Command Prompt syntax. PowerShell generally accepts the quoted executable path followed by arguments, but shell-specific environment-variable syntax differs. On macOS or Linux, use the SDK’s
emulator/emulatorexecutable and a Unix-style path. - Assuming a slow first boot has failed. Initial startup, system-image setup, or a cold boot can take time. Give the emulator a chance to display the Android home screen before starting another copy.
Tips
- Use
emulator -list-avdswhenever you are unsure of the exact AVD name. - If the command window reports an error and closes unexpectedly, run the command directly in an already-open Command Prompt so you can read the message.
- You can add emulator options after the AVD name, for example
-no-snapshotto start without loading a saved snapshot. Use options only when you understand the change; a normal launch needs only-avdand the AVD name. - For repeat use, create a Windows shortcut or a small batch file containing the full launch command. Keep the AVD name and SDK path accurate if you later move or rename either.
Troubleshooting
“The system cannot find the path specified” or “not recognized as an internal or external command”: Check the SDK location in SDK Manager and confirm that emulator.exe exists in its emulator folder. Use the full quoted path, or verify that the emulator folder was added to Path and open a new Command Prompt.
No AVDs appear in the list: Check Device Manager to see whether a virtual device exists. Make sure the command points to the same SDK installation Android Studio uses. If there is no device, create one and install its required system image.
The command says the AVD does not exist: Run -list-avds again and copy an exact listed name. If the list is empty, check for multiple SDK folders or create the AVD in the SDK installation you are using.
The emulator window opens but stays blank, freezes, or closes: Wait briefly, then try starting the AVD from Device Manager to see whether Android Studio reports an additional issue. In Device Manager, open the AVD’s actions menu and try Cold Boot. If it still fails, use Wipe Data only if you are willing to erase that virtual device’s stored apps and data, then launch it again.
The emulator reports a virtualization or graphics problem: Check that hardware virtualization is enabled and supported on the computer, and close other emulator processes. Update the Android Emulator through SDK Manager. If the issue persists, try a different graphics setting in the AVD’s edit options; available choices depend on the computer and emulator version.
Frequently Asked Questions
Can I start an AVD without opening Android Studio?
Yes. Once the SDK emulator and AVD are installed, run emulator.exe -avd AVD_NAME from Command Prompt using the full path or a configured Path entry.
How do I find the exact AVD name?
Run emulator -list-avds using the emulator executable from your SDK. Copy a name from the output for the -avd argument.
Can I start more than one virtual device?
Yes, if your computer has enough resources. Start each AVD with a separate command and use a different AVD name. Starting a device that is already running may instead connect to or conflict with its existing process.
Can I close Command Prompt after launching the emulator?
It is safest to leave the prompt open when you started the emulator directly from it. To avoid tying the emulator to that window, start it from Android Studio or use a Windows shortcut or batch file configured to launch it separately.
Does this work on macOS or Linux?
The emulator command and AVD options are similar, but the executable path and shell syntax differ. Find the SDK location and use its emulator/emulator file in a terminal.
Will launching from Command Prompt erase my virtual device?
No. A normal launch preserves its data. A Device Manager Wipe Data action resets the AVD and removes its stored apps and data.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Error 0x80072f76 0x20016 in Windows
- How to Backup and Restore Drivers in Windows 11
- Fix Windows Couldn’t Complete the Requested Changes
- Move to iOS Stuck? Fixes That Actually Work
- USB Bluetooth Dongle: What It Is and How It Works
- ADB Device Not Found Error on Windows: Fixed