Skip to main content

ADB-based image and text automation utilities for Android devices

Project description

📸 adb_images Module

The adb_images module provides advanced image and text automation features using ADB, OpenCV, and Tesseract OCR.
It allows developers to capture screenshots, match UI elements visually, and interact with text on the screen.


✨ Features

  • Capture device screenshots
  • Match and locate images on screen
  • Tap or long‑press on matched images
  • Preprocess screenshots for OCR
  • Extract and verify text using Tesseract
  • Tap on recognized text safely with retry protection

📚 Installation

pip install dc-adb-images

🚀 Usage Example

from adb_images.image_controller import ImageController
from adb_images.image_matcher import ImageMatcher
from adb_images.text_recognizer import TextRecognizer
from adb_images.text_tapper import TextTapper

# Initialize controllers
controller = ImageController(device_id="emulator-5554")
matcher = ImageMatcher(device_id="emulator-5554")
recognizer = TextRecognizer(device_id="emulator-5554", dir_path=r"C:\Config\Tesseract-OCR\tesseract.exe")
tapper = TextTapper(device_id="emulator-5554")

# Capture a screenshot
screenshot_path = controller.capture_screen()
print(f"Screenshot saved at: {screenshot_path}")

# Find and tap an image
coords = matcher.match_image("assets/target_button.png")
if coords:
    matcher.tap_point(*coords)

# Recognize and tap text
if recognizer.process_text("Login"):
    print("Login button tapped successfully")

# Tap text with preprocessing and safe retries
if tapper.process_text("Continue"):
    print("Continue tapped safely")

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

dc_adb_images-0.0.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

dc_adb_images-0.0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file dc_adb_images-0.0.1.tar.gz.

File metadata

  • Download URL: dc_adb_images-0.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for dc_adb_images-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ed9c81a1155e9c25e21510c9b402c85c3fb8c79deddcc786e3f9c2dba96723e6
MD5 2f6526ab826627004156cb1d4f30391c
BLAKE2b-256 7845424fab7857d214dfd1d0f30bddc981e7d485964b8effca188549ae2a61c1

See more details on using hashes here.

File details

Details for the file dc_adb_images-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dc_adb_images-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for dc_adb_images-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 374b99b1502605af81771565170f257214af42731f8e8649461c22f42cdf796f
MD5 f5a23158ecd9b78af492cc029eec13d3
BLAKE2b-256 2027a706f4ac9b10b48a953c2f42260c9ace4cd6c93379c8235518e6323ded7d

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