diff --git a/website/docs/.vitepress/locales/en.ts b/website/docs/.vitepress/locales/en.ts
index a548c0af..edc36a36 100644
--- a/website/docs/.vitepress/locales/en.ts
+++ b/website/docs/.vitepress/locales/en.ts
@@ -50,6 +50,7 @@ function sidebarGuide() {
{ text: 'How to build?', link: '/guide/how-to-build' },
{ text: 'Intergrate for non-GKI devices', link: '/guide/how-to-integrate-for-non-gki'},
{ text: 'Unofficially supported devices', link: '/guide/unofficially-support-devices.md' },
+ { text: 'Module Guide', link: '/guide/module.md' },
{ text: 'FAQ', link: '/guide/faq' },
]
}
diff --git a/website/docs/.vitepress/locales/zh_CN.ts b/website/docs/.vitepress/locales/zh_CN.ts
index ab420707..bc881fa2 100644
--- a/website/docs/.vitepress/locales/zh_CN.ts
+++ b/website/docs/.vitepress/locales/zh_CN.ts
@@ -50,6 +50,7 @@ function sidebarGuide() {
{ text: '如何构建?', link: '/zh_CN/guide/how-to-build' },
{ text: '如何为非GKI设备集成 KernelSU', link: '/zh_CN/guide/how-to-integrate-for-non-gki'},
{ text: '非官方支持设备', link: '/zh_CN/guide/unofficially-support-devices.md' },
+ { text: '模块开发指南', link: '/zh_CN/guide/module.md' },
{ text: '常见问题', link: '/zh_CN/guide/faq' },
]
}
diff --git a/website/docs/guide/difference-with-magisk.md b/website/docs/guide/difference-with-magisk.md
new file mode 100644
index 00000000..56139ace
--- /dev/null
+++ b/website/docs/guide/difference-with-magisk.md
@@ -0,0 +1,25 @@
+# Difference with Magisk
+
+Although there are many similarities between KernelSU modules and Magisk modules, there are inevitably some differences due to their completely different implementation mechanisms. If you want your module to run on both Magisk and KernelSU, you must understand these differences.
+
+## Similarities
+
+- Module file format: both use zip format to organize modules, and the format of modules is almost the same
+- Module installation directory: both located in `/data/adb/modules`
+- Systemless: both support modifying /system in a systemless way through modules
+- post-fs-data.sh: the execution time and semantics are exactly the same
+- service.sh: the execution time and semantics are exactly the same
+- system.prop: completely the same
+- sepolicy.rule: completely the same
+- BusyBox: scripts are run in BusyBox with "standalone mode" enabled in both cases
+
+## Differences
+
+Before understanding the differences, you need to know how to differentiate whether your module is running in KernelSU or Magisk. You can use the environment variable `KSU` to differentiate it in all places where you can run module scripts (`customize.sh`, `post-fs-data.sh`, `service.sh`). In KernelSU, this environment variable will be set to `true`.
+
+Here are some differences:
+
+- KernelSU modules cannot be installed in Recovery mode.
+- KernelSU modules do not have built-in support for Zygisk (but you can use Zygisk modules through [ZygiskOnKernelSU](https://github.com/Dr-TSNG/ZygiskOnKernelSU).
+- The method for replacing or deleting files in KernelSU modules is completely different from Magisk. KernelSU does not support the `.replace` method. Instead, you need to create a same-named file with `mknod filename c 0 0` to delete the corresponding file.
+- The directories for BusyBox are different. The built-in BusyBox in KernelSU is located in `/data/adb/ksu/bin/busybox`, while in Magisk it is in `/data/adb/magisk/busybox`. **Note that this is an internal behavior of KernelSU and may change in the future!**
diff --git a/website/docs/guide/module.md b/website/docs/guide/module.md
new file mode 100644
index 00000000..2cd4270f
--- /dev/null
+++ b/website/docs/guide/module.md
@@ -0,0 +1,237 @@
+# Module guides
+
+KernelSU provides a module mechanism that achieves the effect of modifying the system directory while maintaining the integrity of the system partition. This mechanism is commonly known as "systemless".
+
+The module mechanism of KernelSU is almost the same as that of Magisk. If you are familiar with Magisk module development, developing KernelSU modules is very similar. You can skip the introduction of modules below and only need to read [difference-with-magisk](difference-with-magisk.md).
+
+## Busybox
+
+KernelSU ships with a feature complete BusyBox binary (including full SELinux support). The executable is located at `/data/adb/ksu/bin/busybox`. KernelSU's BusyBox supports runtime toggle-able "ASH Standalone Shell Mode". What this standalone mode means is that when running in the `ash` shell of BusyBox, every single command will directly use the applet within BusyBox, regardless of what is set as `PATH`. For example, commands like `ls`, `rm`, `chmod` will **NOT** use what is in `PATH` (in the case of Android by default it will be `/system/bin/ls`, `/system/bin/rm`, and `/system/bin/chmod` respectively), but will instead directly call internal BusyBox applets. This makes sure that scripts always run in a predictable environment and always have the full suite of commands no matter which Android version it is running on. To force a command _not_ to use BusyBox, you have to call the executable with full paths.
+
+Every single shell script running in the context of KernelSU will be executed in BusyBox's `ash` shell with standalone mode enabled. For what is relevant to 3rd party developers, this includes all boot scripts and module installation scripts.
+
+For those who want to use this "Standalone Mode" feature outside of KernelSU, there are 2 ways to enable it:
+
+1. Set environment variable `ASH_STANDALONE` to `1`
Example: `ASH_STANDALONE=1 /data/adb/ksu/bin/busybox sh