π 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 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:
.env file in your project directory:
π± Device Configuration
Verify ADB Installation
Ensure ADB is properly installed:Connect to Device
Connect your device via USB or Wi-Fi:For Wireless Debugging
- 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:
π» 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: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
π§ 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