import_file
Import a binary file into a Ghidra project, open it in the CodeBrowser, and optionally start auto-analysis. Supports auto-detection for ELF, PE, Mach-O, and allows language specification for raw firmware.
Instructions
Import a binary file from disk into the current Ghidra project.
Imports the file, opens it in the CodeBrowser, and optionally starts auto-analysis. When analysis is enabled, sends a log notification when analysis completes.
For raw firmware binaries, specify language (e.g. "ARM:LE:32:Cortex") and optionally compiler_spec (e.g. "default"). Without language, Ghidra auto-detects the format (works for ELF, PE, Mach-O, etc.).
Args: file_path: Absolute path to the binary file on disk project_folder: Destination folder in the Ghidra project (default: "/") language: Language ID for raw binaries (e.g. "ARM:LE:32:Cortex", "x86:LE:64:default") compiler_spec: Compiler spec ID (e.g. "default", "gcc"). Uses language default if omitted. auto_analyze: Start auto-analysis after import (default: true)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ||
| file_path | Yes | ||
| auto_analyze | No | ||
| compiler_spec | No | ||
| project_folder | No | / |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |