# Android phones A phone is a sandbox running AOSP Android 15, with no Google Play, in the Android emulator under the sandbox's own `/dev/kvm`. Drive it through the API, or connect adb, Appium or Maestro. ```sh harebox new --image android-15-aosp --size default --name phone harebox phone current --action ui_tree ``` | Action | Takes | |---|---| | `tap` | `x`, `y` | | `swipe` | `x`, `y`, `x2`, `y2`, `duration_ms` | | `type` | `text` | | `key` | `key`, such as `HOME`, `BACK` or `ENTER` | | `ui_tree` | Nothing; returns uiautomator's XML | | `screenshot` | Nothing; returns a PNG in base64 | | `install_apk` | `apk_path`, an APK you uploaded | | `list_apps`, `open_app`, `stop_app` | `package` for the last two | | `open_url` | `url` | `harebox phone adb ID` opens a WebSocket tunnel to the emulator's adb. A phone pays its size's Shared rate plus **$0.04 an hour** for the device, charged daily from the wallet: $0.07564 an hour at the default size, its smallest. The desktop stream shows the phone screen, for a person to take over. **Partly built:** every action is built and checked, and the emulator installs on the phone's first boot, which needs network. Sleep saves the emulator's state first, because it's a nested machine. No emulator has run inside a server VM yet.