A Magisk / KernelSU / APatch module that automatically packages and runs renef — a dynamic instrumentation toolkit for Android.
Inspired by magisk-frida.
- Rooted Android device (Magisk / KernelSU / KernelSU Next / APatch)
- ARM64 only — renef only supports ARM64 Android
- Android 10+ recommended
- Download the latest
MagiskRenef-{version}.zipfrom Releases - Install via your root manager (Magisk / KSU / APatch)
- Reboot
After reboot, renef_server starts automatically using UDS (Unix Domain Socket) on abstract socket @com.android.internal.os.RuntimeInit.
Connect from your host machine using the renef client:
# Spawn a new process
renef -s com.example.app -l your-script.lua
# Attach to running process (open the app first)
adb shell su 0 sh -c "pidof com.example.app" # get PID
renef -a <PID> -l your-script.luaAfter reboot, check your root manager's module list:
- ✅
renef_server is running (UDS)— healthy - ❌
renef_server failed to start— see Troubleshooting
Check the server log:
adb shell su 0 cat /data/local/tmp/renef_server.logPossible causes:
-
SELinux enforcing — most common cause on custom ROMs / Samsung devices:
adb shell su -c setenforce 0
Then retry. If it works, the issue is SELinux blocking renef's process injection.
-
Device not rooted — renef_server must run as root (uid 0)
-
Wrong architecture — only ARM64 is supported
Some apps set android:exported="false" on all activities. The -s (spawn) flag uses monkey which cannot launch them. Use -a (attach) instead:
# 1. Open the app manually on your device
# 2. Get its PID
adb shell su 0 sh -c "pidof com.example.app"
# 3. Attach
renef -a <PID> -l your-script.luaA GitHub Actions workflow runs daily. When a new renef release is detected, it:
- Downloads
renef-v{VERSION}-android-arm64.tar.gzfrom the renef releases - Extracts
renef_serverandlibagent.so - Packages them into a Magisk-compatible ZIP
- Publishes a new GitHub release
# Install uv (https://docs.astral.sh/uv/)
uv run python3 main.py
# Force a rebuild
FORCE_RELEASE=1 uv run python3 main.py- renef by Ahmeth4n
- magisk-frida by ViRb3 (structure inspiration)