Skip to content

akwin1234/damru

Repository files navigation

Damru Logo

Damru

The Apex Predator of Android Browser Automation

The world's first open-source framework for natively modded Android browser automation.

High-performance, ultra-stealth browser automation framework designed for web scraping and botting at scale.

Python Version Playwright Platform License: PolyForm Noncommercial 1.0.0

Community: Discord server recommended · Telegram personal


Damru leverages rooted Android emulators (like Redroid in Docker) via ADB to achieve undetectable automation. Whether you are bypassing modern WAFs (like Cloudflare Turnstile) or scoring 100% on CreepJS, Damru provides an impenetrable disguise.

Warning

Project Status: Beta This project is currently in a Beta state. While it has been verified as 100% stable and fully functional on the local systems of the developers who built it, it requires further testing across diverse environments and hardware configurations. We welcome feedback and issue reports!


Table of Contents


Platform Recommendation: Redroid vs MuMu

While Damru technically lists multiple environments, Redroid (Docker) is the only officially supported and functional path.

Platform Status Stealth Level Stability Recommendation
Redroid (Docker) Production-Ready Absolute High Highly Recommended
MuMu Player Unfinished / Beta Moderate Low Non-functional / Not Recommended
Physical Devices NOT SUPPORTED N/A N/A DO NOT USE

Caution

Physical Device Warning Damru is designed strictly for containerized environments (Redroid). It does not support physical Android devices. Do not attempt to run Damru against your personal phone. If you choose to use a spare rooted device, you do so at your own risk. Damru's low-level OS patches and binary injections may brick or destabilize physical hardware.

Why Redroid? Damru's most advanced stealth layers - including native GPU binary patching and OS-level iptables hooks-are optimized for the Redroid kernel. It provides a more stable environment for multi-container pools and is significantly more undetectable by modern anti-bot heuristics. MuMu Player support is currently an experimental, unfinished, and non-functional beta feature.


Core Features

  • Zero JS Injection: All spoofing is executed at the OS, Binary, and CDP levels. No brittle Object.defineProperty hacks.

  • Massive Device Database: Built-in profiles for 49 real Android devices (Samsung, Pixel, Xiaomi, OnePlus, Nothing, Honor, Vivo, POCO, etc.) with realistic hardware specifications.

  • Display & Resolution Spoofing: Natively overrides screen dimensions and DPI via Android's Window Manager (wm size/density) for physical accuracy.

  • Browser Version & Client Hints Randomization: Dynamically selects from a database of verified Chrome versions and generates perfectly accurate sec-ch-ua Client Hints, including Chromium GREASE brand permutations.

  • TLS/JA3 Randomization: Generates ~184 unique TLS fingerprints from a single binary by dynamically toggling cipher suites and experimental flags.

  • Auto Image Management: Automatically pulls and tags the required Redroid Docker images if the custom baked image is missing.

  • Font & Voice Randomization: Installs custom TTS engines and extra system fonts, randomizing them per session.

  • Hardware Status Spoofing: Fakes battery levels, charging status, and even audio sample rates (48kHz) to mirror real mobile hardware behavior.

  • Hardware Overrides: Spoofs CPU cores, RAM (via syscall hooks), and touch points (e.g., 5-point touch) directly via native OS patching and CDP.

  • Network & DNS Stealth: Faithfully fakes mobile network conditions and forces resolution through proxy-level ISP DNS to pass "DNS Leak" and "Targeted DNS" checks.

  • CDN & Anti-Bot Bypass: Out-of-the-box native bypass for modern WAFs (like Cloudflare Turnstile, CDN TLS) and advanced behavioral detection systems.


Why Damru is Better Than the Rest

We spent significant time modifying and testing popular desktop-first solutions like Camoufox, Fingerprinting Chromium, and various Playwright stealth patches to work on mobile - but nothing reached the level of stability and undetectability achieved by this project.

The botting landscape is littered with tools that used to work: puppeteer-stealth, undetected-chromedriver, and various anti-detect browsers. Here is why they fail today, and why Damru succeeds:

