Home » Phone-harness open-source project enables remote phone control via code

Phone-harness open-source project enables remote phone control via code

By

–

Phone-harness open-source project enables remote phone control via code

What Phone Harness Is and the Problem It Solves

Phone Harness is an open-source Python project that enables AI agents to control a smartphone remotely without requiring any software installation on the device itself. The project addresses the challenge of integrating AI agents with mobile interfaces, where traditional automation tools often rely on platform-specific APIs, jailbreaking, or device-level modifications. By leveraging existing screen mirroring and debugging protocols, Phone Harness allows agents to perceive the phone’s screen, interpret on-screen content, and simulate user interactions such as tapping, typing, and swiping — all while keeping the phone in its original, unmodified state.

Why It Is Gaining Traction

The project has attracted attention from developers exploring AI agent capabilities, particularly as large language models become more adept at planning and executing multi-step tasks. Phone Harness lowers the barrier to testing agent behavior in real-world mobile environments by supporting both iPhone (via Mac’s iPhone Mirroring) and Android (via adb) without requiring root access, developer mode setup on the phone, or additional apps. Its compatibility with widely used agent frameworks like Claude Code and Codex — where users can initiate setup by sending a prompt — makes it accessible to developers already working with these tools. The availability of a hosted cloud option, offering temporary access to real Android devices with phone numbers and 2FA support, further reduces the friction for iPhone users who want to test Android-based workflows.

How It Works at a High Level

Phone Harness operates differently depending on the platform but uses a consistent set of helper functions for agents. On iPhone, it uses Apple’s iPhone Mirroring feature to display the phone’s screen as a window on a Mac. The system captures this window, applies optical character recognition (OCR) using Apple’s Vision framework to extract text and its screen coordinates, and sends human-interface device (HID) events to simulate taps, swipes, and keystrokes. On Android, it relies on the Android Debug Bridge (adb) to capture screen images via screencap, read text from the accessibility tree, and inject input events using the input command. The same Python-based helpers are used across both platforms, with users selecting the default platform via a configuration command. Setup involves guiding the user through granting necessary permissions — such as Accessibility and Screen Recording on iPhone, or enabling developer options and USB debugging on Android — after which the agent can begin interacting with the device.

Who It Is For and Real Use Cases

Phone Harness is aimed at developers, researchers, and hobbyists building or experimenting with AI agents that need to interact with mobile applications. It is particularly useful for testing how agents navigate apps, complete forms, or perform tasks that require real-world mobile interactions — such as ride-hailing, messaging, or shopping — without relying on emulators or simulated environments. The project’s README includes a demo where an agent is tasked with booking a ride to a coffee shop using the phone’s current location, illustrating its potential for end-to-end task automation. Because it works with real devices and carrier-connected numbers (especially in the cloud offering), it supports scenarios involving SMS verification, two-factor authentication, and location-based services that are difficult to replicate in emulated environments.

Honest Caveats and Limitations

Phone Harness is currently maintained by a single developer in their personal time, as noted in the project’s sponsorship section. This means its development pace, feature completeness, and long-term support depend on individual availability. The project acknowledges several technical limitations: iPhone mirroring pauses when the device is locked, requiring manual unlock to resume; Android devices with PIN or pattern locks also require user intervention to unlock before automation can proceed. OCR-based text recognition means that unlabeled icons or graphical controls without accessible labels may not be interpretable by the agent unless paired with a vision-capable model. The system does not support multi-touch gestures, camera access, or biometric authentication flows like Face ID or fingerprint unlock. Additionally, DRM-protected video content appears black when captured due to platform-level security restrictions. Crucially, the initial connection and setup of the phone — whether via mirroring, adb, or cloud service — remains the user’s responsibility and cannot be fully automated.

Source: https://github.com/ShawnPana/phone-harness

Get breaking stories first on our Telegram channel.

More stories by

Most read

AI Tools

Artificial Intelligence

Business

World News