Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ADB_PATHNoPath to ADB binary (ignored in on-device mode)Auto-detect
DA_LOCALNoForce on-device mode (true/false). Auto-detects via /system/build.propAuto-detect
DA_DEVICENoDefault device serial (auto-selects if single device)(auto)
DA_TIMEOUTNoDefault command timeout in milliseconds30000
DA_WS_PORTNoSet to a port number to enable WebSocket transport mode (requires npm install ws)(disabled)
DA_SECURITYNoEnable security middleware (command filtering, rate limiting)false
DA_TEMP_DIRNoTemp directory for screenshots, pulled files, bug reports, test sessions, snapshotsOS temp
DA_AUDIT_LOGNoLog all executed commands for audit trail (set to false to disable)true
DA_CACHE_TTLNoDevice list cache TTL in milliseconds (0 = disabled)5000
DA_HTTP_HOSTNoBind address for HTTP/SSE, WebSocket, and GraphQL servers127.0.0.1
DA_HTTP_PORTNoSet to a port number to enable HTTP/SSE transport mode(disabled)
DA_LOG_LEVELNoLog level: debug, info, warn, errorinfo
DA_AUTH_TOKENNoBearer token for network transports. When set, all HTTP/SSE/WS/GraphQL requests require Authorization: Bearer <token> header. Health endpoints exempt.(none — open)
DA_MAX_LOGCATNoMax logcat lines per snapshot500
DA_MAX_OUTPUTNoMax output characters before truncation50000
DA_PLUGIN_DIRNoDirectory to scan for plugin .js modules at startup{tempDir}/plugins
DA_RATE_LIMITNoMax commands per minute (0 = unlimited)0
DA_RETRY_COUNTNoNumber of retries for transient ADB failures1
DA_RETRY_DELAYNoBase retry delay in ms (doubles each attempt)500
DA_GRAPHQL_PORTNoSet to a port number to enable the GraphQL API endpoint (requires npm install graphql)(disabled)
DA_REGISTRY_URLNoURL of the community plugin registry JSON manifestGitHub default
DA_WS_CORS_ORIGINNoAllowed CORS origin for WebSocket health endpoint(none — deny)
DA_ALLOWED_COMMANDSNoComma-separated allowlist (if set, only matching commands run)(none)
DA_BLOCKED_COMMANDSNoComma-separated list of blocked shell command substrings(none)
DA_HTTP_CORS_ORIGINNoAllowed CORS origin for HTTP/SSE(none — deny)
DA_GRAPHQL_CORS_ORIGINNoAllowed CORS origin for GraphQL API(none — deny)
DA_WORKFLOW_REGISTRY_URLNoURL of the workflow marketplace JSON manifest(derived from DA_REGISTRY_URL)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
adb_devicesA

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

adb_device_infoA

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

adb_getpropA

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

adb_shellB

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

adb_root_shellA

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

adb_installB

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

adb_uninstallC

Uninstall a package from the device

adb_list_packagesB

List installed packages. Supports filtering by name.

adb_package_infoA

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

adb_clear_dataA

Clear all data for a package (equivalent to clearing storage in settings)

adb_grant_permissionB

Grant a runtime permission to a package

adb_revoke_permissionA

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

adb_list_permissionsA

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.

adb_force_stopC

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

adb_start_appA

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

adb_restart_appA

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

adb_resolve_intentsA

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

adb_pushA

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

adb_pullB

Pull a file from the device to local filesystem

adb_lsC

List files and directories on the device

adb_catC

Read a text file from the device

adb_file_writeA

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.

adb_findA

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.

adb_file_statA

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

adb_file_checksumA

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.

adb_mkdirA

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

adb_rmA

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.

adb_file_moveA

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.

adb_file_copyA

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.

adb_file_chmodA

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.

adb_file_touchA

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.

adb_file_fsinfoA

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.

adb_file_chownA

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.

adb_grepA

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.

adb_file_replaceA

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.

adb_logcatC

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

adb_logcat_clearB

Clear all logcat buffers on the device

adb_logcat_crashA

Get recent crash logs from the crash buffer

adb_dumpsysB

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

adb_telephonyC

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

adb_batteryB

Get battery status, level, temperature, and charging info

adb_networkB

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

adb_topC

Get current CPU and memory usage snapshot

adb_perf_snapshotA

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

adb_bugreportB

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

adb_crash_logsA

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.

adb_heap_dumpA

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.

adb_screencapB

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

adb_current_activityB

Get the currently focused activity and window stack

adb_inputA

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

adb_start_activityB

Start an activity or app by intent or component name

adb_ui_dumpA

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.

adb_ui_findA

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

adb_screencap_annotatedA

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.

adb_screen_stateA

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.

adb_gradleB

Run a Gradle task in an Android project directory

adb_build_and_installB

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

adb_health_checkA

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

adb_pairA

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

adb_connectA

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

adb_disconnectA

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

adb_tcpipA

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.

adb_airplane_modeA

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

adb_wifiB

Enable or disable WiFi

adb_mobile_dataB

Enable or disable mobile data

adb_locationC

Enable or disable location services

adb_screenA

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.

adb_airplane_cycleA

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

adb_settings_getA

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

adb_settings_putB

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

adb_rebootB

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

adb_logcat_startA

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

adb_logcat_pollB

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

adb_logcat_stopA

Stop a running logcat watcher session

adb_logcat_sessionsA

List all active logcat watcher sessions

adb_forwardA

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

adb_reverseA

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

adb_forward_listA

List all active port forwards and reverse forwards

adb_forward_removeA

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

adb_reverse_removeA

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

adb_screenrecord_startA

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

adb_screenrecord_stopA

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.

adb_avd_listA

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

adb_emulator_startA

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

adb_emulator_stopA

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

adb_qemu_setupA

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.

adb_qemu_imagesA

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.

adb_qemu_startA

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.

adb_qemu_stopA

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

adb_qemu_statusA

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

adb_qemu_connectA

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.

adb_qemu_disconnectA

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

adb_qemu_guest_shellB

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.

adb_test_session_startA

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

adb_test_stepA

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

adb_test_session_endA

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

adb_multi_shellA

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

adb_multi_installC

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

adb_multi_compareB

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

adb_multi_testA

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.

Prompts

Interactive templates invoked by user choice

NameDescription
debug-crashGuided workflow: Capture crash information for debugging. Clears logcat, waits for reproduction, then captures crash buffer and device state.
deploy-and-testGuided workflow: Build, install, launch, and start monitoring an app in one sequence.
telephony-snapshotGuided workflow: Capture comprehensive telephony and cellular state for radio diagnostics.
airplane-cycle-testGuided workflow: Test cellular re-registration by cycling airplane mode while monitoring logs.

Resources

Contextual data attached and managed by the client

NameDescription
devices-listList of all connected Android devices

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fullread/DeepADB'

If you have feedback or need assistance with the MCP directory API, please join our Discord server