> ## Documentation Index
> Fetch the complete documentation index at: https://phone-harness.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Android

> Temporary Android phones by default, and your saved phone that comes back as you left it.

Every account can start Android phones two ways. A **temporary phone** is the default: a fresh emulator that keeps nothing when the session ends. Your **saved phone** is one Android phone that outlives its sessions: apps you installed, accounts you signed into, files, settings and, normally, the exact screen you left are all there the next time you start it.

`GET /me` → `available` lists both, and the dashboard's Start a phone dialog pre-selects the saved phone. A start that names nothing gets a temporary phone; a start with your `profile_id` gets your saved phone.

```json theme={null}
"available": [
  { "platform": "android", "kind": "emulator", "id": "prof-3f9c2a1b7d5e4c6a8b0f1e2d", "label": "Saved phone", "state": "stored", "default": true },
  { "platform": "android", "kind": "emulator", "temporary": true, "label": "Temporary phone" }
]
```

Your own iPhone, if we have set one up for you, is a different phone and never wiped: see [iPhone](/docs/guides/iphone). Driving an Android phone from code goes through [ADB](/docs/guides/connect-adb).

## Find your saved phone

`GET /me` returns a `profile` block:

```json theme={null}
"profile": {
  "id": "prof-3f9c2a1b7d5e4c6a8b0f1e2d",
  "state": "stored",
  "session": null,
  "exact": true,
  "saved_at": 1800000600
}
```

| `state` | Meaning |
| - | - |
| `empty` | Nothing saved yet. The first profile session sets the phone up. |
| `stored` | Saved and ready. The next profile session brings it back. |
| `running` | A live session holds it; `session` names it. |
| `saving` | A session just ended and the phone is being saved. Retry in a few seconds. |

## Start your saved phone

Pass the id as `profile_id` when creating a session. Everything else is the same as a temporary phone: the request is admitted with `202`, you poll `GET /sessions/{sid}` until `ready`, and the session has the deadline you chose.

```bash theme={null}
curl -X POST https://api.phone-harness.com/sessions \
  -H "Authorization: Bearer $PHONE_HARNESS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_id": "prof-3f9c2a1b7d5e4c6a8b0f1e2d", "timeout_seconds": 1800}'
```

The session's `profile` field carries the id back, and `startup` describes how the phone came up:

* `{"mode": "profile", "pool": "store", "startup": "exact"}`: resumed exactly as you left it, typically ready about 10 seconds after the request.
* `{"mode": "profile", "pool": "store", "startup": "rebooted"}`: the service was upgraded since the save, so the phone booted from its kept storage. Apps, accounts and data are intact; whatever was on screen is not.
* Any other `startup`: the first profile session, which starts like a temporary phone and becomes yours.

Only one session at a time may hold the phone, and that includes the save after a session ends. A `POST /sessions` with the same `profile_id` while the phone is held or still `saving` answers `409` with `code: "profile_running"` and the session that holds it. Temporary phones are not affected: you can start one while your phone is being saved.

## Stop it

End the session as usual with `DELETE /sessions/{sid}`. Instead of being discarded, the phone is saved: `profile.state` in `GET /me` moves through `saving` to `stored`, usually within about half a minute. Billing stops when you end the session, not when the save finishes. If the session reaches its deadline before you end it, the phone is still kept, but without its running state: the next start comes back rebooted.

## Reset it

`POST /me/profile/reset` forgets the saved phone. The next profile session starts fresh. It is refused with `409 profile_running` while a session holds the phone, and it cannot be undone.

## What is kept, and what is not

* Kept: apps, accounts, files, settings, the device identity Google saw, and normally the exact running state.
* Not kept: network connections (apps reconnect on resume, as after sleep), and the running state across a service upgrade (see `rebooted` above).
* Storage for one saved phone is included. Additional saved phones are not available yet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.