adbutils
Pure Python Adb Library
What it is and what it does
adbutils is a pure Python implementation of the ADB protocol that lets you programmatically control Android devices connected via USB or network. It wraps the low-level ADB protocol in a high-level API, allowing you to list devices, run shell commands, transfer files, take screenshots, and manage port forwarding—all without shelling out to the system `adb` command.
The library is built on top of socket communication with an ADB server and handles the protocol details internally. It depends on requests for HTTP operations, Pillow for image handling in screenshots, retry2 for connection resilience, and deprecation for API lifecycle management. It's actively maintained, supports Python 3.8 through 3.10, and has no known security vulnerabilities.
Use it for:
- Automate testing workflows by running shell commands and capturing output from connected Android devices
- Build mobile device farms or CI/CD pipelines that need to control multiple Android devices programmatically
- Transfer test data or APKs to devices and retrieve logs or screenshots for test reporting
- Monitor device properties and state changes in real-time without spawning external processes
- Implement custom device management tools that integrate ADB functionality into larger Python applications
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
adbutils is a Python library that communicates with Android devices through the ADB (Android Debug Bridge) protocol, enabling shell commands, file transfers, screenshots, and device management from Python code.
Yes, if you need to automate Android device control from Python. The library is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers a clean Python API over the ADB protocol. Medium install friction from its dependencies is acceptable for most use cases. Not necessary if you only need occasional manual ADB commands.
Install
adbutils on PyPI
pip
pip install adbutilsuv
uv add adbutilspoetry
poetry add adbutilsInstalling adbutils
Before you install
Medium install friction due to 4 runtime dependencies (requests, deprecation, retry2, Pillow) and platform-specific wheels for macOS, Linux, and Windows. Actively maintained with recent commits and no known vulnerabilities.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
pip install adbutils
from adbutils import adb
# Connect to ADB server and list devices
for device in adb.device_list():
print(device.serial)
# Execute shell command on a device
d = adb.device()
output = d.shell("getprop ro.serialno")
print(output)
Requires Python 3.8 or later and a running ADB server (typically started via `adb start-server` or bundled with Android SDK).
Verify before relying
- Whether Pillow is required for all use cases or only for screenshot functionality
- Whether the package works with all ADB server versions or has specific compatibility constraints
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 4 — requests, deprecation, retry2, Pillow |
| Maintenance | actively maintained — 275 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 642,903/month — #5,610 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: adbutils-2.12.0-py3-none-macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl; adbutils-2.12.0-py3-none-manylinux1_x86_64.whl; adbutils-2.12.0-py3-none-win32.whl; adbutils-2.12.0-py3-none-win_amd64.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
adb-shellImplements ADB (Android Debug Bridge) shell and…
permissive · top 15,000 on PyPI
pure-python-adbPure-Python ADB client that communicates with…
permissive · top 15,000 on PyPI
androidtvremote2A Python library for controlling Android TV…
permissive · top 15,000 on PyPI
uiautomatorPython wrapper for Android's uiautomator…
permissive · top 15,000 on PyPI
uiautomator2Automates Android device interactions from…
permissive · top 15,000 on PyPI
alibabacloud-adb20211201Provides a Python client library for…
permissive · top 5,000 on PyPI
pushbullet.pyA Python client library for the Pushbullet API…
permissive · top 15,000 on PyPI
moblyMobly is a Python test framework designed to…
permissive · top 15,000 on PyPI
brainstemProvides Python bindings to control and…
unclear · top 15,000 on PyPI
uart-devicesProvides a Python interface to interact with…
permissive · top 15,000 on PyPI