Quickstart
Get up and running with DroidRun quickly and effectively
This guide will help you get DroidRun installed and running quickly, controlling your Android device through natural language in minutes.
π Prerequisites
Before installing DroidRun, ensure you have:
- Python 3.10+ installed on your system
- ADB (Android Debug Bridge) installed and configured
- Download Android SDK Platform Tools
- Make sure
adb
is in your PATH
- Android device with:
- Developer options enabled
- USB debugging enabled
- Connected via USB or on the same network (for wireless debugging)
- DroidRun Portal app installed on your Android device
- Available from the DroidRun Portal repository
- Installation instructions are provided in the Install DroidRun Portal App section below
π Installation Methods
Method 1: Install from PyPI (Recommended)
The simplest way to install DroidRun is using pip:
Method 2: Install from Source
To install the latest development version:
Using a virtual environment helps isolate DroidRunβs dependencies from your global Python environment, preventing potential conflicts with other packages.
π API Key Setup
DroidRun requires an API key from at least one of these LLM providers:
OpenAI
- Sign up for an account at OpenAI
- Create an API key in your account dashboard
- Set the environment variable:
Anthropic
- Sign up for an account at Anthropic
- Get your API key
- Set the environment variable:
Google Gemini
- Sign up for Google AI Studio
- Create an API key
- Set the environment variable:
For convenience, create a .env
file in your project directory:
Then load it with:
π± Device Configuration
Verify ADB Installation
Ensure ADB is properly installed:
Connect to Device
Connect your device via USB or Wi-Fi:
For Wireless Debugging
Make sure:
- USB debugging is enabled on your device
- Your device appears in the list when running
droidrun devices
π¦ Install DroidRun Portal App
DroidRun requires the DroidRun Portal app to be installed on your Android device:
- Download the DroidRun Portal APK from the DroidRun Portal repository
- Use DroidRun to install the portal app:
Alternatively, you can use ADB to install it manually:
After installation, ensure the DroidRun Portal app is running on your device. The app provides the necessary interface for DroidRun to control your Android device through natural language commands.
π» Run Your First Command
Letβs run a simple command to test everything:
βοΈ Command Options
DroidRun CLI supports several options:
π Create a Simple Script
For more complex automation, create a Python script:
Save this as test_droidrun.py
and run:
π Vision Capabilities
When vision is enabled:
- The agent can take and analyze screenshots
- Ideal for UI-based tasks that require visual context
π Token Usage Tracking
DroidRun tracks token usage for all LLM calls:
- Total prompt tokens
- Total completion tokens
- Number of API calls
This helps you optimize your automation tasks and manage costs effectively.
π§ Common Installation Issues
ADB Not Found
Ensure ADB is in your PATH or add it:
Device Not Detected
- Check that USB debugging is enabled on your device
- Try a different USB cable or port
- For wireless debugging, ensure device and computer are on the same network
API Key Issues
- Verify youβve correctly set the environment variable
- Ensure your API key is valid and has not expired
- Check for whitespace or extra characters in your API key
β Verify Installation
Verify DroidRun is installed correctly:
π Next Steps
Now that youβve got DroidRun running, you can:
- Learn about the ReAct agent system
- Discover all Android interactions