Footprint
Overview
Frida supports selective feature disabling at build time via config.mk. This is primarily useful for embedded systems (e.g., 32-bit ARM devices) where binary size is constrained.
Configurable Features
Features are ordered by binary size contribution, largest to smallest:
1# config.mk — features ordered by binary footprint, from largest to smallest
2FRIDA_V8 ?= enabled
3FRIDA_CONNECTIVITY ?= enabled
4FRIDA_DATABASE ?= enabled
5FRIDA_JAVA_BRIDGE ?= auto
6FRIDA_OBJC_BRIDGE ?= auto
7FRIDA_SWIFT_BRIDGE ?= auto
Feature Requirements
| Feature | Required When |
|---|---|
FRIDA_V8 | Using the V8 JavaScript engine (default JS runtime is QuickJS — safe to disable if not needed) |
FRIDA_CONNECTIVITY | Using TLS certificates (frida.setup_peer_connection() API or --p2p CLI flag) |
FRIDA_DATABASE | Using SqliteDatabase and related APIs |
FRIDA_JAVA_BRIDGE | Calling or instrumenting Java APIs inside processes with a JVM or Android Runtime |
FRIDA_OBJC_BRIDGE | Calling or instrumenting Objective-C code |
FRIDA_SWIFT_BRIDGE | Calling or instrumenting Swift code |
Footprint Reduction: Linux/armhf (32-bit ARM)
Progressive disabling of features, measured on frida-agent.so and related binaries:
Baseline: All Features Enabled
3.8M frida-inject
3.2M frida-server
15M frida-agent.so
15M frida-gadget.so
Step 1: Disable V8 (FRIDA_V8=disabled)
3.8M frida-inject
3.2M frida-server
5.2M frida-agent.so # -9.8M
5.3M frida-gadget.so
Step 2: Disable Connectivity (FRIDA_CONNECTIVITY=disabled)
2.6M frida-inject
2.0M frida-server
3.6M frida-agent.so # -1.6M
3.7M frida-gadget.so
Step 3: Disable Database (FRIDA_DATABASE=disabled)
2.6M frida-inject
2.0M frida-server
3.2M frida-agent.so # -0.4M
3.3M frida-gadget.so
Step 4: Disable All Bridges (FRIDA_JAVA_BRIDGE=disabled FRIDA_OBJC_BRIDGE=disabled FRIDA_SWIFT_BRIDGE=disabled)
2.6M frida-inject
2.0M frida-server
2.8M frida-agent.so # -0.4M
2.9M frida-gadget.so
Summary Table
| Config | frida-agent.so | Reduction |
|---|---|---|
| All enabled | 15M | — |
| V8 disabled | 5.2M | -9.8M |
| + Connectivity disabled | 3.6M | -1.6M |
| + Database disabled | 3.2M | -0.4M |
| + All bridges disabled | 2.8M | -0.4M |
Embedded Systems Recommendation
Use the -Dassets=installed Meson build option on embedded targets. This loads frida-agent.so from the filesystem rather than embedding it inside other binaries, keeping all deployed binaries smaller and independently updatable.
-Dassets=installed
Remaining Component Breakdown (Fully Optimized)
After disabling all optional features, the remaining footprint on Linux/armhf is dominated by:
libcapstone.a— disassembler engine (required for Stalker and Interceptor)libglib-2.0.a— GLib runtime (core dependency)libgio-2.0.a— GIO I/O layer (core dependency)
These components cannot be individually disabled; they are fundamental to Frida’s operation.