Deepadb

io.github.fullread由 GitHub 帳號 fullread 發布v1.1.7更新於 Nov 17, 2026

功能齊全的 ADB MCP 伺服器——49 個模組共 209 個工具,涵蓋從 UI 到基帶。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Full-featured ADB MCP server — 209 tools across 49 modules, from UI to baseband.

概覽

Deepadb 的本機 MCP 服務;無需登入;STDIO;200 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Deepadb,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

DeepADB

[Build] [npm] [License] [Official MCP Registry]

MCP (Model Context Protocol) server for AI agents that need to inspect, control, test, and diagnose Android devices through ADB—or directly on-device through Termux.

209 tools, 5 resources, and 4 prompts across 49 modules—from UI automation and application management to logs, network capture, baseband, firmware, security, and hardware diagnostics.

Get started

DeepADB runs as a local MCP server. It uses ADB on a host computer and automatically switches to direct execution when running on Android (detected through /system/build.prop).

bash
git clone https://github.com/fullread/DeepADB.gitcd DeepADBnpm cinpm run buildnpm start

Add build/index.js to your MCP client configuration, then begin with these workflows:

GoalStart with
Confirm the toolchain and connected deviceadb_health_check, then adb_devices
Inspect the current Android UIadb_screen_state, then adb_ui_dump
Diagnose a device or appadb_device_info, adb_logcat, and adb_dumpsys

For a guided local connection, see MCP Client Configuration. Read SECURITY.md before exposing HTTP, WebSocket, or GraphQL transports beyond loopback.

Using llama.cpp or another local model? See Local LLM clients for direct stdio, authenticated browser HTTP, and small tool profiles. WebSocket is not required.

1.1.7 release

Version 1.1.7 fixes screenshot temporary-file isolation and root/Termux cleanup, retains Android sensor handle zero, and adds portable emulator regression coverage. The 209-tool interface and existing MCP clients/plugins remain compatible.

For deepadb-v1.1.7-prebuilt.zip, extract its contents into a folder named deepadb-v1.1.7, then run:

bash
cd deepadb-v1.1.7npm ci --omit=devnpm start

No TypeScript build is needed for the prebuilt archive. npm install -g [email protected] installs the same patch from npm. For an HTTP client, use the authenticated local LLM examples; WebSocket/GraphQL remain optional and need their documented runtime dependencies.

Architecture

┌──────────────────────────────────────────────────┐│                   MCP Client                     ││             (Any MCP-capable client)             │└──────────────────────┬───────────────────────────┘                       │ stdio (JSON-RPC), HTTP (/mcp or /sse), or WebSocket┌──────────────────────▼───────────────────────────┐│               DeepADB Server                     ││                                                  ││  ┌─────────────────────────────────────────────┐ ││  │           Tool Modules (49)                 │ ││  │  device │ shell │ packages │ files │ logs   │ ││  │  diagnostics │ ui │ build │ health          │ ││  │  wireless │ control │ logcat-watch          │ ││  │  forwarding │ screen-record │ emulator      │ ││  │  testing │ multi-device │ snapshot          │ ││  │  network-capture │ ci │ plugins │ baseband  │ ││  │  accessibility │ regression                 │ ││  │  device-farm │ registry │ at-commands       │ ││  │  screenshot-diff │ workflow │ sensors       │ ││  │  split-apk │ mirroring │ test-gen           │ ││  │  ota-monitor │ ril-intercept                │ ││  │  device-profiles │ firmware-analysis        │ ││  │  workflow-market │ selinux-audit            │ ││  │  thermal-power │ network-discovery          │ ││  │  input-gestures │ wireless-firmware         │ ││  │  app-network │ database-inspector           │ ││  │  runtime-audit │ wear                       │ ││  ├─────────────────────────────────────────────┤ ││  │  Resources (5) │ Prompts (4)                │ ││  └───────────────────┬─────────────────────────┘ ││                      │                           ││  ┌───────────────────▼─────────────────────────┐ ││  │          ToolContext (unified DI)           │ ││  │  server │ bridge │ deviceManager            │ ││  │  logger │ security │ config                 │ ││  └───────────────────┬─────────────────────────┘ ││                      │                           ││  ┌───────────────────▼─────────────────────────┐ ││  │           Middleware Layer                  │ ││  │  OutputProcessor │ SecurityMiddleware       │ ││  │  InputSanitizer │ Logger (stderr-safe)      │ ││  └───────────────────┬─────────────────────────┘ ││                      │                           ││  ┌───────────────────▼─────────────────────────┐ ││  │         Bridge Layer (auto-detect)          │ ││  │                                             │ ││  │  ┌─────────────┐    ┌────────────────────┐  │ ││  │  │  ADB Bridge  │ OR │  Local Bridge      │ │ ││  │  │  (PC mode)   │    │  (on-device mode)  │ │ ││  │  │  via adb.exe │    │  via sh/su direct  │ │ ││  │  └──────┬───────┘    └────────┬───────────┘ │ ││  │         │                     │             │ ││  │  Retry │ Timeout │ Cache │ Serial routing   │ ││  └─────────┼─────────────────────┼─────────────┘ │└────────────┼─────────────────────┼───────────────┘             │                     │     ┌───────▼───────┐    ┌───────▼───────┐     │  ADB Binary   │    │   sh / su     │     │  (USB/WiFi)   │    │   (local)     │     └───────┬───────┘    └───────┬───────┘             │                    │       ┌─────▼────────────────────▼─────┐       │          Android Device        │       └────────────────────────────────┘

Dual-Mode Architecture

DeepADB operates in two modes, auto-detected at startup:

ADB Mode (default) — PC-side bridge

AI Agent (PC) ←→ MCP ←→ DeepADB (PC) ←→ ADB (USB) ←→ Android Device

Standard mode: DeepADB runs on a PC/Mac/Linux host and communicates with the device over USB via ADB. The complete 209-tool surface is registered through the ADB bridge with automatic retry on transient failures; environment-specific tools report their capability requirements when a host cannot run them.

On-Device Mode — direct local execution

AI Agent (Termux) ←→ MCP (stdio/HTTP) ←→ DeepADB (Termux) ←→ sh/su (local)

When DeepADB runs directly on the Android device (e.g., inside Termux), it auto-detects the environment and switches to LocalBridge. Commands execute directly via sh/su — no ADB server, no USB, no serialization overhead. The same 209-tool MCP surface is registered, with capability-aware guidance when an optional on-device binary such as sqlite3 is unavailable.

Current test profiles: npm test retains strict rooted Pixel 6a / Android 16 coverage. npm run test:emulator uses a disposable fixture app for portable lifecycle/UI tests and verifies sensor readings against Android's actual inventory. Pixel-only hardware checks have explicit skips in the emulator profile; unexpected failures still fail its optional CI lane. See test setup and profile boundaries. The older release baselines below describe their published artifacts. See the 1.1.7 changelog for the current release and validation.

Dependency refresh (November 14, 2026): compatible development, optional-transport and transitive dependencies were updated. Build, lint, 394 device-free checks, 23 runner/profile checks and eight host browser checks pass; full and production-only audits report zero vulnerabilities. The refreshed tree also passes 879 on-device checks, zero failures and three cached-QEMU setup skips across 27 suites on the Pixel 6a, including PIN checks and actual VM boot/shutdown. It replaces the previous on-device installation while preserving shared state and VM cache. Staged and installed production copies each pass ten strict smoke checks; three direct Termux capture checks, eight installed-server browser checks and six WebSocket/GraphQL checks also pass. Hosted verification for this refresh is tracked in PR #66 checks. See the refresh record for details; the November 9 results below remain the earlier dependency-tree baseline.

1.1.7 validation (November 9, 2026): the full on-device regression passed 879 checks, zero failures, three cached-QEMU setup skips (882 total) across 27 suites on the rooted Pixel 6a / Android 16 with Termux Node 24.22.1. Actual VM boot/shutdown, all 30 sensor checks, 30 screenshot-cleanup checks, 46 UI/PIN checks, SQLite/Shannon diagnostics and existing client/plugin compatibility passed. The suite used an isolated validation checkout with the production build's matching files. Host/ADB coverage passed 826 checks with 18 expected skips; after the network-negative test correction, its boundary suite passed 79 checks. The final device-free set passed 394 checks with 17 expected skips. These are distinct test configurations; their counts are not interchangeable. Production-build verification also includes ten strict smoke checks before and after installation, three direct Termux-user capture/cleanup checks, eight real-browser HTTP checks and six authenticated WebSocket/GraphQL checks. The previous 1.1.6 installation and temporary test/rollback copies were removed; shared user state and VM images were preserved. The production directory contains runtime dependencies and the optional transport libraries, without the test/development checkout. Real phone-to-watch Wear validation remains deferred.

1.1.6 device validation (November 1, 2026): the released build's full on-device run passed 836 checks, 0 failed, 3 skipped (839 total) across all 24 suites on the rooted Pixel 6a / Android 16, using Termux Node 24.22.1 and SQLite 3.54.1. The three skips reuse the cached Alpine kernel, initrd and disk; the actual VM boot and shutdown checks passed. Coverage includes the 28 runtime-audit regressions, device SQLite, live Shannon AT/OK, client/plugin compatibility, POSIX security cases and PIN-based UI recovery. The production installation passed eight strict checks before and after promotion, plus eight real Chromium checks and six authenticated WebSocket/GraphQL checks. Following the final documentation audit and verified redeployment, 1.1.6 was the only DeepADB installation retained on the validation Pixel at that time; older installations and rollback copies were removed at the operator's request. Real phone-to-watch validation remains deferred.

The earlier 1.1.6 host/ADB baseline on Windows/Node 24.22.2 passed 783 checks, 0 failed, 18 expected skips (801 total). After the oversized-header test was split into a portable regression, Node 22.23.4 device-free coverage passed 351 checks, 0 failed, 17 expected skips (368 total). Host skips cover device-only or POSIX behavior, unavailable tcpdump and Windows file-symlink privileges; they are distinct from the on-device results above.

v1.1.5 final audit-fix verification (Windows host): the ten device-free suites passed 295 checks, zero failures, and 17 expected skips (312 total) under Node 22.23.4 with coverage. The new hardening suite separately passed 41 checks on Node 24.22.2, with one Windows file-symlink capability skip; 16 other skips in the full CI set require hardware. Eight real-browser CORS/reload checks passed. The Pixel passed eight disposable POSIX path/link/race checks and five focused hardware smoke checks; the latest snapshot code also completed a real schema read through the isolated worker. These initial checks preceded the separate on-device release validation described below.

Final hardening hardware regression (October 31, 2026): all 22 host/ADB suites passed on the Pixel 6a / Android 16 using Node 24.22.2: 728 passed, 0 failed, 18 expected skips (746 total). This includes 41 audit-hardening, 33 local-LLM, 36 SDK/client/plugin compatibility, 93 security and 46 UI checks, plus live SQLite and Shannon validation. The skips are five on-device-only QEMU checks, twelve Windows/POSIX/tcpdump checks and one Windows file-symlink capability case. That last case is additionally covered by the disposable Pixel POSIX probes above. The suite exited successfully, left no ADB forwards, and made no repository file changes. This validates the host build; on-device LocalBridge execution is verified separately during release preparation.

1.1.5 release validation: the production-only package initializes with 209 tools, five resources/templates and four prompts. The staged Pixel build, using Termux Node 24.22.1 and SQLite 3.54.1, passed real SQLite schema/query reads, write rejection, runtime/health checks and a live Shannon handshake. Eight real-browser checks also passed against that on-device process, including authenticated SSE/Streamable HTTP, denied Origins and repeated page reloads. Six optional WebSocket/GraphQL checks passed with their production packages installed. The verified build was promoted to the normal installation path; Android auto-detection and all eight strict device checks passed again there. At that release's validation, the 1.1.4 rollback copy also started on the new runtime. The final host hardware rerun passed 728 checks with zero failures and 18 skips; device-free Node 24 coverage passed 295 checks with zero failures and 17 skips. GitHub CI covers Node 22/24/26 builds and regressions, real-browser MCP compatibility, coverage and dependency auditing, with separate CodeQL analysis for application code and GitHub Actions.

Earlier unreleased host hardware validation (October 31, 2026, before the final seven-finding hardening pass): the expanded suite, including SDK migration, browser reconnect, request-ID/cancellation, plugin callback lifetime, and profile regressions, completed on Pixel 6a / Android 16 with 687 passed, 0 failed, and 17 expected skips (704 total). Live llama.cpp checks separately exercised stdio, authenticated browser Streamable HTTP, and legacy SSE with the inspect profile; see LOCAL_LLMS.md for the tested model and browser HTTP reload recovery and its limits. Phone-to-watch Wear validation is deferred.

v1.1.4 host hardware validation: the full Pixel 6a / Android 16 regression completed with 604 passed, 0 failed, and 17 expected environment-specific skips (621 total). This includes live AT/OK validation on /dev/umts_router, a guarded read-only SQLite schema snapshot with cleanup, the unified runtime audit, per-app route context, and the single-device Wear preflight. The skips are the five on-device-only QEMU checks plus twelve Windows-host or unavailable-tcpdump security checks.

v1.1.3 hardware baseline: validated on a Pixel 6a (Android 16, Termux + Magisk + QEMU 10.2.1) across a four-cell test matrix — host (ADB) and on-device (LocalBridge), each with and without a device PIN — with 0 failures in every cell. The v1.1.3 suite contained 577 tests in the host/ADB configuration and 613 on-device; the difference is the QEMU virtualization and Alpine VM-boot suites, which run only on-device:

  • ADB mode, no PIN: 556 passed / 0 failed / 21 skipped (577 total). Skips: 5 QEMU (on-device only), 7 gracefulKill unit tests (require POSIX signals, skipped on the Windows host), 3 tcpdump sanitization (tcpdump is root-only and unreachable over a non-root ADB shell), 2 host-shell round-trips (require a POSIX /bin/sh), 4 screen-state (require DA_TEST_PIN).
  • ADB mode, with PIN: 560 passed / 0 failed / 17 skipped (577 total). The 4 screen-state tests unlock and run.
  • On-device mode, no PIN: 606 passed / 0 failed / 7 skipped (613 total). All QEMU tests run, including Alpine Linux VM boot with KVM acceleration, big.LITTLE CPU topology detection, guest ADB connectivity error handling, and clean VM shutdown; the tcpdump and gracefulKill suites also run here (root + POSIX). Skips: 3 QEMU setup steps that no-op when the Alpine kernel/initrd/disk are already cached, 4 screen-state (require PIN).
  • On-device mode, with PIN: 610 passed / 0 failed / 3 skipped (613 total). Every test enabled by the environment runs; the 3 skips are the cached-VM setup steps.

Privilege escalation: In ADB mode, all shell commands run as uid=2000 (the shell user) which has system-level permissions. In Termux, commands run as a regular app user. LocalBridge automatically elevates privileged commands through su when root (Magisk) is available:

  • Command allowlist: 16 system commands (settings, dumpsys, am, input, screencap, screenrecord, uiautomator, app_process, getenforce, setenforce, cmd, pm, wm, svc, ip, ifconfig) are routed through su -c to match ADB-mode behavior.
  • Path-based elevation: Commands referencing /sdcard, /storage, or /system/ paths are elevated to bypass Android scoped storage restrictions.
  • Root detection: Cached after a single su -c id probe at first use. Graceful degradation when root is unavailable.
  • Screenshot lifecycle: Allocate, capture and remove private device scratch files under the same identity. LocalBridge uses root when available, while the pulled output remains owned by the Termux user. Registered VM targets use ADB on the guest.
  • The elevation allowlist is frozen (ReadonlySet + Object.freeze) — not configurable via environment variables or runtime API.

Auto-detection: Checks for /system/build.prop (present on all Android devices, never on hosts). Override with DA_LOCAL=true or DA_LOCAL=false.

On-device setup (Termux):

bash
pkg install nodejs-lts git sqlitegit clone https://github.com/fullread/DeepADB.gitcd DeepADBnpm cinpm run build

Choose the launch mode for your client. For stdio, configure the MCP client to launch node with the absolute path to DeepADB/build/index.js; the client starts the process itself. To run a loopback HTTP listener instead:

bash
DA_HTTP_HOST=127.0.0.1 DA_HTTP_PORT=3000 npm start # /mcp and legacy /sse

This listener is accessible only on the device, not directly over Wi-Fi. For browser clients, configure a bearer token and an exact Origin allowlist; see Local LLM clients. For remote access, follow the token and TLS reverse-proxy or SSH-tunnel guidance in SECURITY.md.

Use a supported Node LTS release; Node 24 is validated for this release. The sqlite package supplies the sqlite3 executable required by on-device database inspection. Production installs that omit development dependencies must install ws and/or graphql separately when those optional transports are enabled. Before replacing an existing device installation, stage the built package, keep a rollback copy, and verify its actual LocalBridge execution with the device's runtime and binaries. Host/ADB tests alone do not validate that deployment.

MCP Client Configuration

Configure a local stdio MCP server with node as the command and the absolute path to build/index.js as its argument. The client starts the server process. For clients that use an mcpServers JSON configuration, the equivalent is:

json
{  "mcpServers": {    "deepadb": {      "command": "node",      "args": ["/path/to/DeepADB/build/index.js"]    }  }}

Other clients may use a settings form, TOML, or a different JSON layout; enter the same command and argument using that client's configuration format. Leave DA_HTTP_PORT, DA_WS_PORT, and DA_GRAPHQL_PORT unset for this stdio setup. See Local LLM clients for explicit environment settings and authenticated browser connections.

Available Tools (209)

Start with the capability area that matches your task; the complete reference remains below.

Complete tool reference

Health (1 tool)

  • adb_health_check — Comprehensive toolchain validation: ADB binary, server, device connection, authorization, root access, and storage writability

Runtime Audit (1 tool)

  • adb_runtime_audit — Unified read-only readiness audit for transport, Android userspace, root, SELinux, storage, command capabilities, UI/network diagnostics, SQLite, modem nodes, and Wear prerequisites

The audit retains successful checks when an independent probe fails. Its report labels readiness as available, unavailable (a confirmed negative result), or inconclusive (failed, timed out, incomplete, or not safely checked). Audit status: partial and the Probe issues section identify incomplete checks while preserving useful device information and snapshots. A partial report is returned normally; failure to resolve the requested device remains a tool error. complete means the checks completed, not that every capability is available. Modem node visibility does not verify an AT handshake, and Play services presence does not verify phone/watch pairing. Use the dedicated Shannon and Wear tools for those narrower checks.

SQLite readiness follows the inspector's execution mode: host ADB uses the host's Node SQLite backend (Node 22.16+ with node:sqlite enabled), while on-device LocalBridge uses device sqlite3. A phone's SQLite binary cannot make a missing host backend available. Backend availability alone does not verify access to a particular app database.

Device (3 tools)

  • adb_devices — List all connected devices with state, model, and product info
  • adb_device_info — Detailed device properties (model, OS, SDK, build, security patch, ABI)
  • adb_getprop — Read a specific system property or dump all properties

Shell (2 tools)

  • adb_shell — Execute arbitrary shell commands with configurable timeout (security-checked)
  • adb_root_shell — Execute commands as root via su (requires rooted device, security-checked)

Packages (12 tools)

  • adb_install — Install APK with replace/downgrade options
  • adb_uninstall — Remove package with optional data retention
  • adb_list_packages — List packages filtered by name or type (all/system/third-party)
  • adb_package_info — Detailed package info (version, permissions, paths)
  • adb_clear_data — Clear all app data and cache
  • adb_grant_permission — Grant a runtime permission to a package
  • adb_revoke_permission — Revoke a runtime permission from a package (reset permission state for testing denial flows)
  • adb_list_permissions — List all declared and granted permissions for a package, filterable by granted/denied
  • adb_force_stop — Force-stop an app immediately
  • adb_start_app — Launch an app by package name (resolves launcher activity)
  • adb_restart_app — Force-stop then re-launch in one call (configurable delay)
  • adb_resolve_intents — Discover registered activities, services, and receivers with intent filters

Room & SQLite Inspection (1 tool)

  • adb_sqlite_inspect — Package-scoped listing, schema inspection and validated read-only SQL. Prefers run-as, falls back to root, rejects linked directories/files and verifies opened descriptors. Queries a private snapshot (database + WAL ≤64 MiB) with bounded execution and output, then removes it. Host inspection needs Node 22.16+ and runs in an isolated process; on-device inspection uses a trusted sqlite3 binary. Neither backend queries the live app path. Snapshots are not transactional backups; concurrent writes may require retrying with the app stopped.

Files (18 tools)

  • adb_push — Push local file to device (hard-blocked kernel paths, fs-type awareness, storage reporting)
  • adb_pull — Pull file from device to local filesystem
  • adb_ls — List device directory contents (simple or detailed)
  • adb_cat — Read text file from device with optional line limit
  • adb_file_write — Create or overwrite text files via heredoc (buffer limit warning, fs-aware, post-verify)
  • adb_find — Search for files by name/pattern with depth control and result capping
  • adb_file_stat — File metadata: size, permissions, timestamps, ownership, SELinux context
  • adb_file_checksum — SHA-256/SHA-1/MD5 hash with size-based timeout estimation
  • adb_mkdir — Create directories with parent creation (-p), hard-blocked kernel paths
  • adb_rm — Delete files/directories with depth-based recursive protection and symlink resolution
  • adb_file_move — Move/rename with source depth protection and post-verify
  • adb_file_copy — Copy with pre-flight size+space check and post-verify size match
  • adb_file_chmod — Change permissions (Zod-validated octal mode, depth-based recursive protection)
  • adb_file_touch — Create empty files or update timestamps (explicit timestamp support)
  • adb_file_fsinfo — Filesystem report: type, mount, capacity, capabilities, SELinux, limitations
  • adb_file_chown — Change ownership (root required, depth-based recursive protection)
  • adb_grep — Search file contents with fixed-string default, recursive depth control, result capping
  • adb_file_replace — Find/replace text in files (sed-backed, proper escaping, backup option)

Logs — Snapshots (3 tools)

  • adb_logcat — Filtered logcat snapshot with tag, priority, grep, and buffer selection
  • adb_logcat_clear — Clear all logcat buffers
  • adb_logcat_crash — Crash buffer log snapshot

Logs — Persistent Watchers (4 tools)

  • adb_logcat_start — Start a background logcat watcher with ring buffer accumulation
  • adb_logcat_poll — Retrieve new lines since last poll from a running watcher
  • adb_logcat_stop — Stop a watcher session (or all sessions)
  • adb_logcat_sessions — List all active watcher sessions with stats

Diagnostics (9 tools)

  • adb_dumpsys — Run dumpsys for any service (or list all services)
  • adb_telephony — Cell info, signal strength, and network registration (parallel query)
  • adb_battery — Battery status, level, temperature, and charging info
  • adb_network — WiFi, cellular, and IP connectivity (parallel query)
  • adb_top — CPU and memory usage snapshot
  • adb_perf_snapshot — Parallel memory, frame stats, and CPU profiling for a package
  • adb_bugreport — Full bug report zip capture (device state, logs, system info)
  • adb_crash_logs — ANR traces and tombstone crash dumps from /data/anr/ and /data/tombstones/
  • adb_heap_dump — Capture heap dump (.hprof) from a running process for memory analysis

Per-App Route Context (1 tool)

  • adb_app_route_context — Resolve an installed package to its UID and correlate its effective ip rule ranges, route tables, network policy, VPN, and default-network state without changing routes or policy

UI (10 tools)

  • adb_screencap — Take screenshot with filename sanitization, saves locally
  • adb_screencap_annotated — Screenshot with UI element bounding boxes and numbered labels composited onto the PNG. Returns annotated image path plus a text legend. Ideal for LLM workflows that reference elements by number
  • adb_current_activity — Get focused activity and top window stack
  • adb_input — Send tap, swipe, text, or keyevent input
  • adb_start_activity — Launch activities by intent or component name
  • adb_ui_dump — Dump full UI hierarchy. Supports three output formats: text (default, human-readable), tsv (compact tab-separated for token-efficient automation loops), xml (raw uiautomator XML)
  • adb_ui_find — Search UI hierarchy by text, resource-id, or content-description (returns tap coordinates)
  • adb_screen_state — Combined screen state in one call: foreground activity, screen dimensions and density, orientation, battery level, and a TSV list of interactive elements. Replaces 3–4 separate tool calls
  • adb_screenrecord_start — Start recording the device screen (1-180s, stored on device)
  • adb_screenrecord_stop — Stop recording and pull the mp4 video file locally

All built-in screenshot tools and workflow screenshot steps use a fresh private device directory per capture. Output filenames still select the saved local file; they never select device scratch paths. Cleanup is attempted after capture or transfer failures, and a cleanup failure is reported with its path instead of being hidden. Concurrent calls should use distinct output filenames if both saved images must be retained. Legacy scratch files are not automatically deleted.

Device Control (9 tools)

  • adb_airplane_mode — Toggle airplane mode with broadcast and verification
  • adb_airplane_cycle — Cycle airplane mode on/off to force cellular re-registration
  • adb_wifi — Enable or disable WiFi
  • adb_mobile_data — Enable or disable mobile data
  • adb_location — Set location mode (off/sensors/battery/high)
  • adb_screen — Wake, sleep, toggle, lock, or unlock the screen. Lock verifies keyguard state via dumpsys window. Unlock uses wm dismiss-keyguard (works for swipe keyguards); supply pin to perform the full PIN entry sequence: wakes screen, swipes up to reveal keypad, types PIN, confirms, and verifies the keyguard sleep token was released
  • adb_settings_get — Read any Android setting from system/secure/global namespace
  • adb_settings_put — Write any Android setting with read-back verification
  • adb_reboot — Reboot device (normal, recovery, or bootloader mode)

Wireless Debugging (4 tools)

  • adb_pair — Pair with device over WiFi using pairing code
  • adb_connect — Connect to device over WiFi/TCP
  • adb_disconnect — Disconnect wireless device(s)
  • adb_tcpip — Switch USB device to TCP/IP mode (auto-detects device IP)

Port Forwarding (8 tools)

  • adb_forward — Forward a local port to a device port (host → device)
  • adb_reverse — Reverse-forward a device port to the host (device → host)
  • adb_forward_list — List all active forward and reverse port mappings
  • adb_forward_remove — Remove a port forward or all forwards
  • adb_reverse_remove — Remove a reverse forward or all reverse forwards
  • adb_tunnel_open — Open a managed tunnel with opaque ID. Auto-picks a free host port for forward direction when omitted; registers cleanup so the tunnel is removed on server exit
  • adb_tunnel_list — List active managed tunnels (those opened via adb_tunnel_open). Optional device filter; shows ID, direction, endpoints, and age
  • adb_tunnel_close — Close a managed tunnel by ID, or close all at once with id="all"

Emulator Management (3 tools)

  • adb_avd_list — List available AVDs (PC mode) or detect KVM/QEMU virtualization capabilities (on-device mode)
  • adb_emulator_start — Launch an AVD with headless, cold boot, and GPU options (PC mode) or report QEMU alternative (on-device mode)
  • adb_emulator_stop — Gracefully shut down a running emulator

QEMU/KVM Virtualization (8 tools)

  • adb_qemu_setup — Check and install QEMU for on-device virtualization. Verifies KVM, reports host CPU/RAM, installs via Termux pkg
  • adb_qemu_images — Manage VM disk images: list, create (qcow2/raw), delete. Path containment verification prevents traversal
  • adb_qemu_start — Boot a KVM-accelerated VM with dynamic resource allocation. Auto-detects optimal CPUs (total minus 1, reserving one for host) and memory (65% of physical RAM). Supports kernel/initrd/append for Android boot, ADB port forwarding
  • adb_qemu_stop — Stop a running VM (graceful SIGTERM or force SIGKILL). Auto-disconnects guest ADB before killing. Reports running VMs if no name given
  • adb_qemu_status — Full status: KVM/QEMU availability, host resource budget, running VMs with PID/resources/uptime/ports/ADB connection state, image inventory
  • adb_qemu_connect — Connect to a running VM's guest ADB service. Restricted to localhost only — port derived from running VM state, never user input. Enables multi-device tools to operate on guest VMs
  • adb_qemu_disconnect — Disconnect from a guest VM's ADB service. Clears connection state and removes guest from device list
  • adb_qemu_guest_shell — Execute shell commands on a guest VM via ADB. Subject to security middleware. Guest serial derived internally — no user-supplied host/IP reaches the ADB binary

Test Sessions (3 tools)

  • adb_test_session_start — Start a named test session with organized output directory
  • adb_test_step — Capture a numbered step with screenshot and logcat into the session
  • adb_test_session_end — End session, write summary manifest, return directory path

Multi-Device Orchestration (4 tools)

  • adb_multi_shell — Execute a command on all/selected devices in parallel (security-checked)
  • adb_multi_install — Install an APK across multiple devices simultaneously
  • adb_multi_compare — Run a command on all devices and highlight output differences
  • adb_multi_test — Comparative test workflow: run predefined diagnostic profiles (firmware/security/network/identity/full) or custom command lists across all devices including QEMU guests, compare per-check, report matches and differences

Wear Data Layer (1 tool)

  • adb_wear_datalayer_preflight — Read-only phone/watch role, Google Play services, Bluetooth, optional package, companion-association, and Data Layer service preflight; pairing identifiers are intentionally omitted

Input Gestures & UI Automation (15 tools)

  • adb_input_drag — Drag from point A to point B (uses draganddrop with swipe fallback for older Android)
  • adb_input_fling — High-velocity fling gesture for momentum-scrolling through lists and paged views (configurable duration 20-200ms)
  • adb_input_long_press — Long press at coordinates with configurable hold duration
  • adb_input_double_tap — Double tap with configurable interval between taps
  • adb_input_text — Dedicated text input with space/special character handling
  • adb_open_url — Open a URL on the device via VIEW intent
  • adb_orientation — Get or set screen orientation (auto/portrait/landscape/reverse)
  • adb_clipboard — Read or write device clipboard
  • adb_input_pinch — Multi-touch pinch (zoom out) or spread (zoom in) gesture. Two fingers move symmetrically around a center point. Layered injection: parallel input swipe (universal, no root) or raw sendevent MT Type B protocol (true multi-touch, root required). Auto-detects touchscreen device and capabilities via getevent -p. Configurable center, radius, duration, angle, and interpolation steps
  • adb_tap_element — Find element by text/resource-id/content-description and tap its center
  • adb_wait_element — Poll UI hierarchy until an element appears or disappears (configurable timeout/poll interval)
  • adb_wait_stable — Poll until consecutive UI dumps match (screen stabilization after transitions)
  • adb_scroll_until — Scroll repeatedly until a target element is found, with optional auto-tap
  • adb_screenshot_compressed — Capture screenshot with size/quality metadata for token-efficient workflows
  • adb_batch_actions — Execute multiple input actions (tap/swipe/fling/long_press/double_tap/keyevent/text/drag/pinch/back/home/sleep) in a single tool call with security validation

Device Awareness (3 tools)

  • adb_screen_size — Screen resolution, display density (DPI), aspect ratio, and DP width in one call
  • adb_device_state — Combined snapshot: battery level/status/temp, network type, WiFi state, screen on/off, orientation, foreground activity
  • adb_notifications — Parse active notifications with package, title, text, importance, channel, flags, and timestamp (filterable by package)

Snapshot/Restore (3 tools)

  • adb_snapshot_capture — Save comprehensive device state (packages, settings, properties) to JSON
  • adb_snapshot_compare — Diff current state against a saved snapshot (added/removed packages, changed settings)
  • adb_snapshot_restore_settings — Restore global/secure settings from a saved snapshot

Network Capture (3 tools)

  • adb_tcpdump_start — Start background packet capture via tcpdump (requires root)
  • adb_tcpdump_stop — Stop capture and pull pcap file locally for Wireshark analysis
  • adb_network_connections — Show active TCP/UDP connections (ss/netstat with /proc/net fallback)

CI/CD Integration (3 tools)

  • adb_ci_wait_boot — Wait for device/emulator to fully boot with configurable timeout
  • adb_ci_device_ready — Structured pass/fail readiness check (boot, PM, screen, network, disk)
  • adb_ci_run_tests — Run instrumented tests via am instrument with parsed pass/fail results

Baseband/Modem (6 tools)

  • adb_baseband_info — Modem firmware, RIL implementation, chipset, SIM configuration (dual SIM detection with per-slot state), network registration. IMEI retrieval is opt-in only (includeImei=true)
  • adb_cell_identity — Cell ID (CID), TAC/LAC, EARFCN, PCI, PLMN from dumpsys phone for cellular network analysis
  • adb_signal_detail — RSRP, RSRQ, SINR, RSSI, timing advance — raw radio measurements for signal analysis
  • adb_neighboring_cells — All visible LTE/5G/WCDMA/GSM cells with identities and signal strengths
  • adb_carrier_config — Carrier configuration dump, carrier ID, preferred APN
  • adb_modem_logs — RIL radio buffer, telephony framework, RILJ/RILC, kernel dmesg (root) modem logs

Accessibility Auditing (3 tools)

  • adb_a11y_audit — Targeted Android accessibility checks: missing labels, undersized touch targets (<48dp), duplicate descriptions, unfocusable clickables
  • adb_a11y_touch_targets — List all interactive elements with touch target dimensions in dp, flag undersized
  • adb_a11y_tree — Accessibility-focused UI tree showing only screen-reader-relevant elements with roles, labels, and states

Regression Detection (3 tools)

  • adb_regression_baseline — Capture performance baseline (memory, CPU, frame stats, battery, network) to JSON
  • adb_regression_check — Compare current performance against a saved baseline with configurable regression thresholds
  • adb_regression_history — List all saved baselines with trends, optionally filtered by package

Device Farm (3 tools)

  • adb_farm_run — Run instrumented tests on Firebase Test Lab across multiple device models and API levels
  • adb_farm_results — Retrieve results from a Test Lab run or list recent test matrices
  • adb_farm_matrix — List available device models and Android versions on Firebase Test Lab

Plugin Registry (3 tools)

  • adb_registry_search — Search the community plugin registry, shows install status and available updates
  • adb_registry_install — Download and install a plugin from the registry by name
  • adb_registry_installed — List locally installed plugins with version and update availability

Plugins (2 tools)

  • adb_plugin_list — List all loaded plugins with paths and load times
  • adb_plugin_info — Plugin system documentation and example plugin format

Build (2 tools)

  • adb_gradle — Run any Gradle task in a project directory
  • adb_build_and_install — Build debug APK and install via ANDROID_SERIAL targeting

AT Commands (6 tools)

  • adb_shannon_session — Check Shannon/Exynos chipset detection, root, character-device modem ports, and a benign AT/OK handshake together; supports Google Tensor's /dev/umts_router, re-arms bounded CPIF reads until a terminal result, optionally sends read-only ATI, and never sends a modem configuration command
  • adb_at_detect — Auto-detect modem AT command device node by chipset family (Shannon, Qualcomm, MediaTek, Unisoc, generic). Probes known paths and returns the first responding node
  • adb_at_send — Send a single AT command to the modem with response capture. Auto-detects port or accepts manual override. Dangerous command blocklist with force override
  • adb_at_batch — Send multiple AT commands sequentially with per-command results. Configurable inter-command delay
  • adb_at_probe — Run a standard diagnostic probe: modem ID, signal quality, network registration, SIM status, operator, functionality mode
  • adb_at_cross_validate — Cross-validate baseband firmware by comparing AT command responses (ATI, AT+CGMR, AT+CGMM) against system properties. Flags discrepancies as potential firmware tampering, incomplete OTA, or property spoofing. Shannon-specific AT+DEVCONINFO support. Requires root

Screenshot Diffing (3 tools)

  • adb_screenshot_baseline — Capture and save a named screenshot baseline with metadata (dimensions, SHA-256, timestamp)
  • adb_screenshot_diff — Compare current screen against a saved baseline using pixel-level PNG decoding. Reports changed pixel count/percentage, bounding box of changed region, and supports a tolerance threshold for absorbing dynamic elements like clocks
  • adb_screenshot_history — List all saved screenshot baselines with metadata

Workflow Orchestration (3 tools)

  • adb_workflow_run — Execute a JSON-defined workflow: sequential device operations with variable substitution, conditional steps, loops, and result capture. Actions: shell, root_shell, install, screenshot, logcat, getprop, sleep
  • adb_workflow_validate — Validate workflow structure without executing. Shows execution plan
  • adb_workflow_list — List saved workflow files in the workflows directory

Split APK Management (4 tools)

  • adb_install_bundle — Install split APKs (app bundles) via install-multiple with replace and downgrade options
  • adb_list_splits — Show all APK split paths for a package with classification (base, config.density, config.language, etc.) and total size
  • adb_extract_apks — Pull all splits for a package to a local directory for analysis or backup
  • adb_apex_list — List installed APEX modules with version info

Device Mirroring (3 tools)

  • adb_mirror_start — Start live screen mirroring via scrcpy. Supports windowed and headless modes, recording, bitrate/FPS/resolution control, stay-awake, and screen-off
  • adb_mirror_stop — Stop mirroring for a device or all devices
  • adb_mirror_status — Check scrcpy availability and list active mirroring sessions

Automated Test Generation (3 tools)

  • adb_test_gen_from_ui — Analyze the current screen's interactive elements and generate a workflow that taps each one, screenshots, and checks for crashes
  • adb_test_gen_from_intents — Analyze a package's registered activities and generate a workflow that launches each exported activity with crash detection
  • adb_test_gen_save — Save a generated workflow JSON to the workflows directory for later execution

OTA Update Monitoring (3 tools)

  • adb_ota_fingerprint — Capture system fingerprint: build ID, Android version, security patch, bootloader, baseband firmware, kernel, A/B slot
  • adb_ota_check — Compare current system state against a saved fingerprint to detect OTA updates. Identifies changed fields and recommends re-baselining
  • adb_ota_history — List all saved fingerprints for a device with version progression over time

RIL Message Interception (3 tools)

  • adb_ril_start — Start capturing RIL messages from the radio logcat buffer. Categorizes registration, cell info, signal, network, security, handover, and NAS events
  • adb_ril_poll — Retrieve captured RIL messages with optional category filtering. Shows category distribution
  • adb_ril_stop — Stop a RIL capture session with category summary

Device Profiles (3 tools)

  • adb_profile_detect — Auto-detect and build a device profile: hardware ID, chipset family, modem nodes, root status, 5G support, dual SIM configuration. Matches against built-in library for known quirks
  • adb_profile_save — Save a device profile to the profiles library
  • adb_profile_list — List built-in and user-saved device profiles

Modem Firmware Analysis (3 tools)

  • adb_firmware_probe — Comprehensive firmware identification: parses baseband (Shannon/Qualcomm/MediaTek/Unisoc/HiSilicon/Intel), bootloader, and RIL implementation into structured components. Reports kernel, security patch, A/B slot, verified boot state, VBMeta, hypervisor, and OTA partition inventory
  • adb_firmware_diff — Compare all firmware components (baseband, bootloader, kernel, security patch, build ID, Android version, RIL) between saved fingerprints or live device. Deep parsed diffs for baseband and bootloader when changes detected
  • adb_firmware_history — Track firmware progression across all saved OTA fingerprints with multi-component change detection (baseband, bootloader, kernel, security patch, build ID, Android version) and parsed baseband diffs

Wireless Firmware (4 tools)

  • adb_wifi_firmware — WiFi chipset and firmware identification: driver version, firmware version, supported bands (2.4/5/6 GHz), WiFi standard detection (5/6/6E/7), current connection info. MAC address opt-in only
  • adb_bluetooth_firmware — Bluetooth firmware and chipset identification: firmware version, BT version (4.0–5.4 from LMP), adapter state, LE capabilities (2M PHY, Coded PHY, extended advertising), active profiles (A2DP/HFP/HID/LE Audio), bonded device count. MAC/name opt-in only
  • adb_nfc_firmware — NFC controller firmware: controller type (NXP/Broadcom/Samsung/ST), firmware version, supported technologies (NFC-A/B/F/V, MIFARE), secure element (eSE/UICC), HCE support
  • adb_gps_firmware — GNSS/GPS chipset and firmware identification: hardware model (manufacturer, chip, firmware), supported constellations (GPS/GLONASS/Galileo/BeiDou/QZSS/NavIC/SBAS), signal types with frequencies, dual-frequency (L1+L5) detection, raw GNSS measurement capabilities, A-GPS modes (MSB/MSA), SUPL server configuration, carrier phase measurements

Workflow Marketplace (3 tools)

  • adb_market_search — Search the workflow marketplace for community-shared workflow definitions with keyword and tag filtering. Shows install status
  • adb_market_install — Download, validate (JSON structure + SHA-256 integrity), and install a marketplace workflow for immediate use with adb_workflow_run
  • adb_market_export — Package a local workflow with marketplace metadata (author, version, tags, SHA-256) and generate a registry manifest entry for sharing

SELinux & Permission Auditing (3 tools)

  • adb_selinux_status — SELinux enforcement mode, policy version, shell context, recent AVC denial count. Root provides kernel dmesg denial stats
  • adb_selinux_denials — List recent AVC denial messages with parsed source/target contexts, permission classes, and denied operations. Supports process filtering
  • adb_permission_audit — Audit runtime permission grants for a package grouped by dangerous permission category (Camera, Location, Phone, SMS, etc.). Flags high-sensitivity grants

Thermal & Power Profiling (3 tools)

  • adb_thermal_snapshot — Capture all thermal zone temperatures, per-CPU frequencies/governors, cooling device states, battery temperature/current/voltage/power draw. Optional save as JSON baseline
  • adb_thermal_compare — Compare current thermal state against a saved baseline with per-zone temperature deltas and battery current changes
  • adb_battery_drain — Measure battery drain rate over a configurable duration (3-60s). Reports average mA, mW, estimated %/hour. Optional package-specific batterystats

Network Discovery (3 tools)

  • adb_network_scan — Scan the local network for ADB-enabled devices via ARP table and optional IP range sweep. Probes ports 5555-5558 with batched parallel TCP probes
  • adb_network_device_ip — Get the WiFi IP of a connected device via multiple methods. Shows ADB TCP status and wireless connection instructions
  • adb_network_auto_connect — One-step discover + connect: scans for ADB devices and automatically runs adb connect on each found listener

Hardware Sensor Access (2 tools)

  • adb_sensor_read — Read hardware sensor inventory and last-known values via dumpsys sensorservice. Enumerates vendor, type, mode, rate range, and wake capability, including Android's zero-handle sensors. Returns timestamps and axis-labeled formatting when recent events exist; inactive sensors are identified explicitly. This is passive inspection, not a request to start sensor sampling. Category filter (13 categories) and listOnly discovery mode. No root required
  • adb_iio_read — Read raw hardware data from the Linux IIO subsystem. Auto-discovers IIO devices, classifies by kernel driver. On Tensor/Exynos: exposes per-rail ODPM power monitors showing real-time power consumption per SoC subsystem. Generic IIO path handles raw channels with calibrated scale+offset. Root required

Result Handles (3 tools)

  • adb_result_list — List active result handles in the tempdir-backed cache. Shows tool, name, size, age, and remaining TTL for each handle
  • adb_result_get — Retrieve the content of a stored handle by tool + name. Returns the original content blocks as the source tool produced them; updates last-accessed time. For URI-based retrieval, use the result://{tool}/{name} MCP Resource instead
  • adb_result_drop — Delete a stored result handle, or clear all handles in the current namespace. Pass both tool and name to drop one specific handle, or all: true to drop everything. Useful before changing DA_AUTH_TOKEN (which would otherwise leave orphans under the old token-hash directory)

MCP Resources (5)

Read-only device state surfaces accessible by MCP clients:

  • device://list — List of all connected devices with state and model info
  • device://info/{serial} — Device properties (model, OS, build, ABI)
  • device://battery/{serial} — Parsed battery status (level, charging, temperature, voltage)
  • device://telephony/{serial} — Telephony registry state for cellular analysis
  • result://{tool}/{name} — Stored tool result handle. Resolve by URI; created by tools that opt into result-handle storage via the result_handle parameter. Listed by adb_result_list

MCP Prompts (4)

Pre-built workflow templates for common multi-step debugging tasks:

  • debug-crash — Clear logcat → restart app → wait for reproduction → capture crash buffer → analyze
  • deploy-and-test — Build → install → clear logcat → start watcher → launch → screenshot → report
  • telephony-snapshot — Capture telephony state, SIM/network operator, network type → summarize anomalies
  • airplane-cycle-test — Start watcher → baseline telephony → cycle airplane mode → compare pre/post state

Key Features

Device Caching

Device discovery results are cached with a configurable TTL (default 5s), eliminating redundant adb devices subprocess calls during rapid tool sequences. Cache auto-invalidates on connection errors and after wireless connect/disconnect/pair operations.

Transient Failure Retry

The ADB bridge automatically retries on transient failures (device offline, connection reset, protocol fault) with configurable retry count and exponential backoff. Diagnostic commands skip retries to surface real issues immediately.

Output Protection

All ADB output passes through the OutputProcessor which normalizes line endings, enforces configurable character limits, and provides contextual truncation at logical boundaries (line breaks, section separators) rather than cutting mid-line. Includes structured parsers for battery, meminfo, and getprop output.

Persistent Logcat Streaming

Background logcat watchers run as spawned processes with ring buffer accumulation. Each poll returns only new lines since the last read. Supports multiple concurrent sessions (up to 10) with independent filters. Process cleanup handlers prevent orphaned adb logcat processes on server exit.

UI Hierarchy Analysis

Full view tree capture via uiautomator dump with parsed XML extraction. Returns structured element data including text, resource-id, content-description, class names, bounds coordinates with tap-ready center points, and interaction flags. Pre-compiled regex attribute extraction for efficient parsing.

Security Middleware

DA_SECURITY=true enables command blocklist/allowlist filtering and rate limiting on middleware-checked paths, including generic shell, workflow shell steps, and selected input/automation tools. Checked commands are logged with credential redaction by default. These controls are not a global per-tool policy or complete audit trail: dedicated tools such as adb_reboot and adb_wifi call the bridge directly. Use DA_TOOL_PROFILE=inspect for an enforced three-tool read-only catalog; command allowlisting alone does not make full read-only. See SECURITY.md for deployment recipes and limits.

Input Sanitization

All tools that interpolate user-supplied parameters into shell command strings validate inputs against shell metacharacters before execution. Package names, property keys, service names, setting keys, test identifiers, network interface names, and tcpdump filters are all validated through a centralized validateShellArg() function that rejects ;, |, &, $, backticks, parentheses, and other injection vectors. File paths use single-quoted shell escaping to prevent $() command substitution. The adb_input tool applies type-specific validation: tap/swipe accept only numeric coordinates, keyevent accepts only alphanumeric keycodes, and text is shell-escaped for literal delivery. The adb_batch_actions tool enforces the same per-action-type validation (digits-only for coordinates, alphanumeric for keycodes, shell-escape for text) and routes every assembled command through the security middleware. Deserialized JSON from snapshot files is validated before shell interpolation. Every z.number() parameter across all 209 tools has explicit .min()/.max() Zod bounds to prevent resource exhaustion from extreme values. The LocalBridge has explicit handlers for every ADB subcommand used by tool modules, preventing unquoted fallthrough to the default shell handler. In on-device mode, privilege escalation uses a frozen 16-command allowlist and restricted-path regex — the elevation set is ReadonlySet + Object.freeze, not configurable at runtime. The HTTP/SSE transport denies cross-origin requests by default (configurable via DA_HTTP_CORS_ORIGIN), the plugin registry verifies SHA-256 integrity hashes and prevents path traversal via directory containment checks, and the workflow engine enforces step count (200), sleep duration (5 min), and repeat iteration (100) limits. Fetch helpers enforce a 5 MB response body limit. Getprop output parsing handles Windows \r\n line endings via .trim() before regex matching, and dual SIM slot counts are capped at 4 to prevent resource exhaustion from corrupted device properties.

Multi-Device Orchestration

Run commands, install APKs, and compare outputs across multiple connected devices in parallel. Essential for comparative testing across Android versions and device models.

Snapshot/Restore

Capture comprehensive device state snapshots (packages, settings across all namespaces, system properties) to JSON files. Compare current state against saved snapshots to detect drift. Restore settings from snapshots for reproducible test environments.

Network Traffic Capture

On-device packet capture via tcpdump with pcap file pull for Wireshark analysis. Includes active connection listing via ss/netstat with /proc/net fallback for devices without those tools.

CI/CD Integration

Purpose-built tools for automated pipelines: wait for device boot with polling, structured readiness checks, and instrumented test execution with parsed pass/fail results.

Plugin Architecture

Dynamic tool module loading from a configurable plugins directory. Plugins are standard JavaScript ESM modules that export a register(ctx) function receiving the full ToolContext. Loaded at server startup, enabling community contributions without modifying core code.

The SDK v2 server preserves legacy plugin .tool(), .prompt(), .resource(), and register*() calls through a compatibility adapter, including Zod 3/4 validation, prompt argument completions, callback context, and registration updates. Async registration is awaited. Existing v1 SDK imports remain available. Cancelled or disconnected plugin callbacks cannot use their retained legacy or adapted v2 request/notification helpers to contact the next client. Typed plugins keep ToolContext for legacy callback fields such as extra.signal; new plugins can use NativePluginToolContext for v2 fields such as context.mcpReq. Direct low-level SDK request handlers require migration to v2; SDK-private internals and experimental task APIs are outside this adapter.

Community Plugin Registry

Search, install, and manage plugins from an operator-configured registry URL. DeepADB ships no default registry; set DA_REGISTRY_URL to a manifest URL you trust before searching or installing. Shows install status, version comparison, and available updates. Downloads plugin files with companion metadata into the plugins directory for loading on next restart. Installation requires a matching SHA-256 hash in the manifest; missing or mismatched hashes are rejected. Other checks include path traversal protection and register() export sanity checking. A matching hash verifies consistency with the manifest, not the trustworthiness of its publisher or plugin code.

Baseband/Modem Integration

Deep cellular radio inspection tools for advanced Android development and research. Extracts modem firmware identification, cell identity parameters (CID, TAC, EARFCN, PCI), raw signal measurements (RSRP, RSRQ, SINR), neighboring cell surveys, carrier configuration, and multi-source modem logs (RIL radio buffer, telephony framework, kernel dmesg). Supports Shannon/Exynos, Qualcomm, MediaTek, and Unisoc chipset families via standard Android telephony APIs. Includes Google Tensor SoC detection (gs101/gs201/zuma/zumapro) for automatic Shannon modem path routing on Pixel 6–9 devices. Dual SIM detection reports per-slot SIM state, operator, network type, and country for DSDS, DSDA, and TSTS configurations.

Accessibility Auditing

Targeted accessibility checks on the live Android UI hierarchy. Detects missing labels on interactive elements, undersized touch targets below the Android 48dp recommendation (density-aware), images without content-descriptions, clickable elements missing focusability, and duplicate content-descriptions. Generates structured reports with severity levels and includes an accessibility tree view for screen reader debugging. These checks do not constitute a complete WCAG conformance assessment or replace testing with assistive technology.

Regression Detection

Capture performance baselines (memory, CPU, frame stats, battery, network state) and compare subsequent runs against them. Configurable regression thresholds for memory (+20%), CPU (+50%), and jank rate (+25%). Maintains a history of baselines for trend analysis across releases.

Device Farm Integration

Cloud-based test execution via Firebase Test Lab through the gcloud CLI. Run instrumented tests across multiple device models and API levels, retrieve structured results, and list available test matrix configurations. Graceful fallback with setup instructions if gcloud is unavailable.

HTTP Transport and Tool Profiles

The SDK v2 migration retains existing client configurations: stdio remains the default, /sse and /message retain the legacy SSE protocol, and /ws remains available. Negotiated protocol revisions through 2025-11-25 are preserved. Streamable HTTP is available at /mcp on the same HTTP port. The 2026-07-28 protocol lifecycle is not enabled.

Alternative to stdio for browser-based and native MCP clients. Set DA_HTTP_PORT to start an HTTP server providing /mcp (Streamable HTTP), /sse (legacy client subscription), /message (legacy JSON-RPC), and /health endpoints. Set DA_HTTP_CORS_ORIGIN to an exact HTTP(S) origin or comma-separated list. Unlisted Origins are rejected with HTTP 403 before session handling. Browser preflights permit MCP-Protocol-Version; actual MCP requests still require the configured bearer token. Requests without Origin remain supported for native clients.

/mcp supports POST, GET and DELETE with an exposed Mcp-Session-Id header. One client is active across /mcp and legacy SSE. A new /mcp session cannot displace an active SSE client, and a new SSE client cannot displace an active /mcp session; these attempts receive 409. A second authorized SSE client replaces the previous SSE connection for compatibility. Competing /mcp initializations receive 409 except for the guarded browser-reload recovery described below. Streamable HTTP sessions expire after 30 idle minutes by default; active MCP requests and bounded uploads suspend the countdown until work completes. An open notification stream alone does not prevent expiry, and DELETE can still terminate an active session. If a browser loses its ID on reload, a valid initialization from the same Origin can reclaim the slot after its notification stream disconnects and all active calls, uploads and response streams finish. Native/POST-only clients retain explicit DELETE/expiry behavior; an open client or server-initiated stream close cannot trigger this recovery. Legacy SSE messages must use the current connection's advertised sessionId; stale messages cannot execute after replacement. Plugins and device managers initialize once per process, including across reconnects.

/mcp rejects duplicate in-flight request IDs and repeated IDs within a batch before dispatch (HTTP 400, JSON-RPC -32600), so a conflicting request cannot release another tool's protection against expiry or reconnect. Rejected batches execute no partial work.

DA_TOOL_PROFILE=full preserves the full catalog and existing plugins. DA_TOOL_PROFILE=inspect exposes only adb_devices, adb_device_info and adb_getprop. Excluded tools cannot be called directly; plugins, workflows, resources and prompts are unavailable, and configuring GraphQL fails startup. See Local LLM clients for setup and session behavior.

Test Session Management

Structured test workflows with numbered steps. Each step captures a screenshot and logcat snapshot into an organized directory with a Markdown manifest. Designed for reproducible test documentation.

AT Command Interface

Direct AT command passthrough to the modem via root access, enabling raw interrogation beyond the Android telephony framework. Multi-chipset support auto-detects device nodes for Samsung Shannon/Exynos, Qualcomm Snapdragon, MediaTek, Unisoc/Spreadtrum, and generic USB modems. Input validation rejects shell metacharacters from both AT command strings and device node paths before root shell interpolation. A safety blocklist prevents accidental execution of dangerous commands (AT+CFUN=0, AT+EGMR, etc.) with an explicit force override.

Screenshot Diffing

True pixel-level visual regression detection. Captures named screenshot baselines and compares the current screen state by decoding PNG pixel data (IHDR parsing, IDAT decompression, all 5 PNG filter types) and comparing actual RGB values. Reports changed pixel count and percentage, bounding box of the changed region with vertical screen position, and dimension/size deltas. Supports a tolerancePercent parameter (0–100) that absorbs minor dynamic changes like clock displays or notification badges — a 1% tolerance reliably absorbs nav bar clock changes (~0.5% of pixels) while catching any real UI regression. SHA-256 fast-path for exact matches. Zero external dependencies.

Workflow Orchestration

Declarative JSON workflow engine for repeatable multi-step device operations. Supports variable substitution ({{pkg}}), conditional steps (if expressions with ==, !=, contains), loops (repeat, capped at 100 iterations), and result capture into variables for downstream steps. Actions map directly to ADB bridge operations with full security middleware enforcement. Workflow validation enforces a 200-step maximum and 5-minute sleep cap per step to prevent resource exhaustion from malicious or malformed workflow definitions.

Split APK Management

Support for modern Android delivery formats. Install app bundles via install-multiple, inspect split APK structure (base + config splits for language, density, ABI), extract all splits locally for analysis, and list APEX modules.

Device Mirroring

Live screen mirroring via scrcpy integration. Supports windowed mode for visual feedback and headless mode for recording-only workflows. Per-device session tracking enables simultaneous mirroring of multiple connected devices. Process cleanup handlers prevent orphaned scrcpy processes.

Automated Test Generation

Analyzes live UI hierarchy and package intent registrations to auto-generate test workflow JSON compatible with the workflow orchestration engine. UI-based generation taps each interactive element, screenshots, and checks for crashes. Intent-based generation launches each exported activity with crash detection.

OTA Update Monitoring

Tracks comprehensive system fingerprint (build ID, Android version, security patch, bootloader, baseband firmware, kernel version, A/B partition slot) across sessions. Compares current state against saved fingerprints to detect OTA updates. Identifies exactly which fields changed and recommends re-baselining performance metrics and screenshots after updates.

RIL Message Interception

Persistent Radio Interface Layer message capture from the Android radio logcat buffer. Spawns a background process that accumulates and categorizes RIL messages into: registration, cell_info, signal, network, security, handover, data, radio_state, sms, and NAS events. Poll-based retrieval with category filtering. Useful for passive monitoring of baseband-framework communication for radio diagnostics and cellular network research. Session limit (5) and process cleanup handlers prevent resource exhaustion.

Device Profile Library

Device-specific knowledge base containing hardware identification, chipset family, known modem device nodes, AT command compatibility, root requirements, dual SIM slot count, and quirks. Auto-detects profiles from connected devices and matches against a built-in library of known devices. Saved profiles persist across sessions and improve auto-detection accuracy for tools like adb_at_detect. Community-extensible through saved profile files.

WebSocket Transport

Alternative to stdio and HTTP for native clients that support WebSocket. Requires the optional ws npm package. Set DA_WS_PORT to enable. Authentication and Origin checks run before upgrade; a second active client receives HTTP 409. Browser clients needing bearer headers should use Streamable HTTP or legacy SSE because the native browser WebSocket API cannot set arbitrary Authorization headers.

Modem Firmware Analysis

Comprehensive multi-component firmware identification, diffing, and history tracking. Parses baseband version strings for 6 chipset families: Shannon/Exynos (including Google Pixel/Tensor g5123b-* format and classic Samsung S5123AP_CL* format), Qualcomm MPSS branch/version/build, MediaTek MOLY branch/release/milestone, Unisoc/Spreadtrum SoC model/version, HiSilicon/Kirin model/carrier code, and Intel XMM model/branch. Also parses bootloader versions (Pixel codename/version/build, Samsung model/carrier/revision) and RIL implementation strings (Samsung S.LSI vendor/id/API/build date, Qualcomm, MediaTek). The firmware probe reports 8 sections: baseband, bootloader, RIL, kernel, security/build, partition/boot (A/B slot, secure boot, verified boot, flash lock), VBMeta integrity, and OTA partition inventory. The diff tool compares all firmware components between saved fingerprints or live device state, with deep parsed sub-diffs for baseband and bootloader. The history tool tracks multi-component firmware progression across OTA fingerprints.

Workflow Marketplace

Community sharing layer for the workflow orchestration engine. DeepADB ships no default marketplace; configure a trusted manifest with DA_WORKFLOW_REGISTRY_URL, or derive it from DA_REGISTRY_URL by replacing registry.json with workflows.json. Search for shared test workflows, diagnostic sequences, and audit procedures. Download and install workflows for execution with adb_workflow_run; installation requires a matching SHA-256 hash in the manifest. Export local workflows with marketplace metadata and auto-generated registry manifest entries for submission. Review the source and workflow actions before running them.

GraphQL API

Optional HTTP endpoint serving a GraphQL API for composed device queries. Enables clients to fetch device info, battery, network, and arbitrary properties in a single request instead of multiple MCP tool calls. POST body size limited to 1 MiB. Device properties are pre-fetched once per resolution to minimize subprocess calls. Requires the optional graphql npm package. Set DA_GRAPHQL_PORT to enable in the full profile; query and work budgets are documented in SECURITY.md.

Request validation and known limit errors remain actionable. Unexpected request/resolver failures return generic errors, with backend diagnostics kept on server stderr. GraphQL execution errors retain the normal errors[]/data shape with HTTP 200; unexpected request-handler failures use HTTP 500. See SECURITY.md for the error boundary.

SELinux & Permission Auditing

Inspects SELinux enforcement mode, queries AVC denials from logcat and kernel audit logs, and audits runtime permission grants per package. Groups granted permissions by dangerous category (Camera, Location, Phone, SMS, etc.) and flags high-sensitivity grants like background location and manage-external-storage. Extends the security auditing surface to the OS permission layer.

Thermal & Power Profiling

Captures thermal zone temperatures from sysfs, per-CPU frequency scaling states and governors, cooling device activity, and battery drain rates. Complements regression detection with thermal/power baselines for issues that manifest as heat or battery drain rather than frame drops. Includes timed drain measurement with mA/mW/estimated-%per-hour calculations.

Network Device Discovery

Scans the local network for ADB-enabled devices via ARP table queries and optional IP range sweeps. Probes common ADB ports (5555-5558) with batched parallel TCP connection attempts. Extracts device WiFi IPs via multiple methods. Auto-connect mode discovers and connects to devices in one step. Streamlines wireless debugging workflows.

QEMU/KVM Virtualization

On-device virtual machine management using QEMU with KVM hardware acceleration. Enables running guest Android VMs directly on the physical device — a capability unique to DeepADB. Dynamic resource allocation auto-detects host CPU cores and physical RAM, reserving 1 core and 35% of memory for the host OS to prevent starvation. Multi-VM support tracks resource consumption across concurrent VMs, refusing new VMs when the pool is exhausted rather than degrading host performance. Disk image management with qcow2 (sparse, snapshot-capable) and raw formats. ADB port forwarding to guest VMs enables DeepADB's full tool suite to target both host and guest devices simultaneously. Process lifecycle tracked via the centralized cleanup registry with SIGTERM/SIGKILL shutdown. Path containment verification on all image operations prevents directory traversal.

ToolContext Architecture

All 49 built-in tool modules receive a unified BuiltinToolContext dependency bundle containing server, bridge, deviceManager, logger, security, and config. Adding new cross-cutting dependencies requires no module signature changes.

Environment Variables

VariableDefaultDescription
ADB_PATHAuto-detectPath to ADB binary (ignored in on-device mode)
DA_LOCALAuto-detecttrue/1 forces LocalBridge; false/0 forces ADB. Otherwise detect Android through /system/build.prop.
DA_TIMEOUT30000Default command timeout in milliseconds
DA_MAX_OUTPUT50000Max output characters before truncation
DA_MAX_LOGCAT500Max logcat lines per snapshot
DA_DEVICE(auto)Default device serial (auto-selects if single device)
DA_TEMP_DIRWindows: %TEMP%/deepadb; POSIX host: /tmp/deepadb; Android: $HOME/.deepadbWorking directory for screenshots, pulled files, bug reports, test sessions and snapshots. On-device falls back to /data/local/tmp/.deepadb when HOME is unset.
DA_CACHE_TTL5000Device list cache TTL in milliseconds (0 = disabled)
DA_RETRY_COUNT1Number of retries for transient ADB failures
DA_RETRY_DELAY500Base retry delay in ms (doubles each attempt)
DA_LOG_LEVELinfoLog level: debug, info, warn, error
DA_ASCII_ONLY(auto-detect)Set to 1 to force ASCII-only output in the startup warning banner. Default auto-detects via WT_SESSION/TERM_PROGRAM/TERM for Unicode-capable terminals; falls back to ASCII on legacy cmd.exe.
DA_RESOURCE_CACHE_TTL_MS0 (disabled)MCP Resource cache TTL in ms. Set to a positive value to cache resource reads (device://info, device://battery, etc.) for that duration.
DA_RESULT_HANDLE_DIR{tempDir}/result-handlesStorage root for tempdir-backed tool result handles. Override to relocate the store off the default temp directory.
DA_RESULT_HANDLE_TTL43200 (12h)Per-handle TTL in seconds. Handles older than this are evicted on startup sweep and during periodic eviction. Bounded to [60, 7 days].
DA_RESULT_HANDLE_MAX_BYTES5242880 (5 MiB)Cap on the serialized content blocks stored in one handle. If exceeded, storage is refused; the original tool output is preserved with a not-stored warning.
DA_RESULT_HANDLE_TOTAL_BYTES104857600 (100 MB)Total result-handle store size cap across all handles. Triggers LRU eviction when exceeded.
DA_RESULT_HANDLE_MAX_COUNT100Maximum number of active handles. Triggers LRU eviction when exceeded.
DA_SECURITYfalseEnable filtering/rate limits on middleware-checked command paths; not a global tool policy
DA_BLOCKED_COMMANDS(none)Blocked substrings on middleware-checked command paths
DA_ALLOWED_COMMANDS(none)Allowed substrings on checked command paths; does not make the full catalog read-only
DA_RATE_LIMIT0Max middleware-checked commands per minute; not an HTTP/global tool limit (0 = unlimited)
DA_CI_PING_TARGET1.1.1.1Network reachability target used by adb_ci_device_ready (network reachability is one of the readiness checks alongside boot completion, ADB authorization, and package manager availability). Override to point at an internal target if 1.1.1.1 is firewalled.
DA_AUDIT_LOGtrueLog middleware-checked commands with credential redaction; not a complete per-tool audit
DA_PLUGIN_DIR{tempDir}/pluginsDirectory to scan for plugin .js modules at startup
DA_REGISTRY_URL(not configured)Trusted plugin registry manifest URL; no default registry is shipped. Installation requires a matching SHA-256 hash in the manifest.
DA_HTTP_PORT(disabled)Enable HTTP transport: /mcp plus legacy /sse and /message
DA_HTTP_SESSION_TTL_MS1800000/mcp idle-session timeout; integer 1000–3600000 ms
DA_TOOL_PROFILEfullfull preserves all tools/plugins; inspect exposes three device/property tools and disables alternate interfaces
DA_HTTP_HOST127.0.0.1Bind address for HTTP/SSE, WebSocket, and GraphQL servers
DA_AUTH_TOKEN(none — open)When set, MCP/GraphQL requests and WebSocket upgrades require Authorization: Bearer <token>. Health endpoints and validated CORS preflights are token-free; Origin checks still apply.
DA_HTTP_CORS_ORIGIN(none — deny Origins)Exact HTTP(S) origins for HTTP/SSE; comma-separated; no paths or wildcards
DA_WS_PORT(disabled)Set to a port number to enable WebSocket transport mode (requires npm install ws)
DA_WS_CORS_ORIGIN(none — deny Origins)Exact HTTP(S) origins for WebSocket upgrades and health endpoint; comma-separated
DA_GRAPHQL_PORT(disabled)Set to a port number to enable the GraphQL API endpoint (requires npm install graphql)
DA_GRAPHQL_CORS_ORIGIN(none — deny Origins)Exact HTTP(S) origins for GraphQL; comma-separated; no paths or wildcards
DA_WORKFLOW_REGISTRY_URL(not configured)Trusted workflow manifest URL. Falls back to DA_REGISTRY_URL with registry.json replaced by workflows.json when that variable is set. Installation requires a matching SHA-256 hash.
DA_TEST_PIN(none)Numeric PIN used by tests/test-ui-control.mjs to exercise screen-lock/unlock tests. Without it, the 4 lock-state tests skip. Format: DA_TEST_PIN=0000 npm test.
DA_TEST_PROFILEpixelTest-only expectations: pixel retains strict hardware coverage; the npm run test:emulator wrapper selects emulator and provisions its disposable fixture. Unknown values fail startup. Separate from DA_TOOL_PROFILE.

Project Structure

DeepADB/├── src/│   ├── index.ts                # Entry point — stdio, HTTP, WebSocket, plus optional GraphQL│   ├── server.ts               # MCP server wiring, config, module registration (exports CreateServerResult)│   ├── http-transport.ts       # Shared HTTP router, Origin/auth checks and legacy SSE│   ├── streamable-http.ts      # Bounded /mcp session and Streamable HTTP lifecycle│   ├── tool-profile.ts         # Startup profile validation and tool admission guards│   ├── plugin-compat.ts        # Legacy plugin APIs adapted to the v2 server│   ├── ws-transport.ts         # WebSocket transport (optional `ws` package)│   ├── graphql-api.ts          # GraphQL API endpoint (optional `graphql` package)│   ├── tool-context.ts         # Unified dependency bundle (ToolContext interface)│   ├── bridge/│   │   ├── adb-bridge.ts       # Core ADB subprocess wrapper, retry logic, error types│   │   ├── local-bridge.ts     # On-device direct execution bridge with privilege escalation (Termux/local mode)│   │   └── device-manager.ts   # Device discovery, TTL cache, serial routing│   ├── tools/│   │   ├── health.ts           # Toolchain health check (1 tool)│   │   ├── runtime-audit.ts    # Unified read-only runtime readiness audit (1 tool)│   │   ├── device.ts           # Device info and properties (3 tools)│   │   ├── shell.ts            # Shell and root command execution (2 tools)│   │   ├── packages.ts         # App lifecycle, install, permissions, intents (12 tools)│   │   ├── database-inspector.ts # Package-scoped read-only Room/SQLite inspection (1 tool)│   │   ├── files.ts            # File operations — push, pull, write, find, grep, replace, stat, checksum, chmod, chown, touch, fsinfo (18 tools)│   │   ├── logs.ts             # Logcat snapshots — filtered (3 tools)│   │   ├── logcat-watch.ts     # Persistent logcat with ring buffer and poll (4 tools)│   │   ├── diagnostics.ts      # dumpsys, telephony, battery, network, perf, bugreport, crash logs, heap dump (9 tools)│   │   ├── ui.ts               # Screenshots, input, activity, UI hierarchy, annotated screencap, screen state (8 tools)│   │   ├── input-gestures.ts   # Drag, long press, double tap, text, URL, orientation, clipboard, tap-element, wait-element, wait-stable, scroll-until, compressed screenshot, batch actions, fling, pinch, screen size, device state, notifications (18 tools)│   │   ├── screen-record.ts    # Screen video recording start/stop (2 tools)│   │   ├── control.ts          # Airplane, WiFi, data, location, screen, settings, reboot (9 tools)│   │   ├── wireless.ts         # WiFi pairing, connect, disconnect, TCP/IP (4 tools)│   │   ├── forwarding.ts       # Port forwarding — forward, reverse, list, remove, managed tunnels with auto-port-pick (8 tools)│   │   ├── emulator.ts         # AVD list, start, stop with on-device KVM/QEMU detection (3 tools)│   │   ├── qemu.ts             # QEMU/KVM VM management — setup, images, start, stop, status, guest ADB connect/disconnect/shell (8 tools)│   │   ├── testing.ts          # Structured test sessions with numbered steps (3 tools)│   │   ├── multi-device.ts     # Multi-device shell, install, compare, comparative testing (4 tools)│   │   ├── snapshot.ts         # Device state capture, compare, restore (3 tools)│   │   ├── network-capture.ts  # tcpdump start/stop, network connections (3 tools)│   │   ├── ci.ts               # CI wait-boot, device-ready, run-tests (3 tools)│   │   ├── plugins.ts          # Plugin loader, info, and dynamic tool loading (2 tools)│   │   ├── baseband.ts         # Modem/baseband inspection and radio diagnostics (6 tools)│   │   ├── accessibility.ts    # Targeted Android UI accessibility checks (3 tools)│   │   ├── regression.ts       # Performance baseline and regression detection (3 tools)│   │   ├── device-farm.ts      # Firebase Test Lab integration via gcloud (3 tools)│   │   ├── registry.ts         # Community plugin registry search/install (3 tools)│   │   ├── at-commands.ts      # AT command modem interface, Shannon session, cross-validation (6 tools)│   │   ├── screenshot-diff.ts  # Visual regression — screenshot baseline/diff (3 tools)│   │   ├── workflow.ts         # Declarative workflow orchestration engine (3 tools)│   │   ├── split-apk.ts        # App bundles, split APKs, APEX modules (4 tools)│   │   ├── mirroring.ts        # Live screen mirroring via scrcpy (3 tools)│   │   ├── test-gen.ts         # Automated test workflow generation (3 tools)│   │   ├── ota-monitor.ts      # OTA update monitoring and fingerprinting (3 tools)│   │   ├── ril-intercept.ts    # RIL message interception from radio buffer (3 tools)│   │   ├── device-profiles.ts  # Device profile library with built-in entries (3 tools)│   │   ├── firmware-analysis.ts # Modem firmware version parsing and diffing (3 tools)│   │   ├── workflow-market.ts  # Workflow marketplace — search, install, export (3 tools)│   │   ├── selinux-audit.ts    # SELinux status, AVC denials, permission auditing (3 tools)│   │   ├── thermal-power.ts    # Thermal zones, CPU frequency, battery drain (3 tools)│   │   ├── network-discovery.ts # ADB-over-network scanning and auto-connect (3 tools)│   │   ├── app-network.ts      # Per-app UID routing and network-policy context (1 tool)│   │   ├── wear.ts             # Wear OS Data Layer phone/watch preflight (1 tool)│   │   ├── sensors.ts          # Hardware sensor enumeration, IIO power monitor reading (2 tools)│   │   ├── result-handles.ts   # Tempdir-backed result handles — list, get, drop (3 tools) + the result://{tool}/{name} resource│   │   ├── wireless-firmware.ts # WiFi, Bluetooth, NFC, GPS firmware identification (4 tools)│   │   ├── build.ts            # Gradle build and install (2 tools)│   │   ├── resources.ts        # MCP Resources — 4 device-state surfaces: device://info|battery|telephony|list (5th, result://, lives in result-handles.ts)│   │   └── prompts.ts          # MCP Prompts — workflow templates (4 prompts)│   ├── middleware/│   │   ├── auth.ts             # Bearer token authentication for network transports (DA_AUTH_TOKEN)│   │   ├── origin.ts           # Exact browser Origin and preflight checks│   │   ├── http-url.ts         # HTTP URL authority formatting, including IPv6 hosts│   │   ├── graphql-budget.ts   # GraphQL complexity limits and device-operation budgets│   │   ├── graphql-errors.ts   # Safe public GraphQL errors and internal error masking│   │   ├── output-processor.ts # Contextual truncation, structured parsers, settledValue helper│   │   ├── security.ts         # Command filtering, rate limiting, audit logging with redaction│   │   ├── sanitize.ts         # Shell injection prevention — validateShellArg/validateShellArgs/shellEscape│   │   ├── chipset.ts          # Shared chipset family detection, modem path mapping, SIM config detection│   │   ├── fetch-utils.ts      # Shared HTTP helpers with 5 MB streaming response size limit│   │   ├── png-utils.ts        # Zero-dependency PNG decode/encode/draw primitives for screenshot annotation and diffing│   │   ├── ui-dump.ts          # Shared uiautomator XML capture with concurrent-safe paths, on-device /data/local/tmp routing, and cleanup│   │   ├── cleanup.ts          # Centralized process cleanup registry for SIGINT/SIGTERM/exit│   │   ├── logger.ts           # stderr-safe logging (MCP-compliant)│   │   ├── fs-utils.ts         # Filename sanitization, atomic write, private-dir helpers, within-dir containment check│   │   ├── sqlite-path.ts      # Package/database path containment and symlink guards│   │   ├── sqlite-query.ts     # Bounded, cancellable SQLite query subprocess management│   │   ├── sqlite-worker.ts    # Read-only host SQLite worker with memory and output limits│   │   ├── parse-utils.ts      # Shared parseIntSafe for env-var numeric parsing (single source of truth)│   │   └── result-handle.ts    # Tempdir-backed tool result content cache with TTL, LRU, and token-hash isolation│   └── config/│       └── config.ts           # Configuration, env vars, startup validation├── package.json├── tsconfig.json├── server.json                  # MCP Registry metadata (io.github.fullread/deepadb)├── .gitignore├── README.md├── LOCAL_LLMS.md                # stdio/browser setup, tool profiles and session behavior├── SECURITY.md                  # Threat model, security architecture, deployment hardening, vulnerability reporting├── CHANGELOG.md                 # Version history from v0.1.0 to current├── LICENSE                      # Apache 2.0 license└── tests/    ├── run-all.mjs              # Run all test suites sequentially with summary (tracks skipped counts)    ├── run-emulator.mjs         # Verify emulator, provision/remove disposable fixture, run portable profile    ├── test-sensor-parsing.mjs  # Device-free sensor dump regressions, including handle zero    ├── test-ui-automation.mjs   # Device-free navigation, bounded waits/scrolls and failure paths    ├── test-screenshot-cleanup.mjs # Device-free screenshot ownership, concurrency, cleanup and tool contracts    ├── test-hw.mjs              # Hardware core: health, identity, baseband, thermal, profiles, wireless firmware, crash analysis (34 tests)    ├── test-shell-files.mjs     # Shell, filesystem, packages, diagnostics (24 tests)    ├── test-ui-control.mjs      # UI hierarchy, screenshots, settings, input gestures, UI automation, device awareness, accessibility, screen lock/unlock, multi-touch (46 tests)    ├── test-monitoring.mjs      # Logcat watchers, snapshots, OTA, regression, workflows (43 tests)    ├── test-security.mjs        # Input sanitization, shell injection, AT command safety, QEMU shell escaping, heap-dump validation (116 on-device, 105 host)    ├── test-lifecycle.mjs       # App lifecycle, file push/pull, input, port forwarding, screen recording, test sessions (24 tests)    ├── test-analysis.mjs        # Thermal/snapshot/regression comparison, firmware diff, screenshot diff, test gen, RIL intercept, AT cross-validation, permission management (23 tests)    ├── test-boundaries.mjs      # Zod bounds enforcement, input injection, error paths, sensitive data protection, wireless ADB coverage, multi-device basics, tunnel automation, device-free coverage boundaries (79 tests)    ├── test-sensors.mjs         # HAL sensors, IIO power monitors, category filters, formatting, wake-up, rate display (30 tests)    ├── test-files-extended.mjs  # File tool coverage — write, find, stat, checksum, mkdir, rm, move, copy, chmod, touch, fsinfo, chown, grep, replace; push safety; sed-escape regression (95 tests)    ├── test-result-handles.mjs # Result handle store — listing, retrieval, drop, isolation, eviction (19 tests)    ├── test-qemu.mjs            # QEMU/KVM setup, image management, VM status, guest connectivity errors (13 on-device tests)    ├── test-qemu-boot.mjs       # QEMU Alpine VM boot with auto-fetch of kernel/initrd, KVM acceleration, topology detection, guest ADB connectivity (17 on-device tests)    ├── test-supply-chain.mjs    # Supply-chain hardening checks for fetch and network paths (24 tests)    ├── test-sanitize-fuzz.mjs   # Property-based fuzzing of shell sanitizers — shellQuote/shellEscape round-trip, validateShellArg rejection (19 tests)    ├── test-transports.mjs      # Transport smoke — HTTP/SSE + WebSocket MCP round-trip, GraphQL devices query and introspection (8 tests)    ├── test-sdk-compat.mjs      # SDK v1/v2 clients, plugin compatibility, auth and reconnects (37 tests)    ├── test-browser-access.mjs  # Origin, CORS, auth and WebSocket upgrade checks (14 tests)    ├── test-local-llm.mjs       # Streamable HTTP lifecycle, clients, plugins and profile restrictions (34 tests)    ├── test-next-version.mjs    # Focused diagnostic validation and device-free boundaries    ├── test-runtime-audit.mjs   # Partial failures, backend readiness and retained results (28 checks)    ├── test-next-version-device.mjs # Live runtime, SQLite, route, Wear and Shannon checks    ├── test-audit-hardening.mjs # SQLite isolation, path guards, GraphQL budgets and runner failures    ├── test-code-scanning.mjs   # Bounded auth, safe GraphQL errors and split-APK quoting    ├── browser/cors.mjs         # Separate real Chromium HTTP/SSE checks (8 tests)    └── lib/        └── harness.mjs          # Shared test harness (stdio JSON-RPC transport, assertion primitives)

Tech Stack

  • Runtime: Node.js ≥22 (ES2024, ESM)
  • Development: a supported LTS Node release, at least 22.16 on the Node 22 line or Node 24+, for the full toolchain and SQLite regression tests. c8 coverage alone requires Node 22.12+ on the Node 22 line.
  • Language: TypeScript 6.0 (strict mode, NodeNext module resolution)
  • MCP SDK: @modelcontextprotocol/server ^2.4.0 (resolves to 2.4.0); server-legacy 2.4.0 and SDK v1 1.32.2 retained for existing SSE clients and plugins
  • Validation: Zod ^4.6.7
  • Transport: stdio (JSON-RPC), Streamable HTTP and legacy HTTP/SSE (Node adapter 2.1.2), WebSocket (optional ws), GraphQL API (optional graphql, full profile only)

License

Apache License 2.0 — see LICENSE and NOTICE. The v1.1.2 release migrated from MIT to Apache 2.0 for the explicit patent grant and contributor attribution requirements; existing forks/installs remain valid under the prior MIT terms.

來源:README.md,提交 78db954

工具

200

adb_devices

List all connected Android devices with their state, model, and product info

無需輸入參數。

adb_device_info

Get detailed properties for a connected device (model, OS version, build, etc.)

輸入參數device

adb_getprop

Get a specific Android system property, or all properties if no key given

輸入參數keydevice

adb_shell

Execute a shell command on the Android device. Returns stdout and stderr.

輸入參數devicecommand必填timeout

adb_root_shell

Execute a command as root via su. Requires rooted device.

輸入參數devicecommand必填

adb_install

Install an APK on the device. Provide the full local path to the APK file.

輸入參數deviceapkPath必填replacedowngrade

adb_uninstall

Uninstall a package from the device

輸入參數devicekeepDatapackageName必填

adb_list_packages

List installed packages. Supports filtering by name.

輸入參數typedevicefilter

adb_package_info

Get detailed info about an installed package (version, permissions, paths)

輸入參數devicepackageName必填

adb_clear_data

Clear all data for a package (equivalent to clearing storage in settings). DESTRUCTIVE — irreversibly wipes all app data, cache, databases, shared preferences, and login state. AP5 fix: requires `confirm: <packageName>` to proceed.

輸入參數deviceconfirmpackageName必填

adb_grant_permission

Grant a runtime permission to a package

輸入參數devicepermission必填packageName必填

adb_revoke_permission

Revoke a runtime permission from a package. Useful for resetting permission state to test first-run flows or denial handling.

輸入參數devicepermission必填packageName必填

adb_list_permissions

List permissions declared and granted for a package. Parses the package dump to show install-time and runtime permissions with their current grant state. Useful for auditing permission state before and after grant/revoke operations.

輸入參數devicefilterpackageName必填

adb_force_stop

Force-stop an app immediately. The most common debugging action.

輸入參數devicepackageName必填

adb_start_app

Launch an app by package name (resolves and starts the default launcher activity)

輸入參數devicepackageName必填

adb_restart_app

Force-stop then re-launch an app. The most frequent debugging workflow in a single call.

輸入參數devicedelayMspackageName必填

adb_resolve_intents

Discover all activities, services, and receivers registered by a package with their intent filters

輸入參數devicepackageName必填

adb_push

Push a local file to the device filesystem. Pre-flight checks: hard-blocked kernel paths, filesystem type warnings, symlink resolution, and destination storage availability.

輸入參數devicelocalPath必填remotePath必填

adb_pull

Pull a file from the device to local filesystem

輸入參數devicelocalPathremotePath必填

adb_ls

List files and directories on the device

輸入參數pathdevicedetails

adb_cat

Read a text file from the device

輸入參數path必填devicemaxLines

adb_file_write

Create or overwrite a text file on the device. Content is delivered via shell heredoc — suitable for config files, scripts, test fixtures, and small data files. For large or binary files, use adb_push instead. Shell buffer limits content to approximately 128KB.

輸入參數path必填rootappenddevicecontent必填

adb_find

Search for files on the device by name or pattern. Uses the find command with glob matching. Results are capped at maxResults to prevent unbounded output. Reports whether results were truncated.

輸入參數name必填roottypedevicemaxDepthmaxResultssearchPathresult_handleresult_handle_ttl

adb_file_stat

Get detailed file metadata: size, permissions, ownership, timestamps (access/modify/change), SELinux security context, and file type. Read-only operation.

輸入參數path必填rootdevice

adb_file_checksum

Compute SHA-256 hash of a file on the device. Critical for firmware integrity verification, tamper detection, and comparing files across devices. Read-only operation. Reports file size alongside the hash.

輸入參數path必填rootdevicealgorithm

adb_mkdir

Create a directory on the device. Supports -p flag for creating parent directories.

輸入參數path必填rootdeviceparents

adb_rm

Delete a file or directory on the device. Recursive deletion uses depth-based protection: refuses at depth ≤ 2 from root (blocks rm -rf /system or /sdcard but allows /sdcard/project/build/). Symlinks are resolved before depth checks to prevent traversal bypasses. Hard-blocks /dev, /proc, /sys. For recursive deletes, reports a pre-flight file count.

輸入參數path必填rootdevicerecursive

adb_file_move

Move or rename a file/directory on the device. Moving FROM a system path is destructive — source depth protection refuses if source is at depth ≤ 1 from root. Symlinks resolved before checks. Cross-filesystem moves (e.g., /data → /sdcard) do a copy+delete internally and can be slow for large files.

輸入參數rootdevicesource必填destination必填

adb_file_copy

Copy a file or directory on the device. Pre-flight checks source size against destination available space. Post-verifies the copy by comparing file sizes. For recursive directory copies, use -r flag.

輸入參數rootdevicesource必填recursivedestination必填

adb_file_chmod

Change file permissions on the device. Mode must be a valid octal string (e.g., '755', '644', '600'). Recursive mode uses depth-based protection: refuses at depth ≤ 2 from root. Note: sdcardfs/FUSE ignores Unix permissions — file access on /sdcard is controlled by Android's package ownership model.

輸入參數mode必填path必填rootdevicerecursive

adb_file_touch

Create an empty file or update timestamps. Three modes: create (touch non-existent path), update (set atime/mtime to now), or set explicit timestamp. On FAT32, timestamps have 2-second resolution. On tmpfs, timestamps are volatile.

輸入參數path必填rootdevicetimestamp

adb_file_fsinfo

Report filesystem details for any path: filesystem type, mount point, mount options, capacity, usage, read-only status, permission support, symlink support, max file size, timestamp resolution, encryption status, and SELinux context. Essential for understanding what operations are possible before attempting them.

輸入參數path必填rootdevice

adb_file_chown

Change file ownership on the device. Requires root. Supports both numeric UID:GID (e.g., '10150:10150') and symbolic user:group (e.g., 'system:system'). Recursive mode uses depth-based protection: refuses at depth ≤ 2 from root. Note: sdcardfs/FAT32 ignore ownership changes.

輸入參數path必填owner必填devicerecursive

adb_grep

Search file contents on the device by text pattern. Uses fixed-string matching by default (no regex injection risk). Supports recursive directory search with depth control and result capping. For filename searches, use adb_find instead.

輸入參數path必填rootdevicepattern必填maxDepthrecursiveignoreCasemaxResultsfixedStringresult_handlefilesWithMatchesresult_handle_ttl

adb_file_replace

Find and replace text in a file on the device. Uses sed internally with proper escaping — exposes a safe interface without requiring sed syntax knowledge. Supports global replacement, line-targeted edits, and optional backup creation. Reports match count.

輸入參數find必填path必填rootbackupdeviceglobalreplace必填lineNumber

adb_logcat

Capture a logcat snapshot. Supports tag filtering, priority levels, and grep patterns.

輸入參數taggreplinesbufferdevicepriorityresult_handleresult_handle_ttl

adb_logcat_clear

Clear all logcat buffers on the device

輸入參數device

adb_logcat_crash

Get recent crash logs from the crash buffer

輸入參數linesdevice

adb_dumpsys

Run dumpsys for a specific service. Use 'list' as the service to see all available services.

輸入參數argsdeviceservice必填result_handleresult_handle_ttl

adb_telephony

Get telephony state including cell info, signal strength, and network registration.

輸入參數device

adb_battery

Get battery status, level, temperature, and charging info

輸入參數device

adb_network

Get network connectivity info including WiFi, cellular, and active connections

輸入參數device

adb_top

Get current CPU and memory usage snapshot

輸入參數countdevice

adb_perf_snapshot

Capture a performance snapshot for a package: memory usage, frame stats, and CPU info in one call.

輸入參數devicepackageName必填

adb_bugreport

Capture a full bug report zip (device state, logs, dumpsys, system info). Returns the local file path.

輸入參數device

adb_crash_logs

Read ANR (Application Not Responding) traces and tombstone crash dumps from the device. Requires root access for /data/anr/ and /data/tombstones/. Returns the most recent entries.

輸入參數typedevicemaxEntries

adb_heap_dump

Capture a heap dump from a running process for memory analysis. Triggers `am dumpheap` and pulls the resulting .hprof file. Requires the target process PID or package name.

輸入參數devicetarget必填filename

adb_screencap

Take a screenshot and save to local filesystem. Returns the file path.

輸入參數devicefilename

adb_current_activity

Get the currently focused activity and window stack

輸入參數device

adb_input

Send input events to the device (tap, swipe, text, keyevent)

輸入參數args必填type必填device

adb_start_activity

Start an activity or app by intent or component name

輸入參數deviceintent必填

adb_ui_dump

Dump the current UI hierarchy. Parses the view tree into structured element data with coordinates, text, resource IDs, and interaction flags. Use format='tsv' for token-efficient compact output, format='xml' for raw uiautomator XML.

輸入參數deviceformatclickableOnly

adb_ui_find

Search the UI hierarchy for elements matching text, resource-id, or content-description. Returns matching elements with coordinates for precise adb_input targeting.

輸入參數textdeviceresourceIdcontentDesc

adb_screencap_annotated

Take a screenshot with UI element bounding boxes and numbered labels composited directly onto the image. Returns the annotated PNG path plus a text legend mapping each element number to its identity. Ideal for LLM workflows that need to reference specific UI elements by number rather than by coordinates.

輸入參數devicefilenameclickableOnly

adb_screen_state

Get a combined screen state snapshot in one call: foreground activity, screen dimensions and density, orientation, battery level, and a TSV list of interactive UI elements. Replaces 3-4 separate tool calls with a single round-trip. Ideal as a first step in any automation workflow.

輸入參數deviceclickableOnly

adb_gradle

Run a Gradle task in an Android project directory

輸入參數argstask必填timeoutprojectPath必填

adb_build_and_install

Build a debug APK and install it on the connected device (convenience wrapper)

輸入參數devicetimeoutprojectPath必填

adb_health_check

Run a comprehensive health check of the ADB toolchain. Validates: ADB binary, server, device connection, authorization, and root access.

輸入參數device

adb_runtime_audit

Run a unified, read-only DeepADB readiness audit covering transport, authorization, Android state, root, SELinux, storage, common binaries, UI/network support, SQLite, chipset/modem nodes, and Wear prerequisites. Makes no device changes.

輸入參數device

adb_pair

Pair with a device over WiFi using the pairing code from Developer Options → Wireless debugging → Pair device

輸入參數code必填host必填

adb_connect

Connect to a device over WiFi/TCP. Device must be paired first or have TCP/IP enabled.

輸入參數host必填

adb_disconnect

Disconnect from a wireless device, or all wireless devices if no host specified

輸入參數host

adb_tcpip

Switch a USB-connected device to TCP/IP mode on the specified port (default 5555). After this, you can disconnect USB and use adb_connect.

輸入參數portdevice

adb_airplane_mode

Toggle airplane mode on/off. Useful for resetting cellular registration during radio testing.

輸入參數deviceenabled必填

adb_wifi

Enable or disable WiFi

輸入參數deviceenabled必填

adb_mobile_data

Enable or disable mobile data

輸入參數deviceenabled必填

adb_location

Enable or disable location services

輸入參數mode必填device

adb_screen

Control screen state: wake, sleep, toggle, lock, or unlock. Lock and unlock verify actual keyguard state via dumpsys window. Unlock uses wm dismiss-keyguard (works for swipe keyguards); supply 'pin' to perform the full PIN entry sequence for PIN-protected devices: wakes screen, dismisses keyguard, swipes up to reveal keypad, types PIN, confirms with ENTER, and verifies the keyguard sleep token was released.

輸入參數pinaction必填device

adb_airplane_cycle

Cycle airplane mode on then off after a delay. Forces cellular re-registration — useful for radio diagnostics and network testing.

輸入參數devicedelaySeconds

adb_settings_get

Read an Android settings value from any namespace (system, secure, global)

輸入參數key必填devicenamespace必填

adb_settings_put

Write an Android settings value to any namespace (system, secure, global)

輸入參數key必填value必填devicenamespace必填

adb_reboot

Reboot the device. Supports normal, recovery, and bootloader modes.

輸入參數modedevice

adb_logcat_start

Start a background logcat watcher. Lines accumulate in a ring buffer. Use adb_logcat_poll to retrieve new entries.

輸入參數tagdeviceprioritybufferSize

adb_logcat_poll

Retrieve new logcat lines since the last poll from a running watcher session.

輸入參數session必填maxLinesresult_handleresult_handle_ttl

adb_logcat_stop

Stop a running logcat watcher session

輸入參數session必填

adb_logcat_sessions

List all active logcat watcher sessions

無需輸入參數。

adb_forward

Forward a local port to a port on the device (host → device). Use for connecting to services running on the device.

輸入參數local必填deviceremote必填

adb_reverse

Reverse-forward a device port to a port on the host (device → host). Use for letting device apps reach services on your machine.

輸入參數local必填deviceremote必填

adb_forward_list

List all active port forwards and reverse forwards

輸入參數device

adb_forward_remove

Remove a port forward (host → device), or all forwards. Use after testing to clean up.

輸入參數localdevice

adb_reverse_remove

Remove a reverse forward (device → host), or all reverse forwards. Use after testing to clean up.

輸入參數deviceremote

adb_tunnel_open

Open a managed tunnel between host and device. Higher-level convenience wrapper over adb_forward / adb_reverse: auto-picks a free host port when one isn't specified (forward only), returns an opaque tunnel ID for later close, and registers cleanup so the tunnel is removed on server exit. Direction 'forward' = host port forwards TO device service; 'reverse' = device port forwards TO host service.

輸入參數devicehostSpecdirection必填deviceSpec必填

adb_tunnel_list

List all active managed tunnels (opened via adb_tunnel_open). Shows tunnel ID, device, direction, and both endpoints. Note: this only surfaces tunnels created via adb_tunnel_open — tunnels created via the low-level adb_forward / adb_reverse won't appear here. For those, use adb_forward_list.

輸入參數device

adb_tunnel_close

Close a managed tunnel by ID, or all managed tunnels at once. The corresponding adb forward/reverse entry is removed and the tunnel is dropped from the cleanup registry. Use adb_tunnel_list to see active tunnel IDs.

輸入參數id必填

adb_screenrecord_start

Start recording the device screen. Recording runs on-device. Use adb_screenrecord_stop to finish and pull the video file.

輸入參數devicemaxDuration

adb_screenrecord_stop

Stop an active screen recording and pull the video file locally. If the recording has already finished (hit time limit), this just pulls the file.

輸入參數device

adb_avd_list

List all available Android Virtual Devices (AVDs) that can be started.

無需輸入參數。

adb_emulator_start

Launch an Android Virtual Device (AVD) emulator. Returns once the emulator process has started.

輸入參數avdName必填gpuModecoldBootheadless

adb_emulator_stop

Stop a running emulator. Uses 'adb emu kill' for graceful shutdown.

輸入參數deviceavdName

adb_qemu_setup

Check and install QEMU for on-device virtualization. Verifies KVM availability, checks if QEMU is installed, reports version info, and can install QEMU via Termux package manager. Only available in on-device mode.

輸入參數install

adb_qemu_images

Manage QEMU disk images for virtual machines. List available images, create new qcow2/raw disk images, or delete existing ones. Images are stored in the DeepADB image directory.

輸入參數nameaction必填formatsizeMb

adb_qemu_start

Boot a QEMU virtual machine with KVM hardware acceleration. Auto-detects optimal resource allocation: uses total cores minus 1 for the VM (reserving one for the host OS), and up to 65% of physical RAM. Custom values are accepted but capped at safe limits to prevent host starvation.

輸入參數cpusname必填image必填appendinitrdkerneladbPortdisplaymemoryMb

adb_qemu_stop

Stop a running QEMU virtual machine. Sends SIGTERM for graceful shutdown, with force kill option.

輸入參數nameforce

adb_qemu_status

Show status of QEMU virtual machines — running VMs with resource usage and port mappings, plus KVM and QEMU availability.

無需輸入參數。

adb_qemu_connect

Connect to a running QEMU VM's ADB service, making the guest appear as a device for DeepADB tools. Requires the guest OS to have an ADB daemon running (e.g., Android guest with USB debugging enabled). Requires the 'adb' binary (install with: pkg install android-tools). Connections are restricted to localhost only — no remote host connections allowed.

輸入參數name必填timeout

adb_qemu_disconnect

Disconnect from a QEMU VM's ADB service. Removes the guest from the device list.

輸入參數name必填

adb_qemu_guest_shell

Execute a shell command on a QEMU guest VM via ADB. The VM must be connected first (use adb_qemu_connect). The guest serial is derived internally — no user-supplied host/IP reaches the ADB binary. Subject to the same security middleware checks as adb_shell.

輸入參數name必填command必填timeout

adb_test_session_start

Start a structured test session. Creates a named directory for organizing numbered screenshots and logcat captures.

輸入參數name必填device

adb_test_step

Capture a numbered test step: takes a screenshot and captures logcat since the last step. Saves both to the session directory.

輸入參數description必填captureLogcatcaptureScreenshot

adb_test_session_end

End the active test session. Writes a summary manifest and returns the session directory path.

無需輸入參數。

adb_multi_shell

Execute a shell command on multiple (or all) connected devices in parallel. Returns results grouped by device.

輸入參數command必填devicestimeout

adb_multi_install

Install an APK on multiple (or all) connected devices in parallel.

輸入參數apkPath必填devicesreplace

adb_multi_compare

Run a command on all devices and compare outputs side by side. Highlights differences across devices.

輸入參數command必填devices

adb_multi_test

Run a comparative test workflow across all connected devices (host + QEMU guests). Executes a predefined diagnostic profile or custom command list on every device in parallel, compares results per-check, and reports matches and differences. Profiles: 'firmware' (baseband, bootloader, kernel, security patch), 'security' (SELinux, verified boot, encryption), 'network' (radio, WiFi, SIM), 'identity' (model, chipset, architecture), 'full' (all profiles). Custom commands also supported.

輸入參數devicesprofiletimeoutcommands

adb_snapshot_capture

Capture a comprehensive device state snapshot: installed packages, key settings, and system properties. Saves to a JSON file.

輸入參數namedevice

adb_snapshot_compare

Compare current device state against a saved snapshot. Shows added/removed packages, changed settings, and property differences.

輸入參數devicesnapshotPath必填

adb_snapshot_restore_settings

Restore settings from a saved snapshot to the current device. Only restores global and secure settings — does not install/uninstall packages.

輸入參數devicenamespacesnapshotPath必填

adb_tcpdump_start

Start a packet capture on the device using tcpdump. Requires root or tcpdump binary on device. Capture runs in background.

輸入參數devicefilterinterfacemaxPackets

adb_tcpdump_stop

Stop an active packet capture and pull the pcap file locally for analysis.

輸入參數device

adb_network_connections

Show active network connections on the device (TCP/UDP). Similar to netstat — shows established connections, listening ports, and connection states.

輸入參數deviceprotocol

adb_ci_wait_boot

Wait for a device or emulator to fully boot. Polls sys.boot_completed and waits for the launcher to be ready. Essential for CI pipelines.

輸入參數devicetimeoutSeconds

adb_ci_device_ready

Comprehensive CI readiness check. Verifies: device online, booted, package manager ready, screen unlocked, network available. Returns structured pass/fail results.

輸入參數device

adb_ci_run_tests

Run Android instrumented tests (androidTest) via `am instrument` and capture results. Returns structured pass/fail output.

輸入參數devicerunnertimeouttestClasstestMethodtestPackage必填

adb_plugin_list

List all loaded plugins and the plugin directory path.

無需輸入參數。

adb_plugin_info

Show information about the plugin system: directory, how to create plugins, and loaded plugin count.

無需輸入參數。

adb_baseband_info

Get comprehensive modem/baseband identification: firmware version, RIL implementation, chipset, IMEI, SIM state, and radio capabilities.

輸入參數deviceincludeImeiresult_handleresult_handle_ttl

adb_cell_identity

Extract detailed cell identity information: Cell ID (CID), TAC/LAC, EARFCN/ARFCN, Physical Cell ID (PCI), PLMN, and network type. Parses structured data from dumpsys for cellular network analysis.

輸入參數device

adb_signal_detail

Get detailed signal strength measurements: RSRP, RSRQ, SINR, RSSI, timing advance, and signal bars. Provides raw radio measurements for signal analysis and anomaly detection.

輸入參數device

adb_neighboring_cells

List all visible cells beyond the serving cell: neighboring LTE/5G/WCDMA/GSM cells with their identities and signal strengths. Useful for cellular network surveys, coverage analysis, and radio environment characterization.

輸入參數device

adb_carrier_config

Dump carrier configuration values. Useful for verifying carrier settings, detecting configuration anomalies, and inspecting APN configurations.

輸入參數device

adb_modem_logs

Capture modem/baseband-related logs from multiple sources: RIL (Radio Interface Layer) logcat, telephony framework logs, and kernel modem messages via dmesg (root required for dmesg). Useful for radio diagnostics and tracing baseband-framework communication.

輸入參數greplinesdevice

adb_a11y_audit

Run an automated accessibility audit on the current screen. Checks for: missing labels on interactive elements, undersized touch targets (<48dp), images without content-descriptions, clickable elements missing focusability, and duplicate descriptions. Returns a structured report with severity and rule violations.

輸入參數device

adb_a11y_touch_targets

List all interactive elements with their touch target dimensions in dp. Highlights elements below the 48dp minimum. Useful for quickly identifying cramped UI layouts.

輸入參數devicebelowMinOnly

adb_a11y_tree

Dump the accessibility-focused view of the UI hierarchy. Shows only elements relevant to screen readers: their roles, labels, states, and navigation order. Filters out decorative/layout containers.

輸入參數device

adb_regression_baseline

Capture a performance baseline for a package: memory, CPU, frame stats, battery, and network state. Saves to a timestamped JSON file for later comparison with adb_regression_check.

輸入參數labeldevicepackageName必填

adb_regression_check

Compare current performance against a saved baseline. Flags regressions in memory (>20% increase), CPU (>50% increase), and jank rate (>25% increase). Thresholds are configurable.

輸入參數devicebaselinePath必填cpuThresholdjankThresholdmemoryThreshold

adb_regression_history

List all saved regression baselines, optionally filtered by package name. Shows trends over time.

輸入參數packageName

adb_farm_run

Run tests on Firebase Test Lab. Uploads an APK and test APK, executes instrumented tests across specified device models and API levels. Requires gcloud CLI authenticated with a Firebase project.

輸入參數appApk必填devicestestApk必填timeouttestTargetsexecTimeoutMsresultsBucket

adb_farm_results

Retrieve results from the most recent Firebase Test Lab run, or a specific test matrix ID. Shows pass/fail status, device results, and links to logs and artifacts.

輸入參數matrixId

adb_farm_matrix

List available device models and API levels on Firebase Test Lab. Use to plan test matrices.

輸入參數type

adb_registry_install

Install a plugin from the community registry by name. Downloads the plugin JavaScript file into the plugins directory. Restart DeepADB to load it.

輸入參數name必填force

adb_registry_installed

List all locally installed plugins with their versions and metadata. Shows which plugins have updates available in the registry.

無需輸入參數。

adb_shannon_session

Preflight a Samsung Shannon/Exynos modem session by checking the chipset, root access, known AT ports, and a benign AT handshake together. Optionally sends ATI for identification after a successful handshake. Makes no modem configuration changes.

輸入參數portdevicetimeoutincludeIdentity

adb_at_detect

Auto-detect the modem AT command device node. Identifies the chipset family (Shannon, Qualcomm, MediaTek, Unisoc) and probes known device node paths. Requires root. Returns the first responding node.

輸入參數device

adb_at_send

Send a single AT command to the modem and capture the response. Requires root. Use adb_at_detect to find the correct port, or specify it manually.

輸入參數portforcedevicecommand必填timeout

adb_at_batch

Send multiple AT commands sequentially and capture all responses. Useful for running a diagnostic sequence. Requires root.

輸入參數portforcedevicedelayMstimeoutcommands必填

adb_at_probe

Run a standard AT diagnostic probe: modem identification, signal quality, network registration, SIM status, and supported bands. Requires root.

輸入參數portdevice

adb_at_cross_validate

Cross-validate baseband firmware by comparing AT command responses (direct modem interrogation) against Android system properties (getprop). Discrepancies may indicate firmware tampering, incomplete OTA updates, or property spoofing. Sends ATI (identification), AT+CGMR (firmware revision), and AT+CGMM (model) to the modem and compares with gsm.version.baseband, ro.hardware.chipname, and related properties. Requires root.

輸入參數portdevicetimeout

adb_screenshot_baseline

Capture a named screenshot baseline for later comparison. Saves the screenshot and metadata to the baselines directory.

輸入參數name必填deviceresult_handleresult_handle_ttl

adb_screenshot_diff

Compare the current screen against a saved screenshot baseline. Decodes PNGs and performs pixel-level comparison (RGB channels), reporting exact pixel difference count, percentage, and the bounding box of the changed region. Supports a tolerance threshold for absorbing minor dynamic elements like clocks or notification badges.

輸入參數devicebaseline必填result_handletolerancePercentresult_handle_ttl

adb_screenshot_history

List all saved screenshot baselines with their metadata (timestamp, dimensions, device, file size).

輸入參數result_handleresult_handle_ttl

adb_workflow_run

Execute a workflow — a JSON-defined sequence of device operations with variable substitution, conditional steps, and loop support. Supported actions: shell, root_shell, install, screenshot, logcat, getprop, sleep. Pass the workflow as a JSON string or provide a saved workflow name.

輸入參數devicedryRunworkflow必填variables

adb_workflow_validate

Validate a workflow JSON definition without executing it. Reports structural errors and shows the execution plan.

輸入參數workflow必填

adb_workflow_list

List saved workflow files in the workflows directory.

無需輸入參數。

adb_install_bundle

Install multiple APK splits (app bundle) on the device using `install-multiple`. Provide all split APK files — base APK plus config splits (language, density, ABI).

輸入參數devicereplaceapkPaths必填allowDowngrade

adb_list_splits

List all APK split paths installed for a package. Shows the base APK and any configuration splits (language, screen density, ABI).

輸入參數devicepackageName必填

adb_extract_apks

Pull all APK splits for a package from the device to a local directory. Useful for analysis, backup, or transfer to another device.

輸入參數deviceoutputDirpackageName必填

adb_apex_list

List installed APEX modules on the device. APEX (Android Pony EXpress) modules deliver updatable system components. Shows module name, version, and active/staged status.

輸入參數device

adb_mirror_start

Start live screen mirroring for a device using scrcpy. Requires scrcpy installed and on PATH. Supports windowed (visual) and headless (no display) modes. One session per device.

輸入參數devicemaxFpsrecordbitratemaxSizeheadlessstayAwaketurnScreenOff

adb_mirror_stop

Stop an active scrcpy mirroring session for a device.

輸入參數device

adb_mirror_status

Check scrcpy availability and list active mirroring sessions.

無需輸入參數。

adb_test_gen_from_ui

Analyze the current screen and generate a test workflow that taps each interactive element, takes screenshots, and verifies the app doesn't crash. Produces a workflow JSON compatible with adb_workflow_run.

輸入參數devicepackageName必填returnToStartscreenshotAfterEach

adb_test_gen_from_intents

Analyze a package's registered activities and intent filters to generate a test workflow that launches each exported activity and verifies it renders. Produces workflow JSON compatible with adb_workflow_run.

輸入參數devicepackageName必填

adb_test_gen_save

Save a generated workflow JSON to the workflows directory for later execution with adb_workflow_run.

輸入參數name必填workflow必填

adb_ota_fingerprint

Capture and save the current system fingerprint: build ID, Android version, security patch, bootloader, baseband firmware, kernel version, and A/B partition slot. Saves to a timestamped JSON file for later comparison.

輸入參數labeldevice

adb_ota_check

Compare the current system state against a saved fingerprint. Detects OTA updates by identifying changes in build ID, security patch, baseband firmware, bootloader, or kernel version.

輸入參數devicefingerprintPath

adb_ota_history

List all saved system fingerprints for a device, showing version progression over time. Highlights changes between consecutive snapshots.

輸入參數device

adb_ril_start

Start capturing RIL (Radio Interface Layer) messages from the radio logcat buffer. Captures network registration, cell info, signal strength, authentication, handover, and NAS events. Useful for radio diagnostics and cellular network research.

輸入參數devicebufferSizeincludeKernel

adb_ril_poll

Retrieve captured RIL messages since the last poll. Optionally filter by category (registration, cell_info, signal, network, security, handover, data, radio_state, nas).

輸入參數rawsession必填categorymaxMessages

adb_ril_stop

Stop a RIL capture session. Shows a summary of captured message categories.

輸入參數session必填

adb_profile_detect

Auto-detect and build a device profile from the connected device. Captures hardware identification, chipset family, modem info, root status, and matches against the built-in profile library for known quirks.

輸入參數savedevice

adb_profile_save

Save a device profile to the profiles library. Use after adb_profile_detect to persist the profile, or create a manual profile with custom quirks and notes.

輸入參數name必填profile必填

adb_profile_list

List all device profiles: built-in library entries and user-saved profiles.

無需輸入參數。

adb_firmware_probe

Comprehensive firmware identification for the connected device. Reports all firmware components: baseband (parsed by chipset family — Shannon, Qualcomm, MediaTek, Unisoc, HiSilicon, Intel), bootloader, RIL implementation, kernel, security patch, A/B slot, verified boot state, and OTA-updatable partitions.

輸入參數device

adb_firmware_diff

Compare all firmware components between two saved OTA fingerprints, or between the current device state and a saved fingerprint. Compares baseband (with chipset-specific parsed component diffs), bootloader, kernel, security patch, build ID, and Android version.

輸入參數tofromdeviceresult_handleresult_handle_ttl

adb_firmware_history

Show firmware version progression across all saved OTA fingerprints for a device. Tracks baseband, bootloader, kernel, security patch, and build ID changes between consecutive snapshots with parsed component diffs.

輸入參數device

adb_market_install

Download and install a workflow from the marketplace. Saves to the workflows directory for immediate use with adb_workflow_run.

輸入參數name必填force

adb_market_export

Export a local workflow with marketplace metadata for sharing. Produces a JSON file with name, description, version, author, and tags suitable for submission to the marketplace registry.

輸入參數tagsauthorversionworkflow必填

adb_selinux_status

Check SELinux enforcement mode, policy version, and recent denial count. Shows whether the device is in Enforcing, Permissive, or Disabled mode. Root access provides additional policy details from dmesg audit logs.

輸入參數device

adb_selinux_denials

List recent SELinux AVC denial messages from logcat and kernel logs. Shows which processes were blocked, what they tried to do, and the SELinux contexts involved. Useful for diagnosing permission issues and understanding security policy enforcement.

輸入參數linesdeviceprocess

adb_permission_audit

Audit runtime permission grants for a package. Lists all granted dangerous permissions grouped by category (Camera, Location, Phone, SMS, etc.) and flags potentially over-provisioned permissions. Compares grants against the dangerous permission manifest to identify unnecessary access.

輸入參數devicepackageName必填

adb_thermal_snapshot

Capture a thermal and power snapshot: all thermal zone temperatures, per-CPU frequencies and governors, cooling device states, and battery temperature/current draw. Optionally save as a baseline for later comparison.

輸入參數savelabeldevice

adb_thermal_compare

Compare current thermal/power state against a saved baseline. Reports temperature changes per zone, CPU frequency shifts, and battery drain rate differences.

輸入參數devicebaselinePath

adb_battery_drain

Measure battery drain rate over a specified duration. Takes initial and final readings and calculates mA draw, mW power consumption, and estimated percentage per hour. Useful for profiling power impact of specific operations.

輸入參數devicedurationMspackageName

adb_network_scan

Scan the local network for Android devices with ADB enabled over WiFi/TCP. Probes common ADB ports (5555-5558) on hosts from the ARP table and optionally a custom IP range. Discovered devices can be connected with adb_connect.

輸入參數portsdeviceipRangetimeoutMs

adb_network_device_ip

Get the WiFi IP address of a connected device. Useful for switching from USB to wireless debugging without needing to find the IP manually on the device.

輸入參數device

adb_network_auto_connect

Discover and automatically connect to ADB devices on the local network. Combines network scanning with adb connect in one step. Probes a single port (default 5555) on each candidate; if you need to cover the full ADB port range (5555-5558) use adb_network_scan first, then adb_connect with the discovered host:port.

輸入參數portdeviceipRange

adb_app_route_context

Show the effective Android routing context for one installed app by correlating its UID with ip rules, route tables, network policy, VPN, and default-network state. Read-only; does not alter routes or app policy.

輸入參數devicepackageName必填includeConnectivitySummary

adb_sqlite_inspect

Safely inspect a Room or SQLite database inside an installed app. Lists package databases, shows schema, or executes one validated read-only query. Requires a debuggable app (run-as) or root; queries a bounded private snapshot with device sqlite3 or an isolated host SQLite process.

輸入參數queryaccessactiondevicemaxRowsdatabasepackageName必填

adb_wear_datalayer_preflight

Run a read-only Wear OS Data Layer preflight across a connected phone and watch. Checks device roles, Google Play services, Bluetooth, optional app packages, companion association presence, and Data Layer service signals without exposing pairing identifiers.

輸入參數wearDevicephoneDevicewearPackagephonePackage

adb_sensor_read

Read current hardware sensor values from the device. Enumerates all available sensors from sensorservice and returns their last-known readings with timestamps. Sensor availability is device-dependent — the tool reports what's present. No root required.

輸入參數devicecategorylistOnly

adb_iio_read

Read raw hardware data from the Linux IIO (Industrial I/O) subsystem. Discovers all IIO devices and reads their current values. On Tensor/Exynos devices, this exposes per-rail power monitors (ODPM) showing real-time power consumption per SoC subsystem (CPU clusters, GPU, display, memory, TPU, GPS, etc.) — data not available through the Android sensor HAL. On other devices, may expose raw accelerometer, gyroscope, magnetometer, or ADC channels. Root required.

輸入參數devicelistOnly

adb_wifi_firmware

WiFi chipset and firmware identification. Reports WiFi driver version, firmware version, chipset/hardware info, supported bands and standards, interface details, and dumpsys excerpts. BH7 fix: dumpsys truncation now configurable via maxLines. connection state. MAC address is opt-in only (permanent hardware identifier).

輸入參數devicemaxLinesincludeMac

adb_bluetooth_firmware

Bluetooth firmware and chipset identification. Reports firmware version, BT version (4.x/5.x), chipset model, adapter state, supported profiles, LE capabilities, and bonded device count. MAC address and device name are opt-in only (permanent identifiers).

輸入參數devicemaxLinesincludeIdentifiers

adb_nfc_firmware

NFC controller firmware identification. Reports controller type (NXP/Broadcom/Samsung/ST), firmware version, NCI version, supported technologies (NFC-A/B/F/V), secure element availability (eSE/UICC), and HCE (Host Card Emulation) support.

輸入參數devicemaxLines

adb_gps_firmware

GNSS/GPS chipset and firmware identification. Reports GNSS hardware model (manufacturer, chip, firmware version), supported constellations (GPS, GLONASS, Galileo, BeiDou, QZSS, NavIC, SBAS), signal types with frequencies, dual-frequency (L1+L5) support, raw measurement capabilities (pseudorange access for spoofing detection), A-GPS modes (MSB/MSA — cellular-routed assisted GPS relevant to IMSI catcher research), carrier phase measurements, navigation message decoding, and SUPL server configuration.

輸入參數device

adb_input_drag

Drag from one point to another on screen. Uses Android's draganddrop input command. Useful for drag-and-drop UI elements, sliders, map panning, and reorder operations.

輸入參數x1必填x2必填y1必填y2必填devicedurationMs

adb_input_fling

Perform a high-velocity fling gesture. Like swipe but with a short duration to create scroll momentum on lists, launchers, and paged views. Useful for fast-scrolling through long lists, dismissing notifications, or triggering velocity-sensitive behaviors.

輸入參數x1必填x2必填y1必填y2必填devicedurationMs

adb_input_long_press

Long press at a point on screen. Triggers context menus, selection mode, drag handles, and other long-press behaviors. Implemented as a zero-distance swipe with configurable hold duration.

輸入參數x必填y必填devicedurationMs

adb_input_double_tap

Double tap at a point on screen. Triggers zoom, text selection, or double-tap gestures. Two rapid taps with a configurable interval.

輸入參數x必填y必填deviceintervalMs

adb_input_text

Type text on the device. Handles special characters by converting spaces to %s and escaping shell metacharacters. For multi-line or complex text, consider using the clipboard tool instead.

輸入參數text必填device

adb_open_url

Open a URL on the device in the default browser or handling app. Uses Android's VIEW intent action.

輸入參數url必填device

adb_orientation

Get or set screen orientation. Can lock to portrait, landscape, reverse portrait, reverse landscape, or restore auto-rotate.

輸入參數action必填deviceorientation

adb_clipboard

Read or write the device clipboard. Write mode sets the clipboard content; read mode retrieves it. Clipboard access requires Android 10+ and may need the app to be in foreground on Android 12+.

輸入參數textaction必填device

adb_tap_element

Find a UI element by text, resource-id, or content-description, then tap its center. Combines UI hierarchy search with input tap in one atomic operation. More reliable than coordinate-based taps for dynamic layouts.

輸入參數textindexdeviceresourceIdcontentDesc

adb_wait_element

Wait for a UI element to appear or disappear. Polls the UI hierarchy at regular intervals until the condition is met or timeout expires. Useful for waiting after navigation, animations, or async content loading.

輸入參數textdevicepollMsconditiontimeoutMsresourceIdcontentDesc

adb_wait_stable

Wait for the UI to stabilize. Polls the UI hierarchy and waits until consecutive dumps produce the same element count and structure. Useful after screen transitions, animations, or content loading before interacting with elements.

輸入參數devicepollMstimeoutMsstableCount

adb_scroll_until

Scroll the screen repeatedly until a target element is found. Performs a swipe gesture, then checks the UI hierarchy for the target. Repeats until found or max iterations reached. Useful for finding elements in long lists or scrollable content.

輸入參數textdevicedirectionmaxScrollsresourceIdcontentDesctapWhenFound

版本歷史

4
  1. v1.1.7最新Nov 15, 2026
  2. v1.1.6Nov 3, 2026
  3. v1.1.5Nov 1, 2026
  4. v1.1.4Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分