# PocketShare > Rent real Android phones by the minute. A rented phone works two ways at once: `pocketshare connect` puts it in `adb devices` for Android Studio, adb, scrcpy and test tools, and its page on pocketshare.io controls the live screen and installs APKs in the browser. The `pocketshare` CLI (`--json` output, exit codes), `pocketshare run` for CI and the MCP server at https://pocketshare.io/mcp let AI agents and scripts rent a phone, install a build, test it and end the rental without prompts. Every rental needs a spending cap (`--max-spend`, in dollars). Rentals made with an agent API key (`POCKETSHARE_API_KEY`) count against a daily limit ($5.00 by default) and end after 5 idle minutes. No root; a few actions that would break cleanup are blocked. Phones belong to hosts: use test accounts and test data only. ```sh export POCKETSHARE_API_KEY=psk_... # an agent key from https://pocketshare.io/app/keys rental=$(pocketshare rent --android ">=13" --max-spend 1 --wait 10m --json | jq -r .rentalId) trap 'pocketshare stop "$rental"' EXIT pocketshare install "$rental" app-debug.apk --grant pocketshare screenshot "$rental" -o screen.png pocketshare logcat "$rental" --priority E ``` ## Docs - [AI agents and scripts](https://pocketshare.io/docs/agents/): API key setup, CLI install, rent, install, screenshot, Logcat, `pocketshare run`, idle timeout, exit codes - [Connect with adb and Android Studio](https://pocketshare.io/docs/pocketshare-connect/): `pocketshare connect`, the phone in `adb devices` and Android Studio, what works - [Use a phone in your browser](https://pocketshare.io/docs/browser-live-view/): live screen control, APK install, shell, Logcat, files, screenshots and recordings - [The pocketshare CLI](https://pocketshare.io/docs/cli/): install and verify, sign in, every command - [MCP server for AI agents](https://pocketshare.io/docs/mcp/): hosted (OAuth or API key) and local, tools, spending limits - [Use PocketShare in CI](https://pocketshare.io/docs/ci/): `pocketshare run` with GitLab CI and GitHub Actions templates - [Get started](https://pocketshare.io/docs/get-started/): sign up, rent with a cap, use the phone, end the rental ## Reference - [REST API](https://pocketshare.io/docs/reference/api/): every public route - [Limits](https://pocketshare.io/docs/reference/limits/): what is blocked and why - [Pricing](https://pocketshare.io/docs/pricing/): per-minute phone time, data, credits and caps ## Optional - [How it works](https://pocketshare.io/docs/how-it-works/): hosts, hubs, the relay and a rental's lifecycle - [Sessions and safety](https://pocketshare.io/docs/safety/) - [Hosting docs for phone owners](https://getpocketshare.com/docs/)