Skip to content

[Tutorial] run Droidrun on Termux #225

@shinnpuru

Description

@shinnpuru

Thanks for the great work of droidrun! Here I have a thorough tutorial of running Droidrun on Termux for totally PC-free usage.

Final Results

https://youtube.com/shorts/4p-he0WAoCg

Droidrun Installation and Configuration

1. Download Termux

You can download it from Google Play.

2. Install proot-distro

Open Termux and enter the following commands.

pkg install proot-distro -y
proot-distro install debian
proot-distro login debian

3. Install uv and python

Once inside the Debian environment, enter the following commands:

wget -qO- https://astral.sh/uv/install.sh | sh
apt install python3 python3-pip

4. Install droidrun

After installing uv, enter the following commands:

uv venv
uv pip install 'droidrun[google,anthropic,openai,deepseek,ollama,dev]'

Enable USB Debugging Mode

1. Enter Settings: Open your phone's Settings.

2. Find "About Phone": Scroll to the bottom and tap About Phone or About Device.

3. Activate Developer Options:

  • Find Build Number or Software Version.
  • Tap Build Number continuously 5-7 times until you see a prompt saying "You are now a developer" or similar.

4. Enter "Developer Options":

  • Return to the main Settings menu, or go to System / Additional Settings.
  • A new option called Developer options should now appear.

5. Enable USB Debugging:

  • Enter Developer options.
  • Find USB debugging and USB debugging (Security settings), then toggle the switches to ON.
  • Tap OK in the confirmation dialog box.

6. Enable Wireless Debugging:

  • In Developer options, find and enable Wireless debugging (or Wi-Fi debugging).
  • Tap on Wireless debugging to enter the detailed settings. This will display the device's IP address, port, and pairing code.

Install and Configure DroidRun-Portal

1. Download and Install DroidRun-Portal:
Download from the official website (https://github.com/droidrun/droidrun-portal).

2. Enable Accessibility Permissions:
Follow the instructions within DroidRun-Portal to enable access. Once the top section turns green, the system is ready.


Usage Guide

1. Pair via Wireless Debugging

Get the 6-digit pairing code and port number displayed on the Wireless debugging screen and run the following command in Termux.

uv run adb pair localhost:port

Important: You must perform this using Split-screen mode. If the Wireless debugging interface goes into the background, the pairing will fail.

2. Connect Droidrun

Enter the following commands in the Debian command line:

uv run droidrun connect localhost:port  # Connect device (replace 'port' with actual port)

3. Operate using LLM

Once connected, enter the following commands in the Debian command line:

export GOOGLE_API_KEY=<your-google-api-key>
uv run droidrun run   --provider GoogleGenAI  --model gemini-2.5-flash   "Open the settings app"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    📨 Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions