loading…
Search for a command to run...
loading…
Enables forensic investigators to acquire data from Android devices via ADB, including device backup, artifact collection, and secure command execution.
Enables forensic investigators to acquire data from Android devices via ADB, including device backup, artifact collection, and secure command execution.
A comprehensive Model Context Protocol (MCP) server for Android device forensic data acquisition using Android Debug Bridge (ADB). This tool is designed for forensic investigators with proper consent and authorization.
This tool is intended for authorized forensic investigations only. Users must have:
Unauthorized access to devices is illegal and unethical.
Python 3.13+: Required for the MCP server
Android Platform Tools: Install ADB
UV Package Manager: Already configured in your environment
uv sync
adb version
uv run mcp dev main.py
uv run mcp dev main.py
uv run mcp install main.py --name "Android Forensics"
Add to claude_desktop_config.json:
{
"mcpServers": {
"android-forensics": {
"command": "uv",
"args": [
"--directory",
"u:\\adb-connect",
"run",
"main.py"
],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}
1. Check ADB status: check_adb_status()
2. List devices: adb_devices()
3. Connect to device: adb_connect_device(device_id="DEVICE_SERIAL")
4. Get device info: get_device_info(device_id="DEVICE_SERIAL")
1. Create backup:
adb_backup_device(
output_file="evidence_backup.ab",
device_id="DEVICE_SERIAL",
include_apk=True,
include_shared=True,
all_apps=True
)
2. Extract backup:
extract_backup_to_tar(
backup_file="evidence_backup.ab",
output_tar="evidence_backup.tar",
password="optional_password"
)
collect_forensic_artifacts(
output_dir="./forensic_evidence",
device_id="DEVICE_SERIAL"
)
adb_shell_command(
command="pm list packages",
device_id="DEVICE_SERIAL"
)
Only the following shell commands are allowed:
ls, cat, pwd, find, du, dfgetprop, dumpsys, uname, date, uptimepm, amps, topnetstat, ip, ifconfiglogcatsettings, contentscreencap, wm;, &&, ||, |) are checkedThe extract_backup_to_tar tool is a Python implementation of the adb-backup-extract project.
Android backups (.ab) have the following structure:
ANDROID BACKUP\n
version\n
compressed (0 or 1)\n
encryption (none or AES-256)\n
[encryption metadata if encrypted]
[compressed/encrypted data]
All operations generate metadata including:
get_device_info() firstadb_backup_device() for complete acquisition1. Connect device and verify connection
2. Document device information
3. Take screenshots of device state
4. Create full backup
5. Extract backup to TAR
6. Collect specific artifacts
7. Generate forensic report
8. Calculate and document all hashes
9. Store evidence securely
# Windows: Add to PATH or use full path
$env:PATH += ";C:\path\to\platform-tools"
# Verify
adb version
adb devices outputadb root if device is rootedadb-connect/
├── main.py # MCP server implementation
├── pyproject.toml # Dependencies and configuration
├── README.md # This file
└── .python-version # Python version specification
This is a forensic tool - contributions should prioritize:
MIT License - See LICENSE file for details.
This tool is provided for legitimate forensic investigations only. The authors and contributors are not responsible for any misuse or illegal activities. Always ensure you have proper authorization before accessing any device.
For Forensic Investigation Departments: This tool is designed to support your authorized investigations with full respect for legal requirements and chain of custody procedures.
Run in your terminal:
claude mcp add android-forensics-adb-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.