Skip to main content

pilotdroid (python)

uiautomator2-compatible Python client over the pilotdroid device agent. Persistent socket, no per-op uiautomator server — ~10x device-op latency vs stock u2 (see repo spike/e2e/RESULTS-*.md).

mcp-name: io.github.mofanx/pilotdroid

Install

pip install ./python            # local checkout
pip install msgpack             # sole runtime dep (auto-installed by pip)

Deploy agent + connect

./agent/scripts/deploy-agent.sh <serial>   # pushes jar, starts app_process agent
adb forward tcp:17932 localabstract:pilotdroid_agent
import pilotdroid
d = pilotdroid.connect(port=17932, serial="ba0d072d")

d(text="OK").click()
d(className="android.widget.TextView", index=1).exists   # property, u2-style
d(scrollable=True).scroll.forward()
d.app_start("com.android.settings"); d.app_current()
d.set_text("你好")        # ACTION_SET_TEXT — unicode works, no IME needed
d.screenshot("shot.jpg", scale=0.5)

Supported selector keys

text, resourceId, description, className, packageName, scrollable, index (AND semantics; index = nth match). xpath is host-side evaluation (xpath-lite, upgraded Track B: one a11y dump + a stdlib-only evaluator per query — text/@id/%fuzzy%///,/ steps, axes child/descendant/ancestor/parent/following-sibling/ preceding-sibling, predicates [@a='v']/contains()/and/or/ [n]/union |, parent()/scroll_to; last()/position()/ text()/non-sibling following:: etc raise NotImplementedError. Not the u2 plugin pipeline).

See compat/u2shim.py docstring for the full covered API surface.

Metadata

Release files for pilotdroid 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pilotdroid 0.8.1
File Size Uploaded Provenance Actions
pilotdroid-0.8.1.tar.gz 52.0 kB With provenance Details for pilotdroid-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pilotdroid 0.8.1
File Interpreter ABI Platform Actions
pilotdroid-0.8.1-py3-none-any.whl Python 3 none any Details for pilotdroid-0.8.1-py3-none-any.whl

Total release size: 91.9 kB

Release files / pilotdroid-0.8.1.tar.gz

Download URL pilotdroid-0.8.1.tar.gz
Size 52.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8e9c189f0eada6b2e4d0fc5bd5a58e3b2d61ee2a4e62f714d6a0d45a8955abb8
BLAKE2b-256 checksum
How to use checksums
d0f48d9a79f56945c67f8a0a54bc6bcd8e7c79cb3e0b6954453f32a46b093ad3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / pilotdroid-0.8.1-py3-none-any.whl

Download URL pilotdroid-0.8.1-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e202f8fe2eeb4013b4d3850aa26372df89fe5e9ee04ca128d8ba8f63ecaa9a7c
BLAKE2b-256 checksum
How to use checksums
1681a1bbf16d5a5810f5b3fd40b593b9efa71c466e0e1aac2b9cf4e08dcb0b1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for pilotdroid 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pilotdroid-0.8.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page