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-0.0.6.tar.gz (4.9 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.6-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: adbauto-0.0.6.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for adbauto-0.0.6.tar.gz
Algorithm Hash digest
SHA256 1e555c39451f40e274062f8e876b158dbc2b9be8e095c9bf06c5728ee68416e9
MD5 546609d9057f149d990149171404e8c5
BLAKE2b-256 7fe013864d0b46d96c2f0fa3ce13111afc9874d398f14aa433a894ccf2c96f98

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for adbauto-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4b82aca4f45fc019de93b8108bc2bfe4a52cdc4084b9e0cb98ef552b97b067e5
MD5 bc9dcba002a0d9b93f6feafa266de862
BLAKE2b-256 b953a1356b688c948a58a08a2a9ad045be36952e5222b171d6941da69da4fcb3

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