mirror of
https://github.com/KernelSU-Next/KPatch-Next.git
synced 2026-11-17 06:58:01 +00:00
Standalone implementation of KPM support for Magisk/KernelSU
- C 97.5%
- Assembly 1.4%
- Makefile 0.4%
- Shell 0.3%
- Linker Script 0.2%
- Other 0.1%
|
History
|
||
|---|---|---|
| .github | ||
| doc | ||
| kernel | ||
| kpms | ||
| tools | ||
| user | ||
| .clang-format | ||
| .gitignore | ||
| banner | ||
| build.sh | ||
| doxyfile | ||
| LICENSE | ||
| README.md | ||
| revision | ||
| version | ||
KPatch-Next
Patching and hooking the Linux kernel with only stripped Linux kernel image.
_ ______ _ _ _ _ _
| |/ / _ \ __ _| |_ ___| |__ | \ | | _____ _| |_
| ' /| |_) / _` | __/ __| '_ \ _____| \| |/ _ \ \/ / __|
| . \| __/ (_| | || (__| | | |_____| |\ | __/> <| |_
|_|\_\_| \__,_|\__\___|_| |_| |_| \_|\___/_/\_\\__|
- 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
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
Credits
- KernelPatch: Special thanks to the author for making this project possible.
- vmlinux-to-elf: Some ideas for parsing kernel symbols.
- android-inline-hook: Some code for fixing arm64 inline hook instructions.
- 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 (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).