website: add zh_CN translation (#88)
* website: bump vitepress to 1.0.0-alpha.38 * i18n: add zh-CN translation
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
// node_modules/vitepress/dist/client/theme-default/index.js
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/base.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
|
||||
import "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
|
||||
import VPBadge from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
|
||||
import Layout from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/Layout.vue";
|
||||
import NotFound from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/NotFound.vue";
|
||||
import { default as default2 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
|
||||
import { default as default3 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
|
||||
import { default as default4 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
|
||||
import { default as default5 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
|
||||
import { default as default6 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
|
||||
import { default as default7 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
|
||||
import { default as default8 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
|
||||
import { default as default9 } from "/Users/weishu/dev/github/KernelSU_website/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
|
||||
var theme = {
|
||||
Layout,
|
||||
NotFound,
|
||||
enhanceApp: ({ app }) => {
|
||||
app.component("Badge", VPBadge);
|
||||
}
|
||||
};
|
||||
var theme_default_default = theme;
|
||||
export {
|
||||
default5 as VPDocAsideSponsors,
|
||||
default3 as VPHomeFeatures,
|
||||
default2 as VPHomeHero,
|
||||
default4 as VPHomeSponsors,
|
||||
default9 as VPTeamMembers,
|
||||
default6 as VPTeamPage,
|
||||
default8 as VPTeamPageSection,
|
||||
default7 as VPTeamPageTitle,
|
||||
theme_default_default as default
|
||||
};
|
||||
//# sourceMappingURL=@theme_index.js.map
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../../../node_modules/vitepress/dist/client/theme-default/index.js"],
|
||||
"sourcesContent": ["import './styles/fonts.css';\r\nimport './styles/vars.css';\r\nimport './styles/base.css';\r\nimport './styles/utils.css';\r\nimport './styles/components/custom-block.css';\r\nimport './styles/components/vp-code.css';\r\nimport './styles/components/vp-code-group.css';\r\nimport './styles/components/vp-doc.css';\r\nimport './styles/components/vp-sponsor.css';\r\nimport VPBadge from './components/VPBadge.vue';\r\nimport Layout from './Layout.vue';\r\nimport NotFound from './NotFound.vue';\r\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\r\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\r\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\r\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\r\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\r\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\r\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\r\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\r\nconst theme = {\r\n Layout,\r\n NotFound,\r\n enhanceApp: ({ app }) => {\r\n app.component('Badge', VPBadge);\r\n }\r\n};\r\nexport default theme;\r\n"],
|
||||
"mappings": ";AAAA,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAkC;AAC3C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAAgC;AACzC,IAAM,QAAQ;AAAA,EACV;AAAA,EACA;AAAA,EACA,YAAY,CAAC,EAAE,IAAI,MAAM;AACrB,QAAI,UAAU,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;",
|
||||
"names": ["default"]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"hash": "61282e4d",
|
||||
"browserHash": "774d0f6d",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "cd4413de",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@theme/index": {
|
||||
"src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
|
||||
"file": "@theme_index.js",
|
||||
"fileHash": "2734803c",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{"type":"module"}
|
||||
8876
website/docs/.vitepress/cache/deps/vue.js
vendored
8876
website/docs/.vitepress/cache/deps/vue.js
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,29 +0,0 @@
|
||||
export default {
|
||||
title: 'KernelSU',
|
||||
description: 'A kernel-based root solution for Android GKI devices',
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{ text: 'Guide', link: '/guide/what-is-kernelsu' },
|
||||
{ text: 'Github', link: 'https://github.com/tiann/KernelSU' }
|
||||
],
|
||||
sidebar: [
|
||||
{
|
||||
text: 'Guide',
|
||||
items: [
|
||||
{ text: 'What is KernelSU?', link: '/guide/what-is-kernelsu' },
|
||||
{ text: 'Installation', link: '/guide/installation' },
|
||||
{ text: 'How to build?', link: '/guide/how-to-build' },
|
||||
{ text: 'FAQ', link: '/guide/faq' },
|
||||
]
|
||||
}
|
||||
],
|
||||
footer: {
|
||||
message: 'Released under the GPL3 License.',
|
||||
copyright: 'Copyright © 2022-present KernelSU Developers'
|
||||
},
|
||||
editLink: {
|
||||
pattern: 'https://github.com/tiann/KernelSU_website/edit/main/docs/:path',
|
||||
text: 'Edit this page on GitHub'
|
||||
}
|
||||
}
|
||||
}
|
||||
13
website/docs/.vitepress/config.ts
Normal file
13
website/docs/.vitepress/config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
import { createRequire } from 'module'
|
||||
import { defineConfig } from 'vitepress'
|
||||
import locales from './locales'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const pkg = require('vitepress/package.json')
|
||||
|
||||
export default defineConfig( {
|
||||
title: 'KernelSU',
|
||||
locales: locales.locales
|
||||
})
|
||||
55
website/docs/.vitepress/locales/en.ts
Normal file
55
website/docs/.vitepress/locales/en.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { createRequire } from 'module'
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const pkg = require('vitepress/package.json')
|
||||
|
||||
export default defineConfig({
|
||||
lang: 'en-US',
|
||||
description: 'A kernel-based root solution for Android GKI devices.',
|
||||
|
||||
themeConfig: {
|
||||
nav: nav(),
|
||||
|
||||
lastUpdatedText: 'last Updated',
|
||||
|
||||
sidebar: {
|
||||
'/guide/': sidebarGuide()
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/tiann/KernelSU' }
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: 'Released under the GPL3 License.',
|
||||
copyright: 'Copyright © 2022-present KernelSU Developers'
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/tiann/KernelSU/edit/main/website/docs/:path',
|
||||
text: 'Edit this page on GitHub'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function nav() {
|
||||
return [
|
||||
{ text: 'Guide', link: '/guide/what-is-kernelsu' },
|
||||
{ text: 'Github', link: 'https://github.com/tiann/KernelSU' }
|
||||
]
|
||||
}
|
||||
|
||||
function sidebarGuide() {
|
||||
return [
|
||||
{
|
||||
text: 'Guide',
|
||||
items: [
|
||||
{ text: 'What is KernelSU?', link: '/guide/what-is-kernelsu' },
|
||||
{ text: 'Installation', link: '/guide/installation' },
|
||||
{ text: 'How to build?', link: '/guide/how-to-build' },
|
||||
{ text: 'FAQ', link: '/guide/faq' },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
20
website/docs/.vitepress/locales/index.ts
Normal file
20
website/docs/.vitepress/locales/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import en from './en'
|
||||
import zh_CN from './zh_CN'
|
||||
|
||||
export default defineConfig({
|
||||
locales: {
|
||||
root: {
|
||||
label: 'English',
|
||||
lang: en.lang,
|
||||
themeConfig: en.themeConfig,
|
||||
description: en.description
|
||||
},
|
||||
zh_CN: {
|
||||
label: '简体中文',
|
||||
lang: zh_CN.lang,
|
||||
themeConfig: zh_CN.themeConfig,
|
||||
description: zh_CN.description
|
||||
}
|
||||
}
|
||||
})
|
||||
55
website/docs/.vitepress/locales/zh_CN.ts
Normal file
55
website/docs/.vitepress/locales/zh_CN.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { createRequire } from 'module'
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const pkg = require('vitepress/package.json')
|
||||
|
||||
export default defineConfig({
|
||||
lang: 'zh-CN',
|
||||
description: '一个基于内核,为安卓 GKI 准备的 root 方案。',
|
||||
|
||||
themeConfig: {
|
||||
nav: nav(),
|
||||
|
||||
lastUpdatedText: '最后更新',
|
||||
|
||||
sidebar: {
|
||||
'/zh_CN/guide/': sidebarGuide()
|
||||
},
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/tiann/KernelSU' }
|
||||
],
|
||||
|
||||
footer: {
|
||||
message: '在 GPL3 许可证下发布。',
|
||||
copyright: 'Copyright © 2022-现在 KernelSU 开发者'
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/tiann/KernelSU/edit/main/website/docs/:path',
|
||||
text: '在 GitHub 中编辑本页'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function nav() {
|
||||
return [
|
||||
{ text: '指南', link: '/zh_CN/guide/what-is-kernelsu' },
|
||||
{ text: 'Github', link: 'https://github.com/tiann/KernelSU' }
|
||||
]
|
||||
}
|
||||
|
||||
function sidebarGuide() {
|
||||
return [
|
||||
{
|
||||
text: 'Guide',
|
||||
items: [
|
||||
{ text: '什么是 KernelSU?', link: '/zh_CN/guide/what-is-kernelsu' },
|
||||
{ text: '安装', link: '/zh_CN/guide/installation' },
|
||||
{ text: '如何构建?', link: '/zh_CN/guide/how-to-build' },
|
||||
{ text: '常见问题', link: '/zh_CN/guide/faq' },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
37
website/docs/zh_CN/guide/faq.md
Normal file
37
website/docs/zh_CN/guide/faq.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# 常见问题
|
||||
|
||||
## KernelSU 是否支持我的设备 ?
|
||||
|
||||
首先,您的设备应该能够解锁 bootloader。 如果不能,则不支持。
|
||||
|
||||
然后在你的设备上安装 KernelSU 管理器并打开它,如果它显示 `Unsupported` ,那么你的设备是不受支持的,以后也不会得到支持。
|
||||
|
||||
## KernelSU 是否需要解锁 Bootloader ?
|
||||
|
||||
当然。
|
||||
|
||||
## KernelSU 是否支持模块 ?
|
||||
|
||||
是的,但它是早期版本,可能有问题。请等待它稳定 :)
|
||||
|
||||
## KernelSU 是否支持 Xposed ?
|
||||
|
||||
是的,[Dreamland](https://github.com/canyie/Dreamland) 和 [TaiChi](https::/taichi.cool) 现在部分可用,我们正在努力使其他 Xposed Framework 可用。
|
||||
|
||||
## KernelSU 与 Magisk 兼容吗 ?
|
||||
|
||||
KernelSU 的模块系统与 Magisk 的 magic mount 有冲突,如果 KernelSU 中启用了任何模块,那么整个 Magisk 将无法工作。
|
||||
|
||||
但是如果你只使用 KernelSU 的 `su`,那么它会和 Magisk 一起工作:KernelSU 修改 `kernel` 、 Magisk 修改 `ramdisk`,它们可以一起工作。
|
||||
|
||||
## KernelSU 会替代 Magisk 吗?
|
||||
|
||||
我们不这么认为,这不是我们的目标。Magisk 对于用户空间 root 解决方案来说已经足够好了,而且它的寿命会很长。KernelSU 的目标是为用户提供内核接口,而不是替代 Magisk。
|
||||
|
||||
## KernelSU 可以支持非 GKI 设备吗?
|
||||
|
||||
可以。但是你应该下载内核源代码并将 KernelSU 集成到源代码树中并自己编译内核。
|
||||
|
||||
## KernelSU 可以支持旧内核吗?
|
||||
|
||||
可以,但你需要手动移植它,欢迎 PR !
|
||||
47
website/docs/zh_CN/guide/how-to-build.md
Normal file
47
website/docs/zh_CN/guide/how-to-build.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# 如何构建 KernelSU?
|
||||
|
||||
首先,您应该阅读内核构建的 Android 官方文档:
|
||||
|
||||
1. [构建内核](https://source.android.com/docs/setup/build/building-kernels)
|
||||
2. [通用内核映像 (GKI) 发布构建](https://source.android.com/docs/core/architecture/kernel/gki-release-builds)
|
||||
|
||||
## 构建内核
|
||||
|
||||
### 同步内核源码
|
||||
|
||||
```sh
|
||||
repo init -u https://android.googlesource.com/kernel/manifest
|
||||
mv <kernel_manifest.xml> .repo/manifests
|
||||
repo init -m manifest.xml
|
||||
repo sync
|
||||
```
|
||||
|
||||
`<kernel_manifest.xml>` 是一个可以唯一确定构建的清单文件,您可以使用该清单进行可重新预测的构建。 您应该从 [通用内核映像 (GKI) 发布构建](https://source.android.com/docs/core/architecture/kernel/gki-release-builds) 下载清单文件
|
||||
|
||||
### 构建
|
||||
|
||||
请先查看 [官方文档](https://source.android.com/docs/setup/build/building-kernels)。
|
||||
|
||||
例如,我们需要构建 aarch64 内核镜像:
|
||||
|
||||
```sh
|
||||
LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
|
||||
```
|
||||
|
||||
不要忘记添加 `LTO=thin`, 否则,如果您的计算机内存小于 24GB,构建可能会失败.
|
||||
|
||||
从 Android 13 开始,内核由 `bazel` 构建:
|
||||
|
||||
```sh
|
||||
tools/bazel build --config=fast //common:kernel_aarch64_dist
|
||||
```
|
||||
|
||||
## 使用 KernelSU 构建内核
|
||||
|
||||
如果您可以成功构建内核,那么构建 KernelSU 就很容易,在内核源代码根目录中运行此命令:
|
||||
|
||||
```sh
|
||||
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -
|
||||
```
|
||||
|
||||
然后重建内核,您将获得带有 KernelSU 的内核映像!
|
||||
32
website/docs/zh_CN/guide/installation.md
Normal file
32
website/docs/zh_CN/guide/installation.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# 安装
|
||||
|
||||
## 检查您的设备是否被支持
|
||||
|
||||
从 [GitHub Releases](https://github.com/tiann/KernelSU/releases) 或 [GitHub Actions](https://github.com/tiann/KernelSU/actions/workflows/build-manager.yml) 下载 KernelSU 管理器应用,然后将应用程序安装到设备并打开:
|
||||
|
||||
- 如果应用程序显示 “不支持”,则表示您的设备不支持 KernelSU。
|
||||
- 如果应用程序显示 “未安装”,那么 KernelSU 支持您的设备。
|
||||
|
||||
## 找到合适的 boot.img
|
||||
|
||||
KernelSU 为 GKI 设备提供了通用的 boot.img,您应该将 boot.img 刷写到设备的引导分区。
|
||||
|
||||
您可以从 [GitHub Actions for Kernel](https://github.com/tiann/KernelSU/actions/workflows/build-kernel.yml) 下载 boot.img, 请注意您应该使用正确版本的 boot.img. 例如,如果您的设备显示内核是 `5.10.101`, 需要下载 `5.10.101-xxxx.boot.xxx`.
|
||||
|
||||
另外,请检查您原有 boot.img 的内核压缩格式,您应该使用正确的格式,例如 `lz4`、`gz`。
|
||||
|
||||
## 将 boot.img 刷入设备
|
||||
|
||||
使用 `adb` 连接您的设备,然后执行 `adb reboot bootloader` 进入 fastboot 模式,然后使用此命令刷入 KernelSU:
|
||||
|
||||
```sh
|
||||
fastboot flash boot boot.img
|
||||
```
|
||||
|
||||
## 重启
|
||||
|
||||
刷入完成后,您应该重新启动您的设备:
|
||||
|
||||
```sh
|
||||
fastboot reboot
|
||||
```
|
||||
21
website/docs/zh_CN/guide/what-is-kernelsu.md
Normal file
21
website/docs/zh_CN/guide/what-is-kernelsu.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# 什么是 KernelSU?
|
||||
|
||||
KernelSU 是 Android GKI 设备的 root 解决方案,它工作在内核模式,并直接在内核空间中为用户空间应用程序授予 root 权限。
|
||||
|
||||
## 功能
|
||||
|
||||
KernelSU 的主要特点是它是**基于内核的**。 KernelSU 运行在内核空间, 所以它可以提供我们以前从未有过的内核接口。 例如,我们可以在内核模式下为任何进程添加硬件断点;我们可以在任何进程的物理内存中访问,而无人知晓;我们可以在内核空间拦截任何系统调用; 等等。
|
||||
|
||||
KernelSU 还提供了一个基于 overlayfs 的模块系统,允许您加载自定义插件到系统中。它还提供了一种修改 /system 分区中文件的机制。
|
||||
|
||||
## 如何使用
|
||||
|
||||
请参考: [安装](installation)
|
||||
|
||||
## 如何构建
|
||||
|
||||
请参考: [如何构建](how-to-build)
|
||||
|
||||
## 讨论
|
||||
|
||||
- Telegram: [@KernelSU](https://t.me/KernelSU)
|
||||
28
website/docs/zh_CN/index.md
Normal file
28
website/docs/zh_CN/index.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: KernelSU
|
||||
text: 一个基于内核,为安卓 GKI 准备的 root 方案。
|
||||
tagline: ""
|
||||
image:
|
||||
src: /logo.png
|
||||
alt: KernelSU
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 开始
|
||||
link: /zh_CN/guide/what-is-kernelsu
|
||||
- theme: alt
|
||||
text: 在 GitHub 中查看
|
||||
link: https://github.com/tiann/KernelSU
|
||||
|
||||
features:
|
||||
- title: 基于内核
|
||||
details: KernslSU 运行在内核空间,对用户空间应用有更强的掌控。
|
||||
- title: 白名单访问控制
|
||||
details: 只有被授权的 App 才可以访问 `su`,而其他 App 无法感知其存在。
|
||||
- title: 模块支持
|
||||
details: KernelSU 支持通过 overlayfs 修改 /system,它甚至可以使 /system 可写。
|
||||
- title: 开源
|
||||
details: KernelSU 是 GPL-3 许可下的开源项目。
|
||||
|
||||
Reference in New Issue
Block a user