Files
KernelSU/zh_CN/guide/module.html
2023-11-13 03:33:43 +00:00

107 lines
64 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>模块开发指南 | KernelSU</title>
<meta name="description" content="一个基于内核,为安卓 GKI 准备的 root 方案。">
<link rel="preload stylesheet" href="/assets/style.7b8b1841.css" as="style">
<script type="module" src="/assets/app.9b09a9be.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/framework.43781440.js">
<link rel="modulepreload" href="/assets/chunks/theme.85c31bd3.js">
<link rel="modulepreload" href="/assets/zh_CN_guide_module.md.88839cd5.lean.js">
<script id="check-dark-light">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-b2cf3e0b><!--[--><!--]--><!--[--><span tabindex="-1" data-v-c8616af1></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-c8616af1> Skip to content </a><!--]--><!----><header class="VPNav" data-v-b2cf3e0b data-v-7e5bc4a5><div class="VPNavBar has-sidebar" data-v-7e5bc4a5 data-v-94c81dcc><div class="container" data-v-94c81dcc><div class="title" data-v-94c81dcc><div class="VPNavBarTitle has-sidebar" data-v-94c81dcc data-v-f4ef19a3><a class="title" href="/zh_CN/" data-v-f4ef19a3><!--[--><!--]--><!----><!--[-->KernelSU<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-94c81dcc><div class="curtain" data-v-94c81dcc></div><div class="content-body" data-v-94c81dcc><!--[--><!--]--><div class="VPNavBarSearch search" style="--vp-meta-key:&#39;Meta&#39;;" data-v-94c81dcc><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-94c81dcc data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zh_CN/guide/what-is-kernelsu.html" tabindex="0" data-v-7f418b0f data-v-37adc828 data-v-8f4dc553><!--[-->指南<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="https://github.com/tiann/KernelSU" target="_blank" rel="noreferrer" tabindex="0" data-v-7f418b0f data-v-37adc828 data-v-8f4dc553><!--[-->Github<!--]--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" height="24px" viewbox="0 0 24 24" width="24px" class="icon" data-v-8f4dc553><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"></path></svg></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-94c81dcc data-v-74abcbb9 data-v-764effdf><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-764effdf><span class="text" data-v-764effdf><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="option-icon" data-v-764effdf><path d="M0 0h24v24H0z" fill="none"></path><path d=" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z " class="css-c4d79v"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="text-icon" data-v-764effdf><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="menu" data-v-764effdf><div class="VPMenu" data-v-764effdf data-v-e7ea1737><!----><!--[--><!--[--><div class="items" data-v-74abcbb9><p class="title" data-v-74abcbb9>简体中文</p><!--[--><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->English<!--]--><!----></a></div><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/zh_TW/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->繁體中文<!--]--><!----></a></div><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/ja_JP/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->日本語<!--]--><!----></a></div><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/vi_VN/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Tiếng Việt<!--]--><!----></a></div><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/id_ID/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Bahasa<!--]--><!----></a></div><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/ru_RU/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Русский<!--]--><!----></a></div><div class="VPMenuLink" data-v-74abcbb9 data-v-d2c93bab><a class="VPLink link" href="/pt_BR/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Português (Brasil)<!--]--><!----></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-94c81dcc data-v-f6a63727><label title="toggle dark mode" data-v-f6a63727 data-v-a9c8afb8><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" aria-checked="false" data-v-a9c8afb8 data-v-f3c41672><span class="check" data-v-f3c41672><span class="icon" data-v-f3c41672><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-a9c8afb8><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-a9c8afb8><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></label></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-94c81dcc data-v-0394ad82 data-v-f6988cfb><!--[--><a class="VPSocialLink" href="https://github.com/tiann/KernelSU" aria-label="github" target="_blank" rel="noopener" data-v-f6988cfb data-v-c530cc0a><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-94c81dcc data-v-40855f84 data-v-764effdf><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-764effdf><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-764effdf><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="menu" data-v-764effdf><div class="VPMenu" data-v-764effdf data-v-e7ea1737><!----><!--[--><!--[--><div class="group translations" data-v-40855f84><p class="trans-title" data-v-40855f84>简体中文</p><!--[--><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->English<!--]--><!----></a></div><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/zh_TW/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->繁體中文<!--]--><!----></a></div><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/ja_JP/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->日本語<!--]--><!----></a></div><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/vi_VN/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Tiếng Việt<!--]--><!----></a></div><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/id_ID/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Bahasa<!--]--><!----></a></div><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/ru_RU/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Русский<!--]--><!----></a></div><div class="VPMenuLink" data-v-40855f84 data-v-d2c93bab><a class="VPLink link" href="/pt_BR/guide/module.html" data-v-d2c93bab data-v-8f4dc553><!--[-->Português (Brasil)<!--]--><!----></a></div><!--]--></div><div class="group" data-v-40855f84><div class="item appearance" data-v-40855f84><p class="label" data-v-40855f84>Appearance</p><div class="appearance-action" data-v-40855f84><label title="toggle dark mode" data-v-40855f84 data-v-a9c8afb8><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" aria-checked="false" data-v-a9c8afb8 data-v-f3c41672><span class="check" data-v-f3c41672><span class="icon" data-v-f3c41672><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-a9c8afb8><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-a9c8afb8><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></label></div></div></div><div class="group" data-v-40855f84><div class="item social-links" data-v-40855f84><div class="VPSocialLinks social-links-list" data-v-40855f84 data-v-f6988cfb><!--[--><a class="VPSocialLink" href="https://github.com/tiann/KernelSU" aria-label="github" target="_blank" rel="noopener" data-v-f6988cfb data-v-c530cc0a><svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-94c81dcc data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><!----></header><div class="VPLocalNav" data-v-b2cf3e0b data-v-392e1bf8><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-392e1bf8><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="menu-icon" data-v-392e1bf8><path d="M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"></path><path d="M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"></path><path d="M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"></path><path d="M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"></path></svg><span class="menu-text" data-v-392e1bf8>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-392e1bf8 data-v-079b16a8><button data-v-079b16a8>Return to top</button><!----></div></div><aside class="VPSidebar" data-v-b2cf3e0b data-v-af16598e><div class="curtain" data-v-af16598e></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-af16598e><span class="visually-hidden" id="sidebar-aria-label" data-v-af16598e> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-af16598e><section class="VPSidebarItem level-0 has-active" data-v-af16598e data-v-c4656e6d><div class="item" role="button" tabindex="0" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><h2 class="text" data-v-c4656e6d>Guide</h2><!----></div><div class="items" data-v-c4656e6d><!--[--><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/what-is-kernelsu.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>什么是 KernelSU?</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/installation.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>安装</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/how-to-build.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>如何构建?</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/how-to-integrate-for-non-gki.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>如何为非GKI设备集成 KernelSU</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/unofficially-support-devices.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>非官方支持设备</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link is-active has-active" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/module.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>模块开发指南</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/app-profile.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>App Profile</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/rescue-from-bootloop.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>救砖</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/faq.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>常见问题</p><!--]--><!----></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-c4656e6d data-v-c4656e6d><div class="item" data-v-c4656e6d><div class="indicator" data-v-c4656e6d></div><a class="VPLink link link" href="/zh_CN/guide/hidden-features.html" data-v-c4656e6d data-v-8f4dc553><!--[--><p class="text" data-v-c4656e6d>隐藏功能</p><!--]--><!----></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-b2cf3e0b data-v-a494bd1d><div class="VPDoc has-sidebar has-aside" data-v-a494bd1d data-v-c4b0d3cf><!--[--><!--]--><div class="container" data-v-c4b0d3cf><div class="aside" data-v-c4b0d3cf><div class="aside-curtain" data-v-c4b0d3cf></div><div class="aside-container" data-v-c4b0d3cf><div class="aside-content" data-v-c4b0d3cf><div class="VPDocAside" data-v-c4b0d3cf data-v-3f215769><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" data-v-3f215769 data-v-ff0f39c8><div class="content" data-v-ff0f39c8><div class="outline-marker" data-v-ff0f39c8></div><div class="outline-title" data-v-ff0f39c8>On this page</div><nav aria-labelledby="doc-outline-aria-label" data-v-ff0f39c8><span class="visually-hidden" id="doc-outline-aria-label" data-v-ff0f39c8> Table of Contents for current page </span><ul class="root" data-v-ff0f39c8 data-v-9a431c33><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-c4b0d3cf><div class="content-container" data-v-c4b0d3cf><!--[--><!--]--><!----><main class="main" data-v-c4b0d3cf><div style="position:relative;" class="vp-doc _zh_CN_guide_module" data-v-c4b0d3cf><div><h1 id="introduction" tabindex="-1">模块开发指南 <a class="header-anchor" href="#introduction" aria-label="Permalink to &quot;模块开发指南 {#introduction}&quot;"></a></h1><p>KernelSU 提供了一个模块机制,它可以在保持系统分区完整性的同时达到修改系统分区的效果;这种机制通常被称之为 systemless。</p><p>KernelSU 的模块运作机制与 Magisk 几乎是一样的,如果你熟悉 Magisk 模块的开发,那么开发 KernelSU 的模块大同小异,你可以跳过下面有关模块的介绍,只需要了解 <a href="./difference-with-magisk.html">KernelSU 模块与 Magisk 模块的异同</a></p><h2 id="busybox" tabindex="-1">Busybox <a class="header-anchor" href="#busybox" aria-label="Permalink to &quot;Busybox&quot;"></a></h2><p>KernelSU 提供了一个功能完备的 BusyBox 二进制文件包括完整的SELinux支持。可执行文件位于 <code>/data/adb/ksu/bin/busybox</code>。 KernelSU 的 BusyBox 支持运行时可切换的 &quot;ASH Standalone Shell Mode&quot;。 这种独立模式意味着在运行 BusyBox 的 ash shell 时,每个命令都会直接使用 BusyBox 中内置的应用程序,而不管 PATH 设置为什么。 例如,<code>ls</code><code>rm</code><code>chmod</code> 等命令将不会使用 PATH 中设置的命令在Android的情况下默认情况下分别为 <code>/system/bin/ls</code><code>/system/bin/rm</code><code>/system/bin/chmod</code>),而是直接调用 BusyBox 内置的应用程序。 这确保了脚本始终在可预测的环境中运行并始终具有完整的命令套件无论它运行在哪个Android版本上。 要强制一个命令不使用BusyBox你必须使用完整路径调用可执行文件。</p><p>在 KernelSU 上下文中运行的每个 shell 脚本都将在 BusyBox 的 ash shell 中以独立模式运行。对于第三方开发者相关的内容,包括所有启动脚本和模块安装脚本。</p><p>对于想要在 KernelSU 之外使用这个“独立模式”功能的用户,有两种启用方法:</p><ol><li>设置环境变量 <code>ASH_STANDALONE</code><code>1</code>。例如:<code>ASH_STANDALONE=1 /data/adb/ksu/bin/busybox sh &lt;script&gt;</code></li><li>使用命令行选项切换:<code>/data/adb/ksu/bin/busybox sh -o standalone &lt;script&gt;</code></li></ol><p>为了确保所有后续的 <code>sh</code> shell 都在独立模式下执行,第一种是首选方法(这也是 KernelSU 和 KernelSU 管理器内部使用的方法),因为环境变量会被继承到子进程中。</p><div class="tip custom-block"><p class="custom-block-title">与 Magisk 的差异</p><p>KernelSU 的 BusyBox 现在是直接使用 Magisk 项目编译的二进制文件,<strong>感谢 Magisk</strong> 因此,你完全不用担心 BusyBox 脚本与在 Magisk 和 KernelSU 之间的兼容问题,因为他们是完全一样的!</p></div><h2 id="kernelsu-modules" tabindex="-1">KernelSU 模块 <a class="header-anchor" href="#kernelsu-modules" aria-label="Permalink to &quot;KernelSU 模块 {#kernelsu-modules}&quot;"></a></h2><p>KernelSU 模块就是一个放置在 <code>/data/adb/modules</code> 内且满足如下结构的文件夹:</p><div class="language-txt"><button title="Copy Code" class="copy"></button><span class="lang">txt</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">/data/adb/modules</span></span>
<span class="line"><span style="color:#A6ACCD;">├── .</span></span>
<span class="line"><span style="color:#A6ACCD;">├── .</span></span>
<span class="line"><span style="color:#A6ACCD;">|</span></span>
<span class="line"><span style="color:#A6ACCD;">├── $MODID &lt;--- 模块的文件夹名称与模块 ID 相同</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ *** 模块配置文件 ***</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── module.prop &lt;--- 此文件保存模块相关的一些配置,如模块 ID、版本等</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ *** 模块内容 ***</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── system &lt;--- 这个文件夹通常会被挂载到系统</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ ├── ...</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ ├── ...</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ └── ...</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ *** 标记文件 ***</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── skip_mount &lt;--- 如果这个文件存在,那么模块的 `/system` 将不会被挂载</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── disable &lt;--- 如果这个文件存在,那么模块会被禁用</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── remove &lt;--- 如果这个文件存在,下次重启的时候模块会被移除</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ *** 可选文件 ***</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── post-fs-data.sh &lt;--- 这个脚本将会在 post-fs-data 模式下运行</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── post-mount.sh &lt;--- 这个脚本将会在 post-mount 模式下运行</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── service.sh &lt;--- 这个脚本将会在 late_start 服务模式下运行</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── boot-completed.sh &lt;--- 这个脚本将会在 Android 系统启动完毕后以服务模式运行</span></span>
<span class="line"><span style="color:#A6ACCD;">| ├── uninstall.sh &lt;--- 这个脚本将会在模块被卸载时运行</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── system.prop &lt;--- 这个文件中指定的属性将会在系统启动时通过 resetprop 更改</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── sepolicy.rule &lt;--- 这个文件中的 SELinux 策略将会在系统启动时加载</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ *** 自动生成的目录,不要手动创建或者修改! ***</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── vendor &lt;--- A symlink to $MODID/system/vendor</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── product &lt;--- A symlink to $MODID/system/product</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── system_ext &lt;--- A symlink to $MODID/system/system_ext</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │ *** Any additional files / folders are allowed ***</span></span>
<span class="line"><span style="color:#A6ACCD;">│ │</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── ...</span></span>
<span class="line"><span style="color:#A6ACCD;">│ └── ...</span></span>
<span class="line"><span style="color:#A6ACCD;">|</span></span>
<span class="line"><span style="color:#A6ACCD;">├── another_module</span></span>
<span class="line"><span style="color:#A6ACCD;">│ ├── .</span></span>
<span class="line"><span style="color:#A6ACCD;">│ └── .</span></span>
<span class="line"><span style="color:#A6ACCD;">├── .</span></span>
<span class="line"><span style="color:#A6ACCD;">├── .</span></span></code></pre></div><div class="tip custom-block"><p class="custom-block-title">与 Magisk 的差异</p><p>KernelSU 没有内置的针对 Zygisk 的支持,因此模块中没有 Zygisk 相关的内容,但你可以通过 <a href="https://github.com/Dr-TSNG/ZygiskNext" target="_blank" rel="noreferrer">ZygiskNext</a> 来支持 Zygisk 模块,此时 Zygisk 模块的内容与 Magisk 所支持的 Zygisk 是完全相同的。</p></div><h3 id="module-prop" tabindex="-1">module.prop <a class="header-anchor" href="#module-prop" aria-label="Permalink to &quot;module.prop&quot;"></a></h3><p>module.prop 是一个模块的配置文件,在 KernelSU 中如果模块中不包含此文件,那么它将不被认为是一个模块;此文件的格式如下:</p><div class="language-txt"><button title="Copy Code" class="copy"></button><span class="lang">txt</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">id=&lt;string&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;">name=&lt;string&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;">version=&lt;string&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;">versionCode=&lt;int&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;">author=&lt;string&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;">description=&lt;string&gt;</span></span></code></pre></div><ul><li>id 必须与这个正则表达式匹配:<code>^[a-zA-Z][a-zA-Z0-9._-]+$</code> 例如:✓ <code>a_module</code>,✓ <code>a.module</code>,✓ <code>module-101</code>,✗ <code>a module</code>,✗ <code>1_module</code>,✗ <code>-a-module</code>。这是您的模块的唯一标识符,发布后不应更改。</li><li>versionCode 必须是一个整数,用于比较版本。</li><li>其他未在上面提到的内容可以是任何单行字符串。</li><li>请确保使用 UNIXLF换行类型而不是WindowsCR + LF或 MacintoshCR</li></ul><h3 id="shell-scripts" tabindex="-1">Shell 脚本 <a class="header-anchor" href="#shell-scripts" aria-label="Permalink to &quot;Shell 脚本 {#shell-scripts}&quot;"></a></h3><p>请阅读 <a href="#boot-scripts">启动脚本</a> 一节,以了解 <code>post-fs-data.sh</code>, <code>post-mount.sh</code>, <code>service.sh</code><code>boot-completed.sh</code> 之间的区别。对于大多数模块开发者来说,如果您只需要运行一个启动脚本,<code>service.sh</code> 应该已经足够了。</p><p>在您的模块的所有脚本中,请使用 <code>MODDIR=${0%/*}</code>来获取您的模块的基本目录路径;请勿在脚本中硬编码您的模块路径。</p><div class="tip custom-block"><p class="custom-block-title">与 Magisk 的差异</p><p>你可以通过环境变量 <code>KSU</code> 来判断脚本是运行在 KernelSU 还是 Magisk 中,如果运行在 KernelSU这个值会被设置为 <code>true</code></p></div><h3 id="system-directories" tabindex="-1"><code>system</code> 目录 <a class="header-anchor" href="#system-directories" aria-label="Permalink to &quot;`system` 目录 {#system-directories}&quot;"></a></h3><p>这个目录的内容会在系统启动后,以 <code>overlayfs</code> 的方式叠加在系统的 <code>/system</code> 分区之上,这意味着:</p><ol><li>系统中对应目录的同名文件会被此目录的文件覆盖。</li><li>系统中对应目录的同名文件夹会与此目录的文件夹合并。</li></ol><p>如果你想删掉系统原来目录某个文件或者文件夹,你需要在模块目录通过 <code>mknod filename c 0 0</code> 来创建一个 <code>filename</code> 的同名文件;这样 overlayfs 系统会自动 whiteout 等效删除此文件(<code>/system</code> 分区并没有被更改)。</p><p>你也可以在 <code>customize.sh</code> 中声明一个名为 <code>REMOVE</code> 并且包含一系列目录的变量来执行删除操作KernelSU 会自动为你在模块对应目录执行 <code>mknod &lt;TARGET&gt; c 0 0</code>。例如:</p><div class="language-sh"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">REMOVE</span><span style="color:#89DDFF;">=</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#C3E88D;">/system/app/YouTube</span></span>
<span class="line"><span style="color:#C3E88D;">/system/app/Bloatware</span></span>
<span class="line"><span style="color:#89DDFF;">&quot;</span></span></code></pre></div><p>上面的这个列表将会执行: <code>mknod $MODPATH/system/app/YouTuBe c 0 0</code><code>mknod $MODPATH/system/app/Bloatware c 0 0</code>;并且 <code>/system/app/YouTube</code><code>/system/app/Bloatware</code> 将会在模块生效后被删除。</p><p>如果你想替换掉系统的某个目录,你需要在模块目录创建一个相同路径的目录,然后为此目录设置此属性:<code>setfattr -n trusted.overlay.opaque -v y &lt;TARGET&gt;</code>;这样 overlayfs 系统会自动将系统内相应目录替换(<code>/system</code> 分区并没有被更改)。</p><p>你可以在 <code>customize.sh</code> 中声明一个名为 <code>REPLACE</code> 并且包含一系列目录的变量来执行替换操作KernelSU 会自动为你在模块对应目录执行相关操作。例如:</p><div class="language-sh"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">REPLACE</span><span style="color:#89DDFF;">=</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#C3E88D;">/system/app/YouTube</span></span>
<span class="line"><span style="color:#C3E88D;">/system/app/Bloatware</span></span>
<span class="line"><span style="color:#89DDFF;">&quot;</span></span></code></pre></div><p>上面这个列表将会:自动创建目录 <code>$MODPATH/system/app/YouTube</code><code>$MODPATH//system/app/Bloatware</code>,然后执行 <code>setfattr -n trusted.overlay.opaque -v y $$MODPATH/system/app/YouTube</code><code>setfattr -n trusted.overlay.opaque -v y $$MODPATH/system/app/Bloatware</code>;并且 <code>/system/app/YouTube</code><code>/system/app/Bloatware</code> 将会在模块生效后替换为空目录。</p><div class="tip custom-block"><p class="custom-block-title">与 Magisk 的差异</p><p>KernelSU 的 systemless 机制是通过内核的 overlayfs 实现的,而 Magisk 当前则是通过 magic mount (bind mount),二者实现方式有着巨大的差异,但最终的目标实际上是一致的:不修改物理的 <code>/system</code> 分区但实现修改 <code>/system</code> 文件。</p></div><p>如果你对 overlayfs 感兴趣,建议阅读 Linux Kernel 关于 <a href="https://docs.kernel.org/filesystems/overlayfs.html" target="_blank" rel="noreferrer">overlayfs 的文档</a></p><h3 id="system-prop" tabindex="-1">system.prop <a class="header-anchor" href="#system-prop" aria-label="Permalink to &quot;system.prop&quot;"></a></h3><p>这个文件的格式与 <code>build.prop</code> 完全相同:每一行都是 <code>[key]=[value]</code> 的形式。</p><h3 id="sepolicy-rule" tabindex="-1">sepolicy.rule <a class="header-anchor" href="#sepolicy-rule" aria-label="Permalink to &quot;sepolicy.rule&quot;"></a></h3><p>如果您的模块需要一些额外的 SELinux 策略补丁,请将这些规则添加到此文件中。这个文件中的每一行都将被视为一个策略语句。</p><h2 id="module-installer" tabindex="-1">模块安装包 <a class="header-anchor" href="#module-installer" aria-label="Permalink to &quot;模块安装包 {#module-installer}&quot;"></a></h2><p>KernelSU 的模块安装包就是一个可以通过 KernelSU 管理器 APP 刷入的 zip 文件,此 zip 文件的格式如下:</p><div class="language-txt"><button title="Copy Code" class="copy"></button><span class="lang">txt</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">module.zip</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span>
<span class="line"><span style="color:#A6ACCD;">├── customize.sh &lt;--- (Optional, more details later)</span></span>
<span class="line"><span style="color:#A6ACCD;">│ This script will be sourced by update-binary</span></span>
<span class="line"><span style="color:#A6ACCD;">├── ...</span></span>
<span class="line"><span style="color:#A6ACCD;">├── ... /* 其他模块文件 */</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>KernelSU 模块不支持在 Recovery 中安装!!</p></div><h3 id="customizing-installation" tabindex="-1">定制安装过程 <a class="header-anchor" href="#customizing-installation" aria-label="Permalink to &quot;定制安装过程 {#customizing-installation}&quot;"></a></h3><p>如果你想控制模块的安装过程,可以在模块的目录下创建一个名为 <code>customize.sh</code> 的文件,这个脚本将会在模块被解压后<strong>导入</strong>到当前 shell 中,如果你的模块需要根据设备的 API 版本或者设备构架做一些额外的操作,那这个脚本将非常有用。</p><p>如果你想完全控制脚本的安装过程,你可以在 <code>customize.sh</code> 中声明 <code>SKIPUNZIP=1</code> 来跳过所有的默认安装步骤;此时,你需要自行处理所有安装过程(如解压模块,设置权限等)</p><p><code>customize.sh</code> 脚本以“独立模式”运行在 KernelSU 的 BusyBox <code>ash</code> shell 中。你可以使用如下变量和函数:</p><h4 id="variables" tabindex="-1">变量 <a class="header-anchor" href="#variables" aria-label="Permalink to &quot;变量 {#variables}&quot;"></a></h4><ul><li><code>KSU</code> (bool): 标记此脚本运行在 KernelSU 环境下,此变量的值将永远为 <code>true</code>,你可以通过它区分 Magisk。</li><li><code>KSU_VER</code> (string): KernelSU 当前的版本名字 (如: <code>v0.4.0</code>)</li><li><code>KSU_VER_CODE</code> (int): KernelSU 用户空间当前的版本号 (如. <code>10672</code>)</li><li><code>KSU_KERNEL_VER_CODE</code> (int): KernelSU 内核空间当前的版本号 (如. <code>10672</code>)</li><li><code>BOOTMODE</code> (bool): 此变量在 KernelSU 中永远为 <code>true</code></li><li><code>MODPATH</code> (path): 当前模块的安装目录</li><li><code>TMPDIR</code> (path): 可以存放临时文件的目录</li><li><code>ZIPFILE</code> (path): 当前模块的安装包文件</li><li><code>ARCH</code> (string): 设备的 CPU 构架,有如下几种: <code>arm</code>, <code>arm64</code>, <code>x86</code>, or <code>x64</code></li><li><code>IS64BIT</code> (bool): 是否是 64 位设备</li><li><code>API</code> (int): 当前设备的 Android API 版本 (如Android 6.0 上为 <code>23</code>)</li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p><code>MAGISK_VER_CODE</code> 在 KernelSU 中永远为 <code>25200</code><code>MAGISK_VER</code> 则为 <code>v25.2</code>,请不要通过这两个变量来判断是否是 KernelSU</p></div><h4 id="functions" tabindex="-1">函数 <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;函数 {#functions}&quot;"></a></h4><div class="language-txt"><button title="Copy Code" class="copy"></button><span class="lang">txt</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">ui_print &lt;msg&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;"> print &lt;msg&gt; to console</span></span>
<span class="line"><span style="color:#A6ACCD;"> Avoid using &#39;echo&#39; as it will not display in custom recovery&#39;s console</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span>
<span class="line"><span style="color:#A6ACCD;">abort &lt;msg&gt;</span></span>
<span class="line"><span style="color:#A6ACCD;"> print error message &lt;msg&gt; to console and terminate the installation</span></span>
<span class="line"><span style="color:#A6ACCD;"> Avoid using &#39;exit&#39; as it will skip the termination cleanup steps</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span>
<span class="line"><span style="color:#A6ACCD;">set_perm &lt;target&gt; &lt;owner&gt; &lt;group&gt; &lt;permission&gt; [context]</span></span>
<span class="line"><span style="color:#A6ACCD;"> if [context] is not set, the default is &quot;u:object_r:system_file:s0&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> this function is a shorthand for the following commands:</span></span>
<span class="line"><span style="color:#A6ACCD;"> chown owner.group target</span></span>
<span class="line"><span style="color:#A6ACCD;"> chmod permission target</span></span>
<span class="line"><span style="color:#A6ACCD;"> chcon context target</span></span>
<span class="line"><span style="color:#A6ACCD;"></span></span>
<span class="line"><span style="color:#A6ACCD;">set_perm_recursive &lt;directory&gt; &lt;owner&gt; &lt;group&gt; &lt;dirpermission&gt; &lt;filepermission&gt; [context]</span></span>
<span class="line"><span style="color:#A6ACCD;"> if [context] is not set, the default is &quot;u:object_r:system_file:s0&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> for all files in &lt;directory&gt;, it will call:</span></span>
<span class="line"><span style="color:#A6ACCD;"> set_perm file owner group filepermission context</span></span>
<span class="line"><span style="color:#A6ACCD;"> for all directories in &lt;directory&gt; (including itself), it will call:</span></span>
<span class="line"><span style="color:#A6ACCD;"> set_perm dir owner group dirpermission context</span></span></code></pre></div><h2 id="boot-scripts" tabindex="-1">启动脚本 <a class="header-anchor" href="#boot-scripts" aria-label="Permalink to &quot;启动脚本 {#boot-scripts}&quot;"></a></h2><p>在 KernelSU 中根据脚本运行模式的不同分为两种post-fs-data 模式和 late_start 服务模式。</p><ul><li><p>post-fs-data 模式</p><ul><li>这个阶段是阻塞的。在执行完成之前或者 10 秒钟之后,启动过程会暂停。</li><li>脚本在任何模块被挂载之前运行。这使得模块开发者可以在模块被挂载之前动态地调整它们的模块。</li><li>这个阶段发生在 Zygote 启动之前。</li><li>使用 setprop 会导致启动过程死锁!请使用 <code>resetprop -n &lt;prop_name&gt; &lt;prop_value&gt;</code> 代替。</li><li><strong>只有在必要时才在此模式下运行脚本</strong></li></ul></li><li><p>late_start 服务模式</p><ul><li>这个阶段是非阻塞的。你的脚本会与其余的启动过程<strong>并行</strong>运行。</li><li><strong>大多数脚本都建议在这种模式下运行</strong></li></ul></li></ul><p>在 KernelSU 中,启动脚本根据存放位置的不同还分为两种:通用脚本和模块脚本。</p><ul><li><p>通用脚本</p><ul><li>放置在 <code>/data/adb/post-fs-data.d</code>, <code>/data/adb/post-mount.d</code>, <code>/data/adb/service.d</code><code>/data/adb/boot-completed.d</code> 中。</li><li>只有在脚本被设置为可执行(<code>chmod +x script.sh</code>)时才会被执行。</li><li><code>post-fs-data.d</code> 中的脚本以 post-fs-data 模式运行,在 <code>service.d</code> 中的脚本以 late_start 服务模式运行。</li><li>模块<strong>不应</strong>在安装过程中添加通用脚本。</li></ul></li><li><p>模块脚本</p><ul><li>放置在模块自己的文件夹中。</li><li>只有当模块被启用时才会执行。</li><li><code>post-fs-data.sh</code> 以 post-fs-data 模式运行,<code>post-mount.sh</code> 以 post-mount 模式运行,而 <code>service.sh</code> 则以 late_start 服务模式运行,<code>boot-completed</code> 在 Android 系统启动完毕后以服务模式运行。</li></ul></li></ul><p>所有启动脚本都将在 KernelSU 的 BusyBox ash shell 中运行,并启用“独立模式”。</p></div></div></main><footer class="VPDocFooter" data-v-c4b0d3cf data-v-face870a><!--[--><!--]--><div class="edit-info" data-v-face870a><div class="edit-link" data-v-face870a><a class="VPLink link edit-link-button" href="https://github.com/tiann/KernelSU/edit/main/website/docs/zh_CN/guide/module.md" target="_blank" rel="noreferrer" data-v-face870a data-v-8f4dc553><!--[--><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="edit-link-icon" aria-label="edit icon" data-v-face870a><path d="M18,23H4c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h7c0.6,0,1,0.4,1,1s-0.4,1-1,1H4C3.4,5,3,5.4,3,6v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1v-7c0-0.6,0.4-1,1-1s1,0.4,1,1v7C21,21.7,19.7,23,18,23z"></path><path d="M8,17c-0.3,0-0.5-0.1-0.7-0.3C7,16.5,6.9,16.1,7,15.8l1-4c0-0.2,0.1-0.3,0.3-0.5l9.5-9.5c1.2-1.2,3.2-1.2,4.4,0c1.2,1.2,1.2,3.2,0,4.4l-9.5,9.5c-0.1,0.1-0.3,0.2-0.5,0.3l-4,1C8.2,17,8.1,17,8,17zM9.9,12.5l-0.5,2.1l2.1-0.5l9.3-9.3c0.4-0.4,0.4-1.1,0-1.6c-0.4-0.4-1.2-0.4-1.6,0l0,0L9.9,12.5z M18.5,2.5L18.5,2.5L18.5,2.5z"></path></svg> 在 GitHub 中编辑本页<!--]--><!----></a></div><!----></div><div class="prev-next" data-v-face870a><div class="pager" data-v-face870a><a class="pager-link prev" href="/zh_CN/guide/unofficially-support-devices.html" data-v-face870a><span class="desc" data-v-face870a>Previous page</span><span class="title" data-v-face870a>非官方支持设备</span></a></div><div class="has-prev pager" data-v-face870a><a class="pager-link next" href="/zh_CN/guide/app-profile.html" data-v-face870a><span class="desc" data-v-face870a>Next page</span><span class="title" data-v-face870a>App Profile</span></a></div></div></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-b2cf3e0b data-v-2f86ebd2><div class="container" data-v-2f86ebd2><p class="message" data-v-2f86ebd2>在 GPL3 许可证下发布。</p><p class="copyright" data-v-2f86ebd2>Copyright © 2022-现在 KernelSU 开发者</p></div></footer><!--[--><!--]--></div></div>
<script>__VP_HASH_MAP__ = JSON.parse("{\"guide_difference-with-magisk.md\":\"88801b6b\",\"guide_what-is-kernelsu.md\":\"340bbd63\",\"id_id_index.md\":\"9ad2e601\",\"ja_jp_index.md\":\"be3c7573\",\"index.md\":\"042b4c20\",\"pt_br_guide_app-profile.md\":\"7a2ced3a\",\"id_id_guide_installation.md\":\"a7bb551d\",\"id_id_guide_how-to-integrate-for-non-gki.md\":\"16b9216a\",\"ja_jp_guide_faq.md\":\"998d2dfd\",\"pt_br_guide_difference-with-magisk.md\":\"319599e7\",\"id_id_guide_how-to-build.md\":\"1ecedb69\",\"id_id_guide_rescue-from-bootloop.md\":\"ec3ef7ee\",\"vi_vn_guide_app-profile.md\":\"37d09526\",\"pt_br_guide_what-is-kernelsu.md\":\"b42bbc04\",\"vi_vn_guide_rescue-from-bootloop.md\":\"d796809c\",\"vi_vn_guide_difference-with-magisk.md\":\"efd07233\",\"pt_br_guide_how-to-integrate-for-non-gki.md\":\"9373963e\",\"pt_br_guide_installation.md\":\"8193d15a\",\"pt_br_guide_how-to-build.md\":\"50a0b380\",\"ru_ru_guide_app-profile.md\":\"8936210e\",\"vi_vn_guide_faq.md\":\"e9230071\",\"vi_vn_guide_hidden-features.md\":\"fca4632f\",\"pt_br_guide_rescue-from-bootloop.md\":\"f4a13bcd\",\"vi_vn_guide_how-to-build.md\":\"f5e5323c\",\"guide_how-to-build.md\":\"cf9f2c40\",\"guide_installation.md\":\"ec5f3b13\",\"zh_tw_guide_rescue-from-bootloop.md\":\"db20cf2e\",\"guide_faq.md\":\"234d8c0d\",\"ru_ru_guide_how-to-build.md\":\"1b3dd3fb\",\"id_id_guide_unofficially-support-devices.md\":\"3238b4be\",\"zh_cn_index.md\":\"7dc4034d\",\"zh_cn_guide_what-is-kernelsu.md\":\"cdc98b69\",\"id_id_guide_faq.md\":\"8fe1170a\",\"ja_jp_guide_unofficially-support-devices.md\":\"ca3f04b0\",\"id_id_guide_what-is-kernelsu.md\":\"aee47f37\",\"zh_cn_guide_module.md\":\"88839cd5\",\"zh_tw_guide_module.md\":\"76671e26\",\"zh_cn_guide_installation.md\":\"612797b7\",\"zh_cn_guide_hidden-features.md\":\"cdd5624f\",\"id_id_guide_module.md\":\"a65f7310\",\"ru_ru_guide_installation.md\":\"bd641868\",\"ru_ru_guide_difference-with-magisk.md\":\"d55db77b\",\"vi_vn_guide_module.md\":\"907befd3\",\"ru_ru_guide_rescue-from-bootloop.md\":\"d9d6936e\",\"vi_vn_index.md\":\"a84edf49\",\"zh_cn_guide_difference-with-magisk.md\":\"223f61d1\",\"vi_vn_guide_what-is-kernelsu.md\":\"bea8d4b7\",\"pt_br_guide_hidden-features.md\":\"df3f1d4b\",\"zh_tw_guide_how-to-build.md\":\"ef330d07\",\"zh_tw_guide_difference-with-magisk.md\":\"161de8ef\",\"zh_cn_guide_rescue-from-bootloop.md\":\"3d907e03\",\"ja_jp_guide_what-is-kernelsu.md\":\"779775a2\",\"ru_ru_guide_unofficially-support-devices.md\":\"fdcfea2d\",\"guide_hidden-features.md\":\"45e791e6\",\"ru_ru_guide_hidden-features.md\":\"395803e0\",\"guide_how-to-integrate-for-non-gki.md\":\"35d629c6\",\"guide_rescue-from-bootloop.md\":\"86b40f3b\",\"guide_unofficially-support-devices.md\":\"d9173329\",\"ja_jp_guide_installation.md\":\"2cc6f4de\",\"ja_jp_guide_hidden-features.md\":\"9c5dddb2\",\"ja_jp_guide_module.md\":\"8abad8eb\",\"zh_cn_guide_how-to-integrate-for-non-gki.md\":\"891eeb81\",\"zh_cn_guide_unofficially-support-devices.md\":\"e2fd6c11\",\"zh_tw_guide_unofficially-support-devices.md\":\"e385e7b5\",\"ru_ru_guide_faq.md\":\"e0aa7004\",\"zh_tw_guide_what-is-kernelsu.md\":\"a2ba0439\",\"id_id_guide_difference-with-magisk.md\":\"abc25e03\",\"ja_jp_guide_rescue-from-bootloop.md\":\"d26f95c4\",\"zh_cn_guide_app-profile.md\":\"557e9b58\",\"guide_app-profile.md\":\"9faae288\",\"guide_module.md\":\"1b64f354\",\"pt_br_guide_unofficially-support-devices.md\":\"007edca2\",\"zh_tw_index.md\":\"896578f0\",\"zh_tw_guide_hidden-features.md\":\"f0bea9ae\",\"pt_br_guide_module.md\":\"039201f7\",\"zh_tw_guide_how-to-integrate-for-non-gki.md\":\"e3487c4d\",\"ru_ru_index.md\":\"4f8b1975\",\"zh_cn_guide_faq.md\":\"30eb8f8e\",\"vi_vn_guide_unofficially-support-devices.md\":\"b3af952a\",\"zh_tw_guide_installation.md\":\"0f23d3bf\",\"pt_br_guide_faq.md\":\"e1ef8622\",\"vi_vn_guide_installation.md\":\"7fef5e5e\",\"pt_br_index.md\":\"a1524471\",\"zh_tw_guide_faq.md\":\"bea0a7af\",\"ru_ru_guide_how-to-integrate-for-non-gki.md\":\"7c70c478\",\"ja_jp_guide_difference-with-magisk.md\":\"34107b11\",\"zh_cn_guide_how-to-build.md\":\"f4f2a6dd\",\"vi_vn_guide_how-to-integrate-for-non-gki.md\":\"9b3f1403\",\"ru_ru_guide_module.md\":\"2cf2aec7\",\"ru_ru_guide_what-is-kernelsu.md\":\"b17b08a8\"}")
__VP_SITE_DATA__ = JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"KernelSU\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{},\"locales\":{\"root\":{\"label\":\"English\",\"lang\":\"en-US\",\"themeConfig\":{\"nav\":[{\"text\":\"Guide\",\"link\":\"/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"last Updated\",\"sidebar\":{\"/guide/\":[{\"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\":\"Intergrate for non-GKI devices\",\"link\":\"/guide/how-to-integrate-for-non-gki\"},{\"text\":\"Unofficially supported devices\",\"link\":\"/guide/unofficially-support-devices.md\"},{\"text\":\"Module Guide\",\"link\":\"/guide/module.md\"},{\"text\":\"App Profile\",\"link\":\"/guide/app-profile.md\"},{\"text\":\"Rescue from bootloop\",\"link\":\"/guide/rescue-from-bootloop.md\"},{\"text\":\"FAQ\",\"link\":\"/guide/faq\"},{\"text\":\"Hidden features\",\"link\":\"/guide/hidden-features\"}]}]},\"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\"}},\"description\":\"A kernel-based root solution for Android GKI devices.\"},\"zh_CN\":{\"label\":\"简体中文\",\"lang\":\"zh-CN\",\"themeConfig\":{\"nav\":[{\"text\":\"指南\",\"link\":\"/zh_CN/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"最后更新\",\"sidebar\":{\"/zh_CN/guide/\":[{\"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\":\"如何为非GKI设备集成 KernelSU\",\"link\":\"/zh_CN/guide/how-to-integrate-for-non-gki\"},{\"text\":\"非官方支持设备\",\"link\":\"/zh_CN/guide/unofficially-support-devices.md\"},{\"text\":\"模块开发指南\",\"link\":\"/zh_CN/guide/module.md\"},{\"text\":\"App Profile\",\"link\":\"/zh_CN/guide/app-profile.md\"},{\"text\":\"救砖\",\"link\":\"/zh_CN/guide/rescue-from-bootloop.md\"},{\"text\":\"常见问题\",\"link\":\"/zh_CN/guide/faq\"},{\"text\":\"隐藏功能\",\"link\":\"/zh_CN/guide/hidden-features\"}]}]},\"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 中编辑本页\"}},\"description\":\"一个基于内核,为安卓 GKI 准备的 root 方案。\"},\"zh_TW\":{\"label\":\"繁體中文\",\"lang\":\"zh-TW\",\"themeConfig\":{\"nav\":[{\"text\":\"指南\",\"link\":\"/zh_TW/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"上次更新\",\"sidebar\":{\"/zh_TW/guide/\":[{\"text\":\"Guide\",\"items\":[{\"text\":\"什麼是 KernelSU\",\"link\":\"/zh_TW/guide/what-is-kernelsu\"},{\"text\":\"安裝\",\"link\":\"/zh_TW/guide/installation\"},{\"text\":\"如何建置?\",\"link\":\"/zh_TW/guide/how-to-build\"},{\"text\":\"如何為非 GKI 核心整合 KernelSU\",\"link\":\"/zh_TW/guide/how-to-integrate-for-non-gki\"},{\"text\":\"非官方支援裝置\",\"link\":\"/zh_TW/guide/unofficially-support-devices.md\"},{\"text\":\"模組指南\",\"link\":\"/zh_TW/guide/module.md\"},{\"text\":\"搶救開機迴圈\",\"link\":\"/zh_TW/guide/rescue-from-bootloop.md\"},{\"text\":\"常見問題\",\"link\":\"/zh_TW/guide/faq\"},{\"text\":\"隱藏功能\",\"link\":\"/zh_TW/guide/hidden-features\"}]}]},\"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 中編輯本頁面\"}},\"description\":\"一個以核心為基礎,適用於 Android GKI 的 Root 解決方案。\"},\"ja_JP\":{\"label\":\"日本語\",\"lang\":\"ja-JP\",\"themeConfig\":{\"nav\":[{\"text\":\"ガイド\",\"link\":\"/ja_JP/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"最終更新\",\"sidebar\":{\"/ja_JP/guide/\":[{\"text\":\"ガイド\",\"items\":[{\"text\":\"KernelSU とは?\",\"link\":\"/ja_JP/guide/what-is-kernelsu\"},{\"text\":\"インストール\",\"link\":\"/ja_JP/guide/installation\"},{\"text\":\"ビルドするには?\",\"link\":\"/guide/how-to-build\"},{\"text\":\"非 GKI デバイスでの実装\",\"link\":\"/guide/how-to-integrate-for-non-gki\"},{\"text\":\"非公式の対応デバイス\",\"link\":\"/ja_JP/guide/unofficially-support-devices.md\"},{\"text\":\"モジュールのガイド\",\"link\":\"/ja_JP/guide/module.md\"},{\"text\":\"ブートループからの復旧\",\"link\":\"/ja_JP/guide/rescue-from-bootloop.md\"},{\"text\":\"よくある質問\",\"link\":\"/ja_JP/guide/faq\"},{\"text\":\"隠し機能\",\"link\":\"/ja_JP/guide/hidden-features\"}]}]},\"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 でこのページを編集\"}},\"description\":\"Android GKI デバイス向けのカーネルベースの root ソリューション\"},\"vi_VN\":{\"label\":\"Tiếng Việt\",\"lang\":\"vi-VN\",\"themeConfig\":{\"nav\":[{\"text\":\"Hướng Dẫn\",\"link\":\"/vi_VN/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"cập nhật lần cuối\",\"sidebar\":{\"/vi_VN/guide/\":[{\"text\":\"Hướng Dẫn\",\"items\":[{\"text\":\"KernelSU là gì?\",\"link\":\"/vi_VN/guide/what-is-kernelsu\"},{\"text\":\"Cách cài đặt\",\"link\":\"/vi_VN/guide/installation\"},{\"text\":\"Cách để build?\",\"link\":\"/vi_VN/guide/how-to-build\"},{\"text\":\"Tích hợp vào thiết bị không sử dụng GKI\",\"link\":\"/vi_VN/guide/how-to-integrate-for-non-gki\"},{\"text\":\"Thiết bị hỗ trợ không chính thức\",\"link\":\"/vi_VN/guide/unofficially-support-devices.md\"},{\"text\":\"FAQ - Câu hỏi thường gặp\",\"link\":\"/vi_VN/guide/faq\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"footer\":{\"message\":\"Phát hành dưới giấy phép GPL3.\",\"copyright\":\"Bản Quyền © 2022-nay KernelSU Developers\"},\"editLink\":{\"pattern\":\"https://github.com/tiann/KernelSU/edit/main/website/docs/:path\",\"text\":\"Chỉnh sửa trang này trên GitHub\"}},\"description\":\"Một giải pháp root trực tiếp trên kernel dành cho các thiết bị hỗ trợ GKI.\"},\"id_ID\":{\"label\":\"Bahasa\",\"lang\":\"id-ID\",\"themeConfig\":{\"nav\":[{\"text\":\"Petunjuk\",\"link\":\"/id_ID/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"Update Terakhir\",\"sidebar\":{\"/id_ID/guide/\":[{\"text\":\"Petunjuk\",\"items\":[{\"text\":\"Apa itu KernelSU?\",\"link\":\"/id_ID/guide/what-is-kernelsu\"},{\"text\":\"Instalasi\",\"link\":\"/id_ID/guide/installation\"},{\"text\":\"Bagaimana cara buildnya?\",\"link\":\"/id_ID/guide/how-to-build\"},{\"text\":\"Integrasi untuk perangkat non-GKI\",\"link\":\"/id_ID/guide/how-to-integrate-for-non-gki\"},{\"text\":\"Perangkat yang didukung secara tidak resmi\",\"link\":\"/id_ID/guide/unofficially-support-devices.md\"},{\"text\":\"Petunjuk module\",\"link\":\"/id_ID/guide/module.md\"},{\"text\":\"Antisipasi dari bootloop\",\"link\":\"/id_ID/guide/rescue-from-bootloop.md\"},{\"text\":\"FAQ\",\"link\":\"/id_ID/guide/faq\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"footer\":{\"message\":\"Rilis Dibawah Lisensi GPL3.\",\"copyright\":\"Copyright © 2022-Sekarang pengembang KernelSU \"},\"editLink\":{\"pattern\":\"https://github.com/tiann/KernelSU/edit/main/website/docs/:path\",\"text\":\"Edit Halaman ini di GitHub\"}},\"description\":\"Solusi root kernel-based untuk perangkat Android GKI.\"},\"ru_RU\":{\"label\":\"Русский\",\"lang\":\"ru-RU\",\"themeConfig\":{\"nav\":[{\"text\":\"Руководство\",\"link\":\"/ru_RU/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"последнее обновление\",\"sidebar\":{\"/ru_RU/guide/\":[{\"text\":\"Руководство\",\"items\":[{\"text\":\"Что такое KernelSU?\",\"link\":\"/ru_RU/guide/what-is-kernelsu\"},{\"text\":\"Установка\",\"link\":\"/ru_RU/guide/installation\"},{\"text\":\"Как собрать?\",\"link\":\"/ru_RU/guide/how-to-build\"},{\"text\":\"Реализация в устройствах, не относящихся к GKI\",\"link\":\"/ru_RU/guide/how-to-integrate-for-non-gki\"},{\"text\":\"Неофициально поддерживаемые устройства\",\"link\":\"/ru_RU/guide/unofficially-support-devices.md\"},{\"text\":\"Руководство по разработке модулей\",\"link\":\"/ru_RU/guide/module.md\"},{\"text\":\"Профиль приложений\",\"link\":\"/ru_RU/guide/app-profile.md\"},{\"text\":\"Выход из циклической загрузки\",\"link\":\"/ru_RU/guide/rescue-from-bootloop.md\"},{\"text\":\"FAQ\",\"link\":\"/ru_RU/guide/faq\"},{\"text\":\"Скрытые возможности\",\"link\":\"/ru_RU/guide/hidden-features\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"footer\":{\"message\":\"Выпускается под лицензией GPL3.\",\"copyright\":\"Авторские права © 2022-текущее Разработчики KernelSU\"},\"editLink\":{\"pattern\":\"https://github.com/tiann/KernelSU/edit/main/website/docs/:path\",\"text\":\"Редактировать эту страницу на GitHub\"}},\"description\":\"Решение на основе ядра root для устройств Android GKI.\"},\"pt_BR\":{\"label\":\"Português (Brasil)\",\"lang\":\"pt-BR\",\"themeConfig\":{\"nav\":[{\"text\":\"Guia\",\"link\":\"/pt_BR/guide/what-is-kernelsu\"},{\"text\":\"Github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"lastUpdatedText\":\"Última atualização\",\"sidebar\":{\"/pt_BR/guide/\":[{\"text\":\"Guia\",\"items\":[{\"text\":\"O que é KernelSU?\",\"link\":\"/pt_BR/guide/what-is-kernelsu\"},{\"text\":\"Instalação\",\"link\":\"/pt_BR/guide/installation\"},{\"text\":\"Como construir?\",\"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\":\"Perfil do Aplicativo\",\"link\":\"/pt_BR/guide/app-profile.md\"},{\"text\":\"Resgate do bootloop\",\"link\":\"/pt_BR/guide/rescue-from-bootloop.md\"},{\"text\":\"FAQ\",\"link\":\"/pt_BR/guide/faq\"},{\"text\":\"Recursos ocultos\",\"link\":\"/pt_BR/guide/hidden-features\"}]}]},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/tiann/KernelSU\"}],\"footer\":{\"message\":\"Lançado sob a Licença GPL3.\",\"copyright\":\"Copyright © Desenvolvedores KernelSU atuais de 2022\"},\"editLink\":{\"pattern\":\"https://github.com/tiann/KernelSU/edit/main/website/docs/:path\",\"text\":\"Edite esta página no GitHub\"}},\"description\":\"Uma solução root baseada em kernel para dispositivos Android GKI.\"}},\"scrollOffset\":90,\"cleanUrls\":false}")</script>
</body>
</html>