Android Control
Understanding Android device control in DroidRun
📱 Android Control
DroidRun provides powerful capabilities for controlling and interacting with Android devices. This guide explains the available interactions and best practices.
🔌 Device Connection
Before controlling a device, you need to establish a connection:
Enable USB Debugging
On your Android device, go to Settings → About phone and tap Build number 7 times to enable Developer options. Then go to Settings → Developer options and enable USB debugging.
Connect via USB
Connect your device to your computer with a USB cable and authorize the computer on your device when prompted.
Verify Connection
Wireless Connection
For a cable-free experience:
🖱️ UI Interaction
DroidRun can simulate various user interactions with the device:
Create agent
Tapping
Swiping
Text Input
Key Presses
📊 UI Analysis
DroidRun can analyze the current state of the device UI:
Screenshots
Identifying UI Elements
📱 App Management
DroidRun can launch and interact with apps:
Starting Apps
Listing Installed Apps
💡 Best Practices
1. Prefer Natural Language Commands
The CLI allows you to use natural language instead of precise coordinates:
2. Verify Screen State
Before interacting with UI elements, verify the current screen:
3. Handle Dynamic Content
UI elements may change position. Use relative references when possible:
🛠️ Advanced Techniques
Custom Automation Scripts
For complex scenarios, create custom Python scripts:
Multi-Device Control
DroidRun supports controlling multiple devices: