Rust Droid
A powerful and fluent UI automation framework for Android, written in Rust. Inspired by popular tools like Airtest and uiautomator2.
rust-droid allows you to write simple, readable scripts to automate actions on Android devices using image recognition.
Features
- Fluent Builder API: Chain methods together to create readable and maintainable automation scripts.
- Image Recognition: Find and interact with UI elements on the screen using template matching.
- Core Device Actions: Supports tap, swipe, text input, key events, and screenshots.
- Robust Connection: Automatically finds and connects to an available device via ADB.
- Cross-Platform: Works on Windows, macOS, and Linux.
Prerequisites
USB Debugging: Enable "USB debugging" in the "Developer options" on your Android device.
Quick Start
Add rust-droid to your Cargo.toml:
[]
= "0.1.0"
= "1.0"
= "0.11"
Here is a simple script that finds the "Settings" icon on the home screen, taps it, waits for the page to load, and takes a screenshot.
// examples/simple_script.rs
use ;
use PathBuf;
use Duration;
Contributing
Contributions are welcome! Please feel free to open an issue or submit a pull request.
License
This project is licensed under the Apache-2.0 License.