# Android Command Line Tooling Setup

Android Studio installs the basic emulator binaries by default but the **command-line tools** required for Drizz Desktop such as `avdmanager`, `sdkmanager` and the ability to run the emulator command from any terminal often require a few additional steps. These tools must also be accessible through your system’s environment variables.

> The following steps explains how to enable full command-line emulator support in a clean, predictable way.

### **Step 1: Ensure Required Tools Are Installed**

To use emulator commands from the terminal, install the following SDK components:

1. Open **Android Studio → Settings** (or **Preferences** on macOS).
2. Go to **Languages & Frameworks → Android SDK**.
3. Select the **SDK Tools** tab.
4. Verify the following items are enabled:

* **Android Emulator**
* **Android SDK Platform-Tools**&#x20;
* **Android SDK Command-line Tools**&#x20;

5. Click **Apply** to install or update them.

### **Step 2: Add Tools to Your System PATH**

Installing the tools alone is not enough.\
To run commands like `emulator`, `adb`, `sdkmanager` or `avdmanager` from any terminal, you must add their directories to your system PATH.

These directories exist inside your **Android SDK Location** (visible at the top of the SDK Manager screen).

| Tool                        | Required Folder Path                     |
| --------------------------- | ---------------------------------------- |
| **emulator**                | `…/Android/sdk/emulator`                 |
| **adb**                     | `…/Android/sdk/platform-tools`           |
| **sdkmanager / avdmanager** | `…/Android/sdk/cmdline-tools/latest/bin` |

> **Important:**\
> Always use the **/emulator** directory for the emulator binary.\
> The older version inside `/tools` is deprecated and does not support modern features.

After updating your PATH, restart the terminal to apply changes.

### **Step 3: Relevant Official Documentation**

For deeper reference, here are the official Android documentation pages that correspond to the tools mentioned:

* **Start the emulator from the command line**\
  <https://developer.android.com/studio/run/emulator-commandline>
* **Command-line tools overview**\
  <https://developer.android.com/tools>
* **Emulator console commands**\
  <https://developer.android.com/studio/run/emulator-console>

These resources provide complete command references, startup flags and advanced interaction options.

### **Step 4: Verification**

To confirm your environment is configured correctly, run:

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

If it returns a list of AVDs, your setup is correct.\
If you receive “`command not found`,” the PATH configuration has not been applied correctly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.drizz.dev/getting-started/drizz-desktop-app/drizz-desktop-app-setup/device-setup/android-studio-setup-guide/android-command-line-tooling-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
