Building
Table of contents
- Building Frida
Building Frida
Prerequisites
You need:
- C/C++ toolchain
- Node.js >= 18
- Git
For example on an Ubuntu system:
$ sudo apt-get install build-essential git lib32stdc++-9-dev \
libc6-dev-i386 nodejs npm
Getting the code
$ git clone https://github.com/frida/frida.git
Building for the native machine
To build, run:
$ make
Which will use ./build
as the build directory. Run make install
to install.
You may also do ./configure
first to specify a --prefix
, or any other
options. Use --help
to list the top-level options.
For setting lower level options, do:
$ ./configure -- first-option second-option …
The options after --
are passed directly to Meson’s setup
command. This
means you can also pass project options to subprojects, e.g.:
$ ./configure -- \
-Dfrida-gum:devkits=gum,gumjs \
-Dfrida-core:devkits=core
Consult meson.options
in subprojects/* for available options. You may also
clone the different repos standalone and build the same way as described here.
Building for a different machine
iOS/watchOS/tvOS
$ ./configure --host=ios-arm64
# or: ./configure --host=watchos-arm64
# or: ./configure --host=tvos-arm64
# optionally suffixed by `-simulator`
$ make
Android
$ ./configure --host=android-arm64
$ make
Raspberry Pi
$ sudo apt-get install g++-arm-linux-gnueabihf
$ ./configure --host=arm-linux-gnueabihf
$ make
Building out-of-tree
Sometimes you may want to use a single source tree to build for multiple
systems or configurations. To do this, invoke configure
from an empty
directory outside the source tree:
$ mkdir build-ios
$ ../frida/configure --host=ios-arm64
$ make
$ cd ..
$ mkdir build-android
$ ../frida/configure --host=android-arm64
$ make