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.2.tar.gz (6.6 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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dc_adb_images-0.0.2.tar.gz
  • Upload date:
  • Size: 6.6 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.2.tar.gz
Algorithm Hash digest
SHA256 59f5c24c232bcdc3d7b5d12f7d6d39a87090e35e382748bb260523b0e563e1e1
MD5 fa6823c18783daac3ea6b8fc751a60ef
BLAKE2b-256 651692aa51bc4a95a9ddb4d7a834784e0a9431f6f2ede75d4dc9944933bef00e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dc_adb_images-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0538dd685694554bf470fc9a27888d20e110c2332c8bc4be6ff0bfe1714d2454
MD5 1533d3c85ec25e64a0cc72c422bf8660
BLAKE2b-256 4118df3aa82fb3ec5faf9d36212aafe934b22246a2c501e30573beeac2249a48

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