TL;DR: For Frida Android work, use frida-server on a rooted test phone when you need flexible access to several processes. Use Frida Gadget inside one app when root or normal injection is unavailable. Use frida-inject as a small command-line injector. It uses Frida’s existing machinery, so it is not a third deployment model.

By the PrivacyPortal team
Last updated October 2026
Frida is a dynamic instrumentation toolkit. It lets you inspect and alter a running app on a device you own or have permission to test. For most rooted Android labs, frida-server is the easiest choice. Gadget suits one repackaged app on a non-rooted device. Frida-inject gives experienced users a leaner host tool for loading a script. Your choice affects setup, scope and failure modes. It does not make an app’s security controls disappear.
Back up the phone before changing anything. Unlocking the bootloader normally wipes all user data. Rooting, modified apps and unlocked bootloaders can affect security, warranty support, over-the-air updates, Play Integrity, banking apps and contactless payments. No Frida method can promise compatibility with a particular bank or protected app.
What Frida Server, Gadget and injection mean
Frida injects a JavaScript runtime into a target process. Your script can then observe Java methods, native functions and memory. It can also replace behaviour while the process runs.
Frida Server and Frida Gadget are deployment models. They decide how Frida reaches the process:
- frida-server runs as a daemon on Android. A host computer connects to it and asks it to attach to or spawn processes.
- Frida Gadget is a shared library placed inside an app. The app loads the library into its own process.
- frida-inject is a compact host-side command-line client. It loads a script through Frida’s existing device and injection services.
In plain terms, Server offers broad lab access. Gadget stays with one modified app. Frida-inject changes the client interface, not the underlying architecture.
Frida 17.23.3 was the current Frida core release on 12 October 2026.
Caption: A host computer connects to Frida Server, while Gadget starts from inside one Android app.
Frida Gadget vs Server vs Inject
This comparison resolves the common “frida gadget vs server” choice. The version on the host must match the Server or Gadget core version.
| Option | Best fit | Root needed | Scope | Main drawback |
|---|---|---|---|---|
| frida-server | Owned test phones and broad app research | Usually | Many accessible processes | Root, bootloader and exposure risks |
| Frida Gadget | One app that you can rebuild and sign | No | The app containing Gadget | APK patching changes its signature |
| frida-inject | Small scripted jobs and automation | Depends on the deployment path | One selected process | Fewer interactive conveniences |
A typical frida server Android lab uses a rooted spare phone and a USB cable. A frida gadget Android setup can work without root. However, you must be able to modify, load and re-sign the app.
Choose Server for repeated testing
Server is the practical choice when you own a rooted test device. It can enumerate processes and attach to different apps without rebuilding each APK. It also supports early instrumentation by spawning an app under Frida.
Keep the Server bound to a trusted local path. Do not expose its port to public Wi-Fi or the internet. A Frida endpoint can provide powerful control over reachable processes.
Choose Gadget for one controlled app
Use Gadget when you can rebuild an app but cannot run a rooted daemon. This often suits your own development build or an authorised test package.
Adding the library alone is not enough. The app must load it through Java, Kotlin or native code. You must also include the correct ABI, such as arm64-v8a. Re-signing changes the app identity from Android’s perspective.
Choose frida-inject for a small client
A frida inject Android workflow is useful for loading a known script without the full interactive Frida CLI. It still needs a valid route into the device. That route will often be frida-server, although other Frida device transports may apply.
Use the main frida client while learning. Its interactive prompt and clearer feedback make early debugging easier.
Back up and prepare the test device
Use a spare phone where possible. Save photos, authentication recovery codes, app data and any files that cannot be replaced. Check that the backup opens before unlocking or wiping anything.
Android normally erases user data when the bootloader changes from locked to unlocked. Read the manufacturer’s process first. Some devices cannot be unlocked through an official route.
Android’s official bootloader guidance requires a factory data reset when a user unlocks a device.
The Android bootloader locking and unlocking documentation explains the platform model. PrivacyPortal’s Android bootloader unlocking guide covers the wider preparation and recovery risks.
Never relock a phone while it contains an incompatible or unverified image. That mistake can leave the device unable to boot.
How to install and use frida-server on Android
This numbered workflow uses Frida 17.23.3 on an authorised rooted test device.
- Back up the phone, enable Developer options and turn on USB debugging.
- Install Android Platform Tools and Python on the host computer.
- Run python -m pip install frida==17.23.3 frida-tools.
- Run frida --version and confirm that it reports 17.23.3.
- Connect by USB. Run adb devices, then approve the prompt on the phone.
- Run adb shell getprop ro.product.cpu.abi to find the device ABI.
- From the files section supplied with this guide, get the Frida 17.23.3 Server build matching that ABI. Extract the XZ archive.
- Run adb push frida-server-17.23.3-android-arm64 /data/local/tmp/, changing the filename if your ABI differs.
- Open adb shell, enter su, run chmod 755 on the uploaded file, then start that file with &.
- On the host, run frida-ps -U. A process list confirms that the host, transport and Server work together.
Prerequisites for the Server method
The phone needs working root access. You also need a reliable USB cable, current ADB tools and the Server binary for the phone’s CPU architecture.
Use Frida only on your own software, a training app or a target covered by clear permission. OWASP MAS Crackmes are safer practice targets than live financial or personal apps. Follow the official Frida Android setup documentation when device behaviour differs.
Verify script injection
Create a plain text file named hello.js. Add Java.perform(function () { console.log('Frida attached'); }); as its content.
Open an authorised app and find its package with frida-ps -Uai. Run frida -U -n com.example.app -l hello.js, replacing the package name. The terminal should print Frida attached.
If the message never appears, confirm that the target has a Java runtime and remains open. Also recheck the version and ABI.
Caption: A successful USB session lists Android processes before a test script prints its confirmation message.
How Frida Gadget works on Android
Gadget is supplied as an Android shared library. A common packaging name is libgadget.so. If you rename the library, its configuration filename must follow the matching Gadget naming rules.
For example, Android packages often carry the configuration as libgadget.config.so. The unusual suffix lets it pass Android packaging rules. The file content is JSON even though its name ends in .so.
- Place the correct Gadget library under the APK’s matching ABI directory.
- Make the application load the library during startup.
- Add a Gadget configuration if the default connection behaviour is unsuitable.
- Align and sign the rebuilt APK with a key you control.
- Install it only after preserving any needed data from the original app.
Frida Gadget’s default interaction is Listen, and its default on-load behaviour is Wait.
That default can make an app appear frozen while Gadget waits for a client. The official Frida Gadget documentation describes Listen, Connect and Script modes.
Why patched APKs often fail to install
Android will not install your re-signed APK over a copy signed by another key. Removing the old copy usually removes its local app data too. Back it up first if the app permits that.
Modern apps may arrive as split APKs or app bundles. Patching only the base APK can omit required resources or native libraries. Signature checks inside the app can also make the rebuilt package exit.
Caption: An APK contains separate native-library folders, and Gadget must match the phone’s active ABI.
What frida-inject actually changes
Frida-inject loads a script and then keeps the session alive. A typical authorised lab command is frida-inject -U -n com.example.app -s hello.js.
It does not remove the need for Server, Gadget or another supported device connection. It also does not make injection less visible to a protected app. Choose it for a small repeatable job, not as a bypass technique.
Common Frida Android failure modes
The client and device versions differ
Version mismatch is the first check when a connection closes or reports an incompatible protocol. Run frida --version on the host. Replace the device binary or Gadget with the same Frida core release.
The frida-tools package has its own package version. Do not assume its number must equal the Frida core number.
The binary has the wrong ABI
An arm64 phone usually needs the Android arm64 build. An “Exec format error” often means the binary targets another CPU. Confirm with getprop ro.product.cpu.abi.
Gadget must also exist in the ABI selected for that app. A phone may support 64-bit code while a particular app process remains 32-bit.
Root or SELinux blocks access
A Server launched as the shell user will have limited access. Check the root prompt and process owner. SELinux or the root manager may still deny an operation.
Do not make SELinux globally permissive on a daily phone. That weakens a major Android security boundary. Use a controlled test image and diagnose the specific denial instead.
The app detects modification
Apps can inspect signatures, loaded libraries, ports, threads, files or runtime behaviour. They may exit even when Frida works correctly. An app update can also change those checks without notice.
This guide does not promise a way around such controls. For your own app, use a debug build or a dedicated test flag.
Security, banking and Play Integrity
Frida is not a Play Integrity repair tool. An unlocked bootloader, root framework or modified system can affect integrity verdicts before Frida starts. Apps may also use their own checks.
Banking and payment apps can combine Play Integrity with server-side risk signals. A result in a checker app does not guarantee that another app will work. Avoid repeated integrity tests because they do not prove lasting compatibility.
Root-hiding modules can add more trust and maintenance risk. They may conflict, fail after an update or reduce visibility into what holds privileged access. PrivacyPortal does not recommend weakening a main phone merely to force one app to run.
For a lower-risk daily setup, consider a separate test device. PrivacyPortal’s custom Android ROM guide explains the wider update and security trade-offs.
How to remove Frida safely
Stop frida-server before removing its file from /data/local/tmp. Remove any ADB port forwarding you created. Revoke USB debugging authorisations if the host is no longer trusted.
A Gadget-patched APK cannot be turned back into the vendor-signed original. Uninstall the test build, then reinstall the genuine package from a trusted source. Restoring its data may fail because signing keys differ.
Relocking the bootloader is a separate operation. Restore the exact supported firmware first and verify that it boots. Expect another wipe. Do not relock a modified image unless the device maker explicitly supports it.
Frequently asked questions
Does Frida require root on Android?
No. Frida Gadget can run inside an app without root when you can modify, sign and install that app. Frida Server normally needs root for useful access across unrelated processes.
Is Frida Gadget the same as frida-inject?
No. Gadget is an instrumentation library embedded in the target app. Frida-inject is a host command that asks Frida to load a script into a selected process.
Can Frida brick an Android phone?
A normal Frida session rarely changes boot firmware. The risky parts are bootloader unlocking, rooting and flashing. A wrong image, interrupted flash or unsafe relock can leave the phone unable to boot. Back up first and keep the correct recovery files.
Why does frida-ps work while attaching fails?
Process listing proves the connection, not permission to instrument every target. The app may exit, use another process, block debugging or run under protections that deny access. Check the package, process state, root context and logs.
Will Frida make a banking app work on a rooted phone?
No reliable promise is possible. Banks use different checks and can change them remotely. Frida may itself be detected. Use an officially supported device for financial access rather than relying on an instrumentation or hiding method.
Must the Frida versions match exactly?
Use the same Frida core version on the host and device. For this guide, that means Frida 17.23.3 with the matching Server or Gadget build. Exact matching removes a common source of protocol and feature errors.
PrivacyPortal sells ready-to-use, de-Googled GrapheneOS Pixels — hardened, kept updated, and shipped with our encrypted Graphite messenger. Browse privacy phones →
