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

FeatureRequired When
FRIDA_V8Using the V8 JavaScript engine (default JS runtime is QuickJS — safe to disable if not needed)
FRIDA_CONNECTIVITYUsing TLS certificates (frida.setup_peer_connection() API or --p2p CLI flag)
FRIDA_DATABASEUsing SqliteDatabase and related APIs
FRIDA_JAVA_BRIDGECalling or instrumenting Java APIs inside processes with a JVM or Android Runtime
FRIDA_OBJC_BRIDGECalling or instrumenting Objective-C code
FRIDA_SWIFT_BRIDGECalling 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

Configfrida-agent.soReduction
All enabled15M
V8 disabled5.2M-9.8M
+ Connectivity disabled3.6M-1.6M
+ Database disabled3.2M-0.4M
+ All bridges disabled2.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:

These components cannot be individually disabled; they are fundamental to Frida’s operation.