
Magisk module that auto-packages renef_server (dynamic instrumentation for Android)
A Magisk / KernelSU / APatch module that automatically packages and runs renef — a dynamic instrumentation toolkit for Android.
Inspired by magisk-frida.
MagiskRenef-{version}.zip from ReleasesAfter 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.lua
After reboot, check your root manager's module list:
renef_server is running (UDS) — healthyrenef_server failed to start — see TroubleshootingCheck the server log:
adb shell su 0 cat /data/local/tmp/renef_server.log
Failed to find libc basePossible 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.lua
A GitHub Actions workflow runs daily. When a new renef release is detected, it:
renef-v{VERSION}-android-arm64.tar.gz from the renef releasesrenef_server and libagent.so# Install uv (https://docs.astral.sh/uv/)
uv run python3 main.py
# Force a rebuild
FORCE_RELEASE=1 uv run python3 main.py