From cbff9b8ba1adcb36909aac90e91e023a8a2d75f5 Mon Sep 17 00:00:00 2001
From: igor <134963561+igormiguell@users.noreply.github.com>
Date: Thu, 13 Feb 2025 00:54:30 -0300
Subject: [PATCH] website: enhanced english/portuguese translation (#2427)
Enhanced english/portuguese translation for better fluency, grammar,
clarity, and text accuracy.
---
docs/README.md | 22 +--
docs/README_PT-BR.md | 18 +--
js/README.md | 21 +--
website/docs/.vitepress/locales/en.ts | 6 +-
website/docs/.vitepress/locales/id_ID.ts | 2 +-
website/docs/.vitepress/locales/ja_JP.ts | 2 +-
website/docs/.vitepress/locales/pt_BR.ts | 6 +-
website/docs/.vitepress/locales/ru_RU.ts | 2 +-
website/docs/.vitepress/locales/vi_VN.ts | 2 +-
website/docs/.vitepress/locales/zh_CN.ts | 2 +-
website/docs/.vitepress/locales/zh_TW.ts | 2 +-
website/docs/guide/app-profile.md | 68 ++++-----
website/docs/guide/difference-with-magisk.md | 32 ++--
website/docs/guide/faq.md | 44 +++---
website/docs/guide/how-to-build.md | 28 ++--
.../guide/how-to-integrate-for-non-gki.md | 56 ++++---
website/docs/guide/installation.md | 142 +++++++++---------
website/docs/guide/module-webui.md | 20 +--
website/docs/guide/module.md | 71 +++++----
website/docs/guide/rescue-from-bootloop.md | 32 ++--
.../guide/unofficially-support-devices.md | 6 +-
website/docs/guide/what-is-kernelsu.md | 8 +-
website/docs/index.md | 6 +-
website/docs/pt_BR/guide/app-profile.md | 48 +++---
.../pt_BR/guide/difference-with-magisk.md | 30 ++--
website/docs/pt_BR/guide/faq.md | 24 +--
website/docs/pt_BR/guide/how-to-build.md | 12 +-
.../guide/how-to-integrate-for-non-gki.md | 44 +++---
website/docs/pt_BR/guide/installation.md | 88 +++++------
website/docs/pt_BR/guide/module-webui.md | 12 +-
website/docs/pt_BR/guide/module.md | 22 +--
.../docs/pt_BR/guide/rescue-from-bootloop.md | 26 ++--
.../guide/unofficially-support-devices.md | 4 +-
website/docs/pt_BR/guide/what-is-kernelsu.md | 4 +-
website/docs/pt_BR/index.md | 4 +-
35 files changed, 458 insertions(+), 458 deletions(-)
diff --git a/docs/README.md b/docs/README.md
index 3e99c1e8..add258d6 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -4,7 +4,7 @@
-A Kernel-based root solution for Android devices.
+A kernel-based root solution for Android devices.
[](https://github.com/tiann/KernelSU/releases/latest)
[](https://hosted.weblate.org/engage/kernelsu)
@@ -18,19 +18,19 @@ A Kernel-based root solution for Android devices.
2. Module system based on [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
3. [App Profile](https://kernelsu.org/guide/app-profile.html): Lock up the root power in a cage.
-## Compatibility State
+## Compatibility state
-KernelSU officially supports Android GKI 2.0 devices (kernel 5.10+). Older kernels (4.14+) are also compatible, but the kernel will have to be built manually.
+KernelSU officially supports Android GKI 2.0 devices (kernel 5.10+). Older kernels (4.14+) are also supported, but the kernel will need to be built manually.
With this, WSA, ChromeOS, and container-based Android are all supported.
-Currently, only `arm64-v8a` and `x86_64` are supported.
+Currently, only the `arm64-v8a` and `x86_64` architectures are supported.
## Usage
-- [Installation Instruction](https://kernelsu.org/guide/installation.html)
-- [How to build?](https://kernelsu.org/guide/how-to-build.html)
-- [Official Website](https://kernelsu.org/)
+- [Installation](https://kernelsu.org/guide/installation.html)
+- [How to build](https://kernelsu.org/guide/how-to-build.html)
+- [Official website](https://kernelsu.org/)
## Translation
@@ -51,7 +51,7 @@ For information on reporting security vulnerabilities in KernelSU, see [SECURITY
## Credits
-- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): the KernelSU idea.
-- [Magisk](https://github.com/topjohnwu/Magisk): the powerful root tool.
-- [genuine](https://github.com/brevent/genuine/): apk v2 signature validation.
-- [Diamorphine](https://github.com/m0nad/Diamorphine): some rootkit skills.
+- [Kernel-Assisted Superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): The KernelSU idea.
+- [Magisk](https://github.com/topjohnwu/Magisk): The powerful root tool.
+- [genuine](https://github.com/brevent/genuine/): APK v2 signature validation.
+- [Diamorphine](https://github.com/m0nad/Diamorphine): Some rootkit skills.
diff --git a/docs/README_PT-BR.md b/docs/README_PT-BR.md
index c91737c8..f3361e91 100644
--- a/docs/README_PT-BR.md
+++ b/docs/README_PT-BR.md
@@ -15,26 +15,26 @@ Uma solução root baseada em kernel para dispositivos Android.
## Características
1. `su` e gerenciamento de acesso root baseado em kernel.
-2. Sistema modular baseado em [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
+2. Sistema de módulos baseado em [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
3. [Perfil do Aplicativo](https://kernelsu.org/pt_BR/guide/app-profile.html): Tranque o poder root em uma gaiola.
## Estado de compatibilidade
-O KernelSU oferece suporte oficial a dispositivos Android GKI 2.0 (kernel 5.10+). Kernels mais antigos (4.14+) também são compatíveis, mas o kernel terá que ser construído manualmente.
+O KernelSU oferece suporte oficial a dispositivos Android GKI 2.0 (kernel 5.10+). Kernels mais antigos (4.14+) também são compatíveis, mas será necessário construir o kernel manualmente.
Com isso, WSA, ChromeOS e Android baseado em contêiner são todos suportados.
-Atualmente, apenas `arm64-v8a` e `x86_64` são suportados.
+Atualmente, apenas as arquiteturas `arm64-v8a` e `x86_64` são compatíveis.
## Uso
- [Instalação](https://kernelsu.org/pt_BR/guide/installation.html)
- - [Como compilar o KernelSU?](https://kernelsu.org/pt_BR/guide/how-to-build.html)
+ - [Como compilar](https://kernelsu.org/pt_BR/guide/how-to-build.html)
- [Site oficial](https://kernelsu.org/pt_BR/)
## Tradução
-Para contribuir com a tradução do KernelSU ou aprimorar traduções existentes, por favor, utilize o [Weblate](https://hosted.weblate.org/engage/kernelsu/). PR para a tradução do Gerenciador não são mais aceitas, pois podem entrar em conflito com o Weblate.
+Para contribuir com a tradução do KernelSU ou aprimorar traduções existentes, por favor, use o [Weblate](https://hosted.weblate.org/engage/kernelsu/). PR para a tradução do Manager não são mais aceitas, pois podem entrar em conflito com o Weblate.
## Discussão
@@ -51,7 +51,7 @@ Para obter informações sobre como relatar vulnerabilidades de segurança do Ke
## Créditos
-- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): a ideia do KernelSU.
-- [Magisk](https://github.com/topjohnwu/Magisk): a poderosa ferramenta root.
-- [genuine](https://github.com/brevent/genuine/): validação de assinatura apk v2.
-- [Diamorphine](https://github.com/m0nad/Diamorphine): algumas habilidades de rootkit.
+- [Kernel-Assisted Superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): A ideia do KernelSU.
+- [Magisk](https://github.com/topjohnwu/Magisk): A poderosa ferramenta root.
+- [genuine](https://github.com/brevent/genuine/): Validação de assinatura APK v2.
+- [Diamorphine](https://github.com/m0nad/Diamorphine): Algumas habilidades de rootkit.
diff --git a/js/README.md b/js/README.md
index 91de2b45..422377dd 100644
--- a/js/README.md
+++ b/js/README.md
@@ -10,12 +10,12 @@ yarn add kernelsu
### exec
-Spawns a **root** shell and runs a command within that shell, passing the `stdout` and `stderr` to a Promise when complete.
+Spawns a **root** shell and runs a command within that shell, returning a Promise that resolves with the `stdout` and `stderr` outputs upon completion.
- `command` `` The command to run, with space-separated arguments.
- `options` ``
- - `cwd` - Current working directory of the child process
- - `env` - Environment key-value pairs
+ - `cwd` - Current working directory of the child process.
+ - `env` - Environment key-value pairs.
```javascript
import { exec } from 'kernelsu';
@@ -31,13 +31,13 @@ if (errno === 0) {
Spawns a new process using the given `command` in **root** shell, with command-line arguments in `args`. If omitted, `args` defaults to an empty array.
-Returns a `ChildProcess`, Instances of the ChildProcess represent spawned child processes.
+Returns a `ChildProcess` instance. Instances of `ChildProcess` represent spawned child processes.
- `command` `` The command to run.
- `args` `` List of string arguments.
- `options` ``:
- - `cwd` `` - Current working directory of the child process
- - `env` `` - Environment key-value pairs
+ - `cwd` `` - Current working directory of the child process.
+ - `env` `` - Environment key-value pairs.
Example of running `ls -lh /data`, capturing `stdout`, `stderr`, and the exit code:
@@ -63,9 +63,9 @@ ls.on('exit', (code) => {
##### Event 'exit'
-- `code` `` The exit code if the child exited on its own.
+- `code` `` The exit code if the child process exited on its own.
-The `'exit'` event is emitted after the child process ends. If the process exited, `code` is the final exit code of the process, otherwise null
+The `'exit'` event is emitted when the child process ends. If the process exits, `code` contains the final exit code; otherwise, it is null.
##### Event 'error'
@@ -112,9 +112,10 @@ toast('Hello, world!');
### moduleInfo
-Get Module info.
+Get module info.
+
```javascript
import { moduleInfo } from 'kernelsu';
// print moduleId in console
console.log(moduleInfo());
-```
\ No newline at end of file
+```
diff --git a/website/docs/.vitepress/locales/en.ts b/website/docs/.vitepress/locales/en.ts
index ebf361f3..381a1dc9 100644
--- a/website/docs/.vitepress/locales/en.ts
+++ b/website/docs/.vitepress/locales/en.ts
@@ -11,7 +11,7 @@ export default defineConfig({
themeConfig: {
nav: nav(),
- lastUpdatedText: 'last Updated',
+ lastUpdatedText: 'Last updated',
sidebar: {
'/guide/': sidebarGuide()
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: 'Released under the GPL3 License.',
- copyright: 'Copyright © 2022-present KernelSU Developers'
+ copyright: 'Copyright © 2022-present KernelSU developers.'
},
editLink: {
@@ -47,7 +47,7 @@ function sidebarGuide() {
{ text: 'What is KernelSU?', link: '/guide/what-is-kernelsu' },
{ text: 'Difference with Magisk', link: '/guide/difference-with-magisk' },
{ text: 'Installation', link: '/guide/installation' },
- { text: 'How to build?', link: '/guide/how-to-build' },
+ { 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' },
diff --git a/website/docs/.vitepress/locales/id_ID.ts b/website/docs/.vitepress/locales/id_ID.ts
index 85591ced..9a0b05ca 100644
--- a/website/docs/.vitepress/locales/id_ID.ts
+++ b/website/docs/.vitepress/locales/id_ID.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: 'Rilis Dibawah Lisensi GPL3.',
- copyright: 'Copyright © 2022-Sekarang pengembang KernelSU '
+ copyright: 'Copyright © 2022-Sekarang pengembang KernelSU.'
},
editLink: {
diff --git a/website/docs/.vitepress/locales/ja_JP.ts b/website/docs/.vitepress/locales/ja_JP.ts
index a0ad7578..35521ef9 100644
--- a/website/docs/.vitepress/locales/ja_JP.ts
+++ b/website/docs/.vitepress/locales/ja_JP.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: 'GPL3 ライセンスでリリースされています。',
- copyright: 'Copyright © 2022-現在 KernelSU 開発者'
+ copyright: 'Copyright © 2022-現在 KernelSU 開発者。'
},
editLink: {
diff --git a/website/docs/.vitepress/locales/pt_BR.ts b/website/docs/.vitepress/locales/pt_BR.ts
index 33dc5759..6e5b969b 100644
--- a/website/docs/.vitepress/locales/pt_BR.ts
+++ b/website/docs/.vitepress/locales/pt_BR.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: 'Lançado sob a Licença GPL3',
- copyright: 'Copyright © Desenvolvedores do KernelSU atuais de 2022'
+ copyright: 'Copyright © 2022-presente Desenvolvedores do KernelSU.'
},
editLink: {
@@ -47,8 +47,8 @@ function sidebarGuide() {
{ text: 'O que é KernelSU?', link: '/pt_BR/guide/what-is-kernelsu' },
{ text: 'Diferenças com Magisk', link: '/pt_BR/guide/difference-with-magisk' },
{ text: 'Instalação', link: '/pt_BR/guide/installation' },
- { text: 'Como compilar?', link: '/pt_BR/guide/how-to-build' },
- { text: 'Integração para dispositivos não GKI', link: '/pt_BR/guide/how-to-integrate-for-non-gki'},
+ { text: 'Como compilar', link: '/pt_BR/guide/how-to-build' },
+ { text: 'Integração para dispositivos não-GKI', link: '/pt_BR/guide/how-to-integrate-for-non-gki'},
{ text: 'Dispositivos com suporte não oficial', link: '/pt_BR/guide/unofficially-support-devices.md' },
{ text: 'Guias de módulo', link: '/pt_BR/guide/module.md' },
{ text: 'Módulo WebUI', link: '/pt_BR/guide/module-webui.md' },
diff --git a/website/docs/.vitepress/locales/ru_RU.ts b/website/docs/.vitepress/locales/ru_RU.ts
index 771c137b..3059ab96 100644
--- a/website/docs/.vitepress/locales/ru_RU.ts
+++ b/website/docs/.vitepress/locales/ru_RU.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: 'Выпускается под лицензией GPL3.',
- copyright: 'Авторские права © 2022-текущее Разработчики KernelSU'
+ copyright: 'Авторские права © 2022-текущее Разработчики KernelSU.'
},
editLink: {
diff --git a/website/docs/.vitepress/locales/vi_VN.ts b/website/docs/.vitepress/locales/vi_VN.ts
index b71d4da8..15808681 100644
--- a/website/docs/.vitepress/locales/vi_VN.ts
+++ b/website/docs/.vitepress/locales/vi_VN.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: 'Phát hành dưới giấy phép GPL3.',
- copyright: 'Bản Quyền © 2022-nay KernelSU Developers'
+ copyright: 'Bản Quyền © 2022-nay KernelSU developers.'
},
editLink: {
diff --git a/website/docs/.vitepress/locales/zh_CN.ts b/website/docs/.vitepress/locales/zh_CN.ts
index 8c5ace46..bd3c3559 100644
--- a/website/docs/.vitepress/locales/zh_CN.ts
+++ b/website/docs/.vitepress/locales/zh_CN.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: '在 GPL3 许可证下发布。',
- copyright: 'Copyright © 2022-现在 KernelSU 开发者'
+ copyright: 'Copyright © 2022-现在 KernelSU 开发者。'
},
editLink: {
diff --git a/website/docs/.vitepress/locales/zh_TW.ts b/website/docs/.vitepress/locales/zh_TW.ts
index 5d6fd9e8..b2c23b98 100644
--- a/website/docs/.vitepress/locales/zh_TW.ts
+++ b/website/docs/.vitepress/locales/zh_TW.ts
@@ -23,7 +23,7 @@ export default defineConfig({
footer: {
message: '係依據 GPL3 授權發行。',
- copyright: 'Copyright © 2022-目前 KernelSU 開發人員'
+ copyright: 'Copyright © 2022-目前 KernelSU 開發人員。'
},
editLink: {
diff --git a/website/docs/guide/app-profile.md b/website/docs/guide/app-profile.md
index 4cbad69c..4a8fd011 100644
--- a/website/docs/guide/app-profile.md
+++ b/website/docs/guide/app-profile.md
@@ -12,12 +12,12 @@ For ordinary apps without root permissions, the App Profile can control the beha
Linux systems have two concepts: users and groups. Each user has a user ID (UID), and a user can belong to multiple groups, each with its own group ID (GID). These IDs are used to identify users in the system and determine which system resources they can access.
-Users with a UID of 0 are known as root users, and groups with a GID of 0 are known as root groups. The root user group typically holds the highest system privileges.
+Users with a UID of 0 are known as root users, and groups with a GID of 0 are known as root groups. The root user group generally has the highest system privileges.
-In the case of the Android system, each app is a separate user (excluding shared UID scenarios) with a unique UID. For example, `0` represents the root user, `1000` represents `system`, `2000` represents the ADB shell, and UIDs ranging from `10000` to `19999` represent ordinary apps.
+In the case of the Android system, each app functions as a separate user (except in cases of shared UIDs) with a unique UID. For example, `0` represents the root user, `1000` represents `system`, `2000` represents the ADB shell, and UIDs ranging from `10000` to `19999` represent ordinary apps.
-:::info
-Here, the UID mentioned is not the same as the concept of multiple users or work profiles in the Android system. Work profiles are actually implemented by partitioning the UID range. For example, 10000-19999 represents the main user, while 110000-119999 represents a work profile. Each ordinary app among them has its own unique UID.
+::: info
+Here, the UID mentioned isn't the same as the concept of multiple users or work profiles in the Android system. Work profiles are actually implemented by partitioning the UID range. For example, 10000-19999 represents the main user, while 110000-119999 represents a work profile. Each ordinary app among them has its own unique UID.
:::
Each app can have several groups, with the GID representing the primary group, which usually matches the UID. Other groups are known as supplementary groups. Certain permissions are controlled through groups, such as network access permissions or Bluetooth access.
@@ -31,50 +31,50 @@ uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(ad
Here, the UID is `2000`, and the GID (primary group ID) is also `2000`. Additionally, it belongs to several supplementary groups, such as `inet` (indicating the ability to create `AF_INET` and `AF_INET6` sockets) and `sdcard_rw` (indicating read/write permissions for the SD card).
-KernelSU's Root Profile allows customization of the UID, GID, and groups for the root process after executing `su`. For example, the Root Profile of a root app can set its UID to `2000`, which means that when using `su`, the app's actual permissions are at the ADB shell level. The `inet` group can be removed, preventing the `su` command from accessing the network.
+KernelSU's Root Profile allows customization of the UID, GID, and groups for the root process after executing `su`. For example, the Root Profile of a root app can set its UID to `2000`, which means that when using `su`, the app's actual permissions are at the ADB shell level. Additionally, the `inet` group can be removed, preventing the `su` command from accessing the network.
-:::tip Note
-The App Profile only controls the permissions of the root process after using `su`; it does not control the permissions of the app itself. If an app has requested network access permission, it can still access the network even without using `su`. Removing the `inet` group from `su` only prevents `su` from accessing the network.
+::: tip NOTE
+The App Profile only controls the permissions of the root process after using `su` and doesn't control the app's own permissions. If an app has requested network access permission, it can still access the network even without using `su`. Removing the `inet` group from `su` only prevents `su` from accessing the network.
:::
-Root Profile is enforced in the kernel and does not rely on the voluntary behavior of root apps, unlike switching users or groups through `su`, the granting of `su` permission is entirely up to the user rather than the developer.
+Root Profile is enforced in the kernel and doesn't rely on the voluntary behavior of root apps, unlike switching users or groups through `su`. Granting `su` permissions is entirely controlled by the user, not the developer.
### Capabilities
Capabilities are a mechanism for privilege separation in Linux.
-For the purpose of performing permission checks, traditional `UNIX` implementations distinguish two categories of processes: privileged processes (whose effective user ID is `0`, referred to as superuser or root), and unprivileged processes (whose effective UID is nonzero). Privileged processes bypass all kernel permission checks, while unprivileged processes are subject to full permission checking based on the process's credentials (usually: effective UID, effective GID, and supplementary group list).
+For the purpose of performing permission checks, traditional `UNIX` implementations distinguish two categories of processes: privileged processes (whose effective user ID is `0`, referred to as superuser or root) and unprivileged processes (whose effective UID is nonzero). Privileged processes bypass all kernel permission checks, while unprivileged processes are subject to full permission checking based on the process's credentials (usually: effective UID, effective GID, and supplementary group list).
Starting with Linux 2.2, Linux divides the privileges traditionally associated with superuser into distinct units, known as capabilities, which can be independently enabled and disabled.
-Each Capability represents one or more privileges. For example, `CAP_DAC_READ_SEARCH` represents the ability to bypass permission checks for file reading, as well as directory reading and execution permissions. If a user with an effective UID of `0` (root user) lacks `CAP_DAC_READ_SEARCH` or higher capabilities, this means that even though they are root, they cannot read files at will.
+Each capability represents one or more privileges. For example, `CAP_DAC_READ_SEARCH` represents the ability to bypass permission checks for file reading, as well as directory read and execute permissions. If a user with an effective UID of `0` (root user) doesn't have the `CAP_DAC_READ_SEARCH` capability or higher, this means that even as root, they cannot freely read files.
-KernelSU's Root Profile allows customization of the Capabilities of the root process after executing `su`, thereby achieving partially granting "root permissions." Unlike the aforementioned UID and GID, certain root apps require a UID of `0` after using `su`. In such cases, limiting the Capabilities of this root user with UID `0` can restrict their allowed operations.
+KernelSU's Root Profile allows customization of the capabilities of the root process after executing `su`, thus granting partial "root privileges". Unlike the UID and GID mentioned above, certain root apps require a UID of `0` after using `su`. In such cases, limiting the capabilities of this root user with UID `0` can restrict the operations they're allowed to perform.
-:::tip Strong Recommendation
-Linux's Capability [official documentation](https://man7.org/linux/man-pages/man7/capabilities.7.html) provides detailed explanations of the abilities represented by each Capability. If you intend to customize Capabilities, it is strongly recommended that you read this document first.
+::: tip STRONG RECOMMENDATION
+Linux's capability [official documentation](https://man7.org/linux/man-pages/man7/capabilities.7.html) provides detailed explanations of the abilities represented by each capability. If you intend to customize capabilities, it's strongly recommended that you read this document first.
:::
### SELinux
-SELinux is a powerful Mandatory Access Control (MAC) mechanism. It operates on the principle of **default deny**: any action not explicitly allowed is denied.
+SELinux is a powerful Mandatory Access Control (MAC) mechanism. It operates on the principle of **default deny**. Any action not explicitly allowed is denied.
SELinux can run in two global modes:
-1. Permissive mode: Denial events are logged but not enforced.
+1. Permissive mode: Denial events are logged, but not enforced.
2. Enforcing mode: Denial events are logged and enforced.
-:::warning Warning
-Modern Android systems heavily rely on SELinux to ensure overall system security. It is highly recommended not to use any custom systems running in "permissive mode" since it provides no significant advantages over a completely open system.
+::: warning
+Modern Android systems heavily rely on SELinux to ensure overall system security. It's highly recommended not to use any custom systems running in "Permissive mode" since it provides no significant advantages over a completely open system.
:::
-Explaining the full concept of SELinux is complex and beyond the scope of this document. It is recommended to first understand its workings through the following resources:
+Explaining the full concept of SELinux is complex and beyond the scope of this document. It's recommended to first understand how it works through the following resources:
1. [Wikipedia](https://en.wikipedia.org/wiki/Security-Enhanced_Linux)
2. [Red Hat: What Is SELinux?](https://www.redhat.com/en/topics/linux/what-is-selinux)
3. [ArchLinux: SELinux](https://wiki.archlinux.org/title/SELinux)
-KernelSU's Root Profile allows customization of the SELinux context of the root process after executing `su`. Specific access control rules can be set for this context to enable fine-grained control over root permissions.
+KernelSU's Root Profile allows customization of the SELinux context of the root process after executing `su`. Specific access control rules can be set for this context, enabling fine-grained control over root permissions.
In typical scenarios, when an app executes `su`, it switches the process to a SELinux domain with **unrestricted access**, such as `u:r:su:s0`. Through the Root Profile, this domain can be switched to a custom domain, such as `u:r:app1:s0`, and a series of rules can be defined for this domain:
@@ -85,34 +85,34 @@ typeattribute app1 mlstrustedsubject
allow app1 * * *
```
-Note that the `allow app1 * * *` rule is used for demonstration purposes only. In practice, this rule should not be used extensively since it doesn't differ much from permissive mode.
+Note that the `allow app1 * * *` rule is used for demonstration purposes only. In practice, this rule shouldn't be used extensively, as it isn't much different from Permissive mode.
### Escalation
-If the configuration of the Root Profile is not set properly, an escalation scenario may occur: the restrictions imposed by the Root Profile can unintentionally fail.
+If the configuration of the Root Profile isn't set properly, an escalation scenario may occur. The restrictions imposed by the Root Profile can unintentionally fail.
-For example, if you grant root permission to an ADB shell user (which is a common case), and then you grant root permission to a regular app but configure its root profile with UID 2000 (which is the UID of the ADB shell user), the app can obtain full root access by executing the `su` command twice:
+For example, if you grant root permission to an ADB shell user (which is a common case) and then grant root permission to a regular app, but configure its Root Profile with UID 2000 (which is the UID of the ADB shell user), the app can obtain full root access by executing the `su` command twice:
-1. The first `su` execution is subject to the enforcement of the App Profile and will switch to UID `2000` (ADB shell) instead of `0` (root).
-2. The second `su` execution, since the UID is `2000`, and you have granted root access to the UID `2000` (ADB shell) in the configuration, the app will gain full root privileges.
+1. The first execution of `su` will be subject to the App Profile and will switch to UID `2000` (ADB shell) instead of `0` (root).
+2. The second execution of `su`, since the UID is `2000` and root access has been granted to UID `2000` (ADB shell) in the configuration, the app will gain full root privileges.
-:::warning Note
-This behavior is entirely expected and not a bug. Therefore, we recommend the following:
+::: warning NOTE
+This behavior is fully expected and isn't a bug. Therefore, we recommend the following:
-If you genuinely need to grant root permissions to ADB (e.g., as a developer), it is not advisable to change the UID to `2000` when configuring the Root Profile. Using `1000` (system) would be a better choice.
+If you genuinely need to grant root permissions to ADB (e.g., as a developer), it isn't advisable to change the UID to `2000` when configuring the Root Profile. Using `1000` (system) would be a better choice.
:::
-## Non-Root Profile
+## Non-root profile
### Umount modules
-KernelSU provides a systemless mechanism for modifying system partitions, achieved through OverlayFS mounting. However, some apps may be sensitive to such behavior. Thus, we can unload modules mounted on these apps by setting the "Umount modules" option.
+KernelSU provides a systemless mechanism to modify system partitions, achieved through the mounting of OverlayFS. However, some apps may be sensitive to this behavior. In this case, we can unload modules mounted in these apps by setting the "Umount modules" option.
-Additionally, the settings interface of the KernelSU manager provides a switch for "Umount modules by default". By default, this switch is **enabled**, which means that KernelSU or some modules will unload modules for this app unless additional settings are applied. If you do not prefer this setting or if it affects certain apps, you have the following options:
+Additionally, the KernelSU manager's settings interface provides the "Umount modules by default". By default, this option is **enabled**, which means that KernelSU or some modules will unload modules for this app unless additional settings are applied. If you don't prefer this setting or if it affects certain apps, you have the following options:
-1. Keep the switch for "Umount modules by default" and individually disable the "Umount modules" option in the App Profile for apps requiring module loading (acting as a "whitelist").
-2. Disable the switch for "Umount modules by default" and individually enable the "Umount modules" option in the App Profile for apps requiring module unloading (acting as a "blacklist").
+1. Keep the "Umount modules by default" option enabled and individually disable the "Umount modules" option in the App Profile for apps requiring module loading (acting as a "whitelist").
+2. Disable the "Umount modules by default" option and individually enable the "Umount modules" option in the App Profile for apps requiring module loading (acting as a "blacklist").
-:::info
-In devices using kernel version 5.10 and above, the kernel performs without any further action the unloading of modules. However, for devices running kernel versions below 5.10, this switch is merely a configuration option, and KernelSU itself does not take any action. If you want to be able to use the "Umount modules" option in kernel versions before 5.10 you need to backport the `path_umount` function in `fs/namespace.c`, you can get more information at the end of the [How to integrate KernelSU for non-GKI kernels](https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path_umount) page. Some modules, such as Zygisksu, may also use this switch to determine whether module unloading is necessary.
+::: info
+In devices running kernel version 5.10 and above, the kernel performs without any further action the unloading of modules. However, for devices running kernel versions below 5.10, this option is merely a configuration setting, and KernelSU itself doesn't take any action. If you want to use the "Umount modules" option in kernel versions before 5.10 you need to backport the `path_umount` function in `fs/namespace.c`. You can get more information at the end of the [Intergrate for non-GKI devices](https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path_umount) page. Some modules, such as Zygisksu, may also use this option to determine if module unloading is necessary.
:::
diff --git a/website/docs/guide/difference-with-magisk.md b/website/docs/guide/difference-with-magisk.md
index f4b68162..1e1cc08b 100644
--- a/website/docs/guide/difference-with-magisk.md
+++ b/website/docs/guide/difference-with-magisk.md
@@ -1,28 +1,28 @@
# 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.
+Although KernelSU and Magisk modules have many similarities, there are inevitably some differences due to their completely different implementation mechanisms. If you want your module to work on both Magisk and KernelSU, it's essential to 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.
+- Module file format: Both use the ZIP format to organize modules, and the module format is practically the same.
+- Module installation directory: Both are located at `/data/adb/modules`.
+- Systemless: Both support modifying `/system` in a systemless way through modules.
+- post-fs-data.sh: Execution time and semantics are exactly the same.
+- service.sh: 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`.
+Before understanding the differences, it's important to know how to identify 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 [ZygiskNext](https://github.com/Dr-TSNG/ZygiskNext)).
-- 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!**
-- KernelSU does not support `.replace` files; however, KernelSU supports the `REMOVE` and `REPLACE` variable to remove or replace files and folders.
-- KernelSU adds `boot-completed` stage to run some scripts on boot completed.
-- KernelSU adds `post-mount` stage to run some scripts after mounting OverlayFS.
+- KernelSU modules don't have built-in support for Zygisk, but you can use Zygisk modules through [ZygiskNext](https://github.com/Dr-TSNG/ZygiskNext)).
+- The method for replacing or deleting files in KernelSU modules is completely different from Magisk. KernelSU doesn't 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 at `/data/adb/ksu/bin/busybox`, while in Magisk it is at `/data/adb/magisk/busybox`. **Note that this is an internal behavior of KernelSU and may change in the future!**
+- KernelSU doesn't support `.replace` files, but it supports the `REMOVE` and `REPLACE` variables to remove or replace files and folders.
+- KernelSU adds the `boot-completed` stage to run scripts after the boot process is finished.
+- KernelSU adds the `post-mount` stage to run scripts after OverlayFS is mounted.
diff --git a/website/docs/guide/faq.md b/website/docs/guide/faq.md
index 04217a04..5f68397c 100644
--- a/website/docs/guide/faq.md
+++ b/website/docs/guide/faq.md
@@ -2,66 +2,66 @@
## Does KernelSU support my device?
-First, your devices should be able to unlock the bootloader. If it can't, then it is unsupported.
+First, your devices should be able to unlock the bootloader. If not, then there is unsupported.
-Then install KernelSU manager App to your device and open it, if it shows `Unsupported` then your device cannot be supported out of box, but you can build kernel source and integrate KernelSU to make it work or using [Unofficially supported devices](unofficially-support-devices).
+Next, install the KernelSU manager on your device and open it. If it shows `Unsupported`, then your device cannot be supported immediately. However, you can build kernel source and integrate KernelSU to make it work, or use [Unofficially supported devices](unofficially-support-devices).
-## Does KernelSU need to unlock Bootloader?
+## Does KernelSU need to unlock bootloader?
Certainly, yes.
## Does KernelSU support modules?
-Yes, check [Module guide](module.md) please.
+Yes, check [Module guide](module.md).
## Does KernelSU support Xposed?
-Yes, you can use LSPosed on [ZygiskNext](https://github.com/Dr-TSNG/ZygiskNext).
+Yes, you can use LSPosed with [ZygiskNext](https://github.com/Dr-TSNG/ZygiskNext).
## Does KernelSU support Zygisk?
-KernelSU has no builtin Zygisk support, but you can use [ZygiskNext](https://github.com/Dr-TSNG/ZygiskNext) instead.
+KernelSU has no built-in Zygisk support, but you can use [ZygiskNext](https://github.com/Dr-TSNG/ZygiskNext).
## Is KernelSU compatible with Magisk?
-KernelSU's module system is conflict with Magisk's magic mount, if there is any module enabled in KernelSU, then the whole Magisk would not work.
+KernelSU's module system conflicts with Magisk's magic mount. If any module is enabled in KernelSU, Magisk will stop working entirely.
-But if you only use the `su` of KernelSU, then it will work well with Magisk: with KernelSU modifying the `kernel` and Magisk modifying the `ramdisk`, both of them can work together simultaneously.
+However, if you only use the `su` of KernelSU, it will work well with Magisk. KernelSU modifies the `kernel`, while Magisk modifies the `ramdisk`, allowing both to work together.
## Will KernelSU substitute Magisk?
-We don't think so and it's not our goal. Magisk is good enough for userspace root solution and it will live long. KernelSU's goal is to provide a kernel interface to users, not substituting Magisk.
+We believe that it isn't, and that isn't our goal. Magisk is good enough for userspace root solution and will have a long life. KernelSU's goal is to provide a kernel interface to users, not substituting Magisk.
-## Can KernelSU support non GKI devices?
+## Can KernelSU support non-GKI devices?
-It is possible. But you should download the kernel source and intergrate KernelSU to the source tree and compile the kernel yourself.
+It's possible. But you should download the kernel source and intergrate KernelSU into the source tree, and compile the kernel yourself.
## Can KernelSU support devices below Android 12?
-It is device's kernel that affect KernelSU's compatability and it has nothing to do with Android version. The only restriction is that devices launched with Android 12 must be kernel of a 5.10+ version (GKI devices). So:
+It's the device's kernel that affects KernelSU's compatibility, and it has nothing to do with the Android version. The only restriction is that devices launched with Android 12 must have a kernel version of 5.10+ (GKI devices). So:
1. Devices launched with Android 12 must be supported.
-2. Devices which have an old kernel (Some Android 12 devices is also old kernel) are compatible (You should build kernel yourself).
+2. Devices with an older kernel (some devices with Android 12 also have the older kernel) are compatible (you should build kernel yourself).
## Can KernelSU support old kernel?
-It is possible, KernelSU is backported to kernel 4.14 now; for older kernel, you need to backport it manually and PRs welcome!
+It's possible. KernelSU is backported to kernel 4.14 now. For older kernels, you need to backport it manually, and PRs are always welcome!
## How to integrate KernelSU for an older kernel?
-Please refer to the following [How to integrate KernelSU for non-GKI kernels](how-to-integrate-for-non-gki) guide.
+Please check the [Intergrate for non-GKI devices](how-to-integrate-for-non-gki) guide.
## Why my Android version is 13, and the kernel shows "android12-5.10"?
-The Kernel version has nothing to do with Android version, if you need to flash kernel, always use the kernel version, Android version is not so important.
+The kernel version has nothing to do with the Android version. If you need to flash kernel, always use the kernel version; the Android version isn't as important.
-## I am GKI1.0, can i use this?
+## I'm GKI 1.0, can I use this?
-GKI1 is completely different from GKI2, you must compile kernel by yourself.
+GKI 1.0 is completely different from GKI 2.0, you must compile kernel by yourself.
## How can I make `/system` RW?
-We do not recommend you to modify the system partition directly. You should use the [module](module.md) to modify it systemlessly. If you insist on doing this, check [magisk_overlayfs](https://github.com/HuskyDG/magic_overlayfs).
+We don't recommend that you modify the system partition directly. Please check [Module guide](module.md) to modify it systemlessly. If you insist on doing this, check [magisk_overlayfs](https://github.com/HuskyDG/magic_overlayfs).
## Can KernelSU modify hosts? How can I use AdAway?
@@ -69,10 +69,10 @@ Of course. But KernelSU doesn't have built-in hosts support, you can install [sy
## Why is there a huge 1 TB file?
-The 1 TB size `modules.img` is a disk image file, **don't worry about its size**, it's a special type of file known as a [sparse file](https://en.wikipedia.org/wiki/Sparse_file), it's actual size is only the size of the module you use, and it will dynamically shrink after you delete the module; it does not actually occupy 1 TB of disk space (your mobile phone may not actually have that much space).
+The 1 TB `modules.img` file is a disk image file. **Don't worry about its size**; it's a special type of file known as a [sparse file](https://en.wikipedia.org/wiki/Sparse_file). Its actual size is only the size of the module you use, and it will decrease dynamically after you delete the module. In fact, it doesn't occupy 1 TB of disk space (your device might not even have that much space).
-If you're really unhappy with the size of this file, you can use the `resize2fs -M` command to make it the actual size; but the module may not work properly at this time, and we won't provide any support for this.
+If you really care about the size of this file, you can use the `resize2fs -M` command to make it the actual size. However, the module may not work correctly in this case, and we won't provide any support for this.
## Why does my device show wrong storage size?
-Certain devices use non-standard methods for calculating device's storage size, potentially leading to inaccurate storage calculations in system apps and menus, especially when dealing with 1 TB sparse files. While this problem seems to be specific to Samsung devices, affecting only Samsung apps and services, it's essential to note that the discrepancy is primarily in the total storage size, and the free space calculation remains accurate.
+Certain devices use non-standard methods to calculate the device's storage size, which may lead to inaccurate storage calculations in system apps and menus, especially when dealing with 1 TB sparse files. Although this problem seems to be specific to Samsung devices, affecting only Samsung apps and services, it's important to note that the discrepancy mainly concerns the total storage size, and the free space calculation remains accurate.
diff --git a/website/docs/guide/how-to-build.md b/website/docs/guide/how-to-build.md
index ca7582e6..0260ce2e 100644
--- a/website/docs/guide/how-to-build.md
+++ b/website/docs/guide/how-to-build.md
@@ -1,12 +1,12 @@
-# How to build KernelSU?
+# How to build
-First, you should read the Android Official docs for kernel build:
+First, you should read the official Android documentation for kernel build:
1. [Build kernels](https://source.android.com/docs/setup/build/building-kernels)
2. [GKI release builds](https://source.android.com/docs/core/architecture/kernel/gki-release-builds)
::: warning
-This page is for GKI devices, if you use an old kernel, please refer [How to integrate KernelSU for non-GKI kernels](how-to-integrate-for-non-gki).
+This page is for GKI devices, if you use an old kernel, please refer [Intergrate for non-GKI devices](how-to-integrate-for-non-gki).
:::
## Build kernel
@@ -20,11 +20,11 @@ repo init -m manifest.xml
repo sync
```
-The `` is a manifest file which can determine a build uniquely, you can use the manifest to do a re-preducable build. You should download the manifest file from [GKI release builds](https://source.android.com/docs/core/architecture/kernel/gki-release-builds).
+The `` file is a manifest that uniquely identifies a build, allowing you to make it reproducible. To do this, you should download the manifest file from [GKI release builds](https://source.android.com/docs/core/architecture/kernel/gki-release-builds).
### Build
-Please check the [official docs](https://source.android.com/docs/setup/build/building-kernels) first.
+Please check the [Building kernels](https://source.android.com/docs/setup/build/building-kernels) first.
For example, to build an `aarch64` kernel image:
@@ -32,7 +32,7 @@ For example, to build an `aarch64` kernel image:
LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
```
-Don't forget to add the `LTO=thin` flag, otherwise the build may fail if your computer's memory is less then 24 GB.
+Don't forget to add the `LTO=thin` flag; otherwise, the build may fail if your computer has less than 24 GB of memory.
Starting from Android 13, the kernel is built by `bazel`:
@@ -40,32 +40,32 @@ Starting from Android 13, the kernel is built by `bazel`:
tools/bazel build --config=fast //common:kernel_aarch64_dist
```
-:::info
-For some of the Android 14 kernels, to make Wi-Fi/Bluetooth work, it might be necessary to remove all the GKI protected exports:
+::: info
+For some Android 14 kernels, to make Wi-Fi/Bluetooth work, it might be necessary to remove all GKI protected exports:
```sh
rm common/android/abi_gki_protected_exports_*
```
:::
-## Build Kernel with KernelSU
+## Build kernel with KernelSU
-If you are able to build the kernel successfully, then adding KernelSU support to it is relatively easy. In the root of kernel source directory, run any of the command options listed below:
+If you can successfully build the kernel, adding support for KernelSU will be relatively easy. In the root of kernel source directory, run any of the options listed below:
::: code-group
-```sh[Latest tag(stable)]
+```sh[Latest tag (stable)]
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
```
-```sh[ main branch(dev)]
+```sh[ main branch (dev)]
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s main
```
-```sh[Select tag(Such as v0.5.2)]
+```sh[Select tag (such as v0.5.2)]
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.5.2
```
:::
-And then rebuild the kernel and you will get a kernel image with KernelSU!
+Then, rebuild the kernel and you will get a kernel image with KernelSU!
diff --git a/website/docs/guide/how-to-integrate-for-non-gki.md b/website/docs/guide/how-to-integrate-for-non-gki.md
index 6ed92765..6d119160 100644
--- a/website/docs/guide/how-to-integrate-for-non-gki.md
+++ b/website/docs/guide/how-to-integrate-for-non-gki.md
@@ -1,19 +1,19 @@
-# How to integrate KernelSU for non-GKI kernels?
+# Intergrate for non-GKI devices
-KernelSU can be integrated into non-GKI kernels, and was backported to 4.14 and below.
+KernelSU can be integrated into non-GKI kernels and was backported to 4.14 and earlier versions.
-Due to the fragmentization of non-GKI kernels, we do not have a universal way to build it, so we cannot provide non-GKI boot images. But you can build the kernel yourself with KernelSU integrated.
+Due to the fragmentation of non-GKI kernels, we don't have a universal method to build it, so we cannot provide the non-GKI boot.img. However, you can build the kernel with KernelSU integrated on your own.
-First, you should be able to build a bootable kernel from kernel source code. If the kernel is not open source, then it is difficult to run KernelSU for your device.
+First, you should be able to build a bootable kernel from kernel source code. If the kernel isn't open source, then it is difficult to run KernelSU for your device.
-If you can build a bootable kernel, there are two ways to integrate KernelSU to the kernel source code:
+If you're able to build a bootable kernel, there are two ways to integrate KernelSU into the kernel source code:
1. Automatically with `kprobe`
2. Manually
## Integrate with kprobe
-KernelSU uses kprobe to do kernel hooks, if the *kprobe* runs well in your kernel, it is recommended to use this way.
+KernelSU uses kprobe to do kernel hooks, if kprobe runs well in your kernel, it's recommended to use it this way.
First, add KernelSU to your kernel source tree:
@@ -21,11 +21,11 @@ First, add KernelSU to your kernel source tree:
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.9.5
```
-:::info
-[KernelSU 1.0 and later versions no longer support non-GKI kernels](https://github.com/tiann/KernelSU/issues/1705). The last supported version is `v0.9.5`, please make sure to use the correct version.
+::: info
+[KernelSU 1.0 and later versions no longer support non-GKI kernels](https://github.com/tiann/KernelSU/issues/1705). The last supported version is `v0.9.5`, so make sure to use the correct version.
:::
-Then, you should check if *kprobe* is enabled in your kernel config, if it is not, please add these configs to it:
+Then, you should check if kprobe is enabled in your kernel config. If it isn't, add these configs to it:
```txt
CONFIG_KPROBES=y
@@ -33,25 +33,23 @@ CONFIG_HAVE_KPROBES=y
CONFIG_KPROBE_EVENTS=y
```
-And now when you re-build your kernel, KernelSU should work well.
+Now, when you re-build your kernel, KernelSU should work correctly.
-If you find that KPROBES is still not activated, you can try enabling `CONFIG_MODULES`. If it still doesn't take effect, use `make menuconfig` to search for other dependencies of KPROBES.
+If you find that KPROBES is still not enabled, you can try enabling `CONFIG_MODULES`. If that doesn't solve the issue, use `make menuconfig` to search for other KPROBES dependencies.
-But if you encounter a boot loop when integrated KernelSU, it might be because *kprobe is broken in your kernel*, which means that you should fix the kprobe bug or use another way.
+However, if you encounter a bootloop after integrating KernelSU, this may indicate that the **kprobe is broken in your kernel**, which means that you should fix the kprobe bug or use another way.
-:::tip How to check if kprobe is broken?
-
-comment out `ksu_enable_sucompat()` and `ksu_enable_ksud()` in `KernelSU/kernel/ksu.c`, if the device boots normally, then kprobe may be broken.
+::: tip HOW TO CHECK IF KPROBE IS BROKEN?
+Comment out `ksu_enable_sucompat()` and `ksu_enable_ksud()` in `KernelSU/kernel/ksu.c`, if the device boots normally, then kprobe may be broken.
:::
-:::info How to get module umount feature working on pre-GKI?
-
-If your kernel is older than 5.9, you should backport `path_umount` to `fs/namespace.c`. This is required to get module umount feature working. If you don't backport `path_umount`, module umount feature won't work. You can get more info on how to achieve this at the end of this page.
+::: info HOW TO GET MODULE UMOUNT FEATURE WORKING ON PRE-GKI?
+If your kernel is older than 5.9, you should backport `path_umount` to `fs/namespace.c`. This is required to get "Umount module" feature work correctly. If you don't backport `path_umount`, "Umount module" feature won't work. You can get more info on how to achieve this at the end of this page.
:::
## Manually modify the kernel source
-If kprobe does not work in your kernel (may be an upstream or kernel bug below 4.8), then you can try the following:
+If kprobe doesn't work on your kernel this may be caused by an upstream bug or if the kernel is below 4.8), then you can try the following:
First, add KernelSU to your kernel source tree:
@@ -59,14 +57,14 @@ First, add KernelSU to your kernel source tree:
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.9.5
```
-Keep in mind that on some devices, your defconfig may be in `arch/arm64/configs` or in other cases `arch/arm64/configs/vendor/your_defconfig`. For whichever defconfig you are using, make sure to enable `CONFIG_KSU` with `y` to enable or `n` to disable it. For example, in case you chose to enable it, you defconfig should contain the following string:
+Keep in mind that, on some devices, your defconfig may be located at `arch/arm64/configs` or in other cases, it may be at `arch/arm64/configs/vendor/your_defconfig`. Regardless of the defconfig you're using, make sure to enable `CONFIG_KSU` with `y` to enable or `n` to disable it. For example, if you choose to enable it, your defconfig should contain the following string:
```txt
# KernelSU
CONFIG_KSU=y
```
-Then, add KernelSU calls to the kernel source, here are some patches for reference:
+Next, add KernelSU calls to the kernel source. Below are some patches for reference:
::: code-group
@@ -197,7 +195,7 @@ You should find the four functions in kernel source:
3. `vfs_read`, usually in `fs/read_write.c`
4. `vfs_statx`, usually in `fs/stat.c`
-If your kernel does not have the `vfs_statx` function, use `vfs_fstatat` instead:
+If your kernel doesn't have the `vfs_statx` function, use `vfs_fstatat` instead:
```diff
diff --git a/fs/stat.c b/fs/stat.c
@@ -258,10 +256,10 @@ index 2ff887661237..e758d7db7663 100644
### Safe Mode
-To enable KernelSU's built-in Safe Mode, you should additionally modify `input_handle_event` function in `drivers/input/input.c`:
+To enable KernelSU's built-in Safe Mode, you should modify the `input_handle_event` function in `drivers/input/input.c`:
-:::tip
-It is strongly recommended to enable this feature, it is very helpful in preventing bootloops!
+::: tip
+It's strongly recommended to enable this feature, it's very useful for preventing bootloops!
:::
```diff
@@ -291,8 +289,8 @@ index 45306f9ef247..815091ebfca4 100755
add_input_randomness(type, code, value);
```
-:::info Entering safe mode accidentally?
-If you use manual integration and do not disable `CONFIG_KPROBES`, then the user may trigger safe mode by pressing the volume down button after booting! Therefore if using manual integration you need to disable `CONFIG_KPROBES`!
+::: info ENTERING SAFE MODE ACCIDENTALLY?
+If you're using manual integration and don't disable `CONFIG_KPROBES`, the user will be able to trigger Safe Mode by pressing the volume down button after booting! Therefore, if you're using manual integration, it's necessary to disable `CONFIG_KPROBES`!
:::
### Failed to execute `pm` in terminal?
@@ -329,7 +327,7 @@ index 32f6f1c68..d69d8eca2 100644
### How to backport path_umount
-You can get "Umount modules" feature working on pre-GKI kernels by manually backporting `path_umount` from 5.9. You can use this patch as reference:
+You can make the "Umount modules" feature work on pre-GKI kernels by manually backporting `path_umount` from 5.9. You can use this patch as reference:
```diff
--- a/fs/namespace.c
@@ -376,4 +374,4 @@ You can get "Umount modules" feature working on pre-GKI kernels by manually back
* This is important for filesystems which use unnamed block devices.
```
-Finally, build your kernel again, KernelSU should work well.
+Finally, build your kernel again, and KernelSU should work correctly.
diff --git a/website/docs/guide/installation.md b/website/docs/guide/installation.md
index 22481abc..47d2cb07 100644
--- a/website/docs/guide/installation.md
+++ b/website/docs/guide/installation.md
@@ -2,21 +2,21 @@
## Check if your device is supported
-Download KernelSU manager APP from [GitHub Releases](https://github.com/tiann/KernelSU/releases) and install it to your device:
+Download KernelSU manager from [GitHub Releases](https://github.com/tiann/KernelSU/releases) and install it on your device:
-- If the app shows `Unsupported`, it means **you should compile the kernel yourself**, KernelSU will not and never provide a boot image for you to flash.
-- If the app shows `Not installed`, then your devices is officially supported by KernelSU.
+- If the app shows `Unsupported`, it means that **you should compile the kernel yourself**, KernelSU won't and never provide a boot.img file for you to flash.
+- If the app shows `Not installed`, then your device is officially supported by KernelSU.
-:::info
-For devices showing `Unsupported`, here is an [Unofficially supported devices](unofficially-support-devices.md). You can compile the kernel yourself.
+::: info
+For devices showing `Unsupported`, you can check the list of [Unofficially supported devices](unofficially-support-devices.md). You can compile the kernel yourself.
:::
## Backup stock boot.img
-Before flashing, you must first backup your stock boot.img. If you encounter any bootloop, you can always restore the system by flashing back to the stock factory boot using fastboot.
+Before flashing, it's essential that you back up your stock boot.img. If you encounter any bootloop, you can always restore the system by flashing back to the stock factory boot using fastboot.
::: warning
-Flashing may cause data loss, be sure to do this step well before proceeding to the next step! You can also back up all the data on your device if necessary.
+Flashing may cause data loss. Make sure to do this step well before proceeding to the next step! You can also back up all the data on your device if necessary.
:::
## Necessary knowledge
@@ -27,7 +27,7 @@ By default, you will use ADB and fastboot tools in this tutorial, so if you don'
### KMI
-Kernel Module Interface (KMI), kernel versions with the same KMI are **compatible**, this is what "general" means in GKI; conversely, if the KMI is different, then these kernels are not compatible with each other, and flashing a kernel image with a different KMI than your device may cause a bootloop.
+Kernel Module Interface (KMI), kernel versions with the same KMI are **compatible**, this is what "general" means in GKI; conversely, if the KMI is different, then these kernels aren't compatible with each other, and flashing a kernel image with a different KMI than your device may cause a bootloop.
Specifically, for GKI devices, the kernel version format should be as follows:
@@ -37,23 +37,23 @@ Version.PatchLevel.SubLevel-AndroidRelease-KmiGeneration-suffix
w .x .y -zzz -k -something
```
-`w.x-zzz-k` is the KMI version. For example, if a device kernel version is `5.10.101-android12-9-g30979850fc20`, then its KMI is `5.10-android12-9`; theoretically, it can boot up normally with other KMI kernels.
+`w.x-zzz-k` is the KMI version. For example, if a device kernel version is `5.10.101-android12-9-g30979850fc20`, then its KMI is `5.10-android12-9`. Theoretically, it can boot up normally with other KMI kernels.
::: tip
-Note that the SubLevel in the kernel version is not part of the KMI! That means that `5.10.101-android12-9-g30979850fc20` has the same KMI as `5.10.137-android12-9-g30979850fc20`!
+Note that the SubLevel in the kernel version isn't part of the KMI! This means that `5.10.101-android12-9-g30979850fc20` has the same KMI as `5.10.137-android12-9-g30979850fc20`!
:::
### Security patch level {#security-patch-level}
-Newer Android devices may have anti-rollback mechanisms in place that do not allow flashing a boot image with an old security patch level. For example, if your device kernel is `5.10.101-android12-9-g30979850fc20`, it's security patch level is `2023-11`; even if you flash the kernel corresponding to the KMI, if the security patch level is older than `2023- 11` (such as `2023-06`), then it may cause bootloop.
+Newer Android devices may have anti-rollback mechanisms that prevent flashing a boot image with an old security patch level. For example, if your device kernel is `5.10.101-android12-9-g30979850fc20`, the security patch level is `2023-11`; even if you flash the kernel corresponding to the KMI, if the security patch level is older than `2023-11` (such as `2023-06`), it may cause a bootloop.
-Therefore, kernels with latest security patch levels are preferred for maintaining the correspondence with KMI.
+Therefore, kernels with latest security patch levels are preferred to maintain compatibility with the KMI.
### Kernel version vs Android version
-Please note: **Kernel version and Android version are not necessarily the same!**
+Please note: **Kernel version and Android version aren't necessarily the same!**
-If you find that your kernel version is `android12-5.10.101`, but your Android system version is Android 13 or other, please don't be surprised, because the version number of the Android system is not necessarily the same as the version number of the Linux kernel. The version number of the Linux kernel is generally correspondent to the version of the Android system that comes with the **device when it is shipped**. If the Android system is upgraded later, the kernel version will generally not change. So, before flashing anything, **always refer to the kernel version!**
+If you find that your kernel version is `android12-5.10.101`, but your Android system version is Android 13 or other, don't be surprised, because the version number of the Android system isn't necessarily the same as the version number of the Linux kernel. The version number of the Linux kernel is generally correspondent to the version of the Android system that comes with the **device when it is shipped**. If the Android system is upgraded later, the kernel version will generally not change. So, before flashing anything, **always refer to the kernel version!**
## Introduction
@@ -68,49 +68,49 @@ These two modes are suitable for different scenarios, and you can choose the one
In GKI mode, the original kernel of the device will be replaced with the generic kernel image provided by KernelSU. The advantages of GKI mode are:
-1. Strong universality, suitable for most devices; for example, Samsung has enabled KNOX devices, and LKM mode cannot operate. There are also some niche modified devices that can only use GKI mode.
-2. Can be used without relying on official firmware; no need to wait for official firmware updates, as long as the KMI is consistent, it can be used.
+1. Strong universality, suitable for most devices. For example, Samsung has enabled KNOX devices, and LKM mode cannot work. There are also some niche modified devices that can only use GKI mode.
+2. Can be used without relying on official firmware, and there is no need to wait for official firmware updates, as long as the KMI is consistent, it can be used.
### LKM mode {#lkm-mode}
-In LKM mode, the original kernel of the device will not be replaced, but the loadable kernel module will be loaded into the device kernel. The advantages of LKM mode are:
+In LKM mode, the original kernel of the device won't be replaced, but the loadable kernel module will be loaded into the device kernel. The advantages of LKM mode are:
-1. Will not replace the original kernel of the device; if you have special requirements for the original kernel of the device, or you want to use KernelSU while using a third-party kernel, you can use LKM mode.
-2. It is more convenient to upgrade and OTA; when upgrading KernelSU, you can directly install it in the manager without flashing manually; after the system OTA, you can directly install it to the second slot without manual flashing.
-3. Suitable for some special scenarios; for example, LKM can also be loaded with temporary ROOT permissions. Since it does not need to replace the boot partition, it will not trigger AVB and will not cause the device to be bricked.
-4. LKM can be temporarily uninstalled; if you want to temporarily disable root access, you can uninstall LKM, this process does not require flashing partitions, or even rebooting the device; if you want to enable root again, just reboot the device.
+1. Won't replace the original kernel of the device. If you have special requirements for the original kernel of the device, or you want to use KernelSU while using a third-party kernel, you can use LKM mode.
+2. It's more convenient to upgrade and OTA. When upgrading KernelSU, you can directly install it in the manager without flashing manually. After the system OTA, you can directly install it to the second slot without manual flashing.
+3. Suitable for some special scenarios. For example, LKM can also be loaded with temporary root permissions. Since it doesn't need to replace the boot partition, it won't trigger AVB and won't cause the device to be bricked.
+4. LKM can be temporarily uninstalled. If you want to temporarily disable root access, you can uninstall LKM. This process doesn't require flashing partitions, or even rebooting the device. If you want to enable root again, just reboot the device.
-:::tip Coexistence of two modes
-After opening the manager, you can see the current mode of the device on the homepage; note that the priority of GKI mode is higher than that of LKM. For example, if you use GKI kernel to replace the original kernel, and use LKM to patch the GKI kernel, then LKM will be ignored, and the device will always run in GKI mode.
+::: tip COEXISTENCE OF TWO MODES
+After opening the manager, you can see the current mode of the device on the homepage. Note that the priority of GKI mode is higher than that of LKM. For example, if you use GKI kernel to replace the original kernel, and use LKM to patch the GKI kernel, the LKM will be ignored, and the device will always run in GKI mode.
:::
### Which one to choose? {#which-one}
-If your device is a mobile phone, we recommend that you prioritize LKM mode; if your device is an emulator, WSA, or Waydroid, we recommend that you prioritize GKI mode.
+If your device is a mobile phone, we recommend that you prioritize LKM mode. If your device is an emulator, WSA, or Waydroid, we recommend that you prioritize GKI mode.
## LKM installation
### Get the official firmware
-To use LKM mode, you need to get the official firmware and then patch it on the basis of the official firmware. If you use a third-party kernel, you can use the `boot.img` of the third-party kernel as the official firmware.
+To use LKM mode, you need to get the official firmware and patch it based on the official firmware. If you use a third-party kernel, you can use the `boot.img` of the third-party kernel as the official firmware.
-There are many ways to get the official firmware. If your device supports `fastboot boot`, then we recommend **the most recommended and simplest** method is to use `fastboot boot` to temporarily boot the GKI kernel provided by KernelSU, then install the manager, and finally install it directly in the manager. This method does not require you to manually download the official firmware, nor do you need to manually extract the boot.
+There are many ways to get the official firmware. If your device supports `fastboot boot`, we recommend **the most recommended and simplest** method is to use `fastboot boot` to temporarily boot the GKI kernel provided by KernelSU, then install the manager, and finally install it directly in the manager. This method doesn't require manually downloading the official firmware or manually extracting the boot.
-If your device does not support `fastboot boot`, then you may need to manually download the official firmware package and then extract the boot from it.
+If your device doesn't support `fastboot boot`, you may need to manually download the official firmware package and extract the boot from it.
-Unlike GKI mode, LKM mode will modify the `ramdisk`, so on devices with Android 13, it needs to patch the `init_boot` partition instead of the `boot` partition; meanwhile, GKI mode always operates the `boot` partition.
+Unlike GKI mode, LKM mode modifies the `ramdisk`. Therefore, on devices with Android 13, it needs to patch the `init_boot` partition instead of the `boot` partition, while GKI mode always operates on the `boot` partition.
### Use the manager
Open the manager, click the installation icon in the upper right corner, and several options will appear:
-1. Select and patch a file. If your device does not have root permissions, you can choose this option, and then select your official firmware, the manager will automatically patch it; you only need to flash this patched file to permanently obtain root permissions.
-2. Install directly. If your device is already rooted, you can choose this option, the manager will automatically get your device information, and then automatically patch the official firmware, and then flash it; you can consider using `fastboot boot` KernelSU's GKI kernel to get temporary root and install the manager, and then use this option; this is also the main way to upgrade KernelSU.
-3. Install to another partition. If your device supports A/B partition, you can choose this option, the manager will automatically patch the official firmware, and then install it to another partition; this method is suitable for devices after OTA, you can directly install it to another partition after OTA, and then restart the device.
+1. Select a file. If your device doesn't have root privileges, you can choose this option and then select your official firmware. The manager will automatically patch it. After that, just flash this patched file to obtain root privileges permanently.
+2. Direct install. If your device is already rooted, you can choose this option. The manager will automatically get your device information, and then automatically patch the official firmware, and flash it automatically. You can consider using `fastboot boot` KernelSU's GKI kernel to get temporary root and install the manager, and then use this option. This is also the main way to upgrade KernelSU.
+3. Install to inactive slot. If your device supports A/B partition, you can choose this option. The manager will automatically patch the official firmware and install it to another partition. This method is suitable for devices after OTA, you can directly install it to another partition after OTA, and then restart the device.
### Use the command line
-If you do not want to use the manager, you can also use the command line to install LKM. The `ksud` tool provided by KernelSU can help you quickly patch the official firmware and then flash it.
+If you don't want to use the manager, you can also use the command line to install LKM. The `ksud` tool provided by KernelSU can help you quickly patch the official firmware and then flash it.
This tool supports macOS, Linux, and Windows. You can download the corresponding version from [GitHub Release](https://github.com/tiann/KernelSU/releases).
@@ -123,22 +123,22 @@ Patch boot or init_boot images to apply KernelSU
Usage: ksud boot-patch [OPTIONS]
Options:
- -b, --boot boot image path, if not specified, will try to find the boot image automatically
- -k, --kernel kernel image path to replace
- -m, --module LKM module path to replace, if not specified, will use the builtin one
+ -b, --boot Boot image path. If not specified, it will try to find the boot image automatically
+ -k, --kernel Kernel image path to be replaced
+ -m, --module LKM module path to be replaced. If not specified, the built-in module will be used
-i, --init init to be replaced
- -u, --ota will use another slot when boot image is not specified
+ -u, --ota Will use another slot if the boot image is not specified
-f, --flash Flash it to boot partition after patch
- -o, --out output path, if not specified, will use current directory
- --magiskboot magiskboot path, if not specified, will use builtin one
- --kmi KMI version, if specified, will use the specified KMI
+ -o, --out Output path. If not specified, the current directory will be used
+ --magiskboot magiskboot path. If not specified, the built-in version will be used
+ --kmi KMI version. If specified, the indicated KMI will be used
-h, --help Print help
```
A few options that need to be explained:
-1. The `--magiskboot` option can specify the path of magiskboot. If it is not specified, ksud will look for it in the environment variables. If you do not know how to get magiskboot, you can refer to [this](#patch-boot-image).
-2. The `--kmi` option can specify the `KMI` version. If the kernel name of your device does not follow the KMI specification, you can specify it through this option.
+1. The `--magiskboot` option can specify the path of magiskboot. If not specified, ksud will look for it in the environment variables. If you don’t know how to get magiskboot, you can check [here](#patch-boot-image).
+2. The `--kmi` option can specify the `KMI` version. If the kernel name of your device doesn't follow the KMI specification, you can specify it using this option.
The most common usage is:
@@ -151,31 +151,31 @@ ksud boot-patch -b --kmi android13-5.10
There are several installation methods for GKI mode, each suitable for a different scenario, so please choose accordingly:
1. Install with fastboot using the boot.img provided by KernelSU.
-2. Install with a kernel flash app, such as KernelFlasher.
+2. Install with a kernel flash app, such as [Kernel Flasher](https://github.com/capntrips/KernelFlasher/releases).
3. Repair the boot.img manually and install it.
4. Install with custom Recovery (e.g., TWRP).
## Install with boot.img provided by KernelSU
-If your device's `boot.img` uses a commonly used compression format, you can use the GKI images provided by KernelSU to flash it directly. It does not require TWRP or self-patching the image.
+If your device's `boot.img` uses a commonly used compression format, you can use the GKI images provided by KernelSU to flash it directly. This doesn't require TWRP or self-patching the image.
### Find proper boot.img
-KernelSU provides a generic boot.img for GKI devices, and you should flash the boot.img to the boot partition of the device.
+KernelSU provides a generic boot.img for GKI devices, and you should flash the boot.img to the device's boot partition.
-You can download boot.img from [GitHub Release](https://github.com/tiann/KernelSU/releases), please note that you should use the correct version of boot.img. If you do not know which file to download, please carefully read the description of [KMI](#kmi) and [Security patch level](#security-patch-level) in this document.
+You can download boot.img from [GitHub Release](https://github.com/tiann/KernelSU/releases). Please note that you should use the correct version of boot.img. If you don't know which file to download, carefully read the description of [KMI](#kmi) and [Security patch level](#security-patch-level) in this document.
-Normally, there are three boot files in different formats under the same KMI and security patch level. They are all the same except for the kernel compression format. Please check the kernel compression format of your original boot.img. You should use the correct format, such as `lz4`, `gz`. If you use an incorrect compression format, you may encounter bootloop after flashing boot.
+Normally, there are three boot files in different formats for the same KMI and security patch level. They're identical except for the kernel compression format. Please check the kernel compression format of your original boot.img. You should use the correct format, such as `lz4`, `gz`. If you use an incorrect compression format, you may encounter bootloop after flashing boot.img.
-:::info Compression format of boot.img
-1. You can use magiskboot to get the compression format of your original boot; alternatively, you can also ask for it from community members/developers with the same model as your device. Also, the compression format of the kernel usually does not change, so if you boot successfully with a certain compression format, you can try that format later as well.
+::: info COMPRESSION FORMAT OF BOOT.IMG
+1. You can use magiskboot to get the compression format of your original boot.img. Alternatively, you can also ask members or developers in the community who have the same device model. Also, the compression format of the kernel usually doesn't change, so if you boot successfully with a certain compression format, you can try that format later as well.
2. Xiaomi devices usually use `gz` or `uncompressed`.
3. For Pixel devices, follow the instructions below:
:::
### Flash boot.img to device
-Use `adb` to connect your device, then execute `adb reboot bootloader` to enter fastboot mode, then use this command to flash KernelSU:
+Use `adb` to connect your device, then execute `adb reboot bootloader` to enter fastboot mode, and use this command to flash KernelSU:
```sh
fastboot flash boot boot.img
@@ -187,7 +187,7 @@ If your device supports `fastboot boot`, you can first use `fastboot boot boot.i
### Reboot
-After the flashing process is complete, you should reboot your device:
+After the flash is completed, you should reboot your device:
```sh
fastboot reboot
@@ -197,13 +197,13 @@ fastboot reboot
Steps:
-1. Download the AnyKernel3 zip. If you do not know which file to download, please carefully read the description of [KMI](#kmi) and [Security patch level](#security-patch-level) in this document.
-2. Open the Kernel Flash app (grant necessary root permissions) and use the provided AnyKernel3 zip to flash.
+1. Download the AnyKernel3 ZIP. If you don't know which file to download, carefully read the description of [KMI](#kmi) and [Security patch level](#security-patch-level) in this document.
+2. Open the Kernel Flasher app, grant necessary root permissions, and use the provided AnyKernel3 ZIP to flash.
-This way requires the kernel flash App to have root permissions. You can use the following methods to achieve this:
+This way requires the Kernel Flasher app to have root permissions. You can use the following methods to achieve this:
-1. Your device is rooted. For example, you have installed KernelSU and want to upgrade to the latest version, or you have rooted through other methods (such as Magisk).
-2. If your device is not rooted, but the device supports the temporary boot method of `fastboot boot boot.img`, you can use the GKI image provided by KernelSU to temporarily boot your device, obtain temporary root permissions, and then use the Kernel Flash app to obtain permanent root privileges.
+1. Your device is rooted. For example, you have installed KernelSU and want to upgrade to the latest version or you have rooted through other methods (such as Magisk).
+2. If your device isn't rooted, but the device supports the temporary boot method of `fastboot boot boot.img`, you can use the GKI image provided by KernelSU to temporarily boot your device, obtain temporary root permissions, and then use the Kernel Flash app to obtain permanent root privileges.
Some of kernel flashing apps that can be used for this:
@@ -215,7 +215,7 @@ Note: This method is more convenient when upgrading KernelSU and can be done wit
## Patch boot.img manually {#patch-boot-image}
-For some devices, the boot.img format is not so common, such as not `lz4`, `gz` and `uncompressed`; the most typical example is a Pixel, it's boot.img format is `lz4_legacy` compressed, ramdisk may be `gz` may also be `lz4_legacy` compression; currently, if you directly flash the boot.img provided by KernelSU, the device may not be able to boot; as an alternative, and you can manually patch the boot.img to achieve this.
+For some devices, the boot.img format isn't as common as `lz4`, `gz`, and `uncompressed`. A typical example is the Pixel, where the boot.img is compressed in the `lz4_legacy` format, while the, ramdisk may be in `gz` or also compressed in `lz4_legacy`. Currently, if you directly flash the boot.img provided by KernelSU, the device may not be able to boot. In this case, you can manually patch the boot.img to achieve this.
It's always recommended to use `magiskboot` to patch images, there are two ways:
@@ -225,27 +225,27 @@ It's always recommended to use `magiskboot` to patch images, there are two ways:
The official build of `magiskboot` can only run on Android devices, if you want to run it on PC, you can try the second option.
::: tip
-Android-Image-Kitchen is not recommended for now, as it doesn't handle the boot metadata (such as security patch level) correctly, thus it may not work on some devices.
+Android-Image-Kitchen isn't recommended for now because it doesn't handle the boot metadata (such as security patch level) correctly. Therefore, it may not work on some devices.
:::
### Preparation
-1. Get your device's stock boot.img; you can get it from your device manufacturers. You may need [payload-dumper-go](https://github.com/ssut/payload-dumper-go).
-2. Download the AnyKernel3 zip file provided by KernelSU that matches the KMI version of your device. You can refer to the [Install with custom Recovery](#install-with-custom-recovery).
+1. Get your device's stock boot.img. You can get it from your device manufacturers. You may need [payload-dumper-go](https://github.com/ssut/payload-dumper-go).
+2. Download the AnyKernel3 ZIP file provided by KernelSU that matches the KMI version of your device. You can refer to [Install with custom Recovery](#install-with-custom-recovery).
3. Unpack the AnyKernel3 package and get the `Image` file, which is the kernel file of KernelSU.
### Using magiskboot on Android devices {#using-magiskboot-on-Android-devices}
-1. Download latest Magisk from [Release Page](https://github.com/topjohnwu/Magisk/releases).
+1. Download latest Magisk from [GitHub Releases](https://github.com/topjohnwu/Magisk/releases).
2. Rename `Magisk-*(version).apk` to `Magisk-*.zip` and unzip it.
3. Push `Magisk-*/lib/arm64-v8a/libmagiskboot.so` to your device by ADB: `adb push Magisk-*/lib/arm64-v8a/libmagiskboot.so /data/local/tmp/magiskboot`
4. Push stock boot.img and Image in AnyKernel3 to your device.
-5. Enter adb shell and run `cd /data/local/tmp/` directory, then `chmod +x magiskboot`
-6. Enter adb shell and run `cd /data/local/tmp/` directory, execute `./magiskboot unpack boot.img` to unpack `boot.img`, you will get a `kernel` file, this is your stock kernel.
+5. Enter ADB shell and run `cd /data/local/tmp/` directory, then `chmod +x magiskboot`
+6. Enter ADB shell and run `cd /data/local/tmp/` directory, execute `./magiskboot unpack boot.img` to unpack `boot.img`, you will get a `kernel` file, this is your stock kernel.
7. Replace `kernel` with `Image` by running the command: `mv -f Image kernel`.
8. Execute `./magiskboot repack boot.img` to repack boot image, and you will get a `new-boot.img` file, flash this file to device by fastboot.
-### Using magiskboot on Windows/macOS/Linux PC{#using-magiskboot-on-PC}
+### Using magiskboot on Windows/macOS/Linux PC {#using-magiskboot-on-PC}
1. Download the corresponding `magiskboot` binary for your OS from [magiskboot_build](https://github.com/ookiineko/magiskboot_build/releases/tag/last-ci).
2. Prepare stock `boot.img` and `Image` in your PC.
@@ -255,26 +255,26 @@ Android-Image-Kitchen is not recommended for now, as it doesn't handle the boot
6. Execute `./magiskboot repack boot.img` to repack the boot image, and you will get a `new-boot.img` file, flash this file to device by fastboot.
::: info
-Official `magiskboot` can run in `Linux` environments normally, if you are a Linux user, you can use the official build.
+Official `magiskboot` can run in `Linux` environments normally, if you're a Linux user, you can use the official build.
:::
## Install with custom Recovery {#install-with-custom-recovery}
-Prerequisite: Your device must have a custom Recovery, such as TWRP. If there is no custom recovery available for your device, use another method.
+Prerequisite: Your device must have a custom Recovery, such as TWRP. If there is no custom Recovery available for your device, use another method.
Steps:
-1. From the [Release page](https://github.com/tiann/KernelSU/releases) of KernelSU, download the zip package starting with `AnyKernel3` that matches your phone version; for example, if the device's kernel version is `android12-5.10. 66`, then you should download the `AnyKernel3-android12-5.10.66_yyyy-MM.zip` file (where `yyyy` is the year and `MM` is the month).
+1. On [GitHub Releases](https://github.com/tiann/KernelSU/releases), download the ZIP package starting with `AnyKernel3` that matches your device's version. For example, if the device's kernel version is `android12-5.10.66`, then you should download the `AnyKernel3-android12-5.10.66_yyyy-MM.zip` file (where `yyyy` is the year and `MM` is the month).
2. Reboot the device into TWRP.
-3. Use adb to place AnyKernel3-*.zip into the device's `/sdcard` location and choose to install it in the TWRP GUI; or you can directly run `adb sideload AnyKernel-*.zip` to install.
+3. Use ADB to place AnyKernel3-*.zip into the device's `/sdcard` location and choose to install it in the TWRP GUI, or you can directly run `adb sideload AnyKernel-*.zip` to install.
-Note: This method is suitable for any installation (not limited to initial installation or subsequent upgrades), as long as you are using TWRP.
+Note: This method is suitable for any installation (not limited to initial installation or subsequent upgrades), as long as you're using TWRP.
## Other methods
-In fact, all of these installation methods have only one main idea, which is to **replace the original kernel for the one provided by KernelSU**; as long as this can be achieved, it can be installed. The following are other possible methods:
+In fact, all of these installation methods have only one main idea, which is to **replace the original kernel for the one provided by KernelSU**, as long as this can be achieved, it can be installed. The following are other possible methods:
-1. First install Magisk, get root privileges through Magisk and then use the kernel flasher to flash in the AnyKernel3 zip from KernelSU.
+1. First, install Magisk, get root privileges through Magisk, and then use the Kernel Flasher to flash the AnyKernel3 ZIP from KernelSU.
2. Use any flashing toolkit on PC to flash the kernel provided by KernelSU.
-However, if it does not work, please try `magiskboot` approach.
+However, if it doesn't work, please try `magiskboot` approach.
diff --git a/website/docs/guide/module-webui.md b/website/docs/guide/module-webui.md
index e2683257..d1dede01 100644
--- a/website/docs/guide/module-webui.md
+++ b/website/docs/guide/module-webui.md
@@ -1,8 +1,8 @@
# Module WebUI
-In addition to executing boot scripts and modifying system files, KernelSU's modules also support displaying UI interfaces and interacting with users.
+In addition to executing boot scripts and modifying system files, KernelSU's modules also support displaying UI interfaces and interacting directly with users.
-The module can write HTML + CSS + JavaScript pages through any web technology. KernelSU's manager will display these pages through WebView. It also provides some APIs for interacting with the system, such as executing shell commands.
+The module can write HTML + CSS + JavaScript pages through any web technology. KernelSU's manager will display these pages through WebView. It also provides some APIs to interact with the system, such as executing shell commands.
## `webroot` directory
@@ -16,17 +16,17 @@ Web resource files should be placed in the `webroot` subdirectory of the module
`-- index.html
```
-:::warning
-When installing the module, KernelSU will automatically set the permissions and SELinux context of this directory. If you do not know what you are doing, please do not set the permissions of this directory yourself!
+::: warning
+When installing the module, KernelSU will automatically set the permissions and SELinux context for this directory. If you don't know what you're doing, do not set the permissions for this directory yourself!
:::
If your page contains CSS and JavaScript, you need to place it in this directory as well.
## JavaScript API
-If it is just a display page, it is no different from a normal web page. More importantly, KernelSU provides a series of system API that allows you to implement the unique functions of the module.
+If it's just a display page, it will function like a regular web page. However, the most important thing is that KernelSU provides a series of system APIs, allowing the implementation of module-specific functions.
-KernelSU provides a JavaScript library and [publishes it on npm](https://www.npmjs.com/package/kernelsu), which you can use in the JavaScript code of your web pages.
+KernelSU provides a JavaScript library, which is published on [npm](https://www.npmjs.com/package/kernelsu) and can be used in the JavaScript code of your web pages.
For example, you can execute a shell command to obtain a specific configuration or modify a property:
@@ -38,11 +38,11 @@ const { errno, stdout } = exec("getprop ro.product.model");
For another example, you can make the web page display full screen, or display a toast.
-[API documentation](https://www.npmjs.com/package/kernelsu).
+[API documentation](https://www.npmjs.com/package/kernelsu)
-If you find that the existing API does not meet your needs or is inconvenient to use, you are welcome to give us suggestions [here](https://github.com/tiann/KernelSU/issues)!
+If you find that the existing API doesn't meet your needs or is inconvenient to use, you're welcome to give us suggestions [here](https://github.com/tiann/KernelSU/issues)!
## Some tips
-1. You can use `localStorage` normally to store some data, but it will be lost after the manager app is uninstalled. If you need to save persistently, you can write data to a custom directory yourself.
-2. For simple pages, I recommend you use [parceljs](https://parceljs.org/) for packaging. It requires zero configuration and is very convenient to use. However, if you are a front-end master or have your own preferences, then just choose the one you like!
+1. You can use `localStorage` as usual to store some data, but keep in mind that it will be lost if the manager app is uninstalled. If you need persistent storage, you will need to manually save the data in a specific directory.
+2. For simple pages, we recommend using [parceljs](https://parceljs.org/) for packaging. It requires no initial configuration and is extremely easy to use. However, if you're a front-end expert or have your own preferences, feel free to use the tool of your choice!
diff --git a/website/docs/guide/module.md b/website/docs/guide/module.md
index 7ad4193e..9fcff84f 100644
--- a/website/docs/guide/module.md
+++ b/website/docs/guide/module.md
@@ -2,28 +2,27 @@
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).
+The module mechanism of KernelSU is almost the same as that of Magisk. If you're familiar with Magisk module development, developing KernelSU modules is very similar. You can skip the introduction of modules below and just read [Difference with Magisk](difference-with-magisk.md).
## WebUI
-KernelSU's modules support displaying interfaces and interacting with users. For more, please refer to [WebUI documentation](module-webui.md).
+KernelSU's modules support displaying interfaces and interacting with users. For more details, refer to the [WebUI documentation](module-webui.md).
-## Busybox
+## 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.
+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.
+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:
+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