Skip to main content

Android Device Manager Python

Android Device Manager is a Python library for creating, launching, and managing Android emulators (AVDs) programmatically.

PyPI - Version CI codecov Docs License

📖 Table of Contents


🚀 Features

📦 AVD Management

  • Create AVDs programmatically from system images
  • List existing AVDs and check availability
  • Delete AVDs cleanly
  • Validate AVD names according to Android rules
  • Force recreation of AVDs with force=True

▶️ Emulator Control

  • Start emulators in headless or windowed mode
  • Automatic port allocation for multiple running instances
  • Stop emulators gracefully or force-kill when needed
  • Custom emulator options via EmulatorConfiguration

📡 ADB Integration

  • Execute adb commands directly from Python
  • Install APKs and manage applications (install/uninstall)
  • List installed packages and check if a package is installed
  • Push and pull files between host and device
  • Access logcat output and clear logs

🐍 Requirements

  • Python: 3.10 or higher
  • Android SDK: Latest version recommended
  • System Resources: Sufficient RAM and storage for emulators

📦 Installation

pip install android-device-manager

🚧 From Source

git clone https://github.com/jwoirhaye/python-android-avd-manager-python.git
cd python-android-avd-manager
pip install -e .

⚡ Quickstart

With everything set up, here’s the simplest way to create and run an emulator:

from android_device_manager import AndroidDevice , AndroidProp
from android_device_manager.avd import AVDConfiguration
from android_device_manager.emulator import EmulatorConfiguration

# Define AVD configuration
avd_config = AVDConfiguration(
    name="quickstart_avd",
    package="system-images;android-34;google_apis;x86_64"
)

# Define Emulator configuration
emulator_config = EmulatorConfiguration(
    no_window=True  # Run emulator in headless mode
)

# Create and run the device using context manager
with AndroidDevice(avd_config, emulator_config) as device:
    print(f"Device {device.name} is running!")
    print("Android Version:", device.get_prop(AndroidProp.ANDROID_VERSION))
    # Or
    #print("Android Version:", device.get_prop("ro.build.version.release"))

📜 License

This project is licensed under the MIT License.


📧 Support

  • 🐛 Issues: GitHub Issues
  • 📬 Contact: [jerem.woirhaye@gmail.com]

Metadata

Release files for android-device-manager 1.1.0

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

Source distribution (sdist)

Source distribution for android-device-manager 1.1.0
File Size Uploaded Provenance Actions
android_device_manager-1.1.0.tar.gz 15.9 kB Without provenance Details for android_device_manager-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for android-device-manager 1.1.0
File Interpreter ABI Platform Actions
android_device_manager-1.1.0-py3-none-any.whl Python 3 none any Details for android_device_manager-1.1.0-py3-none-any.whl

Total release size: 39.4 kB

Release files / android_device_manager-1.1.0.tar.gz

Download URL android_device_manager-1.1.0.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
91f2f34f13d6e964f06115976085a4b8743a5382e359dfdb20109c297d65bf0a
BLAKE2b-256 checksum
How to use checksums
6461e8b695ae398deea9ac30ec9f53beb3ad43da7df841343bf719950842c9ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

Release files / android_device_manager-1.1.0-py3-none-any.whl

Download URL android_device_manager-1.1.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb168dbdfc5b91d1cffbd76170fa9c49fa5d4ea448e91deaed5bb24bb003d3ff
BLAKE2b-256 checksum
How to use checksums
5e4a0ace4a25293262f975d4fb867e76d998380fd064d590f6fddbed1ed04f8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.13

Security for android-device-manager 1.1.0

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.

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