Go API
Prerequisites
- Go module:
github.com/frida/frida-go/frida - Full API reference: https://pkg.go.dev/github.com/frida/frida-go/frida
- Frida releases: https://github.com/frida/frida/releases
Capabilities
| Feature | Description |
|---|---|
| Device enumeration | List all attached/available Frida devices |
| Process enumeration | List running processes on a device |
| Application enumeration | List installed applications on a device |
| Attach | Attach to a running process by PID or name |
| Spawn + attach | Spawn a new process and attach to it |
| Information retrieval | Query metadata about devices, applications, processes |
Getting Started
Minimal Example: Enumerate Devices
1package main
2
3import (
4 "fmt"
5
6 "github.com/frida/frida-go/frida"
7)
8
9func main() {
10 manager := frida.NewDeviceManager()
11 devices, err := manager.EnumerateDevices()
12 if err != nil {
13 panic(err)
14 }
15
16 fmt.Printf("[*] Frida version: %s\n", frida.Version())
17 fmt.Println("[*] Devices: ")
18 for _, device := range devices {
19 fmt.Printf("[*] %s => %s\n", device.Name(), device.ID())
20 }
21}
Expected output:
$ go build main.go && ./main
[*] Frida version: 16.0.3
[*] Devices:
[*] Local System => local
[*] Local Socket => socket
Key Types
frida.DeviceManager— top-level manager; create withfrida.NewDeviceManager()frida.Device— represents a Frida-accessible device; exposes.Name(),.ID()frida.Version()— returns the currently linked Frida runtime version string
Full API Reference
See https://pkg.go.dev/github.com/frida/frida-go/frida for the complete type and method documentation.