Skip to main content
Glama
rahulkr
by rahulkr

pull_recordings

Transfer screen recordings from Android devices to a local directory for analysis, testing, or backup purposes.

Instructions

Pull all screen recordings from device to local directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
local_dirNo./recordings
device_serialNo

Implementation Reference

  • The main handler function for the 'pull_recordings' tool. It lists MP4 files in /sdcard/, pulls them using adb pull to the specified local directory, and returns the list of pulled files.
    @mcp.tool()
    def pull_recordings(
        local_dir: str = "./recordings",
        device_serial: str | None = None
    ) -> str:
        """Pull all screen recordings from device to local directory"""
        os.makedirs(local_dir, exist_ok=True)
        
        # List recordings
        files = run_adb(["shell", "ls", "/sdcard/*.mp4"], device_serial)
        if "No such file" in files or not files.strip():
            return "No recordings found on device"
        
        pulled = []
        for f in files.strip().split('\n'):
            f = f.strip()
            if f.endswith('.mp4'):
                local_path = os.path.join(local_dir, os.path.basename(f))
                run_adb(["pull", f, local_path], device_serial)
                pulled.append(local_path)
        
        return f"Pulled {len(pulled)} recordings to {local_dir}: {pulled}"

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/rahulkr/r_adb_mcp_server'

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