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.11+ installed on your system
- Android Debug Bridge (adb) installed and configured
- Android device with:
- Developer options enabled
- USB debugging enabled
- Connected via USB or on the same network (for wireless debugging)
Installation
Droidrun is installed usinguv
, a fast Python package installer and resolver.
Install uv (if not already installed):
If you only need specific providers, you can install just those. For example,
uv tool install 'droidrun[google,openai]'
installs only Google Gemini and OpenAI support.Setup the Portal APK
Droidrun requires the Portal app to be installed on your Android device for device control. The Portal app provides accessibility services that expose the UI accessibility tree, enabling the agent to see and interact with UI elements.- Downloads the latest Portal APK
- Installs it on your connected device
- Enables the accessibility service
Test Connection
Verify that Droidrun can communicate with your device:Configure Your LLM
Droidrun uses a configuration-driven approach. On first run, Droidrun creates aconfig.yaml
file with default settings. You’ll need to set your API key for your chosen LLM provider.
Set your API key:
Run Your First Command via CLI
Now you’re ready to control your device with natural language:--provider
- LLM provider (GoogleGenAI, OpenAI, Anthropic, etc.)--model
- Model name (models/gemini-2.5-pro, gpt-4o, etc.)--vision
- Enable screenshot processing--reasoning
- Enable multi-agent planning mode--steps N
- Maximum execution steps (default: 15)--debug
- Enable detailed logging
Create a Simple Agent via Script
For complex automation or integration into your Python projects, create a script:Next Steps
Now that you’ve got Droidrun running, explore these topics:- Walk through a Guide
- Learn about Agent Architecture
- Costuomize the Agent Configuration System
- Guide the agent with App Cards