$ ./claude-edge-setup.sh

termux-tools

Claude Code and a debloated browser, on your Android phone

Custom Edge Canary build · CFC browser bridge · Claude Code patching · Termux tooling

bash โ€” termux
~ $ ./claude-edge-setup.sh --all
adb · wireless paired
bun · runtime ready
claude-code 2.1.158 (Opus 4.8) patched
cfc-bridge + extension installed
~ $ claude --version
2.1.158 (Claude Code)
~ $ edge-fix/build.sh
stripped 56 trackers · re-signed APK
~ $

# Core Features

๐Ÿ›ก

Custom Edge Canary Build

A reproducible pipeline that strips 56+ tracking permissions, analytics SDKs (OneCollector, Adjust, Tencent Matrix, KOOM), Intune MDM and telemetry endpoints from Edge Canary, then re-signs the APK.

edge-fix/build.sh โ€” unpack, patch, sign, zipalign
patch-manifest.py โ€” drop tracking permissions
replace-urls.list โ€” telemetry โ†’ 127.0.0.1
๐Ÿ“ก

CFC Browser Bridge

A WebSocket bridge that wires the Edge extension to Claude Code's native Chrome host โ€” exposing screenshots, navigation, form fill and JS-over-CDP as MCP tools inside any Claude session on Android.

claude-chrome-android โ€” start the WS bridge
--mcp โ€” MCP relay per session
--setup โ€” register MCP + extension
โ—†

Claude Code on Termux

Runs the latest Claude Code (2.1.158, Opus 4.8) on bionic Android. A byte-preserving patcher edits the bun-compiled binary's vfs in place, plus sed patches for the legacy cli.js path โ€” aligned to your CLAUDE.md.

CCINSTALL_VERSION=next โ€” install the 4.8 binary
claude-code.sh โ€” install + auto-patch
byte-preserving โ€” survives bun-vfs offsets
โš™

Termux Dev Tooling

The glue that makes bionic Android a real dev box: a modular installer, x86_64 emulation via qemu, a Ghostty source build, pip-on-Termux fixes, ADB wireless automation and device-migration scripts.

x86-on-termux โ€” run x86_64 binaries via qemu
pip-tool-install โ€” C-ext Python CLIs on Termux
install-ghostty โ€” GTK4 terminal, source build

# Quick Start

One installer wires up the whole stack on bionic Android โ€” Bun, a patched Claude Code, ADB wireless, the debloated Edge build, and the CFC bridge. Requires Termux and Termux:API from F-Droid.

1. Bootstrap the installer

claude-edge-setup.sh
# One-liner bootstrap โ€” clones the repo, then opens the menu
curl -fsSL https://raw.githubusercontent.com/tribixbite/termux-tools/main/claude-edge-setup.sh | bash

# Or clone first, then run the interactive installer
git clone https://github.com/tribixbite/termux-tools ~/git/termux-tools
cd ~/git/termux-tools
./claude-edge-setup.sh           # interactive menu
./claude-edge-setup.sh --all     # non-interactive, run every step

2. Pick what to install

Each menu option sources a self-contained module from install/modules/. Run them piecemeal or choose 9) Run all.

interactive menu
CFC Setup

  1) Install Bun (via bun-on-termux)
  2) Install Claude Code CLI            # byte-preserving patch
  3) Configure Termux permissions
  4) Setup ADB wireless
  5) Build extension (CRX)
  6) Install extension in browser
  7) Start/manage bridge
  8) Health check & diagnostics
  9) Run all (full setup)
  0) Exit

3. Connect Claude to the browser

After step 7 the bridge is live and the Edge extension is connected. Register it as an MCP server with npx claude-chrome-android --setup, then screenshots, navigation and JS-over-CDP show up as tools inside any Claude Code session.

# Command Reference

./claude-edge-setup.shInteractive installer menu
./claude-edge-setup.sh --allRun every install step non-interactively
install/modules/bun.shInstall Bun via bun-on-termux
install/modules/claude-code.shInstall + byte-preserving patch Claude Code
install/modules/adb.shPair and connect ADB over WiFi
install/modules/extension.shBuild CRX + sideload into Edge

Full reference in docs/ โ€” every module is self-contained and re-runnable

# How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  CFC Bridge โ€” browser automation for Claude Code     โ”‚
โ”‚                                                      โ”‚
โ”‚  Edge Canary (debloated, sideloaded extension)     โ”‚
โ”‚       โ”‚  screenshots ยท navigate ยท form-fill ยท CDP   โ”‚
โ”‚       โ”‚  โ–ฒ WebSocket โ–ผ                            โ”‚
โ”‚       โ–ผ                                              โ”‚
โ”‚  Bridge server (claude-chrome-android)           โ”‚
โ”‚       โ”‚  FIFO tool queue ยท /health ยท /tool         โ”‚
โ”‚       โ”‚  โ–ฒ stdio โ–ผ                                โ”‚
โ”‚       โ–ผ                                              โ”‚
โ”‚  Native host (Claude Code cli.js)                 โ”‚
โ”‚       โ”‚  โ–ฒ unix socket โ–ผ                          โ”‚
โ”‚       โ–ผ                                              โ”‚
โ”‚  MCP relay โ”€โ”€โ–ถ tools in any Claude session        โ”‚
โ”‚       mcp__cfc-bridge__screenshot, navigate, โ€ฆ      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

MV2 on Edge Android

MV3 service workers never start in sideloaded CDP targets. CFC ships as an MV2 background page, pushed via --load-extension.

Byte-preserving patches

Claude Code's bun-compiled binary is patched in place โ€” equal-length overwrites keep the vfs offsets intact so it still runs.

# Repo Structure

termux-tools/
โ”œโ”€โ”€ edge-fix/ Edge Canary debloat pipeline โ€” unpack, strip trackers, re-sign the APK
โ”œโ”€โ”€ bridge/ NPM package (claude-chrome-android) โ€” WS bridge + MCP server for browser tools
โ”œโ”€โ”€ edge-claude-ext/ CFC browser extension source โ€” MV2 background + content scripts
โ”œโ”€โ”€ install/ Modular installer โ€” lib/common.sh + per-step modules (bun, claude-code, adb, crx)
โ”œโ”€โ”€ scripts/ pip-tool-install, install-ghostty, migrate-termux, secure-prefs-dump, CRX build
โ”œโ”€โ”€ x86-on-termux/ qemu-user sysroot installer to run x86_64 binaries on aarch64
โ”œโ”€โ”€ tools/ ADB wireless connect, restore-tabs, post-update phantom-killer fixes
โ”œโ”€โ”€ hooks/ Claude Code hooks โ€” session lifecycle + queue automation
โ””โ”€โ”€ docs/ Architecture, command reference, ADB wireless guide, bridge protocol spec