# Emulator

![](https://3928478158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjMjdRXwO33Lfo7uCpl6%2Fuploads%2Fgit-blob-8c5d6ef24ae54759175052b237351dccf0432770%2Fmapt.png?alt=media)

All the following solutions are implemented in [HacknDroid](https://github.com/RaffaDNDM/HacknDroid).

## Installation

```bash
sdkmanager "platform-tools" "emulator"
```

## Install specific platform

1. List available platforms on Linux

   ```bash
   sdkmanager --list | grep platforms
   ```

   or on Windows

   ```bash
   sdkmanager --list | findstr platforms
   ```
2. Install the selected one

```bash
sdkmanager "platforms;android-30"
```

## Install specific system image

1. List available system images on Linux

   ```bash
   sdkmanager --list | grep system-images
   ```

   or on Windows

   ```bash
   sdkmanager --list | findstr system-images
   ```
2. Install the selected one

```bash
sdkmanager "system-images;android-30;google_apis;x86_64"
```

## AVD creation

1. List available device profiles

   ```bash
   avdmanager list devices
   ```

   ![](https://3928478158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhjMjdRXwO33Lfo7uCpl6%2Fuploads%2Fgit-blob-326fa8ef6d2b50396bf0dd0909dbbd108d85e951%2Favd_list.png?alt=media)
2. Create the AVD using the installed system image (for example, if you select `pixel`, you specify it in `--device`):

   ```bash
   avdmanager create avd -n <avd_id> -k "system-images;android-30;google_apis;x86_64" --device "pixel"
   ```

## Emulator launch

1. List all the created AVDs

```bash
emulator -list-avds
```

2. Launch the emulator for an AVD

```bash
emulator -avd <avd_name> -no-boot-anim -netspeed full -netdelay none -gpu host -writable-system
```