Feature Legacy Tools (puppeteer-stealth, etc.) Damru
Spoofing Method JavaScript Injection (Object.defineProperty). Leaves massive detectable traces. Native Overrides. Modifies C++ engine via CDP, patches binaries, edits OS props.
JS Leakage Anti-bots check .toString() on functions. Injected JS is caught instantly. Zero JS Injected. Functions remain entirely native.
Hardware Emulation Fakes navigator.hardwareConcurrency via JS. Fails worker tests. C++ CDP Override. Changes the main-page value at the Chromium engine level; worker targets are handled best-effort through CDP auto-attach.
GPU Fingerprint WebGL spoofing via JS wrapping. Leaks real GPU via extensions. Binary Patching. Physically patches the .so Vulkan/GLES driver files on Android.
Physical Memory Fakes deviceMemory via JS. Easily caught by timing or syscall checks. Syscall Hooks. Uses libfakemem.so to intercept sysinfo calls via LD_PRELOAD.
Worker Stealth Workers often leak the real hardware concurrency of the host. Worker Interception. Uses CDP Target.setAutoAttach to force overrides on all Threads/Workers.
TLS/JA3 Hash Fixed TLS fingerprint based on the Chrome binary version. TLS Randomization. Produces ~184 unique JA3 hashes via dynamic cipher blacklisting.
Screen Dimensions Viewing desktop Chrome as mobile via viewport scaling (leaks real screen size). OS-Level Display. Modifies Android wm size/density natively.
Network Identity Frequently leaks WebRTC private IPs and IPv6 fingerprints. OS-Level IP Tables. Blocks WebRTC leaks and IPv6 at the Android kernel level.
Mobile Emulation Desktop Chrome pretending to be mobile via viewport scaling. Real Android OS. Runs inside Redroid (Android 14) or MuMu Player. It is mobile.

Proof of Stealth: Benchmark Comparisons

We regularly test Damru against the hardest anti-bot systems in the industry. These results are reproducible using the built-in benchmark suite (python -m damru benchmark) or the comprehensive functional test suite (python example.py).

Fresh Ubuntu/WSL verification proof is tracked in docs/PROOF.md. The current sanitized Ubuntu VPS proof assets include:

Damru Ubuntu VPS proof

Screenshot Proof Gallery

Fingerprint Pro CreepJS
Fingerprint Pro proof CreepJS proof
Sannysoft Foot Locker / DataDome target
Sannysoft proof Foot Locker DataDome proof
Amazon
Amazon proof
Target Anti-Bot Standard Playwright Typical Stealth Plugins Damru
CreepJS (Trust) 0% (Trash) ~45% (High Lies) 85%+ (0% Lies, Top Stealth)
BrowserScan Fails Hardware/OS Fails WebGL/Fonts Passes 100% OS/Hardware/WebRTC
Sannysoft Fails Passes Passes 100%
Cloudflare Turnstile Blocked ("Just a moment") Frequently Blocked Bypassed Natively
Other Enterprise WAFs Blocked Frequently Blocked Bypassed Natively

Note: Damru is capable of bypassing many other advanced detection systems not listed here. As an educational project, we focus on demonstrating these core industry-standard benchmarks.


Architecture: The 8 Layers of "Zero JS" Stealth

