Master repo will stay on version 1.3.8 forever, please refer to other branches for latest SUSFS code for different kernel version.
An addon root hiding kernel patches and userspace module for KernelSU.
The ksu_susfs userspace tool and ksu module requires a susfs patched kernel to work.
This is only experimental code, that said it can harm your system or cause performance hit, YOU ARE !! W A R N E D !! already
The susfs kernel patches may differ for different kernel version or even on the same kernel version, you may need to create your own patches for your kernel.
- Clone the repo with a tag that has release version, as tag with release version is more stable
- Run
cp ./kernel_patches/KernelSU/10_enable_susfs_for_ksu.patch $KERNEL_ROOT/KernelSU/ - Run
cp ./kernel_patches/50_add_susfs_in_kernel-<kernel_version>.patch $KERNEL_ROOT/ - Run
cp ./kernel_patches/fs/susfs.c $KERNEL_ROOT/fs/ - Run
cp ./kernel_patches/include/linux/susfs.h $KERNEL_ROOT/include/linux/ - Run
cd $KERNEL_ROOT/KernelSUand thenpatch -p1 < 10_enable_susfs_for_ksu.patch - Run
cd $KERNEL_ROOTand thenpatch -p1 < 50_add_susfs_in_kernel.patch, if there are failed patches, you may try to patch them manually by yourself. - Make sure again to have
CONFIG_KSUandCONFIG_KSU_SUSFSenabled before building the kernel, some other SUSFS feature are disabled by default, you may turn it on via menuconfig or change it in your config file - Build and flash the kernel.
- Run
./build_ksu_susfs_tool.shto build the userspace toolksu_susfs, and the arm64 and arm binary will be copied toksu_module_susfs/tools/as well. - Now you can also push the compiled
ksu_susfstool to/data/adb/ksu/bin/so that you can run it directly in adb root shell or termux root shell, as well as in your own ksu modules.
The ksu module here is just a demo to show how to use it.
It will also copy the ksu_susfs tool to /data/adb/ksu/bin/ as well when installing the module.
- ksu_susfs tool can be run in any stage scripts, post-fs-data.sh, services.sh, boot-completed.sh according to your own need.
- Then run
./build_ksu_module.shto build the KernelSU module.
- Run ksu_susfs in root shell for usages.
- mnt_id_reorder feature causes bootloop for non-gki devices, more test is needed.
- KernelSU: https://github.com/tiann/KernelSU
- @Kartatz: for ideas and original commit from https://github.com/Dominium-Apum/kernel_xiaomi_chime/pull/1/commits/74f8d4ecacd343432bb8137b7e7fbe3fd9fef189
- @simonpunk