---
title: "Get ADB access"
method: GET
path: "/sessions/{sid}/adb"
tags: ["ADB"]
---

# Get ADB access

`GET /sessions/{sid}/adb`

## Request

- Base URL: `https://api.phone-harness.com`
- URL: `https://api.phone-harness.com/sessions/{sid}/adb`
- Auth: HTTP bearer

Return the ADB endpoint and unlock code for enabled ADB access, or enabled: false. Requires a ready, unexpired session owned by your account. Watch tokens cannot read this endpoint.

## Path parameters

- `sid` string, required

## Response `200`

Success.

- union
  - AdbDisabled
    - `enabled` false, required
  - AdbConnection
    - `enabled` true, required
    - `transport` 'adb', required
    - `host` string, required: DNS name of the ADB endpoint. Use the returned value.
    - `port` integer, required: TCP port dedicated to this phone while the session lives. Run adb connect host:port.
    - `code` string, required: The unlock code. After connecting, run adb shell unlock <code>. Anyone who has host, port and code can drive the phone until the session ends or the code is reset.
    - `expires_at` number, required: Unix timestamp in seconds when access expires. Never later than the session deadline; ADB access does not extend the session.

## Other responses

- `400`: ADB is unavailable on this provider; response includes unsupported: true.
- `401`: Bad or missing bearer credential.
- `403`: Account access denied or rental access unavailable.
- `404`: No live session visible to the caller.
- `409`: Session is not ready, is closing, or the requested action conflicts with current state.
- `500`: Unexpected service error.

---

[API](https://skmtc.dev/phone-harness/apis/phone-harness-api.md) - [All operations](https://skmtc.dev/phone-harness/apis/phone-harness-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phone-harness/apis/phone-harness-api/revisions/5af8941102e5?raw)
