Skip to main content

A Python ADB automation library for Android emulators.

Project description

adbauto

ADB-based automation for Android emulators like LDPlayer

adbauto is a Python library that simplifies automation for Android games and apps running in emulators. It provides tools to connect to an emulator, capture screenshots, match UI elements visually, and simulate input like taps and scrolls.


🚀 Features

  • Connect to LDPlayer or other Android emulators via ADB
  • Capture screenshots directly from the device
  • Locate UI elements via OpenCV template matching
  • Simulate taps and scrolling actions
  • Designed for building automation scripts for games

📦 Installation

pip install adbauto

Note: Make sure ADB is installed and available in your system's PATH.


🧪 Example Usage

from adbauto import adb, screen, input

# Connect to emulator
device_id = adb.get_ldplayer_device()

# Take a screenshot
img = screen.capture_screenshot(device_id)

# Find a button on screen
center = screen.find_template(img, "button_template.png")

# Tap it if found
if center:
    input.tap(device_id, *center)

📂 Project Structure

adbauto/
├── adb.py       # ADB device connection and shell utilities
├── screen.py    # Screenshot capture and template matching (OpenCV)
├── input.py     # Tap and scroll input simulation
└── __init__.py  # Module exports

✅ Requirements

  • Python 3.8+
  • ADB installed and on PATH
  • opencv-python
  • numpy

📃 License

MIT License © Thomas Knoops

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adbauto-1.0.8.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adbauto-1.0.8-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

Details for the file adbauto-1.0.8.tar.gz.

File metadata

  • Download URL: adbauto-1.0.8.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for adbauto-1.0.8.tar.gz
Algorithm Hash digest
SHA256 fc525eb84dee3ef83fcae7838c4aa2ce9b7f291a9b90de697ee091663c19d1c2
MD5 134a3fb407451120fb04907b48c4add6
BLAKE2b-256 e8c8566913830347a7c9a3570f230e2e796a723f209c1a72cf05fdcbe2063682

See more details on using hashes here.

File details

Details for the file adbauto-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: adbauto-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for adbauto-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 402d8a3104f6332a3ae7bd2de6562aed739ea6cc5927891c162dc3bd70004afd
MD5 5d6978377d65a42e80f6126aaa495cb1
BLAKE2b-256 04d0e4795286fc104612be7137b8782259c9c857ec0c3085f48c54a68177a669

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page