This guide will help you get Mobilerun installed and running quickly, controlling your Android device through natural language in minutes.
This is the open source Framework. It runs locally on your machine against your own Android device over adb, and it uses your own LLM provider key such as
GOOGLE_API_KEY or OPENAI_API_KEY. If you would rather use hosted devices and a managed agent with no local setup, use the Cloud Quickstart instead.Prerequisites
Before installing Mobilerun, ensure you have:- Python 3.11, 3.12, or 3.13 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
Mobilerun is installed usinguv, a fast Python package installer and resolver.
Install uv (if not already installed):
Google Gemini, OpenAI, xAI, DeepSeek, MiniMax, ZAI, Ollama, and OpenRouter support is included by default. Anthropic requires the optional extra: use
uv tool install 'mobilerun[anthropic]' for CLI-only use or uv pip install 'mobilerun[anthropic]' in a Python project.Set Up the Portal APK (Recommended)
Portal is the recommended way to control Android devices. It improves text entry and helps Mobilerun read the screen reliably. To use Android through ADB without Portal, see Device Setup.- Downloads the Portal APK compatible with this Mobilerun version
- Installs it on your connected device and grants the Android permissions allowed during installation
- Attempts to enable the accessibility service, opening Settings if manual action is required
mobilerun setup --latest to opt into the newest Portal release, or mobilerun setup --portal-version <version> to pin a specific release.
Test Connection
Verify that Portal is available:mobilerun ping checks Portal. For an ADB-only setup, run adb devices -l instead.Configure Your LLM
Run the configure wizard to choose your provider, auth method (API key or OAuth), and model:Run Your First Command via CLI
Now you’re ready to control your device with natural language:--provider- LLM provider (GoogleGenAI, OpenAI, XAI, Anthropic, etc.)--model- Model name (gemini-3.7-flash, gpt-5.5, etc.); pass it together with--provider--vision- Enable screenshot processing--vision-only- Use screenshots without an accessibility tree--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 Mobilerun running, explore these topics:- Walk through a Guide
- Learn about Agent Architecture
- Customize the Agent Configuration System
- Guide the agent with App Cards