# olef perm

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

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 perm

Runtime permission grants

```bash
olef perm --help
```

Output: **json**.

### olef perm grant

Grant one or more runtime permissions (verify-by-readback)

```bash
olef perm grant --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<package>` | **Required.** |
| `<perms>` | **Required.** Permissions to grant (e.g. android.permission.CAMERA); one or more |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef perm revoke

Revoke one or more runtime permissions

```bash
olef perm revoke --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<package>` | **Required.** |
| `<perms>` | **Required.** Permissions to revoke (e.g. android.permission.CAMERA); one or more |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef perm list

List a package's runtime permission grant states

```bash
olef perm list --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<package>` | **Required.** |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef perm reset

Revoke all granted runtime permissions (fresh-install prompt state)

```bash
olef perm reset --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<package>` | **Required.** |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef perm dialog

Answer the runtime-permission dialog on screen: `allow-foreground` ("While using the app", or "Allow" where that is the only grant), `allow-once` ("Only this time") or `deny` ("Don't allow"). Waits for the dialog, taps the answer whatever its id on this Android version, and waits for the dialog to close or the next one to replace it

```bash
olef perm dialog --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<choice>` | **Required.** Values: `allow-foreground`, `allow-once`, `deny`. |
| `--wait-ms <WAIT_MS>` | How long to wait for a permission dialog to appear, in milliseconds Default: `5000`. |
| `--timeout-ms <TIMEOUT_MS>` | How long to wait for the dialog to close after the tap, in milliseconds Default: `5000`. |
| `--json` | Accepted for compatibility; output is always JSON. |
