Skip to main content

AndroidCtl

AndroidCtl is a local Android automation toolkit for developer and agent workflows. It provides a host CLI, a host daemon, shared Python contracts, and an Android device agent that can observe the current UI, expose stable element refs, run actions, wait for screen changes, and collect artifacts such as screenshots.

The usual loop is:

androidctl observe
androidctl tap n3
androidctl wait --until idle
androidctl observe

Repository Layout

  • contracts/: shared Python wire models and command catalog.
  • androidctl/: public CLI, command parsing, daemon discovery, and XML output.
  • androidctld/: host daemon, runtime state, command execution, and device RPC.
  • android/: Kotlin Android device agent with a foreground RPC service and Accessibility service.

Requirements

  • Python 3.10.
  • Android SDK platform tools, especially adb.
  • An Android 11+ device or emulator with USB debugging enabled.

Installing skills

For agents that support skills, ask your agent to install the AndroidCtl skill:

Install this skill: https://github.com/Azure99/androidctl/tree/main/skills/androidctl

Install From PyPI

Install the released host tools with the single public distribution:

pip install androidctl
androidctl --help

The androidctl distribution includes the CLI, host daemon, and shared Python contracts. Do not install separate androidctld or androidctl-contracts distributions.

Install From Source

Create a local Python environment and install AndroidCtl in editable mode:

conda create -p ./.conda python=3.10
./.conda/bin/python -m pip install -U pip
./.conda/bin/python -m pip install -e ".[dev]"
export PATH="$PWD/.conda/bin:$PATH"

Check the CLI:

androidctl --version
androidctl --help

Build The Android Agent

Released Python packages include the Android agent APK used by setup. When working from source and testing a locally built debug agent, build a debug APK and pass it to setup with --apk:

(cd android && ./gradlew :app:assembleDebug)
androidctl setup --adb --apk android/app/build/outputs/apk/debug/app-debug.apk

The debug APK is created at:

android/app/build/outputs/apk/debug/app-debug.apk

Prepare A Device

Connect a device with USB debugging enabled and confirm that ADB can see it:

adb devices

Run the onboarding helper:

androidctl setup --adb

If more than one device is connected, pass the ADB serial:

androidctl setup --adb --serial <adb-serial>

Setup installs the Android agent, starts its foreground RPC server, provisions a device token, attempts to enable the AndroidCtl Accessibility service, and checks that the daemon can talk to the device. If Android blocks automatic Accessibility enablement, follow the manual instructions printed by the command and rerun setup.

Optional Wireless ADB

Pair and connect from the CLI if you prefer Android wireless debugging:

androidctl adb-pair --pair <host:pair-port> --code <pairing-code>
androidctl adb-connect <host:connect-port>
androidctl setup --adb --serial <host:connect-port>

Basic Usage

Observe the current screen:

androidctl observe

The output is XML intended for scripts and agents. Interactive elements receive refs such as n1, n2, and n3; use those refs in later commands.

Common commands:

androidctl list-apps
androidctl open app:com.android.settings
androidctl open https://example.com
androidctl tap n3
androidctl long-tap n3
androidctl focus n4
androidctl type n4 "hello from androidctl"
androidctl submit n4
androidctl scroll n8 down
androidctl back
androidctl home
androidctl recents
androidctl notifications
androidctl wait --until screen-change
androidctl wait --until gone --ref n3
androidctl wait --until text-present --text "Done"
androidctl wait --until app --app com.android.settings
androidctl screenshot
androidctl close

Commands use the current workspace by default. For a dedicated runtime state directory, pass --workspace-root <path> or set ANDROIDCTL_WORKSPACE_ROOT.

Development

Run the default verification suite from the repository root:

task test
task lint
task quality

Useful focused commands:

task androidctl:test
task androidctld:test
task contracts:test
task android:test
task format
task --list

Source development additionally requires Conda, JDK 17 or newer for Android Gradle builds, and task for repository shortcuts.

Process-level CLI checks are available through:

task test:extended

Metadata

Release files for androidctl 0.1.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 androidctl 0.1.1
File Size Uploaded Provenance
androidctl-0.1.1.tar.gz 1.1 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 2.2 MB

Release files / androidctl-0.1.1.tar.gz

Download URL androidctl-0.1.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
ba594a628663bd3f50c1779ecb4e7e94e687b6c8b70567031a87427fa3765ec4
BLAKE2b-256 checksum
How to use checksums
0dc28ac2927fab7226337383c0340fc9c37377b1274606ca470ec49c5311139f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Release files / androidctl-0.1.1-py3-none-any.whl

Download URL androidctl-0.1.1-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ffc7c4e8db37b9af25d17a00796b05bcea31ce3269e72e4be3707d1f670a9a80
BLAKE2b-256 checksum
How to use checksums
cb56b161a1ffed6bd9f85c0f17ed970e24c19e23311bfe053160589cf83ffd84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.20

Security for androidctl 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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