skillfed

adb-shell

A Python implementation of ADB with shell and FileSync functionality.

adb-shell v0.4.4 128.4K downloads/30d#11,712 on PyPI606
Permissive license DORMANT released

What it is and what it does

adb-shell is a pure-Python implementation of the Android Debug Bridge protocol, allowing you to connect to and control Android devices programmatically from Python code. It supports both TCP connections (over network) and USB connections, and implements both the shell command interface and the FileSync protocol for file transfer. The package originated from Google's python-adb project and provides authentication via RSA keys.

The library is used primarily for automation, testing, and device management workflows where you need to execute shell commands on Android devices or transfer files without relying on the official ADB command-line tool. It has no runtime dependencies in its base form, though optional async and USB support can be added via extras. The project is dormant but stable, with no known security vulnerabilities.

Use it for:

  • Automate Android device testing by executing shell commands and capturing output programmatically
  • Build device management tools that control multiple Android devices over a network
  • Transfer files to and from Android devices as part of CI/CD or deployment pipelines
  • Integrate Android device control into Python-based monitoring or orchestration systems

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements ADB (Android Debug Bridge) shell and FileSync protocol in Python, enabling programmatic communication with Android devices over TCP or USB.

Yes, with conditions. The package is stable, has no known vulnerabilities, and carries a permissive license. However, it is dormant (last release over a year ago), so install only if you need ADB protocol support in Python and can tolerate lack of active maintenance. High install friction (source-only distribution) is a minor friction point but not a blocker. Suitable for automation and testing workflows where you control the Android ecosystem.

Install

adb-shell on PyPI

pip

pip install adb-shell

uv

uv add adb-shell

poetry

poetry add adb-shell

Installing adb-shell

Before you install

High install friction: the package ships as a source distribution with no prebuilt wheels in the standard index. Maintenance is dormant—last release was over a year ago (2023-09-01) and the last commit was 2024-10-29, indicating the project is not actively developed but remains available.

License in practice

Licensed under Apache License 2.0 (permissive), which allows commercial and private use with minimal restrictions, making it safe to adopt from a licensing perspective.

Quickstart

from adb_shell.adb_device import AdbDeviceTcp
from adb_shell.auth.sign_pythonrsa import PythonRSASigner

device = AdbDeviceTcp('192.168.0.222', 5555)
device.connect(rsa_keys=[signer])
response = device.shell('echo TEST')

Requires RSA key pair for authentication; USB support requires optional installation via pip install adb-shell[usb]; async support requires Python 3.7+ and pip install adb-shell[async].

Verify before relying

  • Current compatibility with modern Android versions and ADB protocol revisions
  • Whether dormant status affects reliability or security posture in active use
  • Actual Python version support despite classifiers listing Python 2 and 3

Package facts

License not declared (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 1,078 days since the last release
Last repo commit
First released
Downloads 128,383/month — #11,712 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: adb_shell-0.4.4.tar.gz

Keywords: adb, android

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 3

Tags

adb shell pythonandroid debug bridge libraryadb device communicationandroid device control pythonadb protocol implementationadb tcp usb connectionandroid shell commands python
android-automationdevice-controladb-protocol

More Networking packages