MCPcopy Index your code
hub / github.com/acidanthera/Lilu

github.com/acidanthera/Lilu @1.7.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.7.2 ↗ · + Follow
2,295 symbols 6,022 edges 509 files 302 documented · 13% updated 3mo ago1.7.2 · 2026-03-20★ 3,846
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Lilu

Build Status Scan Status

An open source kernel extension bringing a platform for arbitrary kext, library, and program patching throughout the system for macOS.

Features

  • Generic kext patcher
  • Generic process patcher (64-bit with basic 32-bit functionality)
  • Generic framework/library patcher (64-bit with basic 32-bit functionality)
  • Provides a unified plugin API

Installation

You should install this kext along with the plugin kexts depending on it.
The prebuilt binaries are available on releases page.
Several existing plugins possibly with code samples are available on known plugins page. To compile a plugin copy the debug version of Lilu.kext into its directory.

Configuration

  • Add -liludbg to enable debug printing (available in DEBUG binaries).
  • Add -liludbgall to enable debug printing in Lilu and all loaded plugins (available in DEBUG binaries).
  • Add -liluoff to disable Lilu.
  • Add -liluuseroff to disable Lilu user patcher (for e.g. dyld_shared_cache manipulations).
  • Add -liluslow to enable legacy user patcher.
  • Add -lilulowmem to disable kernel unpack (disables Lilu in recovery mode).
  • Add -lilubeta to enable Lilu on unsupported OS versions (macOS 26 and below are enabled by default).
  • Add -lilubetaall to enable Lilu and all loaded plugins on unsupported os versions (use very carefully).
  • Add -liluforce to enable Lilu regardless of the mode, OS, installer, or recovery.
  • Add liludelay=1000 to enable 1 second delay after each print for troubleshooting.
  • Add lilucpu=N to let Lilu and plugins assume Nth CPUInfo::CpuGeneration.
  • Add liludump=N to let Lilu DEBUG version dump log to /var/log/Lilu_VERSION_KERN_MAJOR.KERN_MINOR.txt after N seconds

Peculiarities

Most of the plugins cease to function in safe (-x) mode.
By default Lilu itself does not function in single-user (-s) mode, unless -liluforce is present.

Discussion

InsanelyMac topic in English
AppleLife topic in Russian

Contribution

For the contributors with programming skills the headers are filled with AppleDOC comments.
Earlier code changes could be tracked in AppleALC project.
Writing and supporting code is fun but it takes time. Please provide most descriptive bugreports or pull requests.

Credits

Extension points exported contracts — how you extend this code

CS (Interface)
(no doc)
capstone/bindings/java/capstone/Capstone.java

Core symbols most depended-on inside this repo

SStream_concat0
called by 459
capstone/SStream.c
MCInst_getOperand
called by 368
capstone/MCInst.c
Check
called by 265
capstone/arch/ARM/ARMDisassembler.c
MCOperand_getReg
called by 233
capstone/MCInst.c
SStream_concat
called by 230
capstone/SStream.c
MCOperand_getImm
called by 219
capstone/MCInst.c
MCOperand_CreateImm0
called by 203
capstone/MCInst.c
printf
called by 171
capstone/contrib/cs_driver/cs_driver/cs_driver.c

Shape

Function 1,369
Method 467
Class 338
Enum 120
Interface 1

Languages

C51%
C++31%
Java9%
Python9%

Modules by API surface

capstone/arch/ARM/ARMDisassembler.c135 symbols
Lilu/Sources/kern_ubsan.c133 symbols
capstone/arch/ARM/ARMInstPrinter.c90 symbols
Lilu/Headers/kern_util.hpp60 symbols
capstone/arch/Mips/MipsDisassembler.c58 symbols
capstone/arch/AArch64/AArch64Disassembler.c57 symbols
capstone/bindings/python/capstone/__init__.py54 symbols
capstone/bindings/java/capstone/Capstone.java50 symbols
capstone/arch/ARM/ARMAddressingModes.h50 symbols
capstone/arch/X86/X86IntelInstPrinter.c40 symbols
capstone/arch/X86/X86ATTInstPrinter.c39 symbols
capstone/arch/SystemZ/SystemZDisassembler.c38 symbols

For agents

$ claude mcp add Lilu \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page