Skip to main content
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

Python 3.14 is not yet supported. Installing Mobilerun on Python 3.14 will silently fall back to an older version (e.g. 0.3.9) due to a dependency that does not yet support Python 3.14. Use Python 3.11, 3.12, or 3.13.
Before installing Mobilerun, ensure you have:
  1. Python 3.11, 3.12, or 3.13 installed on your system
  2. Android Debug Bridge (adb) installed and configured
  3. Android device with:

Installation

Mobilerun is installed using uv, a fast Python package installer and resolver. Install uv (if not already installed):
Choose your installation method: For CLI usage only:
For CLI + Python code integration:
Most LLM providers (Google Gemini, OpenAI, Ollama, OpenRouter) are included by default. For additional providers, install extras: uv tool install 'mobilerun[anthropic,deepseek]'.

Set Up the Portal APK

Mobilerun 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.
This command automatically:
  1. Downloads the latest Portal APK
  2. Installs it on your connected device
  3. Enables the accessibility service

Test Connection

Verify that Mobilerun can communicate with your device:
If successful, you’ll see:

Configure Your LLM

Run the configure wizard to choose your provider, auth method (API key or OAuth), and model:
Alternatively, you can set an API key as an environment variable:

Run Your First Command via CLI

Now you’re ready to control your device with natural language:
Common CLI flags:
  • --provider - LLM provider (GoogleGenAI, OpenAI, Anthropic, etc.)
  • --model - Model name (gemini-3.1-flash-lite-preview, 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 Mobilerun running, explore these topics: