# olef devices

Source: https://olef.dev/docs/reference/cli/devices

Generated from **Olef 3.0.2**. [All commands](https://olef.dev/docs/reference/commands) · [Capabilities and requirements](https://olef.dev/docs/reference/capabilities)

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the [command catalog](https://olef.dev/docs/reference/commands#global-options).

## olef devices

List attached devices / emulators, or reserve billed remote ones. `devices catalog|reserve|extend|release|leases` manage remote devices (preview: Google Cloud Developer Device Platform)

```bash
olef devices --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices list

Every device: attached, AVDs, the Cloud emulator, real phones

```bash
olef devices list --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--source <SOURCE>` | `attached`, `avd`, `cloud`, `real_phone`, `lab` |
| `--form <FORM>` |  |
| `--api <API>` |  |
| `--physical` |  |
| `--available` | Usable now |
| `--query <QUERY>` | Words that must all match |
| `--refresh` | Skip the 10-minute catalog cache |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices catalog

List remote devices that can be reserved (preview: Google Cloud Developer Device Platform, billed to your own Google Cloud project)

```bash
olef devices catalog --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--billing <BILLING>` | Who pays (default `ddp.billing`) Values: `project`, `olef`, `shadowdroid`. |
| `--api <API>` | Only devices with this Android API level |
| `--form <FORM>` | Only this form factor (`phone`, `tablet`, `wearable`, …) |
| `--physical` | Only physical devices Conflicts with: `virtual_only`. |
| `--virtual` | Only virtual devices |
| `--available` | Only devices available now |
| `--all` | Also list devices that can't be streamed or that your project can't use |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices reserve

Reserve a remote device and attach it to adb as `127.0.0.1:<port>`. Billed while held; released when idle, by `devices release`, or when its maximum duration is reached

```bash
olef devices reserve --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<spec>` | **Required.** Device spec from `devices catalog`, e.g. `ddp:komodo-35` |
| `--billing <BILLING>` | Who pays (default `ddp.billing`) Values: `project`, `olef`, `shadowdroid`. |
| `--ttl-ms <TTL_MS>` | Initial session length Default: `1800000`. |
| `--max-duration-ms <MAX_DURATION_MS>` | The longest the lease is extended automatically while in use (default `ddp.max_duration_ms`, else 2 h) |
| `--idle-release-ms <IDLE_RELEASE_MS>` | Release after this long without any adb traffic (default `ddp.idle_release_ms`, else 10 min) |
| `--timeout-ms <TIMEOUT_MS>` | How long to wait for the device to be allocated and online Default: `360000`. |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices extend

Give a reserved device more time

```bash
olef devices extend --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<lease>` | **Required.** Lease id, serial or spec (`devices leases`) |
| `--ttl-ms <TTL_MS>` | **Required.** Time left after extending |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices release

Release reserved devices: detach them and end the provider session

```bash
olef devices release --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<lease>` | Lease id, serial or spec (`devices leases`) |
| `--all` | Release every lease held on this machine Conflicts with: `lease`. |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices leases

The remote devices held now, with time left and idle time

```bash
olef devices leases --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef devices view

A viewer link (`view.shadowdroid.dev`) for a held Olef device

```bash
olef devices view --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<lease>` | **Required.** Lease id, serial or spec |
| `--mode <MODE>` | Default: `control`. Values: `control`, `view`. |
| `--json` | Accepted for compatibility; output is always JSON. |
