• Stars
    star
    3,585
  • Rank 12,368 (Top 0.3 %)
  • Language
    C
  • License
    BSD 3-Clause "New...
  • Created almost 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Arbitrary kext and process patching on macOS

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 14 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

More Repositories

1

OpenCorePkg

OpenCore bootloader
C
13,029
star
2

AppleALC

Native macOS HD audio for not officially supported codecs
C++
3,439
star
3

WhateverGreen

Various patches necessary for certain ATI/AMD/Intel/Nvidia GPUs
C++
3,236
star
4

VirtualSMC

SMC emulator layer
C++
1,664
star
5

BrcmPatchRAM

C++
1,037
star
6

MaciASL

ACPI editing IDE for macOS
Objective-C
749
star
7

OcBinaryData

733
star
8

NVMeFix

C++
685
star
9

AirportBrcmFixup

An open source kernel extension providing a set of patches required for non-native Airport Broadcom Wi-Fi cards.
C++
643
star
10

MacHyperVSupport

Hyper-V integration support for macOS
C++
620
star
11

AppleSupportPkg

AppleSupportPkg - contains UEFI drivers for Apple environment support
559
star
12

CPUFriend

Dynamic macOS CPU power management data injection
C++
535
star
13

VoodooPS2

C++
513
star
14

IntelMausi

Intel Ethernet LAN driver for macOS
C
390
star
15

bugtracker

Acidanthera Bugtracker
375
star
16

HibernationFixup

A Lilu plugin intended to fix hibernation compatibility issues
C++
371
star
17

FeatureUnlock

Add Sidecar support to unsupported models
C++
362
star
18

gfxutil

Device Properties conversion tool
C
274
star
19

MacInfoPkg

Mac Platform Information
249
star
20

RestrictEvents

C++
249
star
21

CpuTscSync

It is a Lilu plugin, combining functionality of VoodooTSCSync and disabling xcpm_urgency if TSC is not in sync. It should solve kernel panics after wake.
C++
171
star
22

MacKernelSDK

macOS kernel SDK targeting various XNU versions
C
167
star
23

AptioFixPkg

AptioFixPkg drivers to workaround macOS compatibility with APTIO UEFI FW
161
star
24

Shiki

Protected video playback support and hardware video acceleration on various hardware.
152
star
25

VoodooInput

Generic Multitouch Handler kernel extension for macOS
C++
151
star
26

BrightnessKeys

Handler for brightness keys without DSDT patches
C++
132
star
27

RTCMemoryFixup

open source kernel extension providing a way to emulate some offsets in your CMOS (RTC) memory
C++
97
star
28

macserial

Decode mac serial number
96
star
29

CryptexFixup

Various patches to install Rosetta Cryptex
C++
88
star
30

BT4LEContinuityFixup

72
star
31

OcSupportPkg

OpenCore common libraries
71
star
32

IOJones

Realtime I/O Registry viewer
60
star
33

DebugEnhancer

A Lilu plugin intended to enable debug output in the macOS kernel
C++
58
star
34

audk

Acidanthera UEFI Development Kit based on EDK II edk2-stable202405
C
57
star
35

dmidecode

dmidecode version with macOS specific improvements
C
40
star
36

ocbuild

Shell
39
star
37

EmeraldSDHC

SD host controller support for macOS
C++
39
star
38

OpenCoreShell

Patched UDK Shell adopted for wide firmware range
38
star
39

EfiPkg

38
star
40

UEFIGraphicsFB

UEFI framebuffer driver for macOS
C++
28
star
41

mac-efi-firmware

C
24
star
42

CpuTopologySync

Rebuild asymmetric CPU topology on macOS.
23
star
43

DuetPkg

Duet UEFI firmware emulator
15
star
44

ocmtoc

C
7
star
45

OcLegacyPkg

Legacy OpenCorePkg repository left for historical purposes
7
star