# Android Setup

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* [Android SDK](https://developer.android.com/studio) installed (via Android Studio or standalone)
* `adb` available on your PATH

## Enable USB debugging[​](#enable-usb-debugging "Direct link to Enable USB debugging")

1. On your device, go to **Settings > About phone**
2. Tap **Build number** 7 times to enable Developer options
3. Go to **Settings > Developer options**
4. Enable **USB debugging**
5. Connect via USB and accept the debugging prompt

## Verify[​](#verify "Direct link to Verify")

```
adb devices
```

Expected output:

```
List of devices attached

XXXXXXXXX    device
```

Then confirm MobileCLI sees it:

```
mobilecli devices
```

## Using an emulator[​](#using-an-emulator "Direct link to Using an emulator")

```
emulator -avd <avd_name>
```

The emulator appears as a connected device automatically.

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

### Device shows as "unauthorized"[​](#device-shows-as-unauthorized "Direct link to Device shows as \"unauthorized\"")

Disconnect and reconnect USB. Accept the debugging prompt on the device. If the prompt doesn't appear, revoke USB debugging authorizations in Developer options and reconnect.

### Device not detected[​](#device-not-detected "Direct link to Device not detected")

* Check USB drivers (Windows)
* Try a different cable or port
* `adb kill-server && adb start-server`
