droidbot  by honeynet

Android test input generator

created 10 years ago
893 stars

Top 41.4% on sourcepulse

GitHubView on GitHub
Project Summary

DroidBot is a lightweight, GUI-guided test input generator for Android applications, designed to increase test coverage and speed up testing without requiring system modification or app instrumentation. It targets developers and researchers seeking automated, intelligent testing solutions for Android apps, offering advantages over random input generators like Monkey by basing events on a GUI model and allowing for scripted customization.

How It Works

DroidBot generates test inputs by modeling the application's GUI, allowing for more intelligent event generation than purely random approaches. It can also be programmed with custom scripts for specific UI states and can optionally use OpenCV for visual analysis (-cv mode) when accessibility services fail to capture UI hierarchies, such as in games. This GUI-centric approach enables the generation of UI transition graphs (UTGs) for deeper analysis.

Quick Start & Requirements

  • Install via pip: git clone https://github.com/honeynet/droidbot.git && cd droidbot/ && pip install -e .
  • Prerequisites: Python (2 or 3), Java, Android SDK (platform-tools added to PATH recommended), OpenCV-Python (for cv mode).
  • Usage: droidbot -a <path_to_apk> -o output_dir
  • Requires an Android device or emulator connected via ADB.
  • Accessibility service may need to be enabled on the device for UI hierarchy access.
  • Official documentation and blog posts are available.

Highlighted Details

  • Generates UI transition graphs (UTGs) for analysis.
  • Does not require app instrumentation or system modification.
  • Supports scripted input customization via JSON files.
  • Offers a visual analysis mode (-cv) for apps that don't expose UI hierarchies via accessibility.

Maintenance & Community

The project acknowledges contributions from AndroidViewClient and Androguard, and was supported by Google Summer of Code. Further details on recent work, including LLM integration for intelligent task automation, are mentioned.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. This requires further investigation for commercial use or closed-source linking.

Limitations & Caveats

The README mentions that accessibility services might need manual activation on some devices. It also notes that the -cv mode is useful for apps where accessibility-based UI hierarchy retrieval fails, implying potential limitations with certain application types like games.

Health Check
Last commit

11 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
33 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.