Add website (#65)

This commit is contained in:
weishu
2023-01-14 23:18:11 +08:00
committed by GitHub
parent 8274f6a1ff
commit 5a8acea84e
17 changed files with 9947 additions and 0 deletions

37
website/docs/guide/faq.md Normal file
View File

@@ -0,0 +1,37 @@
# FAQ
## Does KernelSU support my device?
First, your devices should be able to unlock the bootloader. If it can't, then it is unsupported.
Then install KernelSU manager App to your device and open it, if it shows `Unsupported` then your device is unsupported and won't be supported in the future.
## Does KernelSU need to unlock Bootloader?
Certainly, yes.
## Does KernelSU support modules?
Yes, But it is in early version, may be buggy. Please waiting it to be stable :)
## Does KernelSU support Xposed?
Yes, [Dreamland](https://github.com/canyie/Dreamland) and [TaiChi](https::/taichi.cool) partially works now, And we are trying to make other Xposed Framework work.
## 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.
But if you only use the `su` of KernelSU, then it will work well with Magisk: KernelSU modify the `kernel` and Magisk modify the `ramdisk`, they can 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.
## 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.
## Can KernelSU support old kernel?
It is possible, but you need to backport it manully and PRs welcome!

View File

@@ -0,0 +1,47 @@
# How to build KernelSU?
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)
## Build Kernel
### Sync the kernel source code
```sh
repo init -u https://android.googlesource.com/kernel/manifest
mv <kernel_manifest.xml> .repo/manifests
repo init -m manifest.xml
repo sync
```
The `<kernel_manifest.xml>` 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 [Google 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.
For example, we need to build aarch64 kernel image:
```sh
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 24Gb.
Starting from Android 13, the kernel is built by `bazel`:
```sh
tools/bazel build --config=fast //common:kernel_aarch64_dist
```
## Build Kernel with KernelSU
If you can build the kernel successfully, then build KernelSU is so easy, run this command in Kernel source root dir:
```sh
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
```
And then rebuild the kernel and you will get a kernel image with KernelSU!

View File

@@ -0,0 +1,32 @@
# Installation
## Check if your device is supported
Download the KernelSU manager app from [github releases](https://github.com/tiann/KernelSU/releases) or [github actions](https://github.com/tiann/KernelSU/actions/workflows/build-manager.yml), and then install the app to device and open the app:
- If the app shows `Unsupported`, it means KernelSU is not supported for your device.
- If the app shows `Not installed`, then your devices is supported by KernelSU.
## Find proper boot.img
KernelSU provides a general boot.img for GKI devices, you should flash the boot.img to the boot partition of your device.
You can download the boot.img from [github actions for kernel](https://github.com/tiann/KernelSU/actions/workflows/build-kernel.yml), Please be aware that your should use the right version of boot.img. For example, if your device show that the kernel is `5.10.101`, then you need to download the `5.10.101-xxxx.boot.xxx`.
And also, please check your stock boot.img's format, you should use the right format, such as `lz4``gz`.
## Flash the boot.img to device
Connect your device with `adb` and then execute `adb reboot bootloader` to enter fastboot mode, and then use this command to flash KernelSU:
```sh
fastboot flash boot boot.img
```
## Reboot
When flashed, you should reboot your device:
```sh
fastboot reboot
```

View File

@@ -0,0 +1,21 @@
# What is KernelSU?
KernelSU is a root solution for Android GKI devices, it works in kernel mode and grant root permission to userspace application directly in kernel space.
## Features
The main feature of KernelSU is it is **Kernel-based**. KernelSU works in kernel mode, so it can provide kernel interface we never had before. For example, we can add hardware breakpoint to any process in kernel mode; We can access physical memory of any process without anybody being aware of; We can intercept any syscall in kernel space; etc.
And also, KernelSU provides a module system via overlayfs, which allows you to load your custom plugin into system. It also provides a mechanism to modify files in `/system` partition.
## How to use
Please refer: [Installation](installation)
## How to build
[How to build](how-to-build)
## Discussion
- Telegram: [@KernelSU](https://t.me/KernelSU)