Overview
Maintained by ViRb3, Magisk-Frida is the premier module for security researchers, penetration testers, and reverse engineers who utilize the Frida dynamic instrumentation toolkit on Android.
Ordinarily, running frida-server on Android requires manually pushing the binary to /data/local/tmp/, setting execute permissions, and running it inside an interactive ADB shell that dies as soon as the terminal is closed. Magisk-Frida integrates frida-server into Androidβs systemless boot sequence, launching it as a supervised background daemon whenever your device powers on.
Technical Architecture & How It Works
Supervised Daemon Architecture
- Architecture Detection: During module installation, Magisk-Frida probes
ro.product.cpu.abiand selects the matching upstreamfrida-serverbinary for your hardware architecture. - Boot Service Initialization: During the
service.shlate-boot phase, the module startsfrida-serverusing a detached daemon process:/data/adb/modules/magisk-frida/frida-server -D - SELinux Domain Assignment: Sets appropriate SELinux context (
u:r:magisk:s0) so frida-server can attach to target processes, inject companion.solibraries, and read memory mappings without triggering kernel security violations.
Installation & Quickstart
Step 1: Install the Module
- Download
Magisk-Frida-vX.zip. - Flash it in Magisk, KernelSU, or APatch and reboot.
Step 2: Test from your Workstation
- Install Frida tools on your computer:
pip install frida-tools - Connect your phone via USB with ADB enabled.
- Verify connection:
frida-ps -U - Hook an app:
frida -U -f com.example.targetapp -l hook.js
