From 2ebb363350e0269ad49a2592b5a862fd8150458a Mon Sep 17 00:00:00 2001 From: tiann Date: Thu, 26 Jan 2023 11:50:15 +0800 Subject: [PATCH] website: fix symbol --- website/docs/guide/how-to-build.md | 4 +++- website/docs/guide/how-to-integrate-for-non-gki.md | 5 +++++ website/docs/zh_CN/guide/how-to-build.md | 4 +++- website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md | 6 ++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/website/docs/guide/how-to-build.md b/website/docs/guide/how-to-build.md index 98d9a864..e658c03a 100644 --- a/website/docs/guide/how-to-build.md +++ b/website/docs/guide/how-to-build.md @@ -5,7 +5,9 @@ First, you should read the Android Official docs for kernel build: 1. [Building 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) -> This page is for GKI devices, if you use an old kernel, please refer [how to integrate KernelSU for old kernel](how-to-integrate-for-non-gki) +::: warning +This page is for GKI devices, if you use an old kernel, please refer [how to integrate KernelSU for old kernel](how-to-integrate-for-non-gki) +::: ## Build Kernel 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 8889d5d8..3e29ce47 100644 --- a/website/docs/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/guide/how-to-integrate-for-non-gki.md @@ -35,6 +35,11 @@ If you find that KPROBES is still not activated, you can try enabling `CONFIG_MO But if you encounter a boot loop when integrated KernelSU, it is maybe *kprobe is broken in your kernel*, you should fix the kprobe bug or use the second way. +:::tip How to check if kprobe is broken? + +comment out `ksu_enable_sucompat()` and `ksu_enable_ksud()` in `KernelSU/kernel/ksu.c`, the the device boot normally, then kprobe may be broken. +::: + ## Manully modify the kernel source If kprobe can not work in your kernel (maybe a upstream bug or kernel below 4.8), then you can try this way: diff --git a/website/docs/zh_CN/guide/how-to-build.md b/website/docs/zh_CN/guide/how-to-build.md index 02a77796..007def95 100644 --- a/website/docs/zh_CN/guide/how-to-build.md +++ b/website/docs/zh_CN/guide/how-to-build.md @@ -5,7 +5,9 @@ 1. [构建内核](https://source.android.com/docs/setup/build/building-kernels) 2. [通用内核映像 (GKI) 发布构建](https://source.android.com/docs/core/architecture/kernel/gki-release-builds) -> 本文档适用于 GKI 设备,如果你是旧内核,请参考[如何为非GKI设备集成 KernelSU](how-to-integrate-for-non-gki) +::: warning +本文档适用于 GKI 设备,如果你是旧内核,请参考[如何为非GKI设备集成 KernelSU](how-to-integrate-for-non-gki) +::: ## 构建内核 diff --git a/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md b/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md index 43122418..dee6adde 100644 --- a/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md +++ b/website/docs/zh_CN/guide/how-to-integrate-for-non-gki.md @@ -35,8 +35,10 @@ CONFIG_KPROBE_EVENTS=y 如果你在集成 KernelSU 之后手机无法启动,那么很可能你的内核中 **kprobe 工作不正常**,你需要修复这个 bug 或者用第二种方法。 -> 如何验证是否是 kprobe 的问题? -> 注释掉 `KernelSU/kernel/ksu.c` 中 `enable_sucompat()`,如果正常开机,那么就是 kprobe 的问题;或者你可以手动尝试使用 kprobe 功能,如果不正常,手机会直接重启。 +:::tip 如何验证是否是 kprobe 的问题? + +注释掉 `KernelSU/kernel/ksu.c` 中 `ksu_enable_sucompat()` 和 `ksu_enable_ksud()`,如果正常开机,那么就是 kprobe 的问题;或者你可以手动尝试使用 kprobe 功能,如果不正常,手机会直接重启。 +::: ## 手动修改内核源码