📋 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
adbis 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:🔑 API Key Setup
DroidRun supports multiple LLM providers. Set up at least one:OpenAI
- Sign up at OpenAI
- Create an API key
- Set environment variable:
Anthropic
- Sign up at Anthropic
- Get API key
- Set environment variable:
Google Gemini (Default)
- Sign up for Google AI Studio
- Create API key
- Set environment variable:
Ollama (Local)
- Install Ollama
- Pull desired models:
- No API key needed
Deepseek
- Sign up at Deepseek
- Get API key
- Set environment variable:
.env file:
📱 Device Configuration
Verify ADB Installation
Ensure ADB is properly installed:Connect to Device
Connect your device via USB or Wi-Fi:- USB debugging is enabled
- Device appears in
droidrun devices
📦 Install DroidRun Portal App
The DroidRun Portal app provides accessibility services needed for device control:- Download the APK from DroidRun Portal repository
- Install using DroidRun:
- Install the APK
- Enable accessibility service
- Configure necessary permissions
💻 Run Your First Command
Test with these commands:⚙️ Command Options
DroidRun CLI supports various options:📝 Create a Simple Script
For complex automation, create a Python script:🔄 Using LlamaIndex Integration
DroidRun v2 uses LlamaIndex for LLM integration, providing more flexibility:🔎 Vision Capabilities
When vision is enabled:- The agent can take and analyze screenshots
- Ideal for UI-based tasks that require visual context
🕵️ Tracing and Debugging
DroidRun integrates with Arize Phoenix for execution tracing and debugging:Important: Before using tracing, you must start the Phoenix server in a separate terminal:Then enable tracing with the
--tracing flag or enable_tracing=True parameter.- Visual execution flow
- LLM prompts and responses
- Tool execution details
- Error detection
📊 Token Usage Tracking
DroidRun tracks token usage for all LLM calls:- Total prompt tokens
- Total completion tokens
- Number of API calls
🔧 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 DroidAgent system
- Explore planning capabilities
- Discover Android interactions
- Learn about the Portal App