Skip to content
 
 

Repository files navigation

Renef Logo

Renef

Dynamic instrumentation toolkit for Android ARM64

Release License Stars Issues Docs HookShare


Renef lets you hook native and Java functions, scan and patch memory, and inject into running processes on Android ARM64, all through a Lua scripting interface. No ptrace required.

For comprehensive information, see renef.io.

Install

Prebuilt binaries

Download the latest release from GitHub Releases.

Build from source

Prerequisites: CMake 3.16+, C++17 compiler, Android NDK r25+

# Setup dependencies (first time)
make setup

# Build client, server, and agent
make all

# Build, deploy to device, and start server
make install

Client only (Windows)

Requires WSL with Ubuntu.

git clone https://github.com/ahmeth4n/renef.git
cd renef
build_wsl.bat

This installs dependencies, configures, and builds automatically. Run the binary with wsl ./build/renef.

Connecting to a device from WSL

ADB runs on Windows, so set up the connection from PowerShell/cmd first:

adb tcpip 5555
adb connect <device-ip>:5555

Then use ADB from WSL via the Windows binary:

adb.exe push ...
adb.exe shell ...

Once the renef server is running on the device, the client connects directly over TCP -no ADB needed:

wsl ./build/renef

Client only (Linux / WSL)

No Android NDK needed -only builds the host client. Dependencies (capstone, asio) are downloaded automatically during cmake configure.

# Install build tools (Ubuntu/Debian/WSL)
sudo apt update
sudo apt install -y build-essential cmake libreadline-dev git

# Clone and build
git clone https://github.com/ahmeth4n/renef.git
cd renef
mkdir -p build && cd build
cmake ..
make -j$(nproc)

Client only (macOS)

brew install cmake readline
git clone https://github.com/ahmeth4n/renef.git
cd renef
mkdir -p build && cd build
cmake ..
make -j$(sysctl -n hw.ncpu)

Python bindings

The Python package wraps the C API via ctypes and requires no Android NDK.

# Install build tools (Ubuntu/Debian)
sudo apt install -y build-essential cmake python3 python3-pip

# Build the shared library
git clone https://github.com/ahmeth4n/renef.git
cd renef
mkdir -p build && cd build
cmake ..
make renef_shared -j$(nproc)
cd ..

# Run tests (no device needed)
PYTHONPATH=bindings/python python3 -m pytest bindings/python/tests/ -v

# Or use unittest directly
PYTHONPATH=bindings/python python3 -m unittest discover -s bindings/python/tests -v

Usage:

import sys
sys.path.insert(0, "bindings/python")

from renef import Renef
r = Renef()
session = r.attach(1234)     # attach by PID
# session = r.spawn("com.example.app")  # or spawn an app

# Module API
libc = session.Module.find("libc.so")
modules = session.Module.list()

# Eval Lua on the target
ok, out, err = session.eval("print(OS.getpid())")

Learn more

Visit renef.io for docs, guides, and API reference.

Hooks

Browse and share community hooks at hook.renef.io -SSL pinning bypass, root detection bypass, debugger detection bypass, and more.

Community Projects

Project Description
magisk-renef Magisk/KernelSU/APatch module for auto-deploying renef on rooted devices

Community

Telegram X Discord

License

Apache-2.0 License - see LICENSE for details.

About

mobile reverse engineering framework

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages