https://github.com/KernelSU-Next/KPatch-Next
Standalone implementation of KPM support for Magisk/KernelSU
https://github.com/KernelSU-Next/KPatch-Next
android kernel-patch kpatch-next kpm ksu linux magisk module
Last synced: about 1 month ago
JSON representation
Standalone implementation of KPM support for Magisk/KernelSU
- Host: GitHub
- URL: https://github.com/KernelSU-Next/KPatch-Next
- Owner: KernelSU-Next
- License: gpl-2.0
- Created: 2025-12-29T23:02:41.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-02-04T16:49:40.000Z (about 2 months ago)
- Last Synced: 2026-02-05T04:06:47.271Z (about 2 months ago)
- Topics: android, kernel-patch, kpatch-next, kpm, ksu, linux, magisk, module
- Language: C
- Homepage:
- Size: 2.68 MB
- Stars: 67
- Watchers: 2
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KPatch-Next
**Patching and hooking the Linux kernel with only stripped Linux kernel image.**
``` shell
_ ______ _ _ _ _ _
| |/ / _ \ __ _| |_ ___| |__ | \ | | _____ _| |_
| ' /| |_) / _` | __/ __| '_ \ _____| \| |/ _ \ \/ / __|
| . \| __/ (_| | || (__| | | |_____| |\ | __/> <| |_
|_|\_\_| \__,_|\__\___|_| |_| |_| \_|\___/_/\_\\__|
```
- Obtain all symbol information without source code and symbol information.
- Inject arbitrary code into the kernel. (Static patching the kernel image or Runtime dynamic loading).
- Kernel function inline hook and syscall table hook are provided.
- Pure KPM module support for all root managers i.e Magisk & KernelSU/N (Except APatch).
- Checkout our magisk/kernelsu module! [KPatch-Next-Module](https://github.com/KernelSU-Next/KPatch-Next-Module)
## Requirement
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
or
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=n (Initial support)
or
CONFIG_KALLSYMS=y
## Supported Versions
Currently only supports arm64 architecture.
Linux 3.18 - 6.12 (theoretically)
## Get Involved
## More Information
[Documentation](./doc/)
## Credits
- [KernelPatch](https://github.com/bmax121/KernelPatch): Special thanks to the author for making this project possible.
- [vmlinux-to-elf](https://github.com/marin-m/vmlinux-to-elf): Some ideas for parsing kernel symbols.
- [android-inline-hook](https://github.com/bytedance/android-inline-hook): Some code for fixing arm64 inline hook instructions.
- [tlsf](https://github.com/mattconte/tlsf): Memory allocator used for KPM. (Need another to allocate ROX memory.)
## License
KPatch-Next is licensed under the **GNU General Public License (GPL) 2.0** ().