# ocloud devices

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

Generated from **ocloud 3.17.3**. [All ocloud commands](https://olef.dev/docs/reference/ocloud) · [Olef Cloud overview](https://olef.dev/docs/cloud/overview) · [`olef` commands](https://olef.dev/docs/reference/commands)

List, catalog, reserve, extend, release, view, or run against remote devices (DDP & device labs)

Global options (`--org`, `--project-root`, `--quiet`, `--redact`) apply across commands; see the [`ocloud` command catalog](https://olef.dev/docs/reference/ocloud#global-options).

## ocloud devices catalog

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

```bash
ocloud devices catalog --help
```

| Argument | Description |
| --- | --- |
| `--billing` | Who pays (default `ddp.billing`) |
| `--api` | Only devices with this Android API level |
| `--form` | Only this form factor (`phone`, `tablet`, `wearable`, …) |
| `--physical` | Only physical devices |
| `--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 |

## ocloud devices extend

Give a reserved device more time

```bash
ocloud devices extend --help
```

| Argument | Description |
| --- | --- |
| `<lease>` | **Required.** Lease id, serial or spec (`devices leases`) |
| `--ttl-ms` | **Required.** Time left after extending |

## ocloud devices leases

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

```bash
ocloud devices leases --help
```

## ocloud devices list

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

```bash
ocloud devices list --help
```

| Argument | Description |
| --- | --- |
| `--source` | `attached`, `avd`, `cloud`, `real_phone`, `lab` |
| `--form` |  |
| `--api` |  |
| `--physical` |  |
| `--available` | Usable now |
| `--query` | Words that must all match |
| `--refresh` | Skip the 10-minute catalog cache |

## ocloud devices release

Release reserved devices: detach them and end the provider session

```bash
ocloud devices release --help
```

| Argument | Description |
| --- | --- |
| `<lease>` | Lease id, serial or spec (`devices leases`) |
| `--all` | Release every lease held on this machine |

## ocloud 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
ocloud devices reserve --help
```

| Argument | Description |
| --- | --- |
| `<spec>` | **Required.** Device spec from `devices catalog`, e.g. `ddp:komodo-35` |
| `--billing` | Who pays (default `ddp.billing`) |
| `--ttl-ms` | Initial session length |
| `--max-duration-ms` | The longest the lease is extended automatically while in use (default `ddp.max_duration_ms`, else 2 h) |
| `--idle-release-ms` | Release after this long without any adb traffic (default `ddp.idle_release_ms`, else 10 min) |
| `--timeout-ms` | How long to wait for the device to be allocated and online |

## ocloud devices run

Reserve a remote device, run a command with `OLEF_DEVICE` and `ANDROID_SERIAL` set, and unconditionally release the lease on exit or signal (D6 crash-safe billing wrapper)

```bash
ocloud devices run --help
```

| Argument | Description |
| --- | --- |
| `<spec>` | **Required.** Device spec from `ocloud devices catalog`, e.g. `ddp:komodo-35` or `lab:<host>/<device>` |
| `--billing` | Who pays (default `ddp.billing`) |
| `--ttl-ms` | Initial session length (ms) |
| `--max-duration-ms` | Maximum automatic lease duration (ms) |
| `--idle-release-ms` | Idle release threshold (ms) |
| `--timeout-ms` | Allocation wait timeout (ms) |
| `<command>` | **Required.** Command to execute against the reserved device, after `--` |

## ocloud devices view

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

```bash
ocloud devices view --help
```

| Argument | Description |
| --- | --- |
| `<lease>` | **Required.** Lease id, serial or spec (or `cloud:<name>`, a cloud emulator) |
| `--mode` |  |
