skillfed

adbutils

Pure Python Adb Library

adbutils v2.12.0 642.9K downloads/30d#5,610 on PyPI1,071
Permissive license MIT Active released

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 adbutils

uv

uv add adbutils

poetry

poetry add adbutils

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Tags

adb python libraryandroid device control pythonadb shell commandsandroid file transfer pythondevice automation adb
android-automationadb-protocoldevice-testing

More Python Modules packages