Skip to content

📥 Installation

Get from zero to running automation in 10 minutes. No API keys required for core features.

Core (Android):

RequirementVersionHow to Check
Python3.10+python3 --version
ADBAny recentadb --version
Android phone5.0+ (API 21+)Physical device or emulator
USB cableData-capableNot a charge-only cable

iOS (optional, macOS only):

RequirementVersionHow to Check
macOSany recentrequired — iOS setup is Mac-only
Xcodeany recentxcodebuild -version
Node.js18+node --version
Appium 22.xappium --version
Appium XCUITest driver5.x+appium driver list --installed
iPhone or iOS simulatoriOS 14+physical device (trusted, Developer Mode on) or xcrun simctl list devices

Ubuntu/Debian:

Terminal window
sudo apt install android-tools-adb

macOS:

Terminal window
brew install android-platform-tools

Windows:

Download from Android SDK Platform-Tools, extract, and add the folder to your PATH.

Verify ADB is installed:

Terminal window
adb --version
# Android Debug Bridge version 1.0.41

Skip this section if you’re only driving Android devices.

Terminal window
# 1. Install Appium 2
npm install -g appium
# 2. Install the iOS XCUITest driver
appium driver install xcuitest
# 3. Start Appium in a separate terminal
appium --base-path /
# Default: http://127.0.0.1:4723

For real iPhones, you also need to:

  • Trust the Mac from the iPhone (Settings → General → VPN & Device Management)
  • Enable Developer Mode (Settings → Privacy & Security → Developer Mode)
  • Sign WebDriverAgent with your Apple developer team (open the XCUITest driver’s WDA project in Xcode once, pick a team for WebDriverAgentRunner, run it against your device)

Full walk-through with env vars, multi-device config, smoke tests, and troubleshooting: iOS Setup guide →

Terminal window
git clone https://github.com/ghost-in-the-droid/android-agent.git
cd ghost-in-the-droid
# Install in development mode (recommended)
pip install -e .
# Or install dependencies manually
pip install flask requests pyyaml openai

The -e flag installs in editable mode so changes to the source take effect immediately.

Create a .env file by copying the example:

Terminal window
cp .env.example .env

No API keys are needed for core automation. The following work out of the box:

  • ADB device control (tap, swipe, type, screenshots)
  • Skill system (load, run, create skills)
  • Macro recording and replay
  • Dashboard (all 9 tabs)
  • Job scheduler
  • App Explorer

Add these to .env only if you need AI-powered features. None are required for core automation — pick the brains and gates you actually use.

VariablePurpose
OPENAI_API_KEYOpenAI-backed LLM features
ANTHROPIC_API_KEYClaude API backend
OPENROUTER_API_KEYOpenRouter (any model behind one key)
VariablePurpose
OLLAMA_BASE_URLOverride the Ollama endpoint (default http://localhost:11434 — only needed for Docker or cross-machine setups)
GITD_VLLM_BASE_URLOverride the vLLM endpoint (defaults to a tunneled phone-through-Mac URL)
vllm_api_keySet to EMPTY — vLLM doesn’t enforce auth, but the OpenAI client wants a value

No env vars at all — the model files ship with the companion APK and run inside the phone. See On-Device LLM for the model registry.

VariablePurpose
GITD_ENABLE_IOS=1Turn on iPhone support (opt-in; default off)
A11Y_DIFF_ENABLED=falseKill-switch for the accessibility-tree-diff perception aid (default on)
GITD_ADMIN_TOKENRequired by /api/skills/install — set it before exposing the server beyond localhost
VariablePurpose
DEFAULT_DEVICEPin the primary phone by ADB serial when several are connected
DEFAULT_PROVIDERDefault LLM brain — claude-code (subscription-backed), or Anthropic API / OpenRouter / Ollama / vLLM / on-device
VariablePurpose
LANGFUSE_PUBLIC_KEY / LANGFUSE_SECRET_KEYOpt into Langfuse tracing (cloud or self-hosted)
LANGFUSE_HOSTPoint at a self-hosted Langfuse instance

Local SQLite tracing is always on regardless — Langfuse is purely additive. See Tracing.

The Skill Creator supports 4 LLM backends. Configure whichever you want to use:

BackendConfigDefault Model
OpenRouterOPENROUTER_API_KEY env varanthropic/claude-sonnet-4
Claude APIANTHROPIC_API_KEY env varclaude-sonnet-4-20250514
OllamaAuto-detect at localhost:11434llama3
Claude Codeclaude CLI installedsonnet
Terminal window
# Start the server
python3 run.py

Open http://localhost:5055 in your browser. You should see the dashboard with 9 tabs.

Terminal window
# Quick Python verification
python3 -c "
from gitd.bots.common.adb import Device
from gitd.skills.tiktok import load
s = load()
print(f'Skill: {s.name} | Actions: {len(s.list_actions())} | Workflows: {len(s.list_workflows())}')
"
# Expected: Skill: tiktok | Actions: 13 | Workflows: 9

If you have multiple phones connected, set the default device:

Terminal window
# List connected devices
adb devices
# Set default via environment variable
export DEVICE=YOUR_DEVICE_SERIAL
# Or pass per-command
DEVICE=YOUR_DEVICE_SERIAL_2 python3 -m pytest tests/ -v
android-agent/
run.py # Entry point (port 5055)
pyproject.toml # Package config
.env # Your API keys (gitignored)
gitd/ # All application code
server.py # Flask API (113+ routes)
db.py # SQLite ORM (20+ tables)
bots/common/adb.py # Device class
skills/ # Skill packages
agent/ # LLM content planner
static/dashboard.html # SPA dashboard
data/ # Runtime data
gitd.db # SQLite database
tests/ # Pytest suite (19 files)
config/ # Credentials (gitignored)