Damru's core philosophy is Zero JavaScript Injection. Instead of trying to outsmart anti-bot JavaScript with more JavaScript, Damru lies from the outside in.

  1. Layer 1: Android System Props (Root resetprop) Damru connects via ADB and uses root access to modify build.prop values dynamically. It changes ro.product.model, ro.build.fingerprint, and the Android SDK version at the OS level. The browser sees a genuine Pixel 8 Pro or Samsung S24.
  2. Layer 2: GPU Binary Patching Anti-bots actively check your GPU. Generic Docker containers show "SwiftShader" (an instant ban). Damru physically patches the Vulkan/GLES .so binaries on the filesystem before Chrome launches, reading as an Adreno (TM) 640 or Mali-G710.
  3. Layer 3: Syscall Interception (LD_PRELOAD) Damru uses a custom C shared library (libfakemem.so) to intercept the sysinfo and sysconf system calls. This ensures that even low-level system checks see the spoofed RAM and CPU specifications of the targeted device.
  4. Layer 4: Deep CDP Protocol Overrides Damru uses low-level Chrome DevTools Protocol (CDP) commands (Emulation.setHardwareConcurrencyOverride, Emulation.setTouchEmulationEnabled) to spoof CPU cores and touch points directly inside Chromium's C++ engine.
  5. Layer 5: Thread & Worker Interception Using Target.setAutoAttach, Damru ensures that every Worker (Dedicated, Shared, and Service) created by the browser inherits the same hardware overrides as the main thread, closing a common leakage vector for advanced anti-bots.
  6. Layer 6: Chrome Preferences & Flag Patching Damru modifies Chrome's underlying Preferences JSON and launch flags to force specific Locales, randomize TLS cipher suites (~184 JA3 variants), and disable DNS-over-HTTPS to force resolution through proxy ISP DNS.
  7. Layer 7: OS-Level Evasions Using Android iptables, Damru blocks WebRTC private IP leaks and completely disables IPv6. It also neutralizes DevTools timing detection by bypassing debugger pauses natively via CDP.
  8. Layer 8: Display & Density Spoofing (wm size/density) To avoid "Resolution Mismatch" detections, Damru modifies the Android Window Manager natively. It uses wm size and wm density to force the OS to report physically accurate screen dimensions and pixel densities for the targeted device (e.g., Pixel 8's 1344x2992 @560dpi).

Project Structure

Damru is organized into specialized modules to maintain the separation between high-level Python automation and low-level system spoofing.

damru-project/
+-- damru/                 # Core Framework (Python)
|   +-- async_core.py      # Async entry points (AsyncDamru)
|   +-- core.py            # Sync entry points (Damru)
|   +-- root.py            # OS/Binary patching logic (resetprop/iptables/display)
|   +-- devices.py         # 49 Real Device Specifications Database
|   +-- chrome.py          # Browser lifecycle & Preferences patching
|   +-- bypass.py          # CDN TLS/WAF edge-layer TLS impersonation
|   +-- pool.py            # Multi-container orchestration (DamruPool)
+-- native/                # Native Binary Hooks (C source)
|   +-- vulkan_layer.c     # Vulkan C++ string spoofing binary
|   +-- libfakemem.c       # Physical RAM spoofing via sysconf hooks
+-- tests/                 # Stealth & Stability Benchmarks
|   +-- benchmark_auto.py  # Automated Anti-Bot probe
|   +-- test_stealth.py    # Unit tests for fingerprinting integrity
+-- chrome-apks/           # Pre-validated Mobile Assets
|   +-- espeak.apk         # TTS engines for Voice fingerprinting
|   +-- 145.x/             # Specific Chrome/WebView versions
+-- docs/                  # Roadmaps & Infrastructure Plans
+-- scripts/               # Maintenance & Image Baking Utils
+-- tools/                 # External Debugging Tools (Magisk.apk)

Python API Documentation

For detailed information on how to use the Damru library programmatically, including class references, managed pooling, and advanced configuration, please see the:

Damru Python API Reference

For the full list of available Android identities, see the:

Damru Device Profile Reference

Quick Summary:

  • AsyncDamru: The primary entry point for asynchronous automation.
  • Damru: Synchronous wrapper for standard blocking scripts.
  • DamruPool: Orchestration for high-throughput multi-container scraping.
  • damru.bypass: Advanced TLS/JA3 impersonation for edge-layer bypasses.

Download Custom OS Image

Important

The pre-baked Damru Redroid image is a large Docker tarball and is not tracked in Git. Redroid is Linux-only: load or bake this image inside native Linux or WSL2, never native Windows Docker.

Download the current pre-baked image:

Download damru-redroid-latest.tar

Current local artifact prepared for release testing:

sha256sum -c damru-redroid-latest.tar.sha256
docker load -i damru-redroid-latest.tar

If the tarball is missing, rebuild it on Linux/WSL:

python -m damru bake-image --image damru-redroid:latest
docker save damru-redroid:latest -o damru-redroid-latest.tar
sha256sum damru-redroid-latest.tar > damru-redroid-latest.tar.sha256

Once downloaded, follow Step 3 in the Deployment Guide below to load it into Docker.


First-Time User Deployment Guide (WSL2 / Linux)

Ready to start? Damru uses Redroid (Android in Docker) to spin up headless mobile devices instantly. Follow this step-by-step guide to deploy Damru from scratch on Ubuntu/Debian or WSL2 (Windows Subsystem for Linux).

Important

Redroid is Linux-only. On Windows, Docker and Redroid must run inside WSL2; native Windows Docker is not a supported Redroid target.

Minimum System Requirements

Damru runs one full Android container per worker. The default Redroid worker limit is 2 CPU cores and 2g memory per container (REDROID_CPUS = 2.0, REDROID_MEMORY = "2g"). Use these numbers for capacity planning:

Workload CPU RAM Disk Notes
Bare minimum, 1 worker 2 vCPU 4 GB host RAM 15 GB free Enough for install, Docker, one Redroid worker, and basic smoke tests.
Recommended, 1 worker 4 vCPU 8 GB host RAM 30 GB free Better for high-resolution pages, proof captures, and fewer Chrome startup races.
Each additional worker +2 vCPU +2-3 GB RAM +5-8 GB free Matches the default Docker worker limit plus image/container overhead.
Baking/exporting image 4 vCPU 8 GB RAM 20 GB temporary free Needs room for base image, baked image layer, and exported .tar.
WSL2 recommended host 4+ vCPU 8-16 GB RAM 40+ GB free in WSL disk WSL stores Docker layers inside the distro virtual disk unless you move Docker data-root.

For large pools, start with max_devices=1, run python -m damru check-env, then increase workers gradually. Redroid is CPU and disk-I/O heavy during boot; too many workers on a small VPS will look like browser instability.

DamruPool(max_devices > 1, mode="auto") requires real binderfs support, not only /dev/binder, /dev/hwbinder, and /dev/vndbinder device nodes. If the kernel has CONFIG_ANDROID_BINDERFS disabled, one Redroid container may boot while a second container appears in ADB but fails Android userspace (zygote, system_server, WebView/CDP). Current Damru checks this before starting a multi-worker pool and tells the user to run max_devices=1 or boot a binderfs-enabled kernel.

Step 1: System Preparation (Linux / WSL2)

You need a Linux environment. If you are on Windows, install WSL2 (Ubuntu). Ensure your system is up to date and install adb:

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

After Damru is installed, you can also let the CLI install the common Linux/WSL dependencies:

python -m damru install-deps
python -m damru check-env

install-deps is idempotent: on a fresh WSL/Linux install it installs ADB, Docker, iptables, curl/wget/git/jq, mounts binderfs, and starts Docker. On later runs it reuses installed packages and rehydrates Docker/binderfs after WSL restarts.

On Windows/WSL2, Damru runs Docker and Redroid inside WSL and routes Redroid ADB through WSL. When Docker-published ADB ports are unreliable, Damru uses host networking and remaps each Redroid worker's adbd to a unique port (5600, 5601, ...), so multi-worker pools can still run without native Windows Docker. Native Linux uses Docker bridge/NAT and Damru selects the nft iptables backend to match modern Docker daemons; WSL prefers legacy iptables where available because some WSL kernels reject Docker's addrtype NAT rule through nft. See WSL kernel notes and the latest WSL fallback test results.

Current validation on June 2, 2026. Full sanitized notes are in Verification Proof:

  • WSL2 fresh-loop distro: install-deps -y, fix-wsl, install-viewer -y, check-env --viewer, single-worker browser smoke, and two-worker DamruPool(mode="auto", max_devices=2) passed.
  • Native Ubuntu VPS reset loop: Docker packages/state removed, fresh venv created, install-deps -y, check-env --viewer, unit tests, single-worker browser smoke, and two-worker pool smoke passed.
  • Both WSL and native Linux verified https://example.com in two concurrent Redroid workers with navigator.hardwareConcurrency == 8.

Step 2: Install Docker & Enable Binderfs (Crucial for Redroid)

Prefer python -m damru install-deps; it performs these package, Docker, binderfs, iptables, and Playwright-patch steps automatically. The manual commands below are only for debugging or custom Linux images.

Redroid requires Docker and Android's binderfs kernel modules.

  1. Install Docker:

    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    sudo usermod -aG docker $USER

    (Log out and log back in, or run newgrp docker to apply permissions).

  2. Mount Binderfs (Required for Android inside Docker):

    sudo mkdir -p /dev/binderfs
    sudo mount -t binder binder /dev/binderfs

    (Note: To make this persistent across reboots, you will need to add it to /etc/fstab).

The Instant Custom OS Image

Compiling native C binaries, injecting them via ADB, applying iptables rules, and installing Chrome on every run is slow. The recommended path is a baked damru-redroid:latest Docker image exported as damru-redroid-latest.tar, where Chrome, native patches, fonts, TTS assets, and warm Chrome preferences are already installed. The tarball is intentionally ignored by Git because it is large; keep the checksum file with the release artifact.

Step 3: Instant Boot with the Custom OS (Recommended)

  1. Load the pre-baked image:

    For WSL2 Users: copy or mount the tarball inside your WSL distro, then run Docker from WSL:

    sha256sum -c damru-redroid-latest.tar.sha256
    docker load -i damru-redroid-latest.tar

    For Native Linux Users:

    sha256sum -c damru-redroid-latest.tar.sha256
    docker load -i damru-redroid-latest.tar
  2. Start the custom Damru container:

    docker run -itd --rm --privileged \
        -v ~/data:/data \
        -p 5555:5555 \
        damru-redroid:latest \
        androidboot.redroid_width=1080 \
        androidboot.redroid_height=2400 \
        androidboot.redroid_dpi=480
  3. Wait 30 seconds for Android to boot, then connect via ADB:

    adb connect localhost:5555
    adb devices
    # You should see: localhost:5555 device

Troubleshooting Common WSL2 Errors

If your Redroid container fails to boot or Docker won't start in WSL, run these mandatory "Fix-it" commands:

  • Binderfs Error (docker: Error... no such device):
    sudo mkdir -p /dev/binderfs
    sudo mount -t binder binder /dev/binderfs
  • Docker Network Error (iptables failure):
    python -m damru fix-wsl
    Damru selects a Docker-compatible iptables backend automatically. On some WSL kernels, Docker's addrtype NAT rule works with iptables-legacy but fails with iptables-nft.
  • Missing WSL Kernel Module (xt_addrtype not found):
    python -m damru fix-wsl
    If the module is still missing, Damru tries its no-iptables/no-bridge Docker fallback. Windows auto mode uses WSL host networking with per-worker ADB port remapping for Redroid workers. For classic Docker bridge/NAT mode, boot a WSL2 kernel with Docker bridge/NAT and binderfs support.
  • Permission Denied:
    sudo usermod -aG docker $USER
    # Restart WSL after running this

Tip

What is an ADB Serial?

An ADB serial is a unique identifier for your Android device.

  • For Redroid/Docker, it is usually the network address: localhost:5555 or an internal IP.
  • Physical-device serials may appear in adb devices, but Damru does not support physical phones as automation targets.

Step 4: Install Damru

Option A: Direct Pip Install (Fastest)

pip install git+https://github.com/akwin1234/damru.git
playwright install

Verify the local environment:

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

If Docker still fails inside WSL, run the safe repair/diagnostic pass:

python -m damru fix-wsl

If it reports a missing kernel module such as xt_addrtype, the active WSL2 kernel lacks Docker bridge/NAT support. See WSL2 Kernel Requirements.

For scripted setup with a custom WSL distro/user, pass them explicitly:

python -m damru setup -y --wsl-distro Ubuntu --wsl-username your-wsl-user

Windows Installation Fix (Important)

If you are using an older Windows Python/setuptools combination and encounter an AssertionError: ...distutils\core.py during pip install, upgrade packaging tools first:

python -m pip install -U pip setuptools wheel
pip install git+https://github.com/akwin1234/damru.git

Do not set SETUPTOOLS_USE_DISTUTILS=stdlib globally on modern Python. It can break editable builds on Python 3.14 and newer.

Option B: Clone & Install (For Developers)

git clone https://github.com/akwin1234/damru.git
cd damru
python3 -m venv venv
source venv/bin/activate
pip install -e .
playwright install
python -m damru setup --skip-deps

When you import Damru, it verifies and applies the bundled Playwright crPage.js patch used to reduce CDP target discovery leaks.

CLI Commands

python -m damru setup           # guided first-run setup and config writer
python -m damru check-env       # validate Linux/WSL dependencies and assets
python -m damru install-deps    # install common Linux/WSL dependencies
python -m damru fix-wsl         # retry safe WSL Docker/binderfs/netfilter fixes
python -m damru wsl-kernel status # inspect bundled/active WSL kernel state
python -m damru benchmark       # run the benchmark command
python -m damru bake-image      # bake a warm Redroid image
python -m damru devices         # list ADB devices from Linux/WSL
python -m damru screenshot      # capture Android display PNG through ADB
python -m damru record          # capture Android display MP4 through ADB
python -m damru view            # open optional scrcpy live viewer
python -m damru install-viewer  # check/install optional scrcpy tooling

For testing a separate WSL distro without changing config.py, set DAMRU_WSL_DISTRO, for example: $env:DAMRU_WSL_DISTRO="DamruFreshKernelTest". Do not run host-network Redroid workers in multiple WSL distros at the same time; check-env reports this conflict.

WSL custom kernel safety: On Windows, Damru recommends using a fresh/dedicated WSL distro for Redroid. The bundled kernel installer edits %USERPROFILE%\.wslconfig, which changes how WSL boots. Damru backs up .wslconfig, but a custom WSL kernel can still break Docker/networking/modules or other WSL workloads. Interactive installs require typing the full warning phrase; scripted installs require --confirm-wsl-kernel-risk in addition to --yes. Native Linux/Ubuntu does not use this WSL kernel installer.

On Windows, install-deps runs inside WSL as root and does not use native Windows Docker. On native Linux scripted setup where sudo cannot prompt interactively, pass one password line on stdin:

printf '%s\n' 'your-sudo-password' | python -m damru install-deps -y --sudo-password-stdin

For visual inspection or manual browser operation, see Viewer, Screenshots, and Video. Viewer support is optional and never starts automatically during AsyncDamru, Damru, or pool sessions.


Global Configuration

Damru uses a centralized configuration file located at damru/config.py. If you clone the repository or install it locally, you should modify these settings before running large pools or automated scripts.

Tip

Pre-made Configurations Available! We have provided OS-specific configuration templates in the damru/ directory to get you started faster:

  • Windows / WSL2: Copy damru/config.py.windows and rename it to config.py.
  • Native Linux: Copy damru/config.py.linux and rename it to config.py.

Essential Configurations

  1. WSL2 Settings (Windows Auto-Mode): If you are running Python on Windows, Docker and Redroid still run inside WSL2. Damru uses wsl -u root for Linux setup and Docker preparation, so a WSL sudo password is not required for the CLI setup path.

    # damru/config.py
    WSL_DISTRO = "Ubuntu"
    WSL_USERNAME = "your-wsl-user"
    WSL_PASSWORD = ""  # Kept for compatibility; current WSL setup uses wsl -u root

    Existing WSL installs are covered by damru setup: set WSL_DISTRO and WSL_USERNAME, then run python -m damru check-env. Damru's current Windows setup/runtime path uses wsl -u root for privileged WSL commands, so it does not need to store a sudo password in config.py.

  2. Chrome APK Path: When not using the pre-baked .tar image, Damru will dynamically install Chrome onto raw Redroid instances. Point it to your APK directory.

    # None = auto-searches the 'chrome-apks/' directory in the project root
    CHROME_APK = None  
    # Or specify an absolute path:
    # CHROME_APK = "/mnt/c/path/to/damru/chrome-apks/145.0.7632.75"
  3. Pool Settings (NUM_DEVICES & MODE):

    MODE = "auto"          # "auto" = manages Docker containers; "mumu" = local VMs; "manual" = ADB
    NUM_DEVICES = 10       # How many concurrent containers to spin up/maintain
    REDROID_IMAGE = "damru-redroid:latest"  # The Docker image to use
  4. Proxy, Timezone, and Locale: Leave TIMEZONE and LOCALE as None unless you intentionally need fixed values. Damru resolves the active proxy exit at session start, then applies matching Android timezone, Chrome timezone, Accept-Language, and Intl locale. Rotating residential proxies are rechecked through Chrome after CDP connects so the browser does not keep a stale timezone from a previous exit.

Auto locale selection covers standard ISO country codes plus CLDR exceptional territory codes. Countries with more than one realistic phone/browser language can rotate between valid local variants, for example en-PH / fil-PH or en-IN / hi-IN.

PROXY = None        # Optional: SOCKS5/HTTP proxy URL for Python-side checks
HTTP_PROXY = None   # Optional: Android system HTTP proxy as host:port
TIMEZONE = None     # Auto from proxy exit when unset
LOCALE = None       # Auto from proxy country when unset

If your upstream proxy is SOCKS5 but Android needs an HTTP CONNECT proxy, run or provide a local HTTP bridge and pass it as http_proxy in code or HTTP_PROXY in config.

Docker Storage Location (Crucial for Windows Users)

Redroid containers consume significant disk space. If you are using WSL2 Docker, it saves data to your ext4.vhdx virtual drive on the C: drive by default, which can quickly fill up your primary SSD.

To save Docker images to a secondary HDD: You must configure the Docker daemon inside WSL to use a different data-root.

  1. Open WSL (wsl -d Ubuntu).
  2. Stop docker: sudo service docker stop.
  3. Move existing data to your HDD: sudo mv /var/lib/docker /mnt/d/docker-data.
  4. Symlink it back: sudo ln -s /mnt/d/docker-data /var/lib/docker.
  5. Start docker: sudo service docker start.

(Note: Native DOCKER_STORAGE_PATH configuration via Python is on the upcoming roadmap).


Usage & Examples

Damru handles the heavy lifting: it connects to ADB, gains root, applies system patches, spoofs the GPU, launches Chrome, and attaches via CDP-all automatically.

Example 1: Basic Async Usage (The Standard Way)

import asyncio
from damru import AsyncDamru

async def main():
    print("Launching Damru...")
    
    # device="random" picks from 49 real Android device profiles.
    # Leave timezone/locale unset so Damru follows the active proxy exit.
    async with AsyncDamru(
        device="random", 
        proxy="socks5://your.proxy.ip:1080",
        debug=True
    ) as browser:
        
        # 'browser' is a standard Playwright BrowserContext!
        page = await browser.new_page()
        
        print("Navigating to CreepJS to test stealth...")
        await page.goto("https://abrahamjuliot.github.io/creepjs/")
        await page.wait_for_timeout(10000)
        await page.screenshot(path="creepjs_score.png")
        print("Done! Check creepjs_score.png")

asyncio.run(main())

Example 1b: Authenticated Proxy with Android HTTP Bridge

Android system proxy supports HTTP CONNECT. If your provider gives SOCKS5 for Python-side checks but Android Chrome must use a local HTTP bridge, pass both values:

from damru import AsyncDamru

async with AsyncDamru(
    device="pixel_8_pro",
    proxy="socks5://user:pass@proxy.example:824",
    http_proxy="172.17.0.1:18888",
) as browser:
    page = await browser.new_page()
    await page.goto("https://demo.fingerprint.com/playground")

Damru resolves timezone and locale through http_proxy because that is the route Chrome actually uses. Do not set timezone or locale manually unless they match the current proxy exit.

Example 2: Synchronous Usage

If you prefer synchronous code, Damru provides a blocking wrapper:

from damru import Damru

def run_sync():
    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!")

if __name__ == "__main__":
    run_sync()

Example 3: Scaling Up with Connection Pooling

Scraping thousands of pages? Damru provides a native Pool manager to run operations concurrently across multiple Docker containers.

from damru import DamruPoolSync

proxies = [
    "socks5://proxy1:1080",
    "socks5://proxy2:1080",
    "socks5://proxy3:1080"
]

with DamruPoolSync(mode="auto", max_devices=3, proxies=proxies) as pool:
    for i in range(3):
        with pool.session() as context:
            page = context.new_page()
            page.goto("https://example.com/api/scrape_target")
            print(f"Worker {i} finished scraping: {page.title()}")

Testing Your Setup

Damru ships with a comprehensive benchmark suite. Run it to ensure your setup is truly undetectable.

# Run all benchmark tests on a random device
python -m damru benchmark --device random

# Run specific tests with a proxy
python -m damru benchmark --device samsung_galaxy_s24_ultra --proxy socks5://ip:port --tests creepjs cloudflare

The "Big Plan" (Roadmap)

We are aggressively building Damru into a fully autonomous infrastructure tool. Check docs/AUTOMATION_GAPS_PLAN.md for details.

  • damru setup CLI: Single-command configuration plus Linux/WSL dependency setup.
  • Automated Health Checks: Verification of ADB, Docker, binderfs, Chrome APKs, and Playwright patches.
  • Manual Viewer Tools: Optional screenshots, video recording, and scrcpy live viewer.
  • Auto Image Management: Damru will dynamically bake "Damru-Ready" Docker images natively.
  • Mass Orchestration: Expanding DamruPool for Kubernetes/Swarm deployment.

Frequently Asked Questions

1. Does Damru support physical Android devices?

No. Damru is designed strictly for containerized environments (Redroid). Its low-level OS patches, resetprop logic, and binary driver injections are optimized for Redroid's kernel and filesystem. Do not attempt to use Damru on your personal phone. If you use a spare rooted device, you do so entirely at your own risk.

2. Can I use MuMu Player instead of Docker?

MuMu Player support is currently an experimental, unfinished, and non-functional beta feature. While the code structure for it exists, we highly recommend using Redroid (Docker) for any production or serious research work.

3. Why is the .tar image so large?

The damru-redroid-latest.tar image is a full Android 14 operating system export. The current test artifact is about 915 MB as a Docker tarball and expands to a larger Docker image after docker load. It includes pre-installed Chrome, TTS assets, custom fonts, and pre-patched binary drivers for faster deployment.

4. Does Damru work on native Linux?

Yes. Any Docker image built in WSL2 is a standard Linux image. Damru works perfectly on native Linux (Ubuntu, Debian, etc.), provided the binder kernel modules are loaded.

5. Why "Zero JS Injection"?

Standard stealth tools are caught by anti-bots because their JavaScript injections leave traces (timing, prototype pollution). Damru lies from the outside-in (OS, Binary, and Protocol levels), making it mathematically invisible to scripts.


� Acknowledgments & Credits

Damru is built on the shoulders of giants. We would like to credit the following projects and technologies that make this framework possible:

  • redroid: The core GPU-accelerated Android-in-Container solution that provides our high-performance mobile environment.
  • Playwright: The incredible browser automation library that serves as our high-level API.
  • Chromium: The world-class browser engine we patch and automate.
  • Android Open Source Project (AOSP): For the robust operating system foundation.
  • Chrome DevTools Protocol (CDP): The low-level protocol that allows us to bypass JavaScript-based fingerprinting.
  • Magisk: For the inspiration behind the resetprop logic used in our system property spoofing.
  • curl_cffi: For providing the TLS impersonation capabilities used in our edge-layer bypasses.
  • Docker: For the containerization infrastructure that enables scalable automation pools.

Mandatory Legal Disclaimer & Ethical Use Notice

IMPORTANT: READ CAREFULLY BEFORE PROCEEDING

Damru (the "Software") is developed and distributed strictly for educational purposes, ethical security research, and authorized academic study. By using this Software, you acknowledge and agree to the following terms:

1. Educational and Research Intent

Any examples provided within this repository-including but not limited to the bypassing of Cloudflare, CreepJS, or BrowserScan-are presented solely as theoretical demonstrations of browser fingerprinting vulnerabilities. These "bypasses" are intended for use against systems you own or have explicit, written permission to test. They are designed to help security professionals and developers understand how to improve their own defensive measures.

2. No Warranty and Limitation of Liability

The Software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the authors, contributors, or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the Software or the use or other dealings in the Software.

3. Compliance with Laws and Terms of Service (ToS)

The user assumes full and sole responsibility for ensuring that their use of Damru complies with all applicable local, state, national, and international laws, including but not limited to the Computer Fraud and Abuse Act (CFAA).

  • Terms of Service: Bypassing security measures or anti-bot protections often violates the target website's Terms of Service.
  • Unauthorized Access: Unauthorized scraping or automated interaction with third-party systems may result in civil or criminal penalties.
  • Ethics: Users must not use this tool to facilitate malicious activity, data theft, credential stuffing, or any form of service disruption.

4. Risk Acknowledgment

Using automation frameworks against high-security systems carries inherent risks, including IP blacklisting, account termination, and potential legal action from service providers. The authors do not condone, support, or encourage the illegal or unethical use of this Software.

5. Commercial and Business Use Restriction

In accordance with the PolyForm Noncommercial License 1.0.0, all commercial and business use of this Software is strictly prohibited. This includes, but is not limited to, use by for-profit entities, use in support of commercial services, or any activity directed toward monetary compensation. The Software is licensed exclusively for personal, educational, and non-commercial research purposes.

About

adb Damru is the ultimate stealth Android browser automation framework. Unlike tools that use detectable JS injections, Damru achieves true undetectability via native C++ overrides, OS-level root prop spoofing, and GPU binary patching. Designed to bypass ALL CDNs, and score 100% on CreepJS using Redroid and Playwright.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors