Getting Started with Damru — Android Stealth Browser Automation

Damru is the open-source, Android-native stealth browser automation framework — it runs a real Android OS (Redroid in Docker), drives Chrome through the Chrome DevTools Protocol and Playwright, and spoofs device fingerprints at the OS, binary, and CDP layers with zero JavaScript injection.

This quickstart walks you from a clean Ubuntu 24.04 (or Ubuntu WSL2) host to a working AsyncDamru session in under 15 minutes, using the pre-baked Redroid image.

Project status: Beta. The Ubuntu 24.04 and Ubuntu WSL2 paths have passed fresh smoke loops. Run python -m damru check preflight before starting workers and report environment-specific failures.


Supported Platforms

HostStatus
Ubuntu 24.04 LTS — native LinuxSupported
Ubuntu 24.04 — WSL2 with Damru’s bundled WSL kernelSupported
Debian 13Not supported (stock kernel lacks CONFIG_ANDROID_BINDERFS)
Windows — native Docker (without WSL2)Not supported
Physical Android devicesNot supported

Redroid is Linux-only. On Windows, Docker and Redroid must run inside WSL2; native Windows Docker is not a supported Redroid target. See Installation for full system requirements and the Docker/binderfs setup.


Minimum Requirements at a Glance

ResourceMinimum (1 worker)Recommended (1 worker)
CPU2 vCPU4 vCPU
RAM4 GB host8 GB host
Disk15 GB free25–30 GB free
Python3.10+3.10+
OSUbuntu 24.04 LTSUbuntu 24.04 LTS

Step 1 — Prepare System Packages

Ensure your Ubuntu system is up to date and has the adb package:

sudo apt update && sudo apt upgrade -y
sudo apt install -y adb wget curl git jq python3-venv

Step 2 — Install Damru

Create a virtual environment and install Damru from GitHub. Do not install into the system Python on Ubuntu (PEP 668 will block it).

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install git+https://github.com/akwin1234/damru.git

Developer / editable install:

git clone https://github.com/akwin1234/damru.git
cd damru
python3 -m venv venv
source venv/bin/activate
python -m pip install -U pip setuptools wheel
pip install -e .

Step 3 — Install Dependencies and Load the Baked Image

Run the guided dependency installer, then load the pre-baked Redroid Docker image. The baked image already contains Chrome, WebView/TTS assets, custom fonts, and warm Chrome preferences — no separate APK bundle is needed for normal use.

python -m damru install-deps
python -m damru install-image

install-deps installs Docker, ADB, iptables helpers, mounts binderfs, and starts Docker. install-image auto-detects damru-redroid-latest.tar in the current directory, parent directory, project root, home, or ~/Downloads, verifies its SHA-256, and runs docker load inside Linux/WSL.

If the tarball is not present locally, download it automatically:

python -m damru install-image --download

Step 4 — Run Guided Setup and Verify

The setup command writes a working config.py and runs an environment check:

python -m damru setup
python -m damru check-env
python -m damru check preflight

Both check commands should complete without hard failures. If Docker or binderfs problems appear, run the safe repair pass:

python -m damru fix-wsl

For WSL2 Docker iptables issues specifically, fix-wsl selects a compatible iptables backend and retries binderfs mounting automatically. See Installation — Troubleshooting for more detail.


Your First AsyncDamru Session

AsyncDamru is the primary entry point for asynchronous automation. It manages the full lifecycle — starting a Redroid container, applying all stealth layers, and returning a standard Playwright BrowserContext.

import asyncio
from damru import AsyncDamru

async def main():
    # device="random" picks from 100 real premium Android profiles
    async with AsyncDamru(device="random", debug=True) as browser:
        page = await browser.new_page()
        await page.goto("https://bot.sannysoft.com/")
        await page.wait_for_timeout(5000)
        await page.screenshot(path="sannysoft.png")
        print("Done — check sannysoft.png")

asyncio.run(main())

To use a specific device profile and a proxy:

import asyncio
from damru import AsyncDamru

async def main():
    async with AsyncDamru(
        device="pixel_8_pro",
        proxy="socks5://user:pass@proxy.example:1080",
    ) as browser:
        page = await browser.new_page()
        await page.goto("https://demo.fingerprint.com/playground")
        await page.screenshot(path="fingerprint_pro.png")

asyncio.run(main())

Leave timezone and locale unset so Damru resolves them automatically from the proxy exit IP.


What Happens During a Session

When AsyncDamru starts it executes these steps automatically:

  1. Device profile selection — picks from the 155-profile database (default: premium pool of 100).
  2. Container start — launches a Redroid Docker container in mode="auto".
  3. ADB root — connects via ADB and gains root access.
  4. Android props — applies ro.product.model, ro.build.fingerprint, and SDK version via resetprop.
  5. GPU binary patching — patches Vulkan/GLES .so driver files so Chrome reports a real GPU renderer (e.g., Adreno (TM) 750) instead of SwiftShader.
  6. Syscall interception — injects libfakemem.so via LD_PRELOAD to spoof RAM and CPU core counts at the sysinfo/sysconf level.
  7. CDP overrides — sets hardwareConcurrency, touch points, and worker targets directly in Chrome’s C++ engine via CDP.
  8. Display spoofing — calls wm size and wm density so the OS reports the correct screen dimensions and DPI for the selected device.
  9. TLS randomization — dynamically toggles cipher suites to produce one of ~184 unique JA3 fingerprints.
  10. Playwright attach — connects Playwright to Chrome via CDP and returns a BrowserContext.

No JavaScript is injected into the page at any point.


Synchronous Usage

For traditional blocking scripts, use Damru (the synchronous wrapper):

from damru import Damru

with Damru(device="pixel_8_pro") as browser:
    page = browser.new_page()
    page.goto("https://bot.sannysoft.com/")
    page.wait_for_timeout(5000)
    page.screenshot(path="sannysoft.png")
    print("Passed Sannysoft!")

Methods and parameters are identical to AsyncDamru but without await.


Run a Quick Sanity Check

After your first session, verify the worker is healthy:

python -m damru quick-check --serial 127.0.0.1:5600

Run the built-in benchmark suite against real anti-bot targets:

python -m damru benchmark --device random

Next Steps