Skip to main content

A Python ADB automation library for Android emulators like LDPlayer

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-0.0.1b1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

adbauto-0.0.1b1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file adbauto-0.0.1b1.tar.gz.

File metadata

  • Download URL: adbauto-0.0.1b1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for adbauto-0.0.1b1.tar.gz
Algorithm Hash digest
SHA256 ef0d21e100ab3d660494b2af2f32478710b37dc6e5a38b38c25a503fd86bb526
MD5 fb136711d811a358efcfaa8d6677ff1c
BLAKE2b-256 2dd674e3e84c486ba33e032b6e43f991381c943387a125cf701b434331fdf8af

See more details on using hashes here.

File details

Details for the file adbauto-0.0.1b1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for adbauto-0.0.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f4b9e3d0ec43be8ba4d9ccbc826442a1aa3ccd5d8f7d315cdf25781dcd2df42
MD5 be3544659b2e482117735e29a411b7c9
BLAKE2b-256 b68209c8224a37f7fc4825fdb8bd1411fc53d552b3c52b8d431b404248160ab5

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