How to install Android emulator without installing Android Studio
Tags: tutorial, android, mobile
Published: 2020-05-08 16:45:24

---
title: How to install Android emulator without installing Android Studio
published: true
description: This is the step-by-step note that answering the question: How to install and launch Android emulator without installing Android Studio itself.
tags: tutorial, android, mobile
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/jc2y9j817x51v42wxz2n.jpg
---

This is the step-by-step note that answering the question: How to install and launch Android emulator without installing Android Studio itself.

1. Download and install [JDK](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html)

2. Set `JAVA_HOME` variable.

    Open Command Prompt (`Win+R`, type `cmd` and press Enter) or use any other terminal you like. For me path to JDK is `E:\Program Files\Java\jdk1.8.0_251`. Execute the following:
    ```powershell
setx JAVA_HOME "E:\Program Files\Java\jdk1.8.0_251"
    ```

    or use `Start -> Edit the system environment variables -> Environment variables... -> New...`
    ![JAVA_HOME](https://dev-to-uploads.s3.amazonaws.com/i/b19nm4ht2tuyp3wczm94.png)

3. Download and install [Intel Hardware Accelerated Execution Manager (HAXM)](https://github.com/intel/haxm) (you also need to switch off Hyper-V feature and enable Virtualization in BIOS for successful installation).

4. Download [Command-Line-Tools](https://developer.android.com/studio/#downloads): Go to Downloads page , scroll down to "Command line tools only" section and download the archive with tools.

5. Go to `AppData\Local `:
    ```powershell
cd %localappdata%
    ```

6. Create the following folder structure and go inside:
    ```powershell
mkdir Android\cmdline-tools
cd Android\cmdline-tools
    ```
7. Extract downloaded `commandlinetools-win-*_latest.zip` folder into `cmdline-tools` folder:
    ```powershell
tar -xf C:\Users\a\Downloads\commandlinetools-win-6200805_latest.zip
    ```
    Starting from Android SDK Command-line Tools 1.0.0 (6200805), in contrast to Android SDK 26.1.1 (4333796), the tools directory hierarchy has been changed. Previously it was placed right inside ANDROID_HOME, now it's still named as tools (the only thing you'll get after unpacking the downloaded commandlinetools zip file), but differently, you have to place it inside a directory called cmdline-tools on your own.

8. The structure is supposed to be the following:
    ```powershell
   ├── cmdline-tools
       └── tools
           ├── bin
           ├── lib
           ├── NOTICE.txt
           └── source.properties  
    ```

9. Set ANDROID_HOME environment variable:
    ```powershell
setx ANDROID_HOME %localappdata%\Android
    ```

10. Create new entry in Path environment variable:
    ```powershell
setx path "%PATH%;%ANDROID_HOME%\cmdline-tools\tools\bin" /m
    ```

    Note: you'll probably need to restart `cmd` in order the changes take effect.

11. The next command allows us to see the list of available packages:
    ```powershell
sdkmanager --list
    ```

12. We need to install such packages like `platform-tools`, `platforms;android-*` and `system-images;android-*;google_apis;x86_64`, where `*` means the version:
    ```powershell
sdkmanager "platforms;android-29" "system-images;android-29;google_apis;x86_64" "platform-tools"
    ```

13. Next we have to accept a bunch of licenses. Type the next command and answer `y` to each question:
    ```powershell
sdkmanager --licenses
    ```

14. Now we are ready to create new virtual device:
    ```powershell
avdmanager create avd -n test_avd_29 -k "system-images;android-29;google_apis;x86_64"
    ```

15. To see the list of virtual devices just type:
    ```powershell
avdmanager list avd
    ```

16. Go to `emulator` folder:
    ```powershell
cd %ANDROID_HOME%\emulator
    ```

17. Last but not least thing is launching:
    ```powershell
emulator -avd test_avd_29
    ```


![emu1](https://dev-to-uploads.s3.amazonaws.com/i/dlyn5uheje7qovst4b6h.png)
![emu2](https://dev-to-uploads.s3.amazonaws.com/i/e61zofg60mhfx99urdko.png)
![emu3](https://dev-to-uploads.s3.amazonaws.com/i/mfqlp2dh1b008rpgeuhc.png)

**Cheers!**