Compare commits

..

494 Commits

Author SHA1 Message Date
dependabot[bot]
59ba84eb2b build(deps): bump the npm group in /website with 6 updates (#1907) 2024-07-24 20:15:57 +08:00
dependabot[bot]
543da3589a build(deps): bump the crates group in /userspace/ksud with 7 updates (#1908) 2024-07-24 20:15:35 +08:00
dependabot[bot]
566c7bcb38 build(deps): bump the npm group in /website with 3 updates (#1905) 2024-07-24 14:16:01 +08:00
dependabot[bot]
226025e55b build(deps): bump the npm group in /website with 3 updates (#1903) 2024-07-22 20:47:12 +08:00
dependabot[bot]
084182d7fb build(deps): bump syn from 2.0.71 to 2.0.72 in /userspace/ksud in the crates group (#1902) 2024-07-22 20:46:45 +08:00
LoveSy
62297a74a6 Upgrade rustix (#1900) 2024-07-22 07:43:59 +08:00
dependabot[bot]
54322c0208 build(deps): bump the npm group in /website with 2 updates (#1899) 2024-07-21 22:48:19 +08:00
dependabot[bot]
109e92293c build(deps): bump the crates group in /userspace/ksud with 3 updates (#1898) 2024-07-21 22:47:47 +08:00
dependabot[bot]
88ea96d4cb build(deps): bump the npm group in /website with 13 updates (#1893) 2024-07-19 23:55:03 +08:00
dependabot[bot]
35f97d85ad build(deps): bump the crates group in /userspace/ksud with 40 updates (#1894) 2024-07-19 23:54:31 +08:00
LoveSy
d7364cfc8e [skip ci] Group dependabot dependencies (#1892) 2024-07-19 23:46:53 +08:00
LoveSy
35d025cc18 Upgrade zip (#1891) 2024-07-19 22:50:50 +08:00
dependabot[bot]
685ae46bc0 build(deps): bump io.coil-kt:coil-compose from 2.6.0 to 2.7.0 in /manager (#1888) 2024-07-18 22:17:04 +08:00
dependabot[bot]
c01b4629b1 build(deps): bump org.lsposed.libcxx:libcxx from 27.0.11718014-beta1 to 27.0.12077973 in /manager (#1885) 2024-07-17 23:32:44 +08:00
LoveSy
ea112fc0dc Upgrade deps (#1886) 2024-07-17 23:32:10 +08:00
dependabot[bot]
eab91d9d2b build(deps-dev): bump vitepress from 1.3.0 to 1.3.1 in /website (#1879) 2024-07-17 23:20:13 +08:00
dependabot[bot]
9d22dde6d7 build(deps): bump com.google.devtools.ksp from 2.0.0-1.0.22 to 2.0.0-1.0.23 in /manager (#1872) 2024-07-15 01:07:22 +08:00
dependabot[bot]
6765c1d62c build(deps): bump agp from 8.5.0 to 8.5.1 in /manager (#1873) 2024-07-15 01:06:47 +08:00
Wang Han
4a1ebe490e Allow skipping commented policy (#1870) 2024-07-10 11:38:12 +08:00
dependabot[bot]
b056eacc5e build(deps): bump rust-embed from 8.4.0 to 8.5.0 in /userspace/ksud (#1869) 2024-07-09 22:09:34 +08:00
dependabot[bot]
ad2d51ad5f build(deps): bump clap from 4.5.8 to 4.5.9 in /userspace/ksud (#1868) 2024-07-09 22:08:14 +08:00
LoveSy
34faba11a3 Setup Android SDK (#1867) 2024-07-08 23:48:34 +08:00
LoveSy
0106628da1 Upgrade gradle (#1866) 2024-07-08 22:49:18 +08:00
dependabot[bot]
25a21f4b5f build(deps-dev): bump vitepress from 1.2.3 to 1.3.0 in /website (#1865) 2024-07-08 21:10:42 +08:00
LoveSy
bd24044ec3 Revert "ksud: [Fix] grant root to the shell in debug mode" (#1860)
Reverts tiann/KernelSU#1853
2024-07-06 19:36:37 +08:00
LoveSy
f80a946b0d ksud: upgrade zip (#1859) 2024-07-06 14:34:25 +08:00
RobinChen
56c3954524 ksud: [Fix] grant root to the shell in debug mode (#1853)
Failed to check app_profile version
2024-07-06 13:37:00 +08:00
dependabot[bot]
17c720867d build(deps): bump lifecycle from 2.8.1 to 2.8.3 in /manager (#1851) 2024-07-06 13:33:45 +08:00
dependabot[bot]
16d5742b12 build(deps): bump clap from 4.5.7 to 4.5.8 in /userspace/ksud (#1850) 2024-07-06 13:32:48 +08:00
igor
3dc6e65586 website: fix typo (#1834) 2024-06-29 10:55:55 +08:00
dependabot[bot]
a89a334cca build(deps): bump android_logger from 0.13.3 to 0.14.1 in /userspace/ksud (#1830)
Bumps [android_logger](https://github.com/rust-mobile/android_logger-rs)
from 0.13.3 to 0.14.1.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/rust-mobile/android_logger-rs/commits/0.14.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=android_logger&package-manager=cargo&previous-version=0.13.3&new-version=0.14.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-29 10:55:37 +08:00
dependabot[bot]
5e4c9a60d1 build(deps): bump log from 0.4.21 to 0.4.22 in /userspace/ksud (#1843)
Bumps [log](https://github.com/rust-lang/log) from 0.4.21 to 0.4.22.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/log/blob/master/CHANGELOG.md">log's
changelog</a>.</em></p>
<blockquote>
<h2>[0.4.22] - 2024-06-27</h2>
<h2>What's Changed</h2>
<ul>
<li>Add some clarifications to the library docs by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/620">rust-lang/log#620</a></li>
<li>Add links to <code>colog</code> crate by <a
href="https://github.com/chrivers"><code>@​chrivers</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/621">rust-lang/log#621</a></li>
<li>adding line_number test + updating some testing infrastructure by <a
href="https://github.com/DIvkov575"><code>@​DIvkov575</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/619">rust-lang/log#619</a></li>
<li>Clarify the actual set of functions that can race in _racy variants
by <a href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/623">rust-lang/log#623</a></li>
<li>Replace deprecated std::sync::atomic::spin_loop_hint() by <a
href="https://github.com/Catamantaloedis"><code>@​Catamantaloedis</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/625">rust-lang/log#625</a></li>
<li>Check usage of max_level features by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/627">rust-lang/log#627</a></li>
<li>Remove unneeded import by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/628">rust-lang/log#628</a></li>
<li>Loosen orderings for logger initialization in <a
href="https://redirect.github.com/rust-lang/log/pull/632">rust-lang/log#632</a>.
Originally by <a
href="https://github.com/pwoolcoc"><code>@​pwoolcoc</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/599">rust-lang/log#599</a></li>
<li>Use Location::caller() for file and line info in <a
href="https://redirect.github.com/rust-lang/log/pull/633">rust-lang/log#633</a>.
Originally by <a
href="https://github.com/Cassy343"><code>@​Cassy343</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/520">rust-lang/log#520</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/chrivers"><code>@​chrivers</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/621">rust-lang/log#621</a></li>
<li><a href="https://github.com/DIvkov575"><code>@​DIvkov575</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/619">rust-lang/log#619</a></li>
<li><a
href="https://github.com/Catamantaloedis"><code>@​Catamantaloedis</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/625">rust-lang/log#625</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rust-lang/log/compare/0.4.21...0.4.22">https://github.com/rust-lang/log/compare/0.4.21...0.4.22</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d5ba2cfee9"><code>d5ba2cf</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/634">#634</a>
from rust-lang/cargo/0.4.22</li>
<li><a
href="d1a8306aad"><code>d1a8306</code></a>
prepare for 0.4.22 release</li>
<li><a
href="46894ef229"><code>46894ef</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/633">#633</a>
from rust-lang/feat/panic-info</li>
<li><a
href="e0d389c9ca"><code>e0d389c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/632">#632</a>
from rust-lang/feat/loosen-atomics</li>
<li><a
href="c9e5e13e9b"><code>c9e5e13</code></a>
use Location::caller() for file and line info</li>
<li><a
href="507b672660"><code>507b672</code></a>
loosen orderings for logger initialization</li>
<li><a
href="c879b011a8"><code>c879b01</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/628">#628</a>
from Thomasdezeeuw/fix-warnings</li>
<li><a
href="405fdb4d9f"><code>405fdb4</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/627">#627</a>
from Thomasdezeeuw/check-features</li>
<li><a
href="1307ade112"><code>1307ade</code></a>
Remove unneeded import</li>
<li><a
href="710560ecb7"><code>710560e</code></a>
Don't use --all-features in CI</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/log/compare/0.4.21...0.4.22">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=log&package-manager=cargo&previous-version=0.4.21&new-version=0.4.22)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-29 10:54:57 +08:00
Wang Han
ce776bc5e4 Update resetprop (#1842)
Sync with A15 branch to add property override support.
2024-06-29 10:54:32 +08:00
5ec1cff
f52beb9f75 throne_tracker: skip iterate if failed to open dir (#1832)
fix https://github.com/tiann/KernelSU/issues/1800
2024-06-19 09:19:04 +08:00
Weblate (bot)
f8fb134708 Translations update from Hosted Weblate (#1734)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Pierre GRASSER <pierre.grasser@proton.me>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: WikiBayer <Software@florian-rossmann.de>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-06-17 13:43:13 +08:00
dependabot[bot]
8a3414ca03 build(deps): bump com.google.devtools.ksp from 2.0.0-1.0.21 to 2.0.0-1.0.22 in /manager (#1811)
Bumps [com.google.devtools.ksp](https://github.com/google/ksp) from
2.0.0-1.0.21 to 2.0.0-1.0.22.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/ksp/releases">com.google.devtools.ksp's
releases</a>.</em></p>
<blockquote>
<h2>2.0.0-1.0.22</h2>
<h2>Important Changes</h2>
<ul>
<li><code>KSErrorType.toString()</code> now contains the reference name
it was tried to be resolved, and therefore <code>KSErrorType</code> is
no longer a singleton. Processors relying on equality checks of that (in
contrast of using <code>KSType.isError</code>) will need to be updated
accordingly.</li>
</ul>
<h2>Issues Fixed</h2>
<p><a
href="https://redirect.github.com/google/ksp/issues/1908">#1908</a>
KSP2: Calling KSP2 in programs does not appear to work on macOS or
Windows
<a href="https://redirect.github.com/google/ksp/issues/1917">#1917</a>
KSP2's symbol-processing-aa-embeddable artifact exposes an unresolvable
pre-release kotlin 2.0.20 dependency
<a href="https://redirect.github.com/google/ksp/issues/1911">#1911</a>
NoSuchMethodError when running KSP2 with Dagger (KSP 2.0.0-1.0.21)
<a href="https://redirect.github.com/google/ksp/issues/1909">#1909</a>
KSP2: default annotation arguments no longer work in 1.0.21
<a href="https://redirect.github.com/google/ksp/issues/1232">#1232</a>
Expose simple names on a missing types's synthetic declaration
<a href="https://redirect.github.com/google/ksp/issues/1857">#1857</a>
[KSP2] Modifiers are missing for property accessors
<a href="https://redirect.github.com/google/ksp/issues/1924">#1924</a>
[KSP2] Type arg becomes '*' after calling KSType.replace() with an error
type
<a href="https://redirect.github.com/google/ksp/issues/1948">#1948</a>
KSP2 default annotation KClass values for built-in types use java.lang.*
versions</p>
<h2>What's Changed</h2>
<ul>
<li>Include type hint into KSErrorType. by <a
href="https://github.com/Jeffset"><code>@​Jeffset</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1848">google/ksp#1848</a></li>
<li>Implement Resolver.getModuleName API by <a
href="https://github.com/ZacSweers"><code>@​ZacSweers</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1847">google/ksp#1847</a></li>
<li>Patch AA service files in renamed uber jar by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1867">google/ksp#1867</a></li>
<li>fix annotation default value parsing for arrays and class literals.
by <a href="https://github.com/neetopia"><code>@​neetopia</code></a> in
<a
href="https://redirect.github.com/google/ksp/pull/1871">google/ksp#1871</a></li>
<li>fix package name for library based symbols by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1873">google/ksp#1873</a></li>
<li>Do not index classpath in declaration provider by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1870">google/ksp#1870</a></li>
<li>check functional interface for modifiers by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1872">google/ksp#1872</a></li>
<li>Annotation default java by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1879">google/ksp#1879</a></li>
<li>fix type parameter bounds by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1880">google/ksp#1880</a></li>
<li>Add command line parser and entry points by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1885">google/ksp#1885</a></li>
<li>KSP2: Fix support of wasm by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1888">google/ksp#1888</a></li>
<li>Return KSClassDeclarationEnumEntryImpl for enum entry annotation
values. by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1881">google/ksp#1881</a></li>
<li>Reuse Kotlin indexes in incremental providers by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1891">google/ksp#1891</a></li>
<li>special handling for java property accessors override checking by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1894">google/ksp#1894</a></li>
<li>KSP2: Reuse Java indexes by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1895">google/ksp#1895</a></li>
<li>Incremental: fix roots from getSealedSubclasses by <a
href="https://github.com/ting-yuan"><code>@​ting-yuan</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1893">google/ksp#1893</a></li>
<li>use safe cast for annotation type to declaration resolution by <a
href="https://github.com/neetopia"><code>@​neetopia</code></a> in <a
href="https://redirect.github.com/google/ksp/pull/1902">google/ksp#1902</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/google/ksp/compare/2.0.0-1.0.21...2.0.0-1.0.22">https://github.com/google/ksp/compare/2.0.0-1.0.21...2.0.0-1.0.22</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1ac3fd8f89"><code>1ac3fd8</code></a>
CI: auto-merge: rebase again before push</li>
<li><a
href="414d37a673"><code>414d37a</code></a>
CI: enable manual trigger</li>
<li><a
href="eaf9f7a74e"><code>eaf9f7a</code></a>
map java types to kotlin types when parsing annotation class reference
values</li>
<li><a
href="893a784a99"><code>893a784</code></a>
Update ksp2entrypoints.md</li>
<li><a
href="0c639834ce"><code>0c63983</code></a>
Update ksp2entrypoints.md</li>
<li><a
href="f08bc85a02"><code>f08bc85</code></a>
DeclarationProvider: skip builtins when possible.</li>
<li><a
href="76bf45dace"><code>76bf45d</code></a>
Make originalAnnotations lazy</li>
<li><a
href="e34a635819"><code>e34a635</code></a>
fix property accessor modifier logic</li>
<li><a
href="82871d85eb"><code>82871d8</code></a>
Provide more hints for error types.</li>
<li><a
href="c77e1702f7"><code>c77e170</code></a>
<a href="https://redirect.github.com/google/ksp/issues/1232">#1232</a>:
Include type hint into KSErrorType.</li>
<li>Additional commits viewable in <a
href="https://github.com/google/ksp/compare/2.0.0-1.0.21...2.0.0-1.0.22">compare
view</a></li>
</ul>
</details>
<br />

<details>
<summary>Most Recent Ignore Conditions Applied to This Pull
Request</summary>

| Dependency Name | Ignore Conditions |
| --- | --- |
| com.google.devtools.ksp | [< 1.10, > 1.9.23-1.0.20] |
</details>


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.devtools.ksp&package-manager=gradle&previous-version=2.0.0-1.0.21&new-version=2.0.0-1.0.22)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 10:36:30 +08:00
igor
197d168e4d manager: improve grammar in english (#1814)
Improved the grammar and fixed some typos. Feel free to let me know if
there are any mistakes.

A question. Why is the Profile App not translatable? Would it be
possible to make it translatable?
2024-06-17 10:36:15 +08:00
dabao1955
3695435c3f Redirect the Feature Requests issue template tab (#1788)
ref: #1705
2024-06-16 22:07:58 +08:00
dabao1955
0fa203d021 website: fix typo (#1807) 2024-06-16 22:06:15 +08:00
dependabot[bot]
e7a04d0e7c build(deps): bump zip from 2.1.2 to 2.1.3 in /userspace/ksud (#1810)
Bumps [zip](https://github.com/zip-rs/zip2) from 2.1.2 to 2.1.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.3</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Some date/time filters were previously unreliable (i.e. later-pass
filters had no earliest-pass or latest-fail, and vice-versa)</li>
<li>Decode Zip-Info UTF8 name and comment fields (<a
href="https://redirect.github.com/zip-rs/zip2/pull/159">#159</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Return extended timestamp fields copied rather than borrowed (<a
href="https://redirect.github.com/zip-rs/zip2/pull/183">#183</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Fix a new Clippy warning</li>
<li>Fix a bug and inline <code>deserialize</code> for safety</li>
<li>Add check for wrong-length blocks, and incorporate fixed-size
requirement into the trait name</li>
<li>Fix a fuzz failure by using checked_sub</li>
<li>Add feature gate for new unit test</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.1.2...v2.1.3">2.1.3</a>
- 2024-06-04</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Some date/time filters were previously unreliable (i.e. later-pass
filters had no earliest-pass or latest-fail, and vice-versa)</li>
<li>Decode Zip-Info UTF8 name and comment fields (<a
href="https://redirect.github.com/zip-rs/zip2/pull/159">#159</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Return extended timestamp fields copied rather than borrowed (<a
href="https://redirect.github.com/zip-rs/zip2/pull/183">#183</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Fix a new Clippy warning</li>
<li>Fix a bug and inline <code>deserialize</code> for safety</li>
<li>Add check for wrong-length blocks, and incorporate fixed-size
requirement into the trait name</li>
<li>Fix a fuzz failure by using checked_sub</li>
<li>Add feature gate for new unit test</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.1.0...v2.1.1">2.1.1</a>
- 2024-05-28</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Derive <code>Debug</code> for <code>ZipWriter</code></li>
<li>lower default version to 4.5 and use the version-needed-to-extract
where feasible.</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>use a MIN_VERSION constant</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Bug fixes for debug implementation</li>
<li>Bug fixes for debug implementation</li>
<li>Update unit tests</li>
<li>Remove unused import</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.0.0...v2.1.0">2.1.0</a>
- 2024-05-25</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Support mutual conversion between <code>DateTime</code> and MS-DOS
pair</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>version-needed-to-extract was incorrect in central header, and
version-made-by could be lower than that (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
<li>version-needed-to-extract was incorrect in central header, and
version-made-by could be lower than that (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Another tweak to ensure <code>version_needed</code> is applied</li>
<li>Tweaks to make <code>version_needed</code> and
<code>version_made_by</code> work with recently-merged changes</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.3.1...v2.0.0">2.0.0</a>
- 2024-05-24</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add <code>fmt::Display</code> for <code>DateTime</code></li>
<li>Implement more traits for <code>DateTime</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b5eb25d52f"><code>b5eb25d</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/188">#188</a> from
zip-rs/release-plz-2024-06-04T17-06-20Z</li>
<li><a
href="cb076226f0"><code>cb07622</code></a>
chore: release</li>
<li><a
href="5c77e93616"><code>5c77e93</code></a>
ci(fuzz): Update fuzz_write seed corpus</li>
<li><a
href="0fef68b68f"><code>0fef68b</code></a>
ci(fuzz): Update fuzz_read seed corpus</li>
<li><a
href="fce5e0a2d3"><code>fce5e0a</code></a>
test: Add regression tests for <a
href="https://redirect.github.com/zip-rs/zip2/issues/159">#159</a></li>
<li><a
href="e052842d78"><code>e052842</code></a>
style: cargo fmt --all</li>
<li><a
href="b4970dd80f"><code>b4970dd</code></a>
test: Delete a unit test that's no longer needed</li>
<li><a
href="362a1123b5"><code>362a112</code></a>
ci(fuzz): Limit Zopfli buffer size to fix OOMEs</li>
<li><a
href="b7bec1c2dd"><code>b7bec1c</code></a>
fix: Some date/time filters were previously unreliable (i.e. later-pass
filte...</li>
<li><a
href="cb50ca1213"><code>cb50ca1</code></a>
test: Bug fix? Explicitly type int that may become as large as 3
&lt;&lt; 29</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v2.1.2...v2.1.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=2.1.2&new-version=2.1.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:05:50 +08:00
dependabot[bot]
e75f65409f build(deps): bump regex from 1.10.4 to 1.10.5 in /userspace/ksud (#1815)
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.4 to 1.10.5.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/regex/blob/master/CHANGELOG.md">regex's
changelog</a>.</em></p>
<blockquote>
<h1>1.10.5 (2024-06-09)</h1>
<p>This is a new patch release with some minor fixes.</p>
<p>Bug fixes:</p>
<ul>
<li>[BUG <a
href="https://redirect.github.com/rust-lang/regex/issues/1203">#1203</a>](<a
href="https://redirect.github.com/rust-lang/regex/pull/1203">rust-lang/regex#1203</a>):
Escape invalid UTF-8 when in the <code>Debug</code> impl of
<code>regex::bytes::Match</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0718fc5acb"><code>0718fc5</code></a>
1.10.5</li>
<li><a
href="377463bd82"><code>377463b</code></a>
changelog: 1.10.4 and 1.10.5</li>
<li><a
href="68c4f0b7b7"><code>68c4f0b</code></a>
regex-automata-0.4.7</li>
<li><a
href="4757b5f01a"><code>4757b5f</code></a>
regex-syntax-0.8.4</li>
<li><a
href="1430b65bae"><code>1430b65</code></a>
changelog: 1.10.4</li>
<li><a
href="1f9f9ccd39"><code>1f9f9cc</code></a>
bytes: escape invalid UTF-8 bytes in debug output for Match</li>
<li><a
href="ab4c8d1f21"><code>ab4c8d1</code></a>
doc: fix duplicate phrasing typo</li>
<li><a
href="ddeb85eaa3"><code>ddeb85e</code></a>
cli/deps: update memmap2 to 0.9</li>
<li><a
href="023f1c9ac1"><code>023f1c9</code></a>
lite: fix attribute warning about rustfmt</li>
<li><a
href="9c139f4fa5"><code>9c139f4</code></a>
syntax: simplify <code>Hir::dot</code> constructors</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/regex/compare/1.10.4...1.10.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=regex&package-manager=cargo&previous-version=1.10.4&new-version=1.10.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:05:23 +08:00
dependabot[bot]
2ce8c2df07 build(deps): bump clap from 4.5.4 to 4.5.7 in /userspace/ksud (#1817)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.4 to 4.5.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.7</h2>
<h2>[4.5.7] - 2024-06-10</h2>
<h3>Fixes</h3>
<ul>
<li>Clean up error message when too few arguments for
<code>num_args</code></li>
</ul>
<h2>v4.5.6</h2>
<h2>[4.5.6] - 2024-06-06</h2>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.7] - 2024-06-10</h2>
<h3>Fixes</h3>
<ul>
<li>Clean up error message when too few arguments for
<code>num_args</code></li>
</ul>
<h2>[4.5.6] - 2024-06-06</h2>
<h2>[4.5.5] - 2024-06-06</h2>
<h3>Fixes</h3>
<ul>
<li>Allow <code>exclusive</code> to override
<code>required_unless_present</code>,
<code>required_unless_present_any</code>,
<code>required_unless_present_all</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6c6839a454"><code>6c6839a</code></a>
chore: Release</li>
<li><a
href="e79ff0d42b"><code>e79ff0d</code></a>
docs: Update changelog</li>
<li><a
href="be2e5ca91e"><code>be2e5ca</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5527">#5527</a>
from epage/min</li>
<li><a
href="cf5c95862e"><code>cf5c958</code></a>
fix(parser): Report correct num_args on too-few</li>
<li><a
href="e0c9619c27"><code>e0c9619</code></a>
test(parser): Snapshot num_args errors</li>
<li><a
href="2f645d3e81"><code>2f645d3</code></a>
chore: Release</li>
<li><a
href="6e1e0368f9"><code>6e1e036</code></a>
docs: Update changelog</li>
<li><a
href="7e1bbf82af"><code>7e1bbf8</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5523">#5523</a>
from ben--/zsh-colon</li>
<li><a
href="8e3c273b61"><code>8e3c273</code></a>
fix(zsh): Separate options from _arguments options</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.4&new-version=4.5.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:05:07 +08:00
dependabot[bot]
5397838dce build(deps): bump androidx.compose:compose-bom from 2024.05.00 to 2024.06.00 in /manager (#1820)
Bumps androidx.compose:compose-bom from 2024.05.00 to 2024.06.00.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.compose:compose-bom&package-manager=gradle&previous-version=2024.05.00&new-version=2024.06.00)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:04:32 +08:00
dependabot[bot]
234d5fdd17 build(deps): bump agp from 8.4.1 to 8.5.0 in /manager (#1824)
Bumps `agp` from 8.4.1 to 8.5.0.
Updates `com.android.application` from 8.4.1 to 8.5.0

Updates `com.android.library` from 8.4.1 to 8.5.0


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:04:01 +08:00
dependabot[bot]
46fb24ca74 build(deps): bump lifecycle from 2.8.0 to 2.8.1 in /manager (#1782)
Bumps `lifecycle` from 2.8.0 to 2.8.1.
Updates `androidx.lifecycle:lifecycle-runtime-ktx` from 2.8.0 to 2.8.1

Updates `androidx.lifecycle:lifecycle-runtime-compose` from 2.8.0 to
2.8.1

Updates `androidx.lifecycle:lifecycle-viewmodel-compose` from 2.8.0 to
2.8.1


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-05 11:02:06 +08:00
igor
149d25751c website: update translations (#1796) 2024-06-05 01:15:55 +08:00
dependabot[bot]
9fdbaaa89f build(deps): bump zip-extensions from 0.6.2 to 0.7.0 in /userspace/ksud (#1798)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps
[zip-extensions](https://github.com/matzefriedrich/zip-extensions-rs)
from 0.6.2 to 0.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/matzefriedrich/zip-extensions-rs/releases">zip-extensions's
releases</a>.</em></p>
<blockquote>
<h2>v0.7.0</h2>
<h2>Changes</h2>
<ul>
<li>The <code>create_from_directory_with_options</code> method now
supports per-item file options. This introduces a breaking change:
instead of passing <code>FileOptions</code> directly, an <code>Fn</code>
must be specified that will be called for each file and must return a
<code>FileOptions</code> value.</li>
<li>Upgraded the zip dependency to version 0.6.6.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/matzefriedrich/zip-extensions-rs/blob/master/CHANGELOG.md">zip-extensions's
changelog</a>.</em></p>
<blockquote>
<h2>[0.7.0] - 2024-06-01</h2>
<h3>Changed</h3>
<ul>
<li>[PR <a
href="https://redirect.github.com/matzefriedrich/zip-extensions-rs/issues/13">#13</a>]
Adds support for per-item file options by the
<code>create_from_directory_with_options</code> method. This introduces
a breaking change; instead of passing a <code>FileOptions</code>
directly an <code>Fn</code> must be specified that is called for each
file, and must return a <code>FileOptions</code> value.</li>
<li>Upgraded the zip dependency to version 0.6.6.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b5858a69e5"><code>b5858a6</code></a>
Adds support for per-item FileOptions (<a
href="https://redirect.github.com/matzefriedrich/zip-extensions-rs/issues/14">#14</a>)</li>
<li>See full diff in <a
href="https://github.com/matzefriedrich/zip-extensions-rs/compare/v0.6.2...v0.7.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip-extensions&package-manager=cargo&previous-version=0.6.2&new-version=0.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-05 01:15:34 +08:00
dependabot[bot]
2a576470f5 build(deps): bump zip from 2.1.0 to 2.1.2 in /userspace/ksud (#1799)
Bumps [zip](https://github.com/zip-rs/zip2) from 2.1.0 to 2.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.2</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Derive <code>Debug</code> for <code>ZipWriter</code></li>
<li>lower default version to 4.5 and use the version-needed-to-extract
where feasible.</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>use a MIN_VERSION constant</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Bug fixes for debug implementation</li>
<li>Bug fixes for debug implementation</li>
<li>Update unit tests</li>
<li>Remove unused import</li>
</ul>
<h2>v2.1.1</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Derive <code>Debug</code> for <code>ZipWriter</code></li>
<li>lower default version to 4.5 and use the version-needed-to-extract
where feasible.</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>use a MIN_VERSION constant</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Bug fixes for debug implementation</li>
<li>Bug fixes for debug implementation</li>
<li>Update unit tests</li>
<li>Remove unused import</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.1.0...v2.1.1">2.1.1</a>
- 2024-05-28</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Derive <code>Debug</code> for <code>ZipWriter</code></li>
<li>lower default version to 4.5 and use the version-needed-to-extract
where feasible.</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>use a MIN_VERSION constant</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Bug fixes for debug implementation</li>
<li>Bug fixes for debug implementation</li>
<li>Update unit tests</li>
<li>Remove unused import</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="999d41d438"><code>999d41d</code></a>
feat: Update dependencies</li>
<li><a
href="c74a811680"><code>c74a811</code></a>
ci(fuzz): Update fuzz_read corpus to increase coverage</li>
<li><a
href="6d29c8cc19"><code>6d29c8c</code></a>
ci(fuzz): Update fuzz_read corpus to increase coverage</li>
<li><a
href="9e0966130f"><code>9e09661</code></a>
ci(fuzz): Update fuzz_write corpus to increase coverage</li>
<li><a
href="ae45a26c96"><code>ae45a26</code></a>
ci(fuzz): Increase max_len to 70,000 to let it include overlength
comments</li>
<li><a
href="212dbe757a"><code>212dbe7</code></a>
ci(fuzz): Update fuzz_read corpus to increase coverage</li>
<li><a
href="6539545524"><code>6539545</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/109">#109</a> from
afranchuk/configure-archive-offset</li>
<li><a
href="17c2d868a3"><code>17c2d86</code></a>
Merge branch 'master' into configure-archive-offset</li>
<li><a
href="74c238042e"><code>74c2380</code></a>
ci(fuzz): Remove len_control override from fuzz_read</li>
<li><a
href="a65d182d98"><code>a65d182</code></a>
Merge branch 'master' into configure-archive-offset</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v2.1.0...v2.1.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=2.1.0&new-version=2.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-05 01:15:17 +08:00
dependabot[bot]
f3eab5eac5 build(deps-dev): bump vitepress from 1.2.2 to 1.2.3 in /website (#1803)
Bumps [vitepress](https://github.com/vuejs/vitepress) from 1.2.2 to
1.2.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/releases">vitepress's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.3</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">vitepress's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/vuejs/vitepress/compare/v1.2.2...v1.2.3">1.2.3</a>
(2024-06-04)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>theme,a11y:</strong> handle overflow on long mathematical
equation and make tables focusable (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3932">#3932</a>)
(closes <a
href="https://redirect.github.com/vuejs/vitepress/issues/3914">#3914</a>)
(<a
href="afc611d399">afc611d</a>)</li>
<li><strong>types:</strong> wrong types generated for markdown-it &gt;
mdurl (<a
href="48ca76c523">48ca76c</a>),
closes <a
href="https://redirect.github.com/vuejs/vitepress/issues/3935">#3935</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e313a274c0"><code>e313a27</code></a>
release: v1.2.3</li>
<li><a
href="a83a662fb8"><code>a83a662</code></a>
chore: bump deps</li>
<li><a
href="48ca76c523"><code>48ca76c</code></a>
fix(types): wrong types generated for markdown-it &gt; mdurl</li>
<li><a
href="afc611d399"><code>afc611d</code></a>
fix(theme,a11y): handle overflow on long mathematical equation and make
table...</li>
<li><a
href="b2fa9326c7"><code>b2fa932</code></a>
chore: bump deps</li>
<li><a
href="1188951785"><code>1188951</code></a>
docs: update installation command for yarn pnp</li>
<li>See full diff in <a
href="https://github.com/vuejs/vitepress/compare/v1.2.2...v1.2.3">compare
view</a></li>
</ul>
</details>
<br />

<details>
<summary>Most Recent Ignore Conditions Applied to This Pull
Request</summary>

| Dependency Name | Ignore Conditions |
| --- | --- |
| vitepress | [< 1.2, > 1.1.3] |
</details>


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitepress&package-manager=npm_and_yarn&previous-version=1.2.2&new-version=1.2.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-05 01:14:59 +08:00
TinyHai
71937f5379 manager: fix update no response when changelog is empty (#1786) 2024-06-05 01:14:40 +08:00
Wang Han
78bf2493bf Convert devpts domain to ksu_file (#1801)
AOSP sepolicy does not allow appdomain to open pts. Hence, convert
devpts domain to ksu_file to allow any access.
2024-06-03 21:21:39 +08:00
Coconut
0373646f41 non-GKI:Remove maintainer Coconutat's repositories (#1794) 2024-06-03 16:37:52 +08:00
KeJia
55950be0eb 从非官方支持设备中移除K-Nel-M1721 (#1792) 2024-06-03 16:37:22 +08:00
WenHao2130
51337ee7ee manager: fix translation errors in zh_CN (#1790) 2024-06-01 22:07:16 +08:00
weishu
1f24daa79d docs: Add description for non gki integration 2024-06-01 21:18:34 +08:00
Ylarod
898e9d4f8c [1.0] Drop Non-GKI Support (#1483)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-06-01 14:50:46 +08:00
igor
b766b98513 website: fixed small typo (#1780) 2024-05-29 11:18:27 +08:00
weishu
f381e32434 ksud: remove modules dir when uninstall. close #1736 2024-05-28 11:28:28 +08:00
igor
916d6bcd06 website: update translation (#1779) 2024-05-28 10:30:59 +08:00
dependabot[bot]
9343376bb3 build(deps): bump zip from 2.0.0 to 2.1.0 in /userspace/ksud (#1775)
Bumps [zip](https://github.com/zip-rs/zip2) from 2.0.0 to 2.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.0</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Support mutual conversion between <code>DateTime</code> and MS-DOS
pair</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>version-needed-to-extract was incorrect in central header, and
version-made-by could be lower than that (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
<li>version-needed-to-extract was incorrect in central header, and
version-made-by could be lower than that (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Another tweak to ensure <code>version_needed</code> is applied</li>
<li>Tweaks to make <code>version_needed</code> and
<code>version_made_by</code> work with recently-merged changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v2.0.0...v2.1.0">2.1.0</a>
- 2024-05-25</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Support mutual conversion between <code>DateTime</code> and MS-DOS
pair</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>version-needed-to-extract was incorrect in central header, and
version-made-by could be lower than that (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
<li>version-needed-to-extract was incorrect in central header, and
version-made-by could be lower than that (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Another tweak to ensure <code>version_needed</code> is applied</li>
<li>Tweaks to make <code>version_needed</code> and
<code>version_made_by</code> work with recently-merged changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6d4e460556"><code>6d4e460</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/154">#154</a> from
zip-rs/release-plz-2024-05-25T05-11-15Z</li>
<li><a
href="78aca55db5"><code>78aca55</code></a>
chore: release</li>
<li><a
href="699d10da71"><code>699d10d</code></a>
style: cargo fmt --all</li>
<li><a
href="e6b2290f70"><code>e6b2290</code></a>
chore: Another tweak to ensure <code>version_needed</code> is
applied</li>
<li><a
href="92012b9795"><code>92012b9</code></a>
chore: Tweaks to make <code>version_needed</code> and
<code>version_made_by</code> work with recent...</li>
<li><a
href="cda4712153"><code>cda4712</code></a>
fix: version-needed-to-extract was incorrect in central header, and
version-m...</li>
<li><a
href="b057d0dca2"><code>b057d0d</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/93">#93</a> from
cosmicexplorer/bulk-parsing</li>
<li><a
href="a28b16e69c"><code>a28b16e</code></a>
Apply suggestions from code review</li>
<li><a
href="df70f6a320"><code>df70f6a</code></a>
Fix unmatched bracket due to bad merge</li>
<li><a
href="6b19c877e2"><code>6b19c87</code></a>
Merge branch 'master' into bulk-parsing</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v2.0.0...v2.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=2.0.0&new-version=2.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:30:44 +08:00
igor
1071a5c135 website: update translations (#1772) 2024-05-27 10:35:41 +08:00
Rissu
bd5100d698 kernel: fix throne_tracker uncompile-able on 4.4 kernel (issue #1771) (#1773)
in kernel v4.7.10:
extern unsigned int __pure full_name_hash(const char *, unsigned int);

in kernel v4.8.0:
extern unsigned int __pure full_name_hash(const void *salt, const char
*, unsigned int);
2024-05-27 10:35:08 +08:00
Akari
81f1a47cec website: added conditional preprocessor directive (#1774)
Signed-off-by: Akari <akariondev@gmail.com>
2024-05-27 10:33:44 +08:00
Scruel Tao
6a3979842b doc: add boot scripts process explanation (#1726)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-05-26 17:10:45 +08:00
Juhyung Park
038dae1d6f Deadlock fixes (#1758)
Hi,

This PR fixes deadlocks that I've noticed within my kernel, with some
minor optimizations around it.

Thanks.

---------

Signed-off-by: Juhyung Park <qkrwngud825@gmail.com>
2024-05-26 17:03:33 +08:00
HDTianRu
0674841b94 ksud: Skip patch init_boot.img on kmi android12-xxx devices (#1744)
有一些设备(如ace2v),带了initboot,但ramdisk却在boot里,导致无法使用ota安装与直接安装,所以添加了个开关
因为本人开发环境有点简陋(mt管理器),而且对项目代码不太熟,合并前最好review一下(
2024-05-25 11:09:06 +08:00
igor
57a5f39f81 website: update translations (#1760) 2024-05-25 11:08:35 +08:00
Caner Karaca
49157113c3 Update Workflows (#1764)
Corrections/edits and reviews always welcomed.

Added A14 Debug Kernel
Updated Kernel patch and sub levels
Removed kernels deprecated by Google
2024-05-25 11:07:52 +08:00
Caner Karaca
dc233700aa Update Dependencies and Migrate to Kotlin 2 (#1765)
Corrections/edits and reviews always welcomed.

Migrate to Kotlin 2
Updated dependencies
Refreshed lock files
2024-05-25 11:07:27 +08:00
Alex
d6860160e8 Added a feature to save logs to local storage (#1741)
- Added export logs to local storage
[1664](https://github.com/tiann/KernelSU/issues/1664)

---------

Co-authored-by: weishu <twsxtd@gmail.com>
2024-05-23 10:46:44 +08:00
dependabot[bot]
4e3f03ae96 build(deps-dev): bump vitepress from 1.1.3 to 1.2.0 in /website (#1748)
Bumps [vitepress](https://github.com/vuejs/vitepress) from 1.1.3 to
1.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/releases">vitepress's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.0</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v1.1.4</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">vitepress's
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/vuejs/vitepress/compare/v1.1.4...v1.2.0">1.2.0</a>
(2024-05-18)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>build:</strong> show file info on error (<a
href="f0debd20f4">f0debd2</a>)</li>
<li><strong>dev:</strong> match dev and prod routing behavior (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3837">#3837</a>)
(<a
href="b360ac88df">b360ac8</a>)</li>
<li><strong>markdown:</strong> entities and escapes not working properly
(<a
href="https://redirect.github.com/vuejs/vitepress/issues/3882">#3882</a>)
(<a
href="d5dbd704ce">d5dbd70</a>)</li>
<li>render 404 page completely on client to infer locale from browser
path (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3858">#3858</a>)
(<a
href="728cb15677">728cb15</a>)</li>
<li><strong>style:</strong> prefer YaHei over DengXian (<a
href="f0a37b4b84">f0a37b4</a>)</li>
<li><strong>theme/regression:</strong> custom font not applying in
Chinese docs because of specificity (<a
href="fa2f38a0c3">fa2f38a</a>),
closes <a
href="https://redirect.github.com/vuejs/vitepress/issues/3864">#3864</a></li>
<li><strong>theme:</strong> external link icon not visible for target
_blank links (<a
href="d08eeed897">d08eeed</a>),
closes <a
href="https://redirect.github.com/vuejs/vitepress/issues/3327">#3327</a></li>
<li><strong>theme:</strong> fix invalid vp-offset in ssr (<a
href="9794877347">9794877</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>build/i18n:</strong> support customizing copy code button's
tooltip text (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3854">#3854</a>)
(<a
href="ed6ada7a68">ed6ada7</a>)</li>
<li><strong>build:</strong> add localeIndex to md.env (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3862">#3862</a>)
(<a
href="0cbb469842">0cbb469</a>)</li>
</ul>
<h2><a
href="https://github.com/vuejs/vitepress/compare/v1.1.3...v1.1.4">1.1.4</a>
(2024-04-27)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>dev:</strong> multiple server instances being created when
editing config too quickly (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3835">#3835</a>)
(<a
href="729a890669">729a890</a>)</li>
<li><strong>theme/a11y:</strong> add unique name to footer prev / next
navigation landmark (<a
href="e60c101e50">e60c101</a>)</li>
<li><strong>theme/a11y:</strong> remove duplicate assistive text from
outline nav (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3803">#3803</a>)
(<a
href="733d986a84">733d986</a>)</li>
<li><strong>theme/i18n:</strong> 404 page not showing localized text (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3833">#3833</a>)
(<a
href="cc11b8e41e">cc11b8e</a>)</li>
<li><strong>theme:</strong> disable keypress effect on search button (<a
href="ccc37bb80e">ccc37bb</a>)</li>
<li><strong>theme:</strong> don't use Chinese quotes on non-Chinese
documents (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3834">#3834</a>)
(<a
href="75115f4f82">75115f4</a>)</li>
<li><strong>theme:</strong> leaking event listener when going
back/forward on Safari on iOS (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3658">#3658</a>)
(<a
href="https://redirect.github.com/vuejs/vitepress/issues/3671">#3671</a>)
(<a
href="1a72181c06">1a72181</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1699abfb03"><code>1699abf</code></a>
release: v1.2.0</li>
<li><a
href="241a7c80fc"><code>241a7c8</code></a>
chore: bump deps</li>
<li><a
href="db51f7aa43"><code>db51f7a</code></a>
build: bump deps</li>
<li><a
href="f0a37b4b84"><code>f0a37b4</code></a>
fix(style): prefer YaHei over DengXian</li>
<li><a
href="9447ceeb0e"><code>9447cee</code></a>
docs(zh): sync and tweak translations (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3883">#3883</a>)</li>
<li><a
href="d5dbd704ce"><code>d5dbd70</code></a>
fix(markdown): entities and escapes not working properly (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3882">#3882</a>)</li>
<li><a
href="99c0cece62"><code>99c0cec</code></a>
docs: add notes for sitemap + base</li>
<li><a
href="fa2f38a0c3"><code>fa2f38a</code></a>
fix(theme/regression): custom font not applying in Chinese docs because
of sp...</li>
<li><a
href="0cbb469842"><code>0cbb469</code></a>
feat(build): add localeIndex to md.env (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3862">#3862</a>)</li>
<li><a
href="ed6ada7a68"><code>ed6ada7</code></a>
feat(build/i18n): support customizing copy code button's tooltip text
(<a
href="https://redirect.github.com/vuejs/vitepress/issues/3854">#3854</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vuejs/vitepress/compare/v1.1.3...v1.2.0">compare
view</a></li>
</ul>
</details>
<br />

<details>
<summary>Most Recent Ignore Conditions Applied to This Pull
Request</summary>

| Dependency Name | Ignore Conditions |
| --- | --- |
| vitepress | [< 1.2, > 1.1.3] |
</details>


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitepress&package-manager=npm_and_yarn&previous-version=1.1.3&new-version=1.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 09:36:32 +08:00
Sreeshankar K
717c0fee61 [add device] OnePlus Nord - avicii (#1749) 2024-05-21 09:36:11 +08:00
Joseph P
82d965f44c docs: update documentation for the website (#1750)
Description:

I was originally browsing through project's FAQ on the
[website](https://kernelsu.org/) and noticed a few discrepancies across
the text.<br>I edited them out, and once having finished with the FAQ, I
looked through other website pages as well.

Changes:

- updated documentation for the project's website (English version).

--
P.S. I actually appreciate the partial documentation on GKI and in-depth
Android mechanisms present in it. While there is of course documentation
from Google, it is nice to have guidelines from a more practical
standpoint.
2024-05-21 09:35:51 +08:00
チセ
9c2e48bb3e ksud: turn off auto-detect bootdevice when OS is not android (#1746) 2024-05-21 09:18:28 +08:00
Wang Han
4871e11a55 Update resetprop (#1742)
With topjohnwu/Magisk@941a363 included.
2024-05-19 15:24:59 +08:00
weishu
b67c3122d3 manager: remove jvm restrictions 2024-05-19 12:13:35 +08:00
dependabot[bot]
fa7f5959b2 build(deps): bump zip from 1.2.3 to 1.3.0 in /userspace/ksud (#1738)
Bumps [zip](https://github.com/zip-rs/zip2) from 1.2.3 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v1.3.0</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add <code>is_symlink</code> method</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Extract symlinks into symlinks on Unix and Windows, and fix a bug
that affected making directories writable on MacOS</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Eliminate deprecation warning when <code>--all-features</code>
implicitly enables the deprecated feature</li>
<li>Check if archive contains a symlink's target, without borrowing both
at the same time</li>
<li>Eliminate a clone that's no longer necessary</li>
<li>is_dir only needs to look at the filename</li>
<li>Remove unnecessary #[cfg] attributes</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Fix borrow-of-moved-value</li>
<li>Box<!-- raw HTML omitted --> doesn't directly convert to PathBuf, so
convert back to String first</li>
<li>partial revert - only &amp;str has chars(), but Box<!-- raw HTML
omitted --> should auto-deref</li>
<li>contains_key needs a <code>Box&lt;str&gt;</code>, so generify
<code>is_dir</code> to accept one</li>
<li>Add missing <code>ZipFileData::is_dir()</code> method</li>
<li>Fix another Windows-specific error</li>
<li>More bug fixes for Windows-specific symlink code</li>
<li>More bug fixes for Windows-specific symlink code</li>
<li>Bug fix: variable name change</li>
<li>Bug fix: need both internal and output path to determine whether to
symlink_dir</li>
<li>Another bug fix</li>
<li>Fix another error-type conversion error</li>
<li>Fix error-type conversion on Windows</li>
<li>Fix conditionally-unused import</li>
<li>Fix continued issues, and factor out the Vec<!-- raw HTML omitted
-->-to-OsString conversion (cc: <a
href="https://redirect.github.com/zip-rs/zip2/pull/125">#125</a>)</li>
<li>Fix CI failure involving conversion to OsString for symlinks (see my
comments on <a
href="https://redirect.github.com/zip-rs/zip2/pull/125">#125</a>)</li>
<li>Move path join into platform-independent code</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.2.3...v1.3.0">1.3.0</a>
- 2024-05-17</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add <code>is_symlink</code> method</li>
</ul>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Extract symlinks into symlinks on Unix and Windows, and fix a bug
that affected making directories writable on MacOS</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Eliminate deprecation warning when <code>--all-features</code>
implicitly enables the deprecated feature</li>
<li>Check if archive contains a symlink's target, without borrowing both
at the same time</li>
<li>Eliminate a clone that's no longer necessary</li>
<li>is_dir only needs to look at the filename</li>
<li>Remove unnecessary #[cfg] attributes</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Fix borrow-of-moved-value</li>
<li>Box<!-- raw HTML omitted --> doesn't directly convert to PathBuf, so
convert back to String first</li>
<li>partial revert - only &amp;str has chars(), but Box<!-- raw HTML
omitted --> should auto-deref</li>
<li>contains_key needs a <code>Box&lt;str&gt;</code>, so generify
<code>is_dir</code> to accept one</li>
<li>Add missing <code>ZipFileData::is_dir()</code> method</li>
<li>Fix another Windows-specific error</li>
<li>More bug fixes for Windows-specific symlink code</li>
<li>More bug fixes for Windows-specific symlink code</li>
<li>Bug fix: variable name change</li>
<li>Bug fix: need both internal and output path to determine whether to
symlink_dir</li>
<li>Another bug fix</li>
<li>Fix another error-type conversion error</li>
<li>Fix error-type conversion on Windows</li>
<li>Fix conditionally-unused import</li>
<li>Fix continued issues, and factor out the Vec<!-- raw HTML omitted
-->-to-OsString conversion (cc: <a
href="https://redirect.github.com/zip-rs/zip2/pull/125">#125</a>)</li>
<li>Fix CI failure involving conversion to OsString for symlinks (see my
comments on <a
href="https://redirect.github.com/zip-rs/zip2/pull/125">#125</a>)</li>
<li>Move path join into platform-independent code</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="102e31113d"><code>102e311</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/131">#131</a> from
zip-rs/release-plz-2024-05-15T23-52-34Z</li>
<li><a
href="461fb58a02"><code>461fb58</code></a>
chore: release</li>
<li><a
href="a8b2855910"><code>a8b2855</code></a>
ci: Auto-merge PRs from within repo even if I'm the triggering
actor</li>
<li><a
href="6fa4486089"><code>6fa4486</code></a>
Enable attestation of release builds</li>
<li><a
href="3e81fddb78"><code>3e81fdd</code></a>
style: cargo fmt --all</li>
<li><a
href="1cb0e1b3b7"><code>1cb0e1b</code></a>
refactor: Eliminate deprecation warning when <code>--all-features</code>
implicitly enab...</li>
<li><a
href="fbf111ef97"><code>fbf111e</code></a>
style: cargo fmt --all</li>
<li><a
href="3e06f6433a"><code>3e06f64</code></a>
chore: Fix borrow-of-moved-value</li>
<li><a
href="633a6733e6"><code>633a673</code></a>
refactor: Check if archive contains a symlink's target, without
borrowing bot...</li>
<li><a
href="17fee7938a"><code>17fee79</code></a>
refactor: Eliminate a clone that's no longer necessary</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v1.2.3...v1.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=1.2.3&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-18 10:26:41 +08:00
hosizoraru
3969f79de3 ci: a12-5.10, a13-5.10, a13-5.15, a14-5.15, a14-6.1 patch level 2024-05 (#1737)
[android12-5.10-2024-05](https://android.googlesource.com/kernel/common/+/refs/heads/android12-5.10-2024-05)
已发布,观察
[makefile](https://android.googlesource.com/kernel/common/+/refs/heads/android12-5.10-2024-05/Makefile)
为 5.10.209


[android13-5.10-2024-05](https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.10-2024-05)
已发布,观察
[makefile](https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.10-2024-05/Makefile)
为 5.10.209


[android13-5.15-2024-05](https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.15-2024-05)
已发布,观察
[makefile](https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.15-2024-05/Makefile)
为 5.15.148


[android14-5.15-2024-05](https://android.googlesource.com/kernel/common/+/refs/heads/android14-5.15-2024-05)
已发布,观察
[makefile](https://android.googlesource.com/kernel/common/+/refs/heads/android14-5.15-2024-05/Makefile)
为 5.15.148


[android14-6.1-2024-05](https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-05)
已发布,观察
[makefile](https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-05/Makefile)
为 6.1.75
2024-05-17 17:28:48 +08:00
weishu
31653b11f1 kernel: replace devpts kprobe 2024-05-16 17:16:00 +08:00
Alex
d36e365921 Refactor checkNewVersion function to use LatestVersionInfo data class (#1733)
- Updated the checkNewVersion function to return a LatestVersionInfo
data class instead of a Triple.
- Defined default null value for LatestVersionInfo in case of failure.
- Improved readability and maintainability by replacing the Triple with
a data class.
- Included version code, download URL, and changelog in the
LatestVersionInfo data class.

---------

Co-authored-by: weishu <twsxtd@gmail.com>
2024-05-16 15:35:14 +08:00
weishu
0576495b4b kernel: Allow to use in Private Space 2024-05-16 12:03:58 +08:00
dependabot[bot]
2e94e07d70 build(deps): bump lifecycle from 2.7.0 to 2.8.0 in /manager (#1735)
Bumps `lifecycle` from 2.7.0 to 2.8.0.
Updates `androidx.lifecycle:lifecycle-runtime-ktx` from 2.7.0 to 2.8.0

Updates `androidx.lifecycle:lifecycle-runtime-compose` from 2.7.0 to
2.8.0

Updates `androidx.lifecycle:lifecycle-viewmodel-compose` from 2.7.0 to
2.8.0


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 10:34:20 +08:00
dependabot[bot]
99e2707be4 build(deps): bump org.jetbrains.kotlinx:kotlinx-coroutines-core from 1.8.0 to 1.8.1 in /manager (#1722)
Bumps
[org.jetbrains.kotlinx:kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines)
from 1.8.0 to 1.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kotlin/kotlinx.coroutines/releases">org.jetbrains.kotlinx:kotlinx-coroutines-core's
releases</a>.</em></p>
<blockquote>
<h2>1.8.1</h2>
<ul>
<li>Remove the <code>@ExperimentalTime</code> annotation from usages of
<code>TimeSource</code> (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4046">#4046</a>).
Thanks, <a
href="https://github.com/hfhbd"><code>@​hfhbd</code></a>!</li>
<li>Introduce a workaround for an Android bug that caused an occasional
<code>NullPointerException</code> when setting the
<code>StateFlow</code> value on old Android devices (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3820">#3820</a>).</li>
<li>No longer use <code>kotlin.random.Random</code> as part of
<code>Dispatchers.Default</code> and <code>Dispatchers.IO</code>
initialization (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4051">#4051</a>).</li>
<li><code>Flow.timeout</code> throws the exception with which the
channel was closed (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4071">#4071</a>).</li>
<li>Small tweaks and documentation fixes.</li>
</ul>
<h2>1.8.1-Beta</h2>
<ul>
<li>Remove the <code>@ExperimentalTime</code> annotation from usages of
<code>TimeSource</code> (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4046">#4046</a>).
Thanks, <a
href="https://github.com/hfhbd"><code>@​hfhbd</code></a>!</li>
<li>Attempt a workaround for an Android bug that caused an occasional
<code>NullPointerException</code> when setting the
<code>StateFlow</code> value on old Android devices (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3820">#3820</a>).</li>
<li>No longer use <code>kotlin.random.Random</code> as part of
<code>Dispatchers.Default</code> and <code>Dispatchers.IO</code>
initialization (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4051">#4051</a>).</li>
<li>Small tweaks.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md">org.jetbrains.kotlinx:kotlinx-coroutines-core's
changelog</a>.</em></p>
<blockquote>
<h2>Version 1.8.1</h2>
<ul>
<li>Remove the <code>@ExperimentalTime</code> annotation from usages of
<code>TimeSource</code> (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4046">#4046</a>).
Thanks, <a
href="https://github.com/hfhbd"><code>@​hfhbd</code></a>!</li>
<li>Introduce a workaround for an Android bug that caused an occasional
<code>NullPointerException</code> when setting the
<code>StateFlow</code> value on old Android devices (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3820">#3820</a>).</li>
<li>No longer use <code>kotlin.random.Random</code> as part of
<code>Dispatchers.Default</code> and <code>Dispatchers.IO</code>
initialization (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4051">#4051</a>).</li>
<li><code>Flow.timeout</code> throws the exception with which the
channel was closed (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4071">#4071</a>).</li>
<li>Small tweaks and documentation fixes.</li>
</ul>
<h3>Changelog relative to version 1.8.1-Beta</h3>
<ul>
<li><code>Flow.timeout</code> throws the exception with which the
channel was closed (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4071">#4071</a>).</li>
<li>Small documentation fixes.</li>
</ul>
<h2>Version 1.8.1-Beta</h2>
<ul>
<li>Remove the <code>@ExperimentalTime</code> annotation from usages of
<code>TimeSource</code> (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4046">#4046</a>).
Thanks, <a
href="https://github.com/hfhbd"><code>@​hfhbd</code></a>!</li>
<li>Attempt a workaround for an Android bug that caused an occasional
<code>NullPointerException</code> when setting the
<code>StateFlow</code> value on old Android devices (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3820">#3820</a>).</li>
<li>No longer use <code>kotlin.random.Random</code> as part of
<code>Dispatchers.Default</code> and <code>Dispatchers.IO</code>
initialization (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4051">#4051</a>).</li>
<li>Small tweaks.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cd696d3f8f"><code>cd696d3</code></a>
Version 1.8.1</li>
<li><a
href="c1ba5af8c5"><code>c1ba5af</code></a>
Fix the ticker channel example giving wrong results on the website (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4109">#4109</a>)</li>
<li><a
href="2430d9a799"><code>2430d9a</code></a>
Fix broken API reference links to the Project Reactor Javadoc (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4111">#4111</a>)</li>
<li><a
href="f22b229a09"><code>f22b229</code></a>
fix the link to <code>Thread.uncaughtExceptionHandler</code></li>
<li><a
href="515308dc3d"><code>515308d</code></a>
fix: get rid of horizontal scrolling by splitting the comment and show
more c...</li>
<li><a
href="f8d1821f13"><code>f8d1821</code></a>
Fix typo in coroutine-context-and-dispatchers.md (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3941">#3941</a>)</li>
<li><a
href="20707d35ac"><code>20707d3</code></a>
fix: remove <code>sampleStart</code> and <code>sampleEnd</code> comments
from example in coroutine-...</li>
<li><a
href="01485343b4"><code>0148534</code></a>
chore: fix identation in example loadContributorsBlocking() (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4085">#4085</a>)</li>
<li><a
href="74774df13a"><code>74774df</code></a>
Docs: reference to The Hitchhiker's Guide to the Galaxy (<a
href="https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4082">#4082</a>)</li>
<li><a
href="d106ac7c36"><code>d106ac7</code></a>
Docs: avoid scrolling sample code; fix test description; add () to
functions ...</li>
<li>Additional commits viewable in <a
href="https://github.com/Kotlin/kotlinx.coroutines/compare/1.8.0...1.8.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlinx:kotlinx-coroutines-core&package-manager=gradle&previous-version=1.8.0&new-version=1.8.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 10:33:59 +08:00
dependabot[bot]
64ddf47783 build(deps): bump zip from 1.2.1 to 1.2.3 in /userspace/ksud (#1728)
Bumps [zip](https://github.com/zip-rs/zip2) from 1.2.1 to 1.2.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.3</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Remove a window when an extracted directory might be unexpectedly
listable and/or <code>cd</code>able by non-owners</li>
<li>Extract directory contents on Unix even if the directory doesn't
have write permission (<a
href="https://redirect.github.com/zip-rs/zip-old/issues/423">zip-rs/zip-old#423</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>More conditionally-unused imports</li>
</ul>
<h2>v1.2.2</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Failed to clear &quot;writing_raw&quot; before finishing a symlink,
leading to dropped extra fields</li>
</ul>
<h3><!-- raw HTML omitted --> Performance</h3>
<ul>
<li>Use boxed slice for archive comment, since it can't be
concatenated</li>
<li>Optimize for the fact that false signatures can't overlap with real
ones</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.2.2...v1.2.3">1.2.3</a>
- 2024-05-10</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Remove a window when an extracted directory might be unexpectedly
listable and/or <code>cd</code>able by non-owners</li>
<li>Extract directory contents on Unix even if the directory doesn't
have write permission (<a
href="https://redirect.github.com/zip-rs/zip-old/issues/423">zip-rs/zip-old#423</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>More conditionally-unused imports</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.2.1...v1.2.2">1.2.2</a>
- 2024-05-09</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Failed to clear &quot;writing_raw&quot; before finishing a symlink,
leading to dropped extra fields</li>
</ul>
<h3><!-- raw HTML omitted --> Performance</h3>
<ul>
<li>Use boxed slice for archive comment, since it can't be
concatenated</li>
<li>Optimize for the fact that false signatures can't overlap with real
ones</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="adb40b83d2"><code>adb40b8</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/118">#118</a> from
zip-rs/release-plz-2024-05-10T23-54-42Z</li>
<li><a
href="3d7852a337"><code>3d7852a</code></a>
chore: release</li>
<li><a
href="a385aaf854"><code>a385aaf</code></a>
doc: Important correction: consuming package has to <em>target</em>
Unix, e.g. this ...</li>
<li><a
href="4a5d28ed30"><code>4a5d28e</code></a>
doc: Important correction: contents might not have been extracted at
all</li>
<li><a
href="ba4c6936d5"><code>ba4c693</code></a>
doc: Important clarification: &quot;any user&quot; -&gt; &quot;any
non-root user&quot;</li>
<li><a
href="c28614a0b2"><code>c28614a</code></a>
doc: Document the guarantee provided by
137672cb29a264412211cc20b78f540308a221d3</li>
<li><a
href="137672cb29"><code>137672c</code></a>
fix: Remove a window when an extracted directory might be unexpectedly
listab...</li>
<li><a
href="c0691ec1e5"><code>c0691ec</code></a>
Improve copyright warning</li>
<li><a
href="123fb7b807"><code>123fb7b</code></a>
doc: Improve copyright warning</li>
<li><a
href="2198653882"><code>2198653</code></a>
Add issue templates</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v1.2.1...v1.2.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=1.2.1&new-version=1.2.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 10:33:37 +08:00
dependabot[bot]
d3a5054f68 build(deps): bump rust-embed from 8.3.0 to 8.4.0 in /userspace/ksud (#1729)
Bumps [rust-embed](https://github.com/pyros2097/rust-embed) from 8.3.0
to 8.4.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyrossh/rust-embed/blob/master/changelog.md">rust-embed's
changelog</a>.</em></p>
<blockquote>
<h2>[8.4.0] - 2024-05-11</h2>
<ul>
<li>Re-export RustEmbed as Embed <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/245/files">#245</a>.
Thanks to <a href="https://github.com/pyrossh">pyrossh</a></li>
<li>Do not build glob matchers repeatedly when include-exclude feature
is enabled <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/244/files">#244</a>.
Thanks to <a href="https://github.com/osiewicz">osiewicz</a></li>
<li>Add <code>metadata_only</code> attribute <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/241/files">#241</a>.
Thanks to <a href="https://github.com/ddfisher">ddfisher</a></li>
<li>Replace <code>expect</code> with a safer alternative that returns
<code>None</code> instead <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/240/files">#240</a>.
Thanks to <a href="https://github.com/costinsin">costinsin</a></li>
<li>Eliminate unnecessary <code>to_path</code> call <a
href="https://redirect.github.com/pyrossh/rust-embed/pull/239/files">#239</a>.
Thanks to <a href="https://github.com/smoelius">smoelius</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/pyros2097/rust-embed/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rust-embed&package-manager=cargo&previous-version=8.3.0&new-version=8.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 10:33:21 +08:00
weishu
123b66e84b kernel: fix devpts permission. close #1727 2024-05-16 10:32:48 +08:00
igor
d76004c6f1 website: update translations (#1717) 2024-05-16 10:30:48 +08:00
powellnorma
71cb86c2e9 ksud: refine get_tmp_path (#1713)
Fixes #1710

What do you think?

* It first uses `TEMP_DIR` (`/debug_ramdisk`) if it exists + is is
empty.
* Otherwise it tries to create a random directory in `/dev`.
* If that fails, it goes through a list of directories (including
`TEMP_DIR_LEGACY`), and chooses the first one that is empty.
* If no empty directory it chooses the first one that exists

---------

Co-authored-by: user <user@localhost>
2024-05-16 10:30:20 +08:00
Hadad D
fb6ce7ee62 json: added KSU support in Android 14 for the Xiaomi Redmi 7 and Xiao… (#1732)
…mi Redmi Y3.

makes ksu user happy.
2024-05-16 10:28:55 +08:00
weishu
7af4f338e5 kernel: Fix compile error on 4.4. close #1720 2024-05-10 15:01:05 +08:00
weishu
109442f8c4 docs: Add devpts description for non gki 2024-05-09 12:05:10 +08:00
dependabot[bot]
a943528d82 build(deps): bump agp from 8.3.2 to 8.4.0 in /manager (#1688)
Bumps `agp` from 8.3.2 to 8.4.0.
Updates `com.android.application` from 8.3.2 to 8.4.0

Updates `com.android.library` from 8.3.2 to 8.4.0


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-09 10:04:21 +08:00
weishu
a3df721b84 Revert "su: allocate new pty (#1693)"
This reverts commit 935dc18faa.
2024-05-08 21:18:55 +08:00
weishu
98757bcdb3 kernel: transition devpts in kernel 2024-05-08 21:15:49 +08:00
Weblate (bot)
e0267a22f8 Translations update from Hosted Weblate (#1662)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Fede2782 <78815152+Fede2782@users.noreply.github.com>
Co-authored-by: Ričards L <ricards.lacis18@gmail.com>
Co-authored-by: Pierre GRASSER <pierre.grasser@proton.me>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: AndroPlus <hosigumayuugi@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
2024-05-08 16:02:12 +08:00
dependabot[bot]
21573bbd5b build(deps): bump zip from 1.1.4 to 1.2.1 in /userspace/ksud (#1708)
Bumps [zip](https://github.com/zip-rs/zip2) from 1.1.4 to 1.2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.1</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Prevent panic when trying to read a file with an unsupported
compression method</li>
<li>Prevent panic after reading an invalid LZMA file</li>
<li>Make <code>Stored</code> the default compression method if
<code>Deflated</code> isn't available, so that zip files are readable by
as much software as possible</li>
<li>version_needed was wrong when e.g. cfg(bzip2) but current file
wasn't bzip2 (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
<li>file paths shouldn't start with slashes (<a
href="https://redirect.github.com/zip-rs/zip2/pull/102">#102</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Overhaul <code>impl Arbitrary for FileOptions</code></li>
<li>Remove unused <code>atomic</code> module</li>
</ul>
<h2>v1.2.0</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add method <code>decompressed_size()</code> so non-recursive ZIP
bombs can be detected</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Make <code>ZipWriter::finish()</code> consume the
<code>ZipWriter</code></li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Use panic! rather than abort to ensure the fuzz harness can process
the failure</li>
<li>Update fuzz_write to use replace_with</li>
<li>Remove a drop that can no longer be explicit</li>
<li>Add <code>#![allow(unexpected_cfgs)]</code> in nightly</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.2.0...v1.2.1">1.2.1</a>
- 2024-05-06</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Prevent panic when trying to read a file with an unsupported
compression method</li>
<li>Prevent panic after reading an invalid LZMA file</li>
<li>Make <code>Stored</code> the default compression method if
<code>Deflated</code> isn't available, so that zip files are readable by
as much software as possible</li>
<li>version_needed was wrong when e.g. cfg(bzip2) but current file
wasn't bzip2 (<a
href="https://redirect.github.com/zip-rs/zip2/pull/100">#100</a>)</li>
<li>file paths shouldn't start with slashes (<a
href="https://redirect.github.com/zip-rs/zip2/pull/102">#102</a>)</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Overhaul <code>impl Arbitrary for FileOptions</code></li>
<li>Remove unused <code>atomic</code> module</li>
</ul>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.1.4...v1.2.0">1.2.0</a>
- 2024-05-06</h2>
<h3><!-- raw HTML omitted -->🚀 Features</h3>
<ul>
<li>Add method <code>decompressed_size()</code> so non-recursive ZIP
bombs can be detected</li>
</ul>
<h3><!-- raw HTML omitted -->🚜 Refactor</h3>
<ul>
<li>Make <code>ZipWriter::finish()</code> consume the
<code>ZipWriter</code></li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Use panic! rather than abort to ensure the fuzz harness can process
the failure</li>
<li>Update fuzz_write to use replace_with</li>
<li>Remove a drop that can no longer be explicit</li>
<li>Add <code>#![allow(unexpected_cfgs)]</code> in nightly</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b725303cce"><code>b725303</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/103">#103</a> from
zip-rs/release-plz-2024-05-06T17-54-03Z</li>
<li><a
href="a1f239980e"><code>a1f2399</code></a>
chore: release</li>
<li><a
href="f7ab2ae506"><code>f7ab2ae</code></a>
fix: Prevent panic when trying to read a file with an unsupported
compression...</li>
<li><a
href="7f46b77da2"><code>7f46b77</code></a>
ci: Upload leak reports if fuzz fails</li>
<li><a
href="d13031cc14"><code>d13031c</code></a>
fix: Prevent panic after reading an invalid LZMA file</li>
<li><a
href="8868a11d23"><code>8868a11</code></a>
test(fuzz): Fix a fuzz-read bug when finishing LZMA</li>
<li><a
href="b277298d7f"><code>b277298</code></a>
test(fuzz): Fix: need to accept FileNotFound from abort</li>
<li><a
href="162c9b7281"><code>162c9b7</code></a>
test(fuzz): Fix bugs that were breaking the fuzz test</li>
<li><a
href="447f9c6e4f"><code>447f9c6</code></a>
refactor: Overhaul <code>impl Arbitrary for FileOptions</code></li>
<li><a
href="845c3ec91f"><code>845c3ec</code></a>
refactor: Remove unused <code>atomic</code> module</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v1.1.4...v1.2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=1.1.4&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 11:10:42 +08:00
weishu
fe526cb029 ksud: Fix compiler error 2024-05-08 11:09:27 +08:00
dependabot[bot]
57b96da9db build(deps): bump androidx.compose:compose-bom from 2024.04.01 to 2024.05.00 in /manager (#1691)
Bumps androidx.compose:compose-bom from 2024.04.01 to 2024.05.00.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.compose:compose-bom&package-manager=gradle&previous-version=2024.04.01&new-version=2024.05.00)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 19:04:16 +08:00
dependabot[bot]
0134b27ca7 build(deps): bump androidx.webkit:webkit from 1.10.0 to 1.11.0 in /manager (#1692)
Bumps androidx.webkit:webkit from 1.10.0 to 1.11.0.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.webkit:webkit&package-manager=gradle&previous-version=1.10.0&new-version=1.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 19:03:58 +08:00
dependabot[bot]
239989719d build(deps): bump zip from 1.1.3 to 1.1.4 in /userspace/ksud (#1701)
Bumps [zip](https://github.com/zip-rs/zip2) from 1.1.3 to 1.1.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/releases">zip's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.4</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Rare bug where find_and_parse would give up prematurely on detecting
a false end-of-CDR header</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/zip-rs/zip2/blob/master/CHANGELOG.md">zip's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/zip-rs/zip2/compare/v1.1.3...v1.1.4">1.1.4</a>
- 2024-05-04</h2>
<h3><!-- raw HTML omitted -->🐛 Bug Fixes</h3>
<ul>
<li>Build was failing with bzip2 enabled</li>
<li>use is_dir in more places where Windows paths might be handled
incorrectly</li>
</ul>
<h3><!-- raw HTML omitted --> Performance</h3>
<ul>
<li>Quick filter for paths that contain &quot;/../&quot; or
&quot;/./&quot; or start with &quot;./&quot; or &quot;../&quot;</li>
<li>Fast handling for separator-free paths</li>
<li>Speed up logic if main separator isn't '/'</li>
<li>Drop <code>normalized_components</code> slightly sooner when not
using it</li>
<li>Speed up <code>path_to_string</code> in cases where the path is
already in the proper format</li>
</ul>
<h3><!-- raw HTML omitted -->⚙️ Miscellaneous Tasks</h3>
<ul>
<li>Refactor: can short-circuit handling of paths that start with
MAIN_SEPARATOR, no matter what MAIN_SEPARATOR is</li>
<li>Bug fix: non-canonical path detection when MAIN_SEPARATOR is not
slash or occurs twice in a row</li>
<li>Bug fix: must recreate if . or .. is a path element</li>
<li>Bug fix</li>
</ul>
<h3><!-- raw HTML omitted -->◀️ Revert</h3>
<ul>
<li><a href="https://redirect.github.com/zip-rs/zip2/pull/58">#58</a>
(partial): <code>bzip2-rs</code> can't replace <code>bzip2</code>
because it's decompress-only</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a9482ea8ca"><code>a9482ea</code></a>
Bump version to trigger new release PR</li>
<li><a
href="52af9ffd23"><code>52af9ff</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/96">#96</a> from
zip-rs/oldpr452</li>
<li><a
href="3ccaa3cc85"><code>3ccaa3c</code></a>
style: cargo fmt --all &amp; <code>#![allow(dead_code)]</code></li>
<li><a
href="de95acc543"><code>de95acc</code></a>
style: allow conditionally-unused variables in write_dir.rs</li>
<li><a
href="c4906cfd59"><code>c4906cf</code></a>
Merge remote-tracking branch 'allilo/add_compression_algo_arg' into
oldpr452</li>
<li><a
href="629707c060"><code>629707c</code></a>
Merge pull request <a
href="https://redirect.github.com/zip-rs/zip2/issues/95">#95</a> from
zip-rs/speedup_path_to_string</li>
<li><a
href="1852e96192"><code>1852e96</code></a>
Prelim changes to write_dir</li>
<li><a
href="1b2c42b199"><code>1b2c42b</code></a>
style: cargo fmt --all</li>
<li><a
href="74e76a94ca"><code>74e76a9</code></a>
chore: Refactor: can short-circuit handling of paths that start with
MAIN_SEP...</li>
<li><a
href="2adbbccb82"><code>2adbbcc</code></a>
perf: Quick filter for paths that contain &quot;/../&quot; or
&quot;/./&quot; or start with &quot;./&quot; ...</li>
<li>Additional commits viewable in <a
href="https://github.com/zip-rs/zip2/compare/v1.1.3...v1.1.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=zip&package-manager=cargo&previous-version=1.1.3&new-version=1.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 19:03:34 +08:00
김도훈
2f8323e0a3 docs: Add translation in README_KR (#1703) 2024-05-07 19:03:16 +08:00
5ec1cff
935dc18faa su: allocate new pty (#1693) 2024-05-07 19:02:59 +08:00
Light_summer
f2816653d9 manager: Make SwitchItem can be click like preference (#1697)
Use `AutoMirrored` icon
Drop some deprecated methods
Remove unused imports
Add bottom padding for AppProfileTemplateScreen to avoid display content
behind fab
2024-05-04 20:41:05 +08:00
Flame
8ee274f7d8 device: remove POCO F3/Redmi K40/Mi 11X (alioth) (#1694)
I do patches now,
https://codeberg.org/vyrine/android_vendor_extra/src/branch/main/patches/kernel_xiaomi_sm8250/0001-Implement-KernelSU.patch
2024-05-04 16:07:34 +08:00
Ruchit Marathe
32e0b57b46 [add device] Galaxy A52 and A72 (#1696)
* Update links for a52sxq and m52xq since BlackMesa123 stepped down and
i took over for those devices as well

Change-Id: I9b35fdce65da74fa757d5b77a3819c3174e12160

Signed-off-by: Ruchit <risenid@duck.com>
2024-05-04 16:07:09 +08:00
weishu
d623b9fe09 ksud: bump zip dependency to 1.x 2024-05-02 12:04:28 +08:00
lyc8503
66ae50eb49 Add chopin kernel (#1687) 2024-05-01 10:27:12 +08:00
fsxitutu
839fc0534e Add magiskboot to kernelsu working directory (#1684)
Add the magiskboot binary to the /data/adb/ksu/bin directory so that
scripts/programs can call magiskboot to patch the boot/init_boot image.

---------

Co-authored-by: weishu <twsxtd@gmail.com>
2024-05-01 09:48:59 +08:00
dependabot[bot]
e9b6fcfa22 build(deps): bump androidx.activity:activity-compose from 1.8.2 to 1.9.0 in /manager (#1645)
Bumps androidx.activity:activity-compose from 1.8.2 to 1.9.0.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.activity:activity-compose&package-manager=gradle&previous-version=1.8.2&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-30 12:58:31 +08:00
weishu
646b6f71f4 kernel: close fd early 2024-04-29 15:53:12 +08:00
weishu
efbc07fde3 kernel: use library import 2024-04-27 09:55:24 +08:00
dependabot[bot]
0be7846f9d build(deps-dev): bump vue from 3.4.23 to 3.4.25 in /website (#1660)
Bumps [vue](https://github.com/vuejs/core) from 3.4.23 to 3.4.25.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/core/releases">vue's
releases</a>.</em></p>
<blockquote>
<h2>v3.4.25</h2>
<p>Please refer to <a
href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v3.4.24</h2>
<p>Please refer to <a
href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/core/blob/main/CHANGELOG.md">vue's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/vuejs/core/compare/v3.4.24...v3.4.25">3.4.25</a>
(2024-04-24)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>defineModel:</strong> align prod mode runtime type
generation with defineProps (<a
href="4253a57f17">4253a57</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10769">#10769</a></li>
<li><strong>runtime-core:</strong> properly get keepAlive child (<a
href="https://redirect.github.com/vuejs/core/issues/10772">#10772</a>)
(<a
href="3724693a25">3724693</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10771">#10771</a></li>
<li><strong>runtime-core:</strong> use normal object as internal
prototype for attrs and slots (<a
href="064e82f585">064e82f</a>),
closes <a
href="6df53d85a2 (r141304923)</a></li>
</ul>
<h2><a
href="https://github.com/vuejs/core/compare/v3.4.23...v3.4.24">3.4.24</a>
(2024-04-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>compiler-core:</strong> handle template ref bound via v-bind
object on v-for (<a
href="https://redirect.github.com/vuejs/core/issues/10706">#10706</a>)
(<a
href="da7adefa84">da7adef</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10696">#10696</a></li>
<li><strong>compiler-core:</strong> properly parse await expressions in
edge cases (<a
href="b92c25f53d">b92c25f</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10754">#10754</a></li>
<li><strong>compiler-sfc:</strong> handle readonly operator and
ReadonlyArray/Map/Set types (<a
href="5cef52a5c2">5cef52a</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10726">#10726</a></li>
<li><strong>compiler-ssr:</strong> fix hydration mismatch for
conditional slot in transition (<a
href="f12c81efca">f12c81e</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10743">#10743</a></li>
<li><strong>compiler-ssr:</strong> fix v-html SSR for nullish values (<a
href="1ff407676f">1ff4076</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10725">#10725</a></li>
<li><strong>deps:</strong> update compiler (<a
href="https://redirect.github.com/vuejs/core/issues/10760">#10760</a>)
(<a
href="15df5c1b26">15df5c1</a>)</li>
<li><strong>runtime-core:</strong> fix edge case of KeepAlive inside
Transition with slot children (<a
href="https://redirect.github.com/vuejs/core/issues/10719">#10719</a>)
(<a
href="e51ca61ca0">e51ca61</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10708">#10708</a></li>
<li><strong>runtime-core:</strong> further fix slots _ctx check (<a
href="cde7f05787">cde7f05</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/10724">#10724</a></li>
<li><strong>runtime-core:</strong> props should be readonly via direct
template access (<a
href="b93f264647">b93f264</a>),
closes <a
href="https://redirect.github.com/vuejs/core/issues/8216">#8216</a> <a
href="https://redirect.github.com/vuejs/core/issues/10736">#10736</a></li>
<li><strong>transition:</strong> transition is breaking/flickering when
enter is canceled (<a
href="https://redirect.github.com/vuejs/core/issues/10688">#10688</a>)
(<a
href="65109a70f1">65109a7</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="574c3e63bb"><code>574c3e6</code></a>
release: v3.4.25</li>
<li><a
href="8ee69e7eaf"><code>8ee69e7</code></a>
ci: use single thread for e2e tests on ci</li>
<li><a
href="064e82f585"><code>064e82f</code></a>
fix(runtime-core): use normal object as internal prototype for attrs and
slots</li>
<li><a
href="4253a57f17"><code>4253a57</code></a>
fix(defineModel): align prod mode runtime type generation with
defineProps</li>
<li><a
href="3724693a25"><code>3724693</code></a>
fix(runtime-core): properly get keepAlive child (<a
href="https://redirect.github.com/vuejs/core/issues/10772">#10772</a>)</li>
<li><a
href="958286e3f0"><code>958286e</code></a>
release: v3.4.24</li>
<li><a
href="b92c25f53d"><code>b92c25f</code></a>
fix(compiler-core): properly parse await expressions in edge cases</li>
<li><a
href="173ec65cd4"><code>173ec65</code></a>
test: revert to threads</li>
<li><a
href="f12c81efca"><code>f12c81e</code></a>
fix(compiler-ssr): fix hydration mismatch for conditional slot in
transition</li>
<li><a
href="c8e87a1c90"><code>c8e87a1</code></a>
test: use pool: vmThreads</li>
<li>Additional commits viewable in <a
href="https://github.com/vuejs/core/compare/v3.4.23...v3.4.25">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vue&package-manager=npm_and_yarn&previous-version=3.4.23&new-version=3.4.25)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-27 09:33:46 +08:00
Howard Wu
51bc01afde Fix ksubot session file ext dup (#1672) 2024-04-27 00:10:54 +08:00
Wang Han
045bc7f6fb Update resetprop (#1671)
With https://github.com/topjohnwu/system_properties/pull/3 included.
2024-04-26 22:46:18 +08:00
weishu
f982683825 kernel: refactor PR_REAL_REGS 2024-04-26 13:25:29 +08:00
weishu
2e1bb8e303 kernel: fix setup script. close #1625, close #1647 2024-04-26 13:12:57 +08:00
buildbot
fcc3d2d3d4 kernel: no need to hook 2024-04-26 12:10:58 +08:00
buildbot
dedd54d890 kernel: use syscall hook for all version, remove code next version if works well 2024-04-26 11:42:24 +08:00
Another Guy
2027ac325f Hook syscalls and stable symbols (#1657)
1. Replace `do_execveat_common` with `sys_execve` and `sys_execveat`
2. Replace `input_handle_event` with `input_event` and
`input_inject_event`

Tested on android12-5.10-2024-04, android13-5.15-2024-04.
android14-6.1-2024-04
2024-04-26 11:27:48 +08:00
weishu
c8dd0b070c ksud: Fix compiler error 2024-04-24 21:36:38 +08:00
weishu
063d5c8025 ksud: use sha1 library to calc hash 2024-04-24 12:51:11 +08:00
weishu
ac4c6f7895 manager: Fix select kmi not working 2024-04-24 00:29:43 +08:00
weishu
472a94b6f2 ksud: Fix name typo 2024-04-23 23:33:13 +08:00
weishu
8ba008fb9f ksud: Fix backup not working 2024-04-23 23:24:45 +08:00
weishu
825b14635f ksud: move backup directory to /data/adb/ksu 2024-04-23 16:38:54 +08:00
weishu
52c7f0e2bf manager: extract flashWithIO 2024-04-23 15:51:04 +08:00
weishu
05eb280d79 manager: hide "uninstall temporary" temporarily. 2024-04-23 15:38:18 +08:00
weishu
97dd3d9ec2 manager: Add UI for uninstall permanently 2024-04-23 15:37:42 +08:00
weishu
3aac979caa ksud: skip removing module if no modules exist, also add uninstall mangaer, reboot 2024-04-23 15:32:15 +08:00
weishu
0697db618e ksud: Add uninstall 2024-04-22 20:41:53 +08:00
igor
4922d89823 website: update translation (#1653) 2024-04-22 13:31:24 +08:00
Weblate (bot)
3750e6e759 Translations update from Hosted Weblate (#1635)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
Co-authored-by: rehork <cooky@e.email>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: Bilchuk Radomyr <bilchuk.radomyr@gmail.com>
Co-authored-by: Nostalgia <2455367098@qq.com>
Co-authored-by: Kazuki Nakashima <flukfik41@gmail.com>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: ngocanhtve <ngocanh.tve@gmail.com>
Co-authored-by: _wais <cikomo.game@gmail.com>
2024-04-20 22:30:50 +08:00
Dawid2849
ba28d57e94 Add LG G8 / G8s / G8X source (#1651) 2024-04-20 20:53:10 +08:00
dependabot[bot]
dff1452eaa build(deps): bump androidx.compose:compose-bom from 2024.04.00 to 2024.04.01 in /manager (#1644)
Bumps androidx.compose:compose-bom from 2024.04.00 to 2024.04.01.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.compose:compose-bom&package-manager=gradle&previous-version=2024.04.00&new-version=2024.04.01)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 22:05:57 +08:00
dependabot[bot]
311fad7462 build(deps): bump serde_json from 1.0.115 to 1.0.116 in /userspace/ksud (#1637)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.115 to
1.0.116.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.116</h2>
<ul>
<li>Make module structure comprehensible to static analysis (<a
href="https://redirect.github.com/serde-rs/json/issues/1124">#1124</a>,
thanks <a
href="https://github.com/mleonhard"><code>@​mleonhard</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a3f62bb10e"><code>a3f62bb</code></a>
Release 1.0.116</li>
<li><a
href="12c8ee0ce6"><code>12c8ee0</code></a>
Hide &quot;non-exhaustive patterns&quot; errors when crate fails to
compile</li>
<li><a
href="051ce970fe"><code>051ce97</code></a>
Merge pull request 1124 from mleonhard/master</li>
<li><a
href="25dc75050a"><code>25dc750</code></a>
Replace <code>features_check</code> mod with a call to
<code>std::compile_error!</code>. Fixes htt...</li>
<li><a
href="2e15e3d7d5"><code>2e15e3d</code></a>
Revert &quot;Temporarily disable miri on doctests&quot;</li>
<li><a
href="0baba28775"><code>0baba28</code></a>
Resolve legacy_numeric_constants clippy lints</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.115&new-version=1.0.116)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 22:05:09 +08:00
dependabot[bot]
54383dfc94 build(deps): bump serde from 1.0.197 to 1.0.198 in /userspace/ksud (#1640)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to
1.0.198.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/serde/releases">serde's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.198</h2>
<ul>
<li>Support serializing and deserializing
<code>Saturating&lt;T&gt;</code> (<a
href="https://redirect.github.com/serde-rs/serde/issues/2709">#2709</a>,
thanks <a
href="https://github.com/jbethune"><code>@​jbethune</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c4fb923335"><code>c4fb923</code></a>
Release 1.0.198</li>
<li><a
href="65b7eea775"><code>65b7eea</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2729">#2729</a>
from dtolnay/saturating</li>
<li><a
href="01cd696fd1"><code>01cd696</code></a>
Integrate Saturating&lt;T&gt; deserialization into impl_deserialize_num
macro</li>
<li><a
href="c13b3f7e68"><code>c13b3f7</code></a>
Format PR 2709</li>
<li><a
href="a6571ee0da"><code>a6571ee</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2709">#2709</a>
from jbethune/master</li>
<li><a
href="6e38afff49"><code>6e38aff</code></a>
Revert &quot;Temporarily disable miri on doctests&quot;</li>
<li><a
href="3d1b19ed90"><code>3d1b19e</code></a>
Implement Ser+De for <code>Saturating\&lt;T&gt;</code></li>
<li><a
href="5b24f88e73"><code>5b24f88</code></a>
Resolve legacy_numeric_constants clippy lints</li>
<li><a
href="74d06708dd"><code>74d0670</code></a>
Explicitly install a Rust toolchain for cargo-outdated job</li>
<li><a
href="3bfab6ef7f"><code>3bfab6e</code></a>
Temporarily disable miri on doctests</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.197&new-version=1.0.198)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 22:04:49 +08:00
dependabot[bot]
c2bf237fd2 build(deps-dev): bump vitepress from 1.1.0 to 1.1.3 in /website (#1650)
Bumps [vitepress](https://github.com/vuejs/vitepress) from 1.1.0 to
1.1.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/releases">vitepress's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.3</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v1.1.1</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">vitepress's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/vuejs/vitepress/compare/v1.1.1...v1.1.3">1.1.3</a>
(2024-04-18)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>build/regression:</strong> markdown backslash escapes not
working (<a
href="d02d1e923a">d02d1e9</a>),
closes <a
href="https://redirect.github.com/vuejs/vitepress/issues/3808">#3808</a></li>
</ul>
<h2><a
href="https://github.com/vuejs/vitepress/compare/v1.1.0...v1.1.1">1.1.1</a>
(2024-04-18)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> don't reload page on hash change (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3777">#3777</a>)
(<a
href="74b725a224">74b725a</a>)</li>
<li>let vue compiler handle entity decoding (<a
href="f86ac56b78">f86ac56</a>)</li>
<li>hot updating config file suppresses error logs (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3592">#3592</a>)
(<a
href="cd5adf3011">cd5adf3</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7ed5148260"><code>7ed5148</code></a>
release: v1.1.3</li>
<li><a
href="576e43aef4"><code>576e43a</code></a>
refactor: simplify code</li>
<li><a
href="a481ebee10"><code>a481ebe</code></a>
release: v1.1.2</li>
<li><a
href="d02d1e923a"><code>d02d1e9</code></a>
fix(build/regression): markdown backslash escapes not working</li>
<li><a
href="f30b848e3c"><code>f30b848</code></a>
docs(ru): update translation guide/deploy.md (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3807">#3807</a>)</li>
<li><a
href="47570a1847"><code>47570a1</code></a>
chore: bump deps</li>
<li><a
href="3f551ead18"><code>3f551ea</code></a>
release: v1.1.1</li>
<li><a
href="a1ced36553"><code>a1ced36</code></a>
chore: override text renderer before calling user config</li>
<li><a
href="f86ac56b78"><code>f86ac56</code></a>
fix: let vue compiler handle entity decoding</li>
<li><a
href="469ff3841e"><code>469ff38</code></a>
chore: remove missing type</li>
<li>Additional commits viewable in <a
href="https://github.com/vuejs/vitepress/compare/v1.1.0...v1.1.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitepress&package-manager=npm_and_yarn&previous-version=1.1.0&new-version=1.1.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 22:04:26 +08:00
hosizoraru
1db9fc2029 ci: a13-5.10, a13-5.15, a14-5.15 and a14-6.1 patch level 2024-04 (#1649)
a13-5.10-2024-04 已发布,观察 makefile 为 5.10.209

https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.10-2024-04

https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.10-2024-04/Makefile

a13-5.15-2024-04 已发布,观察 makefile 为 5.15.148

https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.15-2024-04

https://android.googlesource.com/kernel/common/+/refs/heads/android13-5.15-2024-04/Makefile

a14-5.15-2024-04 已发布,观察 makefile 为 5.15.148

https://android.googlesource.com/kernel/common/+/refs/heads/android14-5.15-2024-04

https://android.googlesource.com/kernel/common/+/refs/heads/android14-5.15-2024-04/Makefile

a14-6.1-2024-04 已发布,观察 makefile 为 6.1.75

https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-04

https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-04/Makefile
2024-04-19 16:33:22 +08:00
Ice Year
99f7bfea6e Add support for ChromeOS ARM64 ARCVM (#1642)
1. Add support for ChromeOS ARM64 ARCVM.
2. Optimization of intermediate variable naming.
3. Optimization of kernel version acquisition logic for file names,
obtaining the kernel version directly from Makefile.
2024-04-19 10:25:16 +08:00
TinyHai
1f67487c37 fix grant root failed #1559 (#1633) 2024-04-16 22:02:55 +08:00
dependabot[bot]
7aa36dc326 build(deps): bump chrono from 0.4.37 to 0.4.38 in /userspace/ksud (#1632)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.37 to
0.4.38.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chronotope/chrono/releases">chrono's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.38</h2>
<p>This release bring a ca. 20% improvement to the performance of the
formatting code, and a convenient <code>days_since</code> method for the
<code>Weekday</code> type.</p>
<p>Chrono 0.4.38 also removes the long deprecated
<code>rustc-serialize</code> feature. Support for
<code>rustc-serialize</code> will be <a
href="https://redirect.github.com/rust-lang/rust/pull/116016">soft-destabilized
in the next Rust edition</a>. Removing the feature will not break
existing users of the feature; Cargo will just not update dependents
that rely on it to newer versions of chrono.</p>
<p>In chrono 0.4.36 we made an accidental breaking change by switching
to <code>derive(Copy)</code> for <code>DateTime</code> instead of a
manual implementation. It is reverted in this release.</p>
<h1>Removals</h1>
<ul>
<li>Remove <code>rustc-serialize</code> feature (<a
href="https://redirect.github.com/chronotope/chrono/issues/1548">#1548</a>,
thanks <a
href="https://github.com/workingjubilee"><code>@​workingjubilee</code></a>)</li>
</ul>
<h1>Additions</h1>
<ul>
<li>Add <code>Weekday::days_since</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1249">#1249</a>,
based on <a
href="https://redirect.github.com/chronotope/chrono/issues/216">#216</a>
by <a
href="https://github.com/clarfonthey"><code>@​clarfonthey</code></a>)</li>
<li>Add <code>TimeDelta::checked_mul</code> and
<code>TimeDelta::checked_div</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1565">#1565</a>,
thanks <a
href="https://github.com/Zomtir"><code>@​Zomtir</code></a>)</li>
</ul>
<h1>Fixes</h1>
<ul>
<li>Return error when rounding with a zero duration (<a
href="https://redirect.github.com/chronotope/chrono/issues/1474">#1474</a>,
thanks <a
href="https://github.com/Dav1dde"><code>@​Dav1dde</code></a>)</li>
<li>Manually implement <code>Copy</code> for <code>DateTime</code> if
offset is <code>Copy</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1573">#1573</a>)</li>
</ul>
<h1>Internal</h1>
<ul>
<li>Inline <code>test_encodable_json</code> and
<code>test_decodable_json</code> functions (<a
href="https://redirect.github.com/chronotope/chrono/issues/1550">#1550</a>)</li>
<li>CI: Reduce combinations in <code>cargo hack check</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1553">#1553</a>)</li>
<li>Refactor formatting code (<a
href="https://redirect.github.com/chronotope/chrono/issues/1335">#1335</a>)</li>
<li>Optimize number formatting (<a
href="https://redirect.github.com/chronotope/chrono/issues/1558">#1558</a>)</li>
<li>Only package files needed for building and testing (<a
href="https://redirect.github.com/chronotope/chrono/issues/1554">#1554</a>)</li>
</ul>
<p>Thanks to all contributors on behalf of the chrono team, <a
href="https://github.com/djc"><code>@​djc</code></a> and <a
href="https://github.com/pitdicker"><code>@​pitdicker</code></a>!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="352a35203a"><code>352a352</code></a>
Prepare 0.4.38</li>
<li><a
href="46d44d6074"><code>46d44d6</code></a>
Manually implement <code>Copy</code> for <code>DateTime</code> if offset
is <code>Copy</code></li>
<li><a
href="760eb660d3"><code>760eb66</code></a>
Update windows-bindgen requirement from 0.55 to 0.56</li>
<li><a
href="391187fff3"><code>391187f</code></a>
Return error when rounding with zero duration</li>
<li><a
href="ffc75e5705"><code>ffc75e5</code></a>
Add <code>TimeDelta::checked_mul</code> and
<code>TimeDelta::checked_div</code></li>
<li><a
href="f8cecbe57e"><code>f8cecbe</code></a>
Make <code>Weekday::num_days_from public</code>, rename to
<code>days_since</code>.</li>
<li><a
href="0cfc405d3e"><code>0cfc405</code></a>
Optimize number formatting</li>
<li><a
href="74ba83ba27"><code>74ba83b</code></a>
Take <code>pad</code> by value</li>
<li><a
href="78e79dbabf"><code>78e79db</code></a>
Match on tuples in <code>format_fixed</code></li>
<li><a
href="f3d76c7bb0"><code>f3d76c7</code></a>
Match on tuples in <code>format_numeric</code></li>
<li>Additional commits viewable in <a
href="https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chrono&package-manager=cargo&previous-version=0.4.37&new-version=0.4.38)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 09:56:04 +08:00
github-actions[bot]
9b72b4542c [add device]: LG V60 timelm (#1630)
LG V60 timelm has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1629

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-15 18:47:53 +08:00
weishu
b1a225799a manager: Allow to use other su to install 2024-04-15 12:32:29 +08:00
Weblate (bot)
2e2992a1c2 Translations update from Hosted Weblate (#1617)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: _wais <cikomo.game@gmail.com>
Co-authored-by: rehork <cooky@e.email>
Co-authored-by: Bilchuk Radomyr <bilchuk.radomyr@gmail.com>
Co-authored-by: Muhammad Bahaa <muhammad.bahaa1@gmail.com>
Co-authored-by: Nostalgia <2455367098@qq.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Fede2782 <78815152+Fede2782@users.noreply.github.com>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: sus <jeffpeng2012@gmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
2024-04-15 11:56:04 +08:00
5ec1cff
50387a9d3d ksud: do not abort if backup failed (#1627) 2024-04-14 15:55:47 +08:00
5ec1cff
488564fe76 ksud: only backup stock boot if flashing (#1626) 2024-04-14 14:00:59 +08:00
LoveSy
37df6ffc52 Merge pull request #1623 from 5ec1cff/5ec1cff-patch-1
fix boot restore
2024-04-14 01:56:49 +08:00
5ec1cff
ee05aed5e5 fix boot restore 2024-04-14 01:46:12 +08:00
5ec1cff
60dd52afd1 ksud: backup stock image and use it when restore (#1619) 2024-04-14 00:45:06 +08:00
Wang Han
1be266b6f6 Register receiver with RECEIVER_EXPORTED (#1620) 2024-04-13 18:48:29 +08:00
Caner Karaca
1e029eddee Update (#1618) 2024-04-13 16:43:45 +08:00
weishu
f0b18a1e18 manager: Add uninstall ui 2024-04-13 12:49:54 +08:00
Weblate (bot)
a7f54af273 Translations update from Hosted Weblate (#1578)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: _wais <cikomo.game@gmail.com>
Co-authored-by: rehork <cooky@e.email>
Co-authored-by: Bilchuk Radomyr <bilchuk.radomyr@gmail.com>
2024-04-12 22:11:26 +08:00
5ec1cff
c2e71f1141 update avd 15 manifest (#1616) 2024-04-12 20:50:28 +08:00
dependabot[bot]
7c9246bc15 build(deps): bump agp from 8.3.1 to 8.3.2 in /manager (#1611)
Bumps `agp` from 8.3.1 to 8.3.2.
Updates `com.android.application` from 8.3.1 to 8.3.2

Updates `com.android.library` from 8.3.1 to 8.3.2


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 14:36:22 +08:00
weishu
6ea2438425 ksud: Fix clippy 2024-04-12 10:36:34 +08:00
dependabot[bot]
705a9b7238 build(deps): bump encoding_rs from 0.8.33 to 0.8.34 in /userspace/ksud (#1612)
Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs) from 0.8.33
to 0.8.34.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a0c5c578db"><code>a0c5c57</code></a>
Increment version number to 0.8.34</li>
<li><a
href="8bcba0b8cd"><code>8bcba0b</code></a>
Move a negation to the right place and cargo fmt</li>
<li><a
href="29668e345a"><code>29668e3</code></a>
Move a negation to the right place</li>
<li><a
href="dbf673ef1c"><code>dbf673e</code></a>
Work around bad SIMD codegen on 32-bit ARM</li>
<li><a
href="3c96213bf7"><code>3c96213</code></a>
Add rust-version to Cargo.toml</li>
<li><a
href="98f3c6a657"><code>98f3c6a</code></a>
Update README</li>
<li><a
href="598edc8602"><code>598edc8</code></a>
Port from packed_simd crate to portable_simd feature (aarch64 part)</li>
<li><a
href="2d198c8354"><code>2d198c8</code></a>
Port from packed_simd crate to portable_simd feature (x86_64 part)</li>
<li><a
href="9217fd2178"><code>9217fd2</code></a>
Remove the remains of Travis</li>
<li><a
href="966fc0aa72"><code>966fc0a</code></a>
wip mem</li>
<li>Additional commits viewable in <a
href="https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=encoding_rs&package-manager=cargo&previous-version=0.8.33&new-version=0.8.34)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-12 00:48:04 +08:00
weishu
3010ed89c0 ksud: Add boot restore 2024-04-12 00:47:29 +08:00
dependabot[bot]
2d86c8bbfc build(deps): bump anyhow from 1.0.81 to 1.0.82 in /userspace/ksud (#1613)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.81 to 1.0.82.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/anyhow/releases">anyhow's
releases</a>.</em></p>
<blockquote>
<h2>1.0.82</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="074bdea1c7"><code>074bdea</code></a>
Release 1.0.82</li>
<li><a
href="47a4fbfa36"><code>47a4fbf</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/360">#360</a>
from dtolnay/docensure</li>
<li><a
href="c5af1db020"><code>c5af1db</code></a>
Make ensure's doc comment apply to the cfg(not(doc)) macro too</li>
<li><a
href="bebc7a2fe4"><code>bebc7a2</code></a>
Revert &quot;Temporarily disable miri on doctests&quot;</li>
<li><a
href="f2c4db9b47"><code>f2c4db9</code></a>
Update ui test suite to nightly-2024-03-31</li>
<li><a
href="028cbeedf5"><code>028cbee</code></a>
Explicitly install a Rust toolchain for cargo-outdated job</li>
<li><a
href="7a4cac5192"><code>7a4cac5</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/358">#358</a>
from dtolnay/workspacewrapper</li>
<li><a
href="939db012c2"><code>939db01</code></a>
Apply RUSTC_WORKSPACE_WRAPPER</li>
<li><a
href="9f84a37551"><code>9f84a37</code></a>
Temporarily disable miri on doctests</li>
<li><a
href="45e5a589e9"><code>45e5a58</code></a>
Ignore dead code lint in test</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.81&new-version=1.0.82)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 13:33:26 +08:00
ice
6aa0e4cf28 manager: Use AM instead of Monkey to start the app. (#1614)
Using Monkey will unlock the rotation, and possibly more unintended
behavior.
link: [ADB shell monkey command changing device orientation
lock](https://stackoverflow.com/q/56684778)
2024-04-11 13:30:06 +08:00
dependabot[bot]
582e81d5af build(deps-dev): bump vitepress from 1.0.2 to 1.1.0 in /website (#1608)
Bumps [vitepress](https://github.com/vuejs/vitepress) from 1.0.2 to
1.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/releases">vitepress's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.0</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">vitepress's
changelog</a>.</em></p>
<blockquote>
<h1><a
href="https://github.com/vuejs/vitepress/compare/v1.0.2...v1.1.0">1.1.0</a>
(2024-04-09)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> hashchange should only be triggered for
same page navigations (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3768">#3768</a>)
(<a
href="2a9fc2a26b">2a9fc2a</a>)</li>
<li><strong>client:</strong> emit correct <code>Event</code> instance in
hashchange event</li>
<li><strong>theme:</strong> remove small layout shift on <code>On this
page</code> button (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3767">#3767</a>)
(<a
href="5f28e74abf">5f28e74</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>client:</strong> add <code>hash</code> property to
<code>useData()</code></li>
<li><strong>theme:</strong> update Inter to version 4 (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3693">#3693</a>)
(<a
href="https://redirect.github.com/vuejs/vitepress/issues/3694">#3694</a>)
(<a
href="ffafa31b92">ffafa31</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="32e105cd56"><code>32e105c</code></a>
release: v1.1.0</li>
<li><a
href="9de259371e"><code>9de2593</code></a>
chore: bump deps, lock mdit to v2.0</li>
<li><a
href="2a9fc2a26b"><code>2a9fc2a</code></a>
fix: hashchange should only be triggered for same page navigations (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3768">#3768</a>)</li>
<li><a
href="5f28e74abf"><code>5f28e74</code></a>
fix(theme): remove small layout shift on <code>On this page</code>
button (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3767">#3767</a>)</li>
<li><a
href="b45217c136"><code>b45217c</code></a>
docs(ru): update translations (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3765">#3765</a>)</li>
<li><a
href="229c168a36"><code>229c168</code></a>
docs: make vue as peer dependency section clearer (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3687">#3687</a>)</li>
<li><a
href="c4ae9d3cde"><code>c4ae9d3</code></a>
docs: update default-theme sidebar type (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3715">#3715</a>)</li>
<li><a
href="54c46e7ceb"><code>54c46e7</code></a>
docs: adjust install and init commands</li>
<li><a
href="58324020c7"><code>5832402</code></a>
docs(ru): add Russian translation (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3709">#3709</a>)</li>
<li><a
href="3113dad002"><code>3113dad</code></a>
docs: add Stormkit as deployment platform (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3751">#3751</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vuejs/vitepress/compare/v1.0.2...v1.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitepress&package-manager=npm_and_yarn&previous-version=1.0.2&new-version=1.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 19:51:22 +08:00
dependabot[bot]
605d33056b build(deps): bump androidx.compose:compose-bom from 2024.03.00 to 2024.04.00 in /manager (#1589)
Bumps androidx.compose:compose-bom from 2024.03.00 to 2024.04.00.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.compose:compose-bom&package-manager=gradle&previous-version=2024.03.00&new-version=2024.04.00)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 12:42:53 +08:00
dependabot[bot]
112321f9cc build(deps): bump com.google.devtools.ksp from 1.9.23-1.0.19 to 1.9.23-1.0.20 in /manager (#1593)
Bumps [com.google.devtools.ksp](https://github.com/google/ksp) from
1.9.23-1.0.19 to 1.9.23-1.0.20.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/ksp/releases">com.google.devtools.ksp's
releases</a>.</em></p>
<blockquote>
<h2>1.9.23-1.0.20</h2>
<h2>KSP1 issues fixed</h2>
<ul>
<li>performance optimization for certain workload consists of heavy Java
files, including
<ul>
<li>Replace IdKey's impl with identityHashCode <a
href="https://redirect.github.com/google/ksp/issues/1804">#1804</a></li>
<li>Cache enclosed descriptors by name <a
href="https://redirect.github.com/google/ksp/issues/1808">#1808</a></li>
</ul>
</li>
<li>Add excludedSources to the KSP extension object <a
href="https://redirect.github.com/google/ksp/issues/1793">#1793</a>
thanks to <a
href="https://github.com/bitspittle"><code>@​bitspittle</code></a></li>
</ul>
<h2>KSP2 issues fixed</h2>
<ul>
<li>NoClassDefFoundError for LZ4Factory when trying KSP2 <a
href="https://redirect.github.com/google/ksp/issues/1713">#1713</a></li>
<li>Calling KSType.replace() with original arguments results in <!-- raw
HTML omitted --> <a
href="https://redirect.github.com/google/ksp/issues/1807">#1807</a></li>
<li>Static fields in base class appear in derived classes <a
href="https://redirect.github.com/google/ksp/issues/1744">#1744</a></li>
<li>fix backing field checking for top level callables</li>
<li>support sealed inheritors lookup.</li>
<li>support type alias for getSymbolsWithAnnotation</li>
<li>support more types for reference elements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a96538743e"><code>a965387</code></a>
UPDATE_KOTLIN_VERSION: 1.9.23</li>
<li><a
href="96361a97ac"><code>96361a9</code></a>
Downgrade Kotlin to 2.0.0-Beta4</li>
<li><a
href="ea7e9d2cd4"><code>ea7e9d2</code></a>
Revert &quot;UPDATE_KOTLIN_VERSION: 1.9.30-dev-2548&quot;</li>
<li><a
href="a2b9298c14"><code>a2b9298</code></a>
Revert &quot;UPDATE_KOTLIN_VERSION: 2.0.0-dev-4562&quot;</li>
<li><a
href="cdce1978a1"><code>cdce197</code></a>
Revert &quot;Downgrade Kotlin to 2.0.0-Beta4&quot;</li>
<li><a
href="4d5849a3a5"><code>4d5849a</code></a>
Revert &quot;UPDATE_KOTLIN_VERSION: 2.0.0-Beta5&quot;</li>
<li><a
href="5418453824"><code>5418453</code></a>
Remove dep to javax.annotation.ParametersAreNonnullByDefault</li>
<li><a
href="70a232306c"><code>70a2323</code></a>
UPDATE_KOTLIN_VERSION: 2.0.0-Beta5</li>
<li><a
href="815b7a072d"><code>815b7a0</code></a>
Keep more classes in uber jar</li>
<li><a
href="acc00dda96"><code>acc00dd</code></a>
Do not minimize lz4-java</li>
<li>Additional commits viewable in <a
href="https://github.com/google/ksp/compare/1.9.23-1.0.19...1.9.23-1.0.20">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.devtools.ksp&package-manager=gradle&previous-version=1.9.23-1.0.19&new-version=1.9.23-1.0.20)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 12:42:35 +08:00
5ec1cff
6c6fc44cae ci: add avd x86-64 a15 (#1598) 2024-04-08 12:42:20 +08:00
Tonklaistonton
11a98e855a add device (#1606)
add realme 9 pro 5g and oneplus nord ce 2 lite

Co-authored-by: weishu <twsxtd@gmail.com>
2024-04-08 12:42:11 +08:00
github-actions[bot]
464847daee [add device]: Galaxy S10e (#1600)
Galaxy S10e has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1599

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-04-08 12:41:39 +08:00
github-actions[bot]
2449b494a3 [add device]: Galaxy S10+ (#1602)
Galaxy S10+ has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1601

---------

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-04-08 12:40:24 +08:00
github-actions[bot]
637caa84ce [add device]: Galaxy S10 (#1604)
Galaxy S10 has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1603

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-08 12:36:25 +08:00
Wang Han
57314c9963 Exclude minidump.gz when collecting xiaomi logs (#1592)
Saves about ~80MB space.
2024-04-06 12:30:33 +08:00
sus
15970b321f Update README_TW.md (#1587) 2024-04-04 10:07:14 +08:00
github-actions[bot]
7e3c756803 [add device]: (#1583)
has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1582

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-04-03 15:15:52 +08:00
github-actions[bot]
11ff59a81c [add device]: (#1585)
has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1584

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-03 15:14:45 +08:00
Heiler Bemerguy
4f9bbf199b throne_tracker: Fix Manager sometimes not detecting KSU and optimize it (#1586)
The original logic was wrong and used 3 strlen()s for every file found,
wasting cpu.

Optimize it by first comparing only the filename length, given we
already know it,
and then strncmp() to compare with "base.apk"

Tested successfully on my Bandido Kernel (4.19)
2024-04-03 14:33:10 +08:00
dependabot[bot]
a34090bc57 build(deps-dev): bump vitepress from 1.0.1 to 1.0.2 in /website (#1576)
Bumps [vitepress](https://github.com/vuejs/vitepress) from 1.0.1 to
1.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/releases">vitepress's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.2</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">vitepress's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/vuejs/vitepress/compare/v1.0.1...v1.0.2">1.0.2</a>
(2024-04-01)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>theme:</strong> text containing html not showing properly in
mobile nav menu (<a
href="3c8b4c7060">3c8b4c7</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3e95fa1028"><code>3e95fa1</code></a>
release: v1.0.2</li>
<li><a
href="3c8b4c7060"><code>3c8b4c7</code></a>
fix(theme): html text not showing properly in mobile nav menu</li>
<li><a
href="a6a7645e94"><code>a6a7645</code></a>
docs: typo (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3692">#3692</a>)</li>
<li><a
href="1e8b3679c8"><code>1e8b367</code></a>
docs(zh): sync and tweak translations (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3684">#3684</a>)</li>
<li>See full diff in <a
href="https://github.com/vuejs/vitepress/compare/v1.0.1...v1.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitepress&package-manager=npm_and_yarn&previous-version=1.0.1&new-version=1.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 23:03:26 +08:00
dependabot[bot]
be452c5a42 build(deps): bump actions/configure-pages from 4 to 5 (#1574)
Bumps
[actions/configure-pages](https://github.com/actions/configure-pages)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/configure-pages/releases">actions/configure-pages's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h1>Changelog</h1>
<ul>
<li>Attempt to auto-detect configuration files with varying file
extensions <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/139">#139</a>)</li>
<li>Convert errors into Actions-compatible logging with annotations <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/138">#138</a>)</li>
<li>Bump <code>@​actions/github</code> from 5.1.1 to 6.0.0 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/123">#123</a>)</li>
<li>Bump the non-breaking-changes group with 2 updates <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/136">#136</a>)</li>
<li>Update the Next.js configuration for v14 <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/137">#137</a>)</li>
<li>Bump the non-breaking-changes group with 3 updates <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/132">#132</a>)</li>
<li>Bump release-drafter/release-drafter from 5 to 6 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/133">#133</a>)</li>
<li>Bump github/codeql-action from 2 to 3 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/127">#127</a>)</li>
<li>Bump actions/checkout from 3 to 4 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/120">#120</a>)</li>
<li>Bump actions/setup-node from 3 to 4 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/118">#118</a>)</li>
<li>Bump the non-breaking-changes group with 1 update <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/configure-pages/issues/131">#131</a>)</li>
<li>Update Dependabot config to group non-breaking changes <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/configure-pages/issues/130">#130</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/configure-pages/compare/v4.0.0...v5.0.0">all
code changes</a> since previous release.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="983d7736d9"><code>983d773</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/139">#139</a>
from actions/config-auto-detect</li>
<li><a
href="9cf6e24f74"><code>9cf6e24</code></a>
Tweak comment</li>
<li><a
href="f304bd89be"><code>f304bd8</code></a>
Update distributables</li>
<li><a
href="215cd51eb0"><code>215cd51</code></a>
Attempt to detect existing config files matching the expected basename
plus o...</li>
<li><a
href="e9382ac9ad"><code>e9382ac</code></a>
Front-load the file extension warning</li>
<li><a
href="7781abd34b"><code>7781abd</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/configure-pages/issues/138">#138</a>
from actions/error-utils</li>
<li><a
href="fc47e3c838"><code>fc47e3c</code></a>
Update distributables</li>
<li><a
href="9c9f8a266f"><code>9c9f8a2</code></a>
Update tests to use the Octokit RequestError class</li>
<li><a
href="9a4705d653"><code>9a4705d</code></a>
Update distributables</li>
<li><a
href="f6ded38287"><code>f6ded38</code></a>
Fix syntax error and formatting</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/configure-pages/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/configure-pages&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 23:03:07 +08:00
Weblate (bot)
e7dfaefaac Translations update from Hosted Weblate (#1567)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
Co-authored-by: weishu tian <twsxtd@gmail.com>
Co-authored-by: _wais <cikomo.game@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: Kazuki Nakashima <flukfik41@gmail.com>
Co-authored-by: sus <jeffpeng2012@gmail.com>
Co-authored-by: Dawid2849 <dawid2849@gmail.com>
Co-authored-by: Dawid2849 <dawiddziewa24@gmail.com>
Co-authored-by: Federico Lombardo <fede2782@users.noreply.hosted.weblate.org>
Co-authored-by: Tebbe Ubben <kontakt@tebbeubben.de>
Co-authored-by: Fede2782 <78815152+Fede2782@users.noreply.github.com>
2024-04-02 23:02:48 +08:00
weishu
9cb28b6e92 [skip ci]: don't assign me 2024-04-02 20:49:09 +08:00
Ali Beyaz
6901371852 Update README_TR.md (#1568) 2024-04-02 08:24:31 +08:00
Rissu
828ce6d29d website: update repository link (#1569) 2024-04-02 08:23:47 +08:00
weishu
2df8caaa85 manager: Create new root shell for time consuming task 2024-04-01 12:34:42 +08:00
weishu
31fbeef7e3 manager: Add module shrink to settings. close #1572 2024-04-01 12:23:41 +08:00
Weblate (bot)
eba87b7223 Translations update from Hosted Weblate (#1548)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
Co-authored-by: weishu tian <twsxtd@gmail.com>
Co-authored-by: _wais <cikomo.game@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: Kazuki Nakashima <flukfik41@gmail.com>
Co-authored-by: sus <jeffpeng2012@gmail.com>
Co-authored-by: Dawid2849 <dawid2849@gmail.com>
Co-authored-by: Dawid2849 <dawiddziewa24@gmail.com>
Co-authored-by: Federico Lombardo <fede2782@users.noreply.hosted.weblate.org>
Co-authored-by: Tebbe Ubben <kontakt@tebbeubben.de>
2024-03-31 00:40:40 +08:00
weishu
24d77e0ad5 [skip ci]: Fix check build 2024-03-30 22:18:05 +08:00
P. Thịnh
13ae650445 Fixed link typo in kernel/Makefile (#1564)
I spotted this typo when building the Kernel.
2024-03-30 22:16:46 +08:00
github-actions[bot]
a43dddf6f1 [add device]: (#1563)
has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1562

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-30 21:01:23 +08:00
Light_summer
a81201f368 manager: Fix round corner for Module Info Card (#1565)
| Before | After |
| :----- | :----- |
|
![Screenshot_20240330-183552](https://github.com/tiann/KernelSU/assets/93428659/b42b2e90-2d52-4d0f-964a-2288aeec3d8a)
|
![Screenshot_20240330-183539](https://github.com/tiann/KernelSU/assets/93428659/8272cd5e-6bfc-4444-9bac-19d95cc4b9cb)
|
2024-03-30 21:00:44 +08:00
weishu
4a73672190 kernel: fix potential dead loop
Co-Authored-by: qwerty472123
2024-03-30 16:13:11 +08:00
weishu
942866d986 Revert "kernel: deny all unexpected signature block"
This reverts commit 869cd50b79.
2024-03-30 16:05:31 +08:00
weishu
d533c27e4f Revert "kernel: deny unexpected offset value for signing check"
This reverts commit 97ee114aa5.
2024-03-30 16:05:31 +08:00
weishu
97ee114aa5 kernel: deny unexpected offset value for signing check 2024-03-29 14:28:51 +08:00
weishu
869cd50b79 kernel: deny all unexpected signature block 2024-03-29 14:14:17 +08:00
dependabot[bot]
7fe07329fc build(deps): bump chrono from 0.4.35 to 0.4.37 in /userspace/ksud (#1552)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.35 to
0.4.37.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chronotope/chrono/releases">chrono's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.37</h2>
<p>Version 0.4.36 introduced an unexpected breaking change and was
yanked. In it <code>LocalResult</code> was renamed to
<code>MappedLocalTime</code> to avoid the impression that it is a
<code>Result</code> type were some of the results are errors. For
backwards compatibility a type alias with the old name was added.</p>
<p>As it turns out there is one case where a type alias behaves
differently from the regular enum: you can't import enum variants from a
type alias with <code>use chrono::LocalResult::*</code>. With 0.4.37 we
make the new name <code>MappedLocalTime</code> the alias, but keep using
it in function signatures and the documentation as much as possible.</p>
<p>See also the release notes of <a
href="https://github.com/chronotope/chrono/releases/tag/v0.4.36">chrono
0.4.36</a> from yesterday for the yanked release.</p>
<h2>v0.4.36</h2>
<p>This release un-deprecates the methods on <code>TimeDelta</code> that
were deprecated with the 0.4.35 release because of the churn they are
causing for the ecosystem.</p>
<p>New is the <code>DateTime::with_time()</code> method. As an example
of when it is useful:</p>
<pre lang="rust"><code>use chrono::{Local, NaiveTime};
// Today at 12:00:00
let today_noon = Local::now().with_time(NaiveTime::from_hms_opt(12, 0,
0).unwrap());
</code></pre>
<h1>Additions</h1>
<ul>
<li>Add <code>DateTime::with_time()</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1510">#1510</a>)</li>
</ul>
<h1>Deprecations</h1>
<ul>
<li>Revert <code>TimeDelta</code> deprecations (<a
href="https://redirect.github.com/chronotope/chrono/issues/1543">#1543</a>)</li>
<li>Deprecate <code>TimeStamp::timestamp_subsec_nanos</code>, which was
missed in the 0.4.35 release (<a
href="https://redirect.github.com/chronotope/chrono/issues/1486">#1486</a>)</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>Correct version number of deprecation notices (<a
href="https://redirect.github.com/chronotope/chrono/issues/1486">#1486</a>)</li>
<li>Fix some typos (<a
href="https://redirect.github.com/chronotope/chrono/issues/1505">#1505</a>)</li>
<li>Slightly improve serde documentation (<a
href="https://redirect.github.com/chronotope/chrono/issues/1519">#1519</a>)</li>
<li>Main documentation: simplify links and reflow text (<a
href="https://redirect.github.com/chronotope/chrono/issues/1535">#1535</a>)</li>
</ul>
<h1>Internal</h1>
<ul>
<li>CI: Lint benchmarks (<a
href="https://redirect.github.com/chronotope/chrono/issues/1489">#1489</a>)</li>
<li>Remove unnessary <code>Copy</code> and <code>Send</code> impls (<a
href="https://redirect.github.com/chronotope/chrono/issues/1492">#1492</a>,
thanks <a
href="https://github.com/erickt"><code>@​erickt</code></a>)</li>
<li>Backport streamlined <code>NaiveDate</code> unit tests (<a
href="https://redirect.github.com/chronotope/chrono/issues/1500">#1500</a>,
thanks <a
href="https://github.com/Zomtir"><code>@​Zomtir</code></a>)</li>
<li>Rename <code>LocalResult</code> to <code>TzResolution</code>, add
alias (<a
href="https://redirect.github.com/chronotope/chrono/issues/1501">#1501</a>)</li>
<li>Update windows-bindgen to 0.55 (<a
href="https://redirect.github.com/chronotope/chrono/issues/1504">#1504</a>)</li>
<li>Avoid duplicate imports, which generate warnings on nightly (<a
href="https://redirect.github.com/chronotope/chrono/issues/1507">#1507</a>)</li>
<li>Add extra debug assertions to <code>NaiveDate::from_yof</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1518">#1518</a>)</li>
<li>Some small simplifications to <code>DateTime::date_naive</code> and
<code>NaiveDate::diff_months</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1530">#1530</a>)</li>
<li>Remove <code>unwrap</code> in Unix <code>Local</code> type (<a
href="https://redirect.github.com/chronotope/chrono/issues/1533">#1533</a>)</li>
<li>Use different method to ignore feature-dependent doctests (<a
href="https://redirect.github.com/chronotope/chrono/issues/1534">#1534</a>)</li>
</ul>
<p>Thanks to all contributors on behalf of the chrono team, <a
href="https://github.com/djc"><code>@​djc</code></a> and <a
href="https://github.com/pitdicker"><code>@​pitdicker</code></a>!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7d62045ec4"><code>7d62045</code></a>
Prepare 0.4.37</li>
<li><a
href="6857d00070"><code>6857d00</code></a>
Hide re-export of <code>LocalResult</code> in docs</li>
<li><a
href="9e22e48d15"><code>9e22e48</code></a>
Swap <code>MappedLocalTime</code> and <code>LocalResult</code> type
alias</li>
<li><a
href="ca3c3b6293"><code>ca3c3b6</code></a>
Prepare 0.4.36</li>
<li><a
href="1850198da9"><code>1850198</code></a>
Revert <code>TimeDelta</code> deprecations</li>
<li><a
href="e05ba8b9c2"><code>e05ba8b</code></a>
Add <code>MappedLocalTime::and_then</code></li>
<li><a
href="3adfd88ce0"><code>3adfd88</code></a>
Main documentation: simplify links and reflow text</li>
<li><a
href="1e8df65f47"><code>1e8df65</code></a>
Rustfmt doc comments</li>
<li><a
href="1b57859782"><code>1b57859</code></a>
Run doctests with <code>alloc</code> feature if possible</li>
<li><a
href="6f2c7ccabd"><code>6f2c7cc</code></a>
Use different method to run feature-dependent doctests</li>
<li>Additional commits viewable in <a
href="https://github.com/chronotope/chrono/compare/v0.4.35...v0.4.37">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chrono&package-manager=cargo&previous-version=0.4.35&new-version=0.4.37)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 09:15:40 +08:00
5ec1cff
fd17e852d0 kernel: no need to umount and mark as root for manager uid (#1549)
Co-authored-by: LoveSy <shana@zju.edu.cn>
2024-03-29 09:15:18 +08:00
Fede2782
f8c6c747b3 templates: fix italian templates language id (#1554)
Sorry for the previous PR.

This fixes #1553
2024-03-29 09:14:45 +08:00
Masum Reza
a5fa45baf2 templates: Add bn translation for templates (#1555)
For the following templates:
- adb
- cemiuiler
- incompetent.root
- kernelmanager
- nethunter
- rootexplorer
- system
2024-03-29 09:14:02 +08:00
Fede2782
e1c59f8e18 template: add Italian translations (#1553) 2024-03-28 21:30:04 +08:00
D8G Official
444574739c Fix missing semicolon (#1551)
Fix build non gki kernel
2024-03-28 20:22:00 +08:00
Coconut
4f05fe226e kernel:Add Huawei hisi check (#1545)
Use huawei_hisi_check.h to determine whether it is an old Huawei
HiSilicon device.
Solve:  
1. Compatible with non-GKI Huawei HiSilicon devices
2. Solve different bugs in EMUI of different system versions
3. Does not affect other devices
2024-03-28 14:20:00 +08:00
Weblate (bot)
58416be4a5 Translations update from Hosted Weblate (#1523)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
Co-authored-by: weishu tian <twsxtd@gmail.com>
Co-authored-by: _wais <cikomo.game@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: Kazuki Nakashima <flukfik41@gmail.com>
Co-authored-by: sus <jeffpeng2012@gmail.com>
2024-03-28 11:16:15 +08:00
weishu
eb5b36f138 ksud: Fix debug set manager 2024-03-27 18:13:47 +08:00
weishu
9ffdd171f6 kernel: fix debug set manager 2024-03-27 17:58:47 +08:00
weishu
4ac203a78d kernel: Fix misleading log 2024-03-27 17:29:03 +08:00
weishu
c9d8c62497 [skip ci]: Fix check build kernel 2024-03-27 16:31:21 +08:00
CallMESuper
8fe19d3876 kernel: fix issue with dfd parameter retrieval (#1543)
Although in most cases, this system call might not be used, or when
called, AT_FDCWD(-100) is passed in.
2024-03-27 16:29:53 +08:00
weishu
09402ccfa6 manager: Fix template escape 2024-03-27 14:17:39 +08:00
weishu
5f7d4b609f kernel: Fix wrong kfree 2024-03-27 13:49:09 +08:00
weishu
eea2287a39 Update nethunter.root 2024-03-27 13:13:39 +08:00
weishu
ed08f4e9af ci: remove build-ksud workflow becuase we build it in manager 2024-03-27 12:46:17 +08:00
weishu
511a671824 ci: don't build lkm and ksud alone, always build in manager 2024-03-27 12:42:08 +08:00
5ec1cff
e51c78ada9 fix avd kernel build (#1540) 2024-03-27 12:30:40 +08:00
weishu
eb24884684 kernel: alloc path on stack; don't follow symlink 2024-03-27 11:51:41 +08:00
dependabot[bot]
ac56a017ab build(deps): bump serde_json from 1.0.114 to 1.0.115 in /userspace/ksud (#1536)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.114 to
1.0.115.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.115</h2>
<ul>
<li>Documentation improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1ebf3888e"><code>b1ebf38</code></a>
Release 1.0.115</li>
<li><a
href="c3dc153e06"><code>c3dc153</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1119">#1119</a>
from titaniumtraveler/pr</li>
<li><a
href="218770bb75"><code>218770b</code></a>
Explicitly install a Rust toolchain for cargo-outdated job</li>
<li><a
href="840da8e892"><code>840da8e</code></a>
Fix missing backticks in doc comments</li>
<li><a
href="3a3f61b1c9"><code>3a3f61b</code></a>
Temporarily disable miri on doctests</li>
<li><a
href="4a0be88b5a"><code>4a0be88</code></a>
Format regression tests with rustfmt</li>
<li><a
href="d2dbbf7055"><code>d2dbbf7</code></a>
Ignore dead code lint in tests</li>
<li><a
href="8e7b37bf7e"><code>8e7b37b</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1118">#1118</a>
from serde-rs/transparent</li>
<li><a
href="a25f6c6f2a"><code>a25f6c6</code></a>
Remove conditional on repr(transparent)</li>
<li><a
href="fedf8341ee"><code>fedf834</code></a>
Ignore non_local_definitions false positive in test</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.114&new-version=1.0.115)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 09:43:46 +08:00
dependabot[bot]
801de95d1a build(deps): bump clap from 4.5.3 to 4.5.4 in /userspace/ksud (#1537)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.3 to 4.5.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.4</h2>
<h2>[4.5.4] - 2024-03-25</h2>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Allow non-literal <code>#[arg(id)]</code>
attributes again</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.4] - 2024-03-25</h2>
<h3>Fixes</h3>
<ul>
<li><em>(derive)</em> Allow non-literal <code>#[arg(id)]</code>
attributes again</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5e4facf76f"><code>5e4facf</code></a>
chore: Release</li>
<li><a
href="8880b0a5da"><code>8880b0a</code></a>
docs: Update changelog</li>
<li><a
href="132b5dded5"><code>132b5dd</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5425">#5425</a>
from epage/lit</li>
<li><a
href="df915fefef"><code>df915fe</code></a>
fix(derive): Re-allow expressions for id's</li>
<li><a
href="8eab48fa3c"><code>8eab48f</code></a>
refactor(derive): Make it easier to work with 'Name'</li>
<li><a
href="be73195ecf"><code>be73195</code></a>
refactor(derive): Clarify tests</li>
<li><a
href="024089bb60"><code>024089b</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5415">#5415</a>
from Pi-Cla/patch-1</li>
<li><a
href="3b35dba160"><code>3b35dba</code></a>
docs: Add mention of nushell to clap_complete README</li>
<li><a
href="58469d1669"><code>58469d1</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5405">#5405</a>
from epage/docs</li>
<li><a
href="655d8295a7"><code>655d829</code></a>
docs(derive): Fix ToC links within tutorial chapters</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/v4.5.3...v4.5.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.3&new-version=4.5.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 09:43:26 +08:00
longhuan1999
e4c2f3eb20 ci: fix WSA ci to adapt to the change of kernel/Makefile (#1534) 2024-03-27 09:43:10 +08:00
weishu
006a1b7657 kernel: continue search when open some dir failed 2024-03-26 22:56:59 +08:00
dependabot[bot]
5068e2fcc4 build(deps): bump which from 6.0.0 to 6.0.1 in /userspace/ksud (#1525)
Bumps [which](https://github.com/harryfei/which-rs) from 6.0.0 to 6.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/harryfei/which-rs/releases">which's
releases</a>.</em></p>
<blockquote>
<h2>6.0.1</h2>
<ul>
<li>Remove dependency on <code>once_cell</code> for Windows users,
replace with <code>std::sync::OnceLock</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md">which's
changelog</a>.</em></p>
<blockquote>
<h2>6.0.1</h2>
<ul>
<li>Remove dependency on <code>once_cell</code> for Windows users,
replace with <code>std::sync::OnceLock</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7c8a898a0d"><code>7c8a898</code></a>
bump patch version</li>
<li><a
href="e95dca277b"><code>e95dca2</code></a>
remove dependency on once_cell</li>
<li><a
href="071683c2d5"><code>071683c</code></a>
Use winsafe over windows-sys, and reduce dependency on rustix</li>
<li><a
href="96a8004f45"><code>96a8004</code></a>
Upgrade deps, move to 6.0.0</li>
<li>See full diff in <a
href="https://github.com/harryfei/which-rs/compare/6.0.0...6.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=which&package-manager=cargo&previous-version=6.0.0&new-version=6.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-26 18:11:54 +08:00
dependabot[bot]
c35f7e984d build(deps): bump regex from 1.10.3 to 1.10.4 in /userspace/ksud (#1526)
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.3 to 1.10.4.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="aa2d8bd8be"><code>aa2d8bd</code></a>
1.10.4</li>
<li><a
href="088d7f3269"><code>088d7f3</code></a>
api: add Cow guarantee to replace API</li>
<li><a
href="a5ae35153a"><code>a5ae351</code></a>
regex-automata-0.4.6</li>
<li><a
href="9cf4a42a93"><code>9cf4a42</code></a>
automata: fix bug where reverse NFA lacked an unanchored prefix</li>
<li><a
href="10fe722a3f"><code>10fe722</code></a>
style: clean up some recent lint violations</li>
<li><a
href="d7f9347f2a"><code>d7f9347</code></a>
regex-automata-0.4.5</li>
<li><a
href="07ef7f1550"><code>07ef7f1</code></a>
automata: make additional prefileter metadata public</li>
<li>See full diff in <a
href="https://github.com/rust-lang/regex/compare/1.10.3...1.10.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=regex&package-manager=cargo&previous-version=1.10.3&new-version=1.10.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-26 18:11:39 +08:00
weishu
05366ca7d0 ksud: fmt 2024-03-26 17:17:19 +08:00
5ec1cff
8b85e003f6 manager: refine webui (#1535) 2024-03-26 17:16:01 +08:00
5ec1cff
c4d28e6256 manager: open webui in single task (#1531) 2024-03-26 08:55:34 +08:00
Jprimero15
cb7f414e39 kernel: guard "umount for uid" logprint with CONFIG_KSU_DEBUG (#1519)
Its too spammy to be on non-debug mode.
2024-03-24 21:42:23 +08:00
weishu
858ec910fd kernel: clean memory when exit 2024-03-24 16:41:53 +08:00
Caner Karaca
5167dc7352 Update Workflows and Dependencies (#1512)
Corrections would be very welcome.

---------

Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-24 15:40:10 +08:00
Jprimero15
96242df228 kernel: make for loop compatible (#1517) 2024-03-24 15:04:57 +08:00
weishu
dc5f911e43 kernel: remove become_manager and minor refactors 2024-03-24 11:20:43 +08:00
5ec1cff
fc613d5b6a manager: splash screen follows system dark mode (#1515) 2024-03-24 11:19:44 +08:00
Forget
f3cdfab88f website: docs: zh_CN: Sync to en as path_umount (#1516)
Signed-off-by: xiaoleGun <1592501605@qq.com>
2024-03-24 11:19:12 +08:00
weishu
b5cc931d00 kernel: Fix format error 2024-03-24 00:03:59 +08:00
weishu
e1f9900b2f kernel: simplify prctl 2024-03-23 23:11:47 +08:00
weishu
a5e3cab177 kernel: Fix compile error above 6.1 2024-03-23 23:11:47 +08:00
igor
4adc9873a9 website: update translation (#1514) 2024-03-23 21:50:43 +08:00
weishu
9a04211051 kernel: Let the kernel choose who is qualified to be the manager. 2024-03-23 21:48:03 +08:00
sus
9403c8f606 Updated translations for the website and templates. (#1513)
Mainly updates in traditional Chinese, but also fixes a typo in
simplified Chinese.
2024-03-23 19:44:02 +08:00
weishu
998664402d manager: upgrade apksign plugin 2024-03-23 16:54:59 +08:00
weishu
f73885fc95 website: Add docs for LKM mode 2024-03-23 16:05:21 +08:00
weishu
7451d0fb83 manager: make some shell op suspend 2024-03-23 15:12:34 +08:00
weishu
c924c655df ksud: fix supported kmi 2024-03-23 13:59:05 +08:00
weishu
98030ee1ae manager: support choose kmi manually. close #1496 2024-03-23 12:30:27 +08:00
weishu
e124aab76a manager: get kmi info from ksud 2024-03-23 10:53:19 +08:00
weishu
ef92c32729 ksud: add boot-info cli 2024-03-23 10:46:16 +08:00
weishu
b2d0de325f manager: allow scroll in settings screen. close #1501 2024-03-23 10:26:56 +08:00
weishu
fd7234bf11 ksud: rename patched boot. close #1511 2024-03-23 10:06:37 +08:00
dependabot[bot]
c189320a66 build(deps-dev): bump vitepress from 1.0.0-rc.45 to 1.0.1 in /website (#1510)
Bumps [vitepress](https://github.com/vuejs/vitepress) from 1.0.0-rc.45
to 1.0.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/releases">vitepress's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.1</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v1.0.0</h2>
<p>Please refer to <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vuejs/vitepress/blob/main/CHANGELOG.md">vitepress's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/vuejs/vitepress/compare/v1.0.0...v1.0.1">1.0.1</a>
(2024-03-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>build:</strong> vendor vue-demi to avoid resolution issues
with yarn berry (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3680">#3680</a>)
(<a
href="5d3cb96ac3">5d3cb96</a>)</li>
</ul>
<h1><a
href="https://github.com/vuejs/vitepress/compare/v1.0.0-rc.45...v1.0.0">1.0.0</a>
(2024-03-21)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>build:</strong> resolve pattern relative to srcDir instead
of root in createContentLoader (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3638">#3638</a>)
(<a
href="59183e9cef">59183e9</a>)</li>
<li><strong>localSearch:</strong> remove empty titles that may appear in
search results (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3665">#3665</a>)
(<a
href="f7aef3ca23">f7aef3c</a>)</li>
<li><strong>theme:</strong> fixed sidebar expand caret showing when no
children are present (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3657">#3657</a>)
(<a
href="e13f93292c">e13f932</a>)</li>
<li><strong>theme:</strong> ignore inner-page items in next/prev link
(<a
href="https://redirect.github.com/vuejs/vitepress/issues/3663">#3663</a>)
(<a
href="b50a8a1325">b50a8a1</a>)</li>
<li><strong>theme:</strong> local nav separator not visible on pages
having no outline (<a
href="1909041715">1909041</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li><strong>theme:</strong> allow selectively disabling external link
icon on navbar items (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3607">#3607</a>)
(<a
href="5f6297cb3d">5f6297c</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0b45abd7dd"><code>0b45abd</code></a>
release: v1.0.1</li>
<li><a
href="66bae6bff7"><code>66bae6b</code></a>
chore: bump deps</li>
<li><a
href="5d3cb96ac3"><code>5d3cb96</code></a>
fix(build): ship built-in vue-demi to avoid resolution issues (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3680">#3680</a>)</li>
<li><a
href="05061bd3d2"><code>05061bd</code></a>
release: v1.0.0</li>
<li><a
href="88a4284f3a"><code>88a4284</code></a>
docs: tweak intro perf section</li>
<li><a
href="0b68382121"><code>0b68382</code></a>
docs: document metaChunk</li>
<li><a
href="38ac579d17"><code>38ac579</code></a>
chore: bump vite version</li>
<li><a
href="f7aef3ca23"><code>f7aef3c</code></a>
fix(localSearch): remove empty titles that may appear in search results
(<a
href="https://redirect.github.com/vuejs/vitepress/issues/3665">#3665</a>)</li>
<li><a
href="e13f93292c"><code>e13f932</code></a>
fix(theme): fixed sidebar expand caret showing when no children are
present (...</li>
<li><a
href="b50a8a1325"><code>b50a8a1</code></a>
fix(theme): ignore inner-page items in next/prev link (<a
href="https://redirect.github.com/vuejs/vitepress/issues/3663">#3663</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vuejs/vitepress/compare/v1.0.0-rc.45...v1.0.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vitepress&package-manager=npm_and_yarn&previous-version=1.0.0-rc.45&new-version=1.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 22:12:11 +08:00
weishu
c46fefc58e ci: upload ksud for release 2024-03-22 12:01:44 +08:00
dependabot[bot]
24385691ea build(deps): bump androidx.compose:compose-bom from 2024.02.02 to 2024.03.00 in /manager (#1497)
Bumps androidx.compose:compose-bom from 2024.02.02 to 2024.03.00.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=androidx.compose:compose-bom&package-manager=gradle&previous-version=2024.02.02&new-version=2024.03.00)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 10:59:47 +08:00
Ali Beyaz
3ebe2c6a81 Turkish translation of adaway.root (#1500) 2024-03-22 09:17:07 +08:00
weishu
3291538446 manager: allow to query language if country is unknown. close #1495 2024-03-21 14:45:33 +08:00
weishu
e38a5e52d2 kernel: we should take ownership over fd 2024-03-21 14:15:11 +08:00
weishu
b3a15e2b6b kernel: Fix the incorrect judgment condition. 2024-03-21 11:48:02 +08:00
weishu
c5d423c4eb kernel: ignore all non application uid 2024-03-21 11:45:44 +08:00
weishu
4511d4b7bf kernel: remove unused module_api 2024-03-21 11:36:36 +08:00
weishu
64908583e9 kernel: Fix compile warning 2024-03-21 11:32:30 +08:00
weishu
c408710b11 kernel: minor fixes 2024-03-21 11:24:56 +08:00
weishu
bc1e03feb1 kernel: remove unused headers 2024-03-20 23:14:30 +08:00
Houvven
39b025b235 add user custom select lkm file button on install screen top bar (#1491) 2024-03-20 22:29:04 +08:00
weishu
65a0f0070a manager: print space to avoid button overlap. close #1478 2024-03-20 21:48:00 +08:00
weishu
8b71d3c9ba ksud: try find KMI from installed modules 2024-03-20 21:33:41 +08:00
dependabot[bot]
2bcb6a93c0 build(deps): bump com.google.devtools.ksp from 1.9.22-1.0.18 to 1.9.23-1.0.19 in /manager (#1487)
Bumps [com.google.devtools.ksp](https://github.com/google/ksp) from
1.9.22-1.0.18 to 1.9.23-1.0.19.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/google/ksp/releases">com.google.devtools.ksp's
releases</a>.</em></p>
<blockquote>
<h2>1.9.23-1.0.19</h2>
<h3>New APIs</h3>
<ul>
<li><a
href="https://redirect.github.com/google/ksp/issues/1708">#1708</a>
<code>SymbolProcessorEnvironment.kspVersion</code></li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1707">#1707</a>
<code>CodeGenerator.associateWithFunctions</code> and
<code>CodeGenerator.associateWithProperties</code></li>
</ul>
<h3>Issues fixed in KSP2</h3>
<ul>
<li><a
href="https://redirect.github.com/google/ksp/issues/1691">#1691</a>
IllegalStateException: Value type not found for value</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1719">#1719</a> The
order of symbols returned from Resolver.getSymbolsWithAnnotation() is
different</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1718">#1718</a>
Getting packageName of Kotlin types returns empty String</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1721">#1721</a>
KSAnnotation packageName is an empty String for a type from a different
module</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1722">#1722</a>
Resolver.getDeclarationsFromPackage() returns declarations from the
default package when passing in an unknown package</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1717">#1717</a>
Resolver.getJvmName() returns different results for annotation args</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1725">#1725</a>
asMemberOf() throws exception with a generic type without arguments</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1728">#1728</a>
ClassCastException when calling KSType.replace() with empty list</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1713">#1713</a>
NoClassDefFoundError for LZ4Factory when trying KSP2</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1665">#1665</a>
NoClassDefFound in ksp.useKSP2=true mode</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1733">#1733</a> ABI
incompatibility with kotlin-compiler-embeddable in 2.0.0-Beta4</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1714">#1714</a>
Generated resources are not added to KotlinCompilation inputs</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1747">#1747</a>
isCompanionObject is false for companion objects from KOTLIN_LIB</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1743">#1743</a>
Incorrect type parameter variances</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1759">#1759</a>
IllegalStateException when getting the modifiers from properties in a
Java annotation declaration</li>
</ul>
<h3>Issues fixed in KSP Gradle Plugin</h3>
<ul>
<li><a
href="https://redirect.github.com/google/ksp/issues/1712">#1712</a>
Analysis API artifacts have the wrong common-deps dependency</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1775">#1775</a>
1.0.18 creates circular dependencies with kapt tasks</li>
<li><a
href="https://redirect.github.com/google/ksp/issues/1772">#1772</a>
Update plugin com.google.devtools.ksp to v1.9.22-1.0.18 BUILD
FAILED</li>
</ul>
<h3>Known issues</h3>
<ul>
<li><a
href="https://redirect.github.com/google/ksp/issues/1776">#1776</a> KSP2
has higher memory usage when the compile classpath is very large.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/google/ksp/commits/1.9.23-1.0.19">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.google.devtools.ksp&package-manager=gradle&previous-version=1.9.22-1.0.18&new-version=1.9.23-1.0.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 21:03:39 +08:00
weishu
51880e3e90 ci: revert apksign plugin 2024-03-20 20:03:58 +08:00
weishu
4cd435b194 [no ci]: Don't upload ci manager 2024-03-20 19:22:41 +08:00
weishu
c986b7a53a Fix manager signature (#1489)
f48f2fea59
2024-03-20 19:12:39 +08:00
weishu
808342bf04 kernel: Fix sepolicy on ColorOS14 2024-03-20 17:43:37 +08:00
weishu
0b9f675013 ci: fix manager ci 2024-03-20 17:42:17 +08:00
weishu
f19d157887 manager: tar oplus log if exists 2024-03-20 16:24:36 +08:00
weishu
a160a7bf0d ci: fix typo 2024-03-20 16:13:54 +08:00
weishu
ef26aba4d8 ci: build manager when kernel changed, don't upload apk for pr builds 2024-03-20 15:42:29 +08:00
weishu
71b56ba700 kernel: fix panic cast 2024-03-20 15:39:07 +08:00
weishu
d958e6d7e7 ci: only post manager to tg 2024-03-20 15:34:06 +08:00
weishu
815f4d0428 kernel: hook newfstatat/faccessat syscall instead of unstable symbol 2024-03-20 15:15:26 +08:00
weishu
2a64784a33 kernel: hook syscall instead of unstable symbol 2024-03-20 14:21:19 +08:00
Caner Karaca
8f33926aa0 Add Dependabot, Update Dependencies and Workflows (#1440)
Build may fail because of some major dependency updates. Needs changes,
changes/fixes welcomed.

Main goal is keeping all things up-to-date.

---------

Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-20 12:52:34 +08:00
weishu
2b0d19928a manager: don't show mode for non gki 2024-03-19 21:12:43 +08:00
Fede2782
1fc1ffe2ab Docs: add backport notice in module umount docs (#1476)
This aims to uniform the documentation since the official introduction
of pre-GKI modules umount feature
2024-03-19 15:41:22 +08:00
dabao1955
97faab6be4 kernel: Use CONFIG_KSU=m to compile lkm (#1468)
before:
CONFIG_KSU=y
CONFIG_KSU_MODULE=y

after:
CONFIG_KSU=m

---------

Signed-off-by: dabao1955 <dabao1955@163.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-19 15:40:38 +08:00
backslashxx
247aa877e4 fixup! Suggest non-gki kernel users to backport path_umount (#1477)
My bad.

as reported by @AzusaHana on tg

![image](https://github.com/tiann/KernelSU/assets/118538522/a67f97c2-20f7-4ee6-9ae1-9f9089376857)
2024-03-19 15:39:54 +08:00
weishu
cbd47329e8 ci: no need to cache bot session 2024-03-19 13:32:29 +08:00
weishu
eb25644a0e ci: Don't upload images to group, uploading manager is enough because we can use manager to install directly 2024-03-19 13:31:02 +08:00
weishu
65b5ce2a50 ci: Remove kernel builds deprecated by Google 2024-03-19 12:19:02 +08:00
weishu
8c44e82db2 manager: Filter ignore case. fix #1470 2024-03-19 12:17:32 +08:00
weishu
79a1410fd3 manager: Correct minimal lkm version 2024-03-19 11:53:14 +08:00
weishu
ce0c397a65 kernel: support query working mode 2024-03-19 11:52:17 +08:00
weishu
99847cb986 manager: Show working mode 2024-03-19 11:50:45 +08:00
weishu
f41d73f7eb ksud: try parse kmi from gki modules if uname is modified 2024-03-19 10:37:17 +08:00
igor
7f73827658 website: update translation (#1473) 2024-03-19 09:53:45 +08:00
TheNeutrinoRaged
053fce61c0 [CI][A13] a13-5.10 security date 2024-04 (#1475)
My Pixel 7a March 2024 update has kernel version
5.10.189-android13-4-00012-g1217bb583cc5-ab11174560 and Android security
update 2024-03


https://cs.android.com/android/kernel/superproject/+/common-android13-5.10-2024-03:common/Makefile

Thanks
2024-03-19 09:51:38 +08:00
weishu
8ae6eaa5e3 ci: we don't need to build-lkm separetly because build-manager depends on it. 2024-03-18 23:24:32 +08:00
weishu
35553afd12 ci: Fix manager build 2024-03-18 23:20:41 +08:00
weishu
0c11d210a9 manager: support offline patch 2024-03-18 23:16:24 +08:00
weishu
9759a779cd embed LKM to ksud (#1472) 2024-03-18 23:12:46 +08:00
weishu
4bad691ec8 kernel: don't remove from sysfs when debug is enabled 2024-03-18 19:12:56 +08:00
weishu
fefb02e578 kernel: remove it from sysfs 2024-03-18 18:50:53 +08:00
Soo-Hwan Na
d6770467fa kernel: Make it compile on 3.18 (maybe older) kernels (#1460)
input-event-codes.h:

Input: add input-event-codes header file
(f902dd8934)
This was in 4.4-rc, so 4.4.0 or above has it else no.

aio.h:
fs: move struct kiocb to fs.h
(e2e40f2c1e)

Below this version, we need to explicitly include aio.h for struct kiocb
This was in 4.1-rc, so 4.0 or below should do the include

uaccess.h, sched.h was present for long times, but 4.10 splited out to
include/sched/ but the current ifdef is not including uaccess.h for
lower versions than 4.4. Fix it.
2024-03-18 13:13:00 +08:00
weishu
95dc7fcbe1 ci: fix version incorrect of avd kernel. android_ci config use sandbox and cannot access git 2024-03-18 12:30:09 +08:00
backslashxx
b4cfc2f298 Suggest non-gki kernel users to backport path_umount (#1464)
Most kernel builders have to touch their kernel source code anyway, why
not also tell them to backport path_umount so even non-gki users can
benefit from this?

I know this might be a bit controversial as this will raise the barrier
of entry, but the benefits are just so high.

Idea was from OnlyTomInSecond on KernelSU group chat way back, and it
has been on the discussions for some time

references:
https://t.me/KernelSU_group/27237/176515
https://t.me/KernelSU_group/3249/184908

https://github.com/tiann/KernelSU/discussions/955#discussioncomment-7617166

03d233db8b
https://github.com/tiann/KernelSU/pull/1060 


https://elixir.bootlin.com/linux/v5.9.1/source/fs/namespace.c#L1728
https://elixir.bootlin.com/linux/v5.10.9/source/fs/namespace.c#L1730
https://elixir.bootlin.com/linux/v6.5/source/fs/namespace.c#L1887
https://github.com/tiann/KernelSU/pull/1464#issuecomment-2002492107


Kernel side change examples
5.4
961d978862
4.19
164917f56d
4.14
c07c70a0c5
4.9
195f07593a
4.4
21ea33fe41
https://github.com/tiann/KernelSU/pull/1464#issuecomment-2002424069
ofcourse having someone on 3.18 confirm this will be nice.

**PROS**: umount modules for everyone
**CONS**: barrier of entry +1

---------

Co-authored-by: Christoph Hellwig <hch@lst.de>
Co-authored-by: Fede2782 <78815152+Fede2782@users.noreply.github.com>
Co-authored-by: Tom <31297720+onlytominsecond@users.noreply.github.com>
2024-03-18 10:27:31 +08:00
hosizoraru
6016937d5a ci: a14-6.1 patch level 2024-02 to 03 (#1465)
https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-03
android14-6.1-2024-03 已经发布

https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-03/Makefile
从 Makefile 来看依旧是 6.1.68
2024-03-17 21:47:00 +08:00
weishu
117b4dc051 manager: check init_boot more precisely 2024-03-17 17:41:35 +08:00
weishu
f6d552c797 ksud: ensure post-fs-data.d is created by post ota 2024-03-17 17:25:42 +08:00
weishu
a5e76553e4 manager: Fix new version tip 2024-03-17 13:30:13 +08:00
weishu
44c0b3a767 skipci: Fix release upload 2024-03-17 13:15:55 +08:00
weishu
177ef6b634 manager: Add tips for select boot image 2024-03-17 12:00:44 +08:00
Weblate (bot)
9a4ea27e9d Translations update from Hosted Weblate (#1454)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Misaka <79515833+misakazip@users.noreply.github.com>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Madis Otenurm <robotkoer@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: ngocanhtve <ngocanh.tve@gmail.com>
Co-authored-by: Integral <integral@member.fsf.org>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: weishu tian <twsxtd@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: charlotte <charlotterose@duck.com>
Co-authored-by: sus <jeffpeng2012@gmail.com>
Co-authored-by: Caner Karaca <canerkaraca_23@hotmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
2024-03-17 10:19:05 +08:00
igor
339e75be24 website: fix typo (#1456) 2024-03-17 09:08:46 +08:00
weishu
cf210d629f ci: Fix avd build (#1457) 2024-03-17 09:07:52 +08:00
weishu
ca480a5ec3 ci: Add lkm to release 2024-03-16 22:59:22 +08:00
weishu
23263a55de try fix 2024-03-16 12:21:03 +08:00
weishu
f65ea5a340 manager: Add install menu 2024-03-16 11:46:13 +08:00
weishu
ad6e2390f5 manager: Add CN translation 2024-03-16 11:37:31 +08:00
weishu
383f164453 remove ccache, bazel don't use 2024-03-16 11:37:30 +08:00
sewn
f675ce9aba [CI][A13] a13-5.10 patch level 2024-02 (#1449)
My Pixel 7a has a kernel version
`5.10.177-android13-4-00003-ga7208022a7ea-ab1081582`, with a security
patch of 2024-02, but the only available kernel build for that is
security patch 2023-07 which causes a bootloop.
2024-03-16 11:32:32 +08:00
weishu
7fd760f4f4 manager: Fix loading dialog 2024-03-16 11:13:50 +08:00
weishu
972d347a14 manager: Add string resource 2024-03-16 11:13:50 +08:00
weishu
ca8a88f0cc manager: Fix reboot button is missing when flash 2024-03-16 11:13:50 +08:00
weishu
e39be55db8 ksud: Fix magisk detect 2024-03-16 11:13:50 +08:00
Weblate (bot)
d00d3cbf82 Translations update from Hosted Weblate (#1437)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: Misaka <79515833+misakazip@users.noreply.github.com>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Madis Otenurm <robotkoer@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: ngocanhtve <ngocanh.tve@gmail.com>
Co-authored-by: Integral <integral@member.fsf.org>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: weishu tian <twsxtd@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: charlotte <charlotterose@duck.com>
Co-authored-by: sus <jeffpeng2012@gmail.com>
Co-authored-by: Caner Karaca <canerkaraca_23@hotmail.com>
2024-03-16 11:08:56 +08:00
cachiusa
7168a974be Add nethunter.root template (#1445)
This app requires DAC_OVERRIDE, DAC_READ_SEARCH, SYS_PTRACE, SYS_ADMIN
(for /data/local r/w) and SYS_CHROOT, SETGID (to run chroot and run it's
processes)

Devices with NetHunter installed is already considered compromised due
to lack of security features(like SELinux), therefore users are advised
not to store private data

It's not really worth restricting more capabilities of the app.
2024-03-16 10:54:00 +08:00
TheNeutrinoRaged
ddc086c4ef Update installation.md (#1451)
typo flush -> flash
2024-03-16 10:53:10 +08:00
sus
076511e275 Updated the Traditional Chinese translations for the website and templates. (#1453)
Signed-off-by: sus <54392299+jeffpeng3@users.noreply.github.com>
2024-03-16 10:52:53 +08:00
weishu
9d5529fb09 ksud: Fix magisk detect 2024-03-16 09:22:37 +08:00
weishu
ceb00dfdfd ci: remove avd build disk cache 2024-03-15 22:28:00 +08:00
weishu
39504ec2f3 ci: Fix release 2024-03-15 22:14:42 +08:00
weishu
1642e92c6f ci: Fix symbol strip 2024-03-15 21:00:44 +08:00
weishu
0f220f4044 ci: Fix release and LKM upload 2024-03-15 20:54:32 +08:00
weishu
2c34ec1742 ci: fix avd build 2024-03-15 20:29:53 +08:00
Ylarod
7568d55be1 Build KernelSU as LKM (#1254)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-15 18:53:24 +08:00
Coconut
e3998c0744 kernel:Compatible with devices based on Huawei EMUI10 (#1447)
EMUI 10 kernel version is 4.14.xxx.  
The SELinux of Huawei's modified EMUI10 kernel is still similar to the
EMUI 9 version. This commit not support HarmonyOS 2 based EMUI 10.
2024-03-14 15:18:59 +08:00
Ylarod
50914ce39b Fix typo (#1444) 2024-03-13 18:04:58 +08:00
zalnars
6af2480008 Fix typos (#1443) 2024-03-12 13:15:03 +08:00
余空
625e1aafd1 ci: Add more kernel branches (#1442)
* Android12 5.10.205
* Android13 5.10.205
* Android13 5.15.144
* Update os_patch_level
2024-03-11 21:37:16 +08:00
weishu
d77988c1ac ksud: catch dmesg in bootlog 2024-03-11 14:20:27 +08:00
weishu
fe7ec370d4 ksud: fmt & tidy 2024-03-11 14:01:21 +08:00
weishu
ce5aa990ed ksud: don't patch if it's already patched 2024-03-11 12:48:25 +08:00
TinyHai
22a1276a22 manager: a small fix in InstallScreen (#1434)
今天刷一个模块,刷入时要配置一些内容,然后发现每次输出我都得手动滑动一下才能看全内容,就很难受。气得我直接翻源码,就有了这个PR   :P

- 防止logContent在重组时丢失。
- 修复输出内容总是自动滚动到上次内容的最底部,而不是最新内容的最底部的f问题。
2024-03-08 19:35:52 +08:00
loogeo
f9a4186dc7 Update build-kernel-a14.yml (#1432) 2024-03-08 12:39:24 +08:00
lyf
8b29137e83 [CI][A14] a14-5.15 patch level 2024-01 and 2024-02 (#1433)
Since android14 5.15.137 (2024-01) was released with QPR3 Beta2 on Pixel
8(Pro)
2024-03-08 12:39:17 +08:00
igor
ae17001033 website: update translation (#1423) 2024-03-08 10:32:08 +08:00
Syuugo
0eea198c2f Upgrade Gradle and AGP (#1431)
and Fix batch line config
2024-03-08 10:31:41 +08:00
TinyHai
425713fad3 manager: refine dialog component & add an animation to UpdateCard (#1429) 2024-03-08 10:31:14 +08:00
WindyDay
7611accc33 Add docs about Android 14 Kernel (#1421)
First time Pr to this project, not sure if I done it in the correct
format
2024-03-05 23:39:55 +08:00
riChar
323eaa0242 Add types in package.json (#1415)
The package can not be imported into TS project without this option.
[docs](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package)
2024-03-04 23:05:38 +08:00
igor
217755bb5a website: fixed typos and update translation (#1407) 2024-03-04 19:16:39 +08:00
weishu
170cd3f912 ci: Add android 15 avd kernel (#1414) 2024-03-04 19:12:48 +08:00
weishu
1d7d406745 manager: change webview debug icon 2024-03-04 15:10:16 +08:00
weishu
c8fc6a0656 ksud: resize image if it is shrinked 2024-03-04 13:50:00 +08:00
weishu
3829894d4d Use fallback method to mount overlayfs when fsopen one failed
Co-authored-by: natsumerinchan
2024-03-04 12:26:19 +08:00
5ec1cff
cd772fa250 manager: allow enable webview debugging (#1412) 2024-03-03 22:24:02 +08:00
weishu
dbe43b1540 ksud: remove permission mode for symlink 2024-03-01 23:10:03 +08:00
weishu
8a59fe1969 ksud: Copy directory permission mode 2024-03-01 22:46:53 +08:00
weishu
2a4fa94af0 ksud: Add more logs 2024-02-29 22:43:48 +08:00
weishu
6de330b00a ksud: Add some logs 2024-02-29 22:40:42 +08:00
weishu
8c0d06bc68 misc: Add just command 2024-02-29 20:35:03 +08:00
weishu
ed254b7ab4 ksud: fmt 2024-02-29 20:34:50 +08:00
weishu
5355625ed6 ksud: correctly copy chr device and keep xattr. close #1397 2024-02-29 19:23:11 +08:00
5ec1cff
7b89ec89c0 ci: support android 14 AVD (#1405) 2024-02-29 17:36:38 +08:00
weishu
5aa025c3f0 ksud: Add ksud to manager's su path 2024-02-29 14:04:10 +08:00
weishu
e39a80f91e webui: use global mount namespace by default. 2024-02-29 13:59:13 +08:00
weishu
622a7d73dc Revert "webui: support mount master mode"
This reverts commit 922703d2ff.
2024-02-29 13:58:44 +08:00
weishu
922703d2ff webui: support mount master mode 2024-02-29 13:55:07 +08:00
Fede2782
f459dfad54 English Faq: add wrong storage size on some Samsung (#1400)
#1389
2024-02-29 13:47:45 +08:00
Wang Han
3e2de84a81 Guard a few logprint in prctl path with KSU_DEBUG (#1402) 2024-02-29 13:47:22 +08:00
weishu
796f8a448a kernel: fix bazel build 2024-02-26 16:54:14 +08:00
Lycs-D
7775ce3938 ci: update android12-5.10 os_patch_level to 2024-01 (#1378) 2024-02-26 15:59:56 +08:00
Mufanc
2fb5334ac6 fix kernelsu.spawn && add type definitions (#1395) 2024-02-26 15:35:23 +08:00
weishu
afe0e691aa kernel: Unshallow the repo in Makefile. close #1365 2024-02-26 12:23:51 +08:00
Celica Sylphil
532796de48 website: Fix zh_CN and ja_JP paths (#1394) 2024-02-26 10:16:20 +08:00
dabao1955
e691c62811 website: fix ja guide broken links (#1392)
Signed-off-by: dabao1955 <dabao1955@163.com>
2024-02-26 09:49:10 +08:00
Weblate (bot)
3f341a4e3a Translations update from Hosted Weblate (#1376)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: Federico Lombardo <mlomb.federalberto@gmail.com>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Kazuki Nakashima <flukfik41@gmail.com>
Co-authored-by: Rex_sa <rex.sa@pm.me>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: / <sahmatov267@gmail.com>
2024-02-25 23:11:08 +08:00
weishu
40d7bc6256 ksud: Fix incorrect dir copy 2024-02-25 22:55:24 +08:00
igor
56dbc980f4 website: update translation (#1377) 2024-02-25 22:48:22 +08:00
weishu
bf71ff133c manager: Add adb file details to log 2024-02-25 22:36:58 +08:00
weishu
a9b156df43 manager: Add ksu file real size to logs 2024-02-25 22:33:04 +08:00
weishu
1690e5db02 manager: Use global mount namespace to gather logs 2024-02-25 22:30:53 +08:00
weishu
300d9d4cca ksud: Force creating new module format to avoid many wired issues. close #1384, close #1381 2024-02-25 22:29:13 +08:00
dabao1955
3f12080dfe website: update Japanese translation (#1387)
Signed-off-by: dabao1955 <dabao1955@163.com>
2024-02-25 20:24:49 +08:00
weishu
b670db2d22 ksud: fix punch hole 2024-02-25 20:21:17 +08:00
heinu
62a31b3dc2 manager: Allow http for more localhost (#1385) 2024-02-25 18:21:52 +08:00
weishu
a395b1011e manager: Allow http for localhost 2024-02-24 11:20:14 +08:00
weishu
406070914a website: Add docs for module WebUI 2024-02-23 22:43:31 +08:00
weishu
8685fa1f60 js: relicense js library to Apache 2.0 2024-02-23 21:30:02 +08:00
weishu
c95163b144 manager: Enter -> Open 2024-02-23 19:47:37 +08:00
weishu
648d56da39 manager: use kernelsu's domain instead of default one 2024-02-23 18:54:40 +08:00
weishu
33c0a9eebd manager: remove http that was introduced before 2024-02-23 18:49:18 +08:00
Weblate (bot)
3f86fb016d Translations update from Hosted Weblate (#1319)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: yuztass <inkognito0901@gmail.com>
Co-authored-by: 聖小熊 <as406010503@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-02-23 18:32:56 +08:00
weishu
66316e76f5 manager: Add entry for module ui 2024-02-23 18:28:28 +08:00
weishu
5591a94f87 manager: create new root shell for module installation to avoid block other su operations 2024-02-23 18:28:28 +08:00
weishu
f855f8148a manager: use global mnt shell to aovid nsenter 2024-02-23 18:28:28 +08:00
weishu
0c52f24612 ksud: remove link manager 2024-02-23 18:08:53 +08:00
weishu
9635a00036 manager: use SuFile to load webview assets to avoid spoofing manager's mount namespace 2024-02-23 18:04:08 +08:00
weishu
cbc04ff6df ksud: support global mnt for debug su 2024-02-23 18:04:00 +08:00
igor
8e448767a5 update templates (#1371) 2024-02-23 16:55:53 +08:00
那年雪落
2820779947 kernel: Add back Makefile new line with posix compatible (#1372) 2024-02-23 16:55:22 +08:00
weishu
a99c69f9b4 manager: Usse WebViewAssetLoader instead of file uri. refer: https://developer.android.com/reference/androidx/webkit/WebViewAssetLoader
androidCompileSdkVersion changed to meet webview library requirements
2024-02-23 16:12:53 +08:00
weishu
a829707b16 js: Allow spawn(command, options) call, fix memory leak 2024-02-23 09:16:00 +08:00
weishu
77d16ac896 js: support spawn jsapi 2024-02-23 00:16:04 +08:00
weishu
d02855a40a js: simplify the exec call 2024-02-22 22:41:50 +08:00
weishu
b904680f13 js: Add more API and README 2024-02-22 22:09:27 +08:00
weishu
811c68cac0 js: Add jsapi package 2024-02-22 20:42:15 +08:00
weishu
f20ccc1728 manager: Add jsapi: toast 2024-02-22 20:40:52 +08:00
weishu
66e7db2a4e manager: Add more abilities to js exec 2024-02-22 20:39:46 +08:00
weishu
e6b05b1d3c ksud: fix mount view of manager when 'umount modules by default' is enabled 2024-02-22 19:08:37 +08:00
weishu
329010a694 manager: mount modules webui resources to manager directly. 2024-02-22 16:26:39 +08:00
weishu
9c4d20c0f2 ksud: remove http serve mode 2024-02-22 16:26:14 +08:00
weishu
355b55a01d ksud: use bind mount to serve module webui 2024-02-22 16:26:14 +08:00
Masum Reza
e85646fad4 Added adaway.root template (#1337)
Adaway only needs the following permissions to work properly:
DAC_OVERRIDE, SYS_PTRACE.

Note: [systemless hosts kernelsu
module](https://github.com/symbuzzer/systemless-hosts-KernelSU-module)
needs to be installed, to add support.

This PR only addresses the minimal permission requirements of Adaway to
let it modify hosts file.
2024-02-21 09:57:23 +08:00
dabao1955
4969c5f548 Translate templates into Japanese (#1364)
Signed-off-by: dabao1955 <dabao1955@163.com>
2024-02-21 09:55:26 +08:00
weishu
55f8f2da90 manager: support full screen for webui 2024-02-20 23:25:57 +08:00
weishu
65bff7bf03 manager: Allow localstroage for webview 2024-02-20 20:23:43 +08:00
weishu
30dfbbdc0e ksud: support self stop server 2024-02-20 19:58:40 +08:00
weishu
fceffc9cfe manager: support load module webui 2024-02-20 19:21:07 +08:00
weishu
01b685ce58 kernel: Allow system_server to kill su process 2024-02-20 18:16:43 +08:00
weishu
cbd184421c ksud: Add support for module webui 2024-02-20 16:39:05 +08:00
weishu
b0a42abf4f ksud: Add support for module webui 2024-02-20 16:23:40 +08:00
weishu
cfc982f2f3 ksud: don't reclaim when enable/disable modules 2024-02-19 16:36:41 +08:00
weishu
e0e7058d14 ksud: reclaim sparse space when install/uninstall modules. close #1367 2024-02-19 15:29:03 +08:00
weishu
e0802b0d15 ksud: check image before shrink 2024-02-19 12:31:35 +08:00
igor
81f15ef120 Translate templates into Brazilian Portuguese (#1362)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-02-18 11:40:48 +08:00
Syuugo
20c19d7126 Update mamager configs (#1359)
Upgrade Gradle and AGP.

Fixing workflow.
2024-02-18 11:40:05 +08:00
Pr0pHesyer
a360cd87c0 Update msm8998 in repos.json (#1363)
A repository still under maintenance
2024-02-18 11:39:50 +08:00
Ali Beyaz
ea9b572402 Turkish translations of Root Templates (#1356) 2024-02-17 11:24:39 +08:00
5ec1cff
6bf9e0478e ci: upload manager mappings (#1351) 2024-02-07 01:15:34 +08:00
LoveSy
abf0dacb36 Add fallback to mount syscall (#1349) 2024-02-05 17:36:07 +08:00
github-actions[bot]
263b986bcd [add device]: (#1345)
has been added to the website.
Related issue: https://github.com/tiann/KernelSU/issues/1344

Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-04 10:53:42 +08:00
weishu
15bdd9f507 ci: fix wsa and chromeos ci 2024-02-04 10:52:57 +08:00
backslashxx
810a62f795 [Add devices] daisy, sakura, ysl, sunny/mojito, fog/rain/wind (#1340)
Multiple devices

- Mi A2 Lite (daisy) / Redmi 6 Pro (sakura) + Redmi S2/Y2 (ysl) - 4.9

60a7363a15

4c67fcbcb6
- Redmi Note 10 (sunny/mojito) - 4.14

51cbedbeaa

96634ef252
- Redmi 10C (fog/rain/wind) - 4.19

fd2e365b80

126694822e
2024-02-03 20:40:10 +08:00
weishu
07e475c5dc kernel: prevent become manager when failed. close #1328 2024-02-03 20:03:26 +08:00
Masum Reza
eb02e42bc7 Added shizuku.root template (#1330)
Shizuku only needs DAC_OVERRIDE to execute the script to start the
Shizuku service.
Also added bengali translation for the name and description.
2024-02-02 13:08:55 +08:00
weishu
5db51b0715 manager: fix misleading tips when grant root failed. 2024-02-02 12:25:30 +08:00
weishu
60d2685f7e ksud: Fix dependency 2024-02-02 11:25:54 +08:00
LoveSy
a4b9ea04a4 Use as_ref instead of as_slice (#1336) 2024-02-02 10:40:36 +08:00
LoveSy
f80d0764b5 Use rustix for setgroups (#1334) 2024-02-01 23:35:42 +08:00
LoveSy
f80769a82a Recursive bind mount (#1332) 2024-02-01 23:29:19 +08:00
LoveSy
64269c8c4f Use rustix for prctl (#1333) 2024-02-01 23:28:56 +08:00
weishu
9f04482b90 ksud: allow to set upperdir and workdir for overlayfs 2024-02-01 18:02:10 +08:00
weishu
aca505c3e6 ksud: Fix bind mount failed 2024-02-01 17:15:44 +08:00
weishu
d4826bc97c ksud: fmt 2024-02-01 16:33:33 +08:00
weishu
4efc8164f1 ksud: Fix overlayfs mount 2024-02-01 16:32:18 +08:00
weishu
0fc25cf091 ksud: remove unused methods 2024-02-01 16:32:18 +08:00
Ali Beyaz
ca438291cc Update README_TR.md (#1329) 2024-02-01 15:44:06 +08:00
LoveSy
d6cab60e6d Merge pull request #1325 from tiann/rustix 2024-02-01 14:19:18 +08:00
LoveSy
4d4bd4793f Use new mount api 2024-02-01 01:50:30 +08:00
LoveSy
c1a2cbf1e4 Use rustix to replace some unsafe calls 2024-02-01 00:35:51 +08:00
igor
4b1fb121b4 website: update translation (#1322) 2024-01-31 11:16:57 +08:00
weishu
883a3e3407 ksud: force-stop manager when set-manager 2024-01-31 11:15:23 +08:00
weishu
27bd18f60e ksud: fix potential slow copy 2024-01-30 22:34:33 +08:00
weishu
7cb5fb47e1 ksud: Add command to shrink image 2024-01-30 13:23:49 +08:00
weishu
d43b40572d ksud: clippy 2024-01-30 12:59:24 +08:00
weishu
c99b5b31c1 ksud: fmt 2024-01-30 12:58:20 +08:00
weishu
ca960a2a8f ksud: shrink image before resize 2024-01-30 12:56:59 +08:00
weishu
cce423a2f6 ksud: Add cli for fast copy sparse file 2024-01-30 12:56:59 +08:00
weishu
946fb6f999 ksud: default 1T for sparse file 2024-01-30 12:56:59 +08:00
weishu
b6ecce4317 ksud: use default block size to reduce image size 2024-01-30 12:56:59 +08:00
weishu
be70a91f16 ksud: resize the journal size of image 2024-01-30 12:56:59 +08:00
weishu
71c2790f08 ksud: remove unnecessary image check 2024-01-30 12:56:59 +08:00
Bot_wxt1221
8733b390ca [Change device]Onepluus 6T&6 (#1315)
Because of the different implementation of dynastic partition. It only
boots on crdroid.
2024-01-30 11:08:17 +08:00
c4e106d6f8 website: [pt_BR]: Add description for sparse file (#1321)
Signed-off-by: 明 <akariondev@gmail.com>
Signed-off-by: akari <akariondev@gmail.com>
Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-01-30 11:06:41 +08:00
weishu
b612efcfad ksud: sparse file default 256G 2024-01-29 21:49:39 +08:00
weishu
7f53882007 manager: Fix icon for settings update 2024-01-29 21:43:55 +08:00
weishu
23ba3182cf website: Add description for sparse file 2024-01-29 21:42:52 +08:00
weishu
8abd37a35c manager: Add option to disable update close #1303 2024-01-29 21:33:24 +08:00
weishu
d7bc853bfc ksud: use sparse image to avoiding resize image. close #1220 2024-01-29 18:50:19 +08:00
weishu
16c5aba4ff ksud: fix dd failure 2024-01-29 15:51:54 +08:00
Jung-Chi Wang
3914242457 [Add devices] Oneplus 7 Serials (#1317)
Add unofficial support devices

![20240127213056](https://github.com/tiann/KernelSU/assets/447101/feeb6be7-7e96-4572-9062-879fbb1ae08d)
2024-01-27 22:10:40 +08:00
Weblate (bot)
eaa12161d6 Translations update from Hosted Weblate (#1284)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for
[KernelSU/Manager](https://hosted.weblate.org/projects/kernelsu/manager/).



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/kernelsu/manager/horizontal-auto.svg)

---------

Co-authored-by: 聖小熊 <as406010503@gmail.com>
Co-authored-by: I g o r <igormczampola1@gmail.com>
Co-authored-by: dabao1955 <dabao1955@163.com>
Co-authored-by: Mahendar Y <mahendar625934@gmail.com>
Co-authored-by: Ali Beyaz <alipolatbeyaz@gmail.com>
Co-authored-by: Integral <integral@murena.io>
Co-authored-by: 周港 <z200645049@gmail.com>
Co-authored-by: LolekLiam <liamstaric@gmail.com>
Co-authored-by: Skallr2 <pm563838@gmail.com>
Co-authored-by: charlotte <charlotterose@duck.com>
2024-01-27 11:31:11 +08:00
秋秋
0f985917f9 ci: Remove ccache patch (#1312)
We don't need it
2024-01-24 14:11:19 +08:00
igor
a569b1c76e docs: fix typos in readme (#1311) 2024-01-23 21:12:11 +08:00
KeJia
7f1ea2e178 [非官方支持设备]修正K-Nel-M1721内核的仓库网址 (#1308)
合并之前没发现偏偏合并以后发现多了个https://
之前的合并请求关闭了,只能再开一个()
2024-01-22 20:35:24 +08:00
Guanran928
da89a45d56 fix typo (#1300)
AdAday -> AdAway
2024-01-22 15:23:56 +08:00
KeJia
dc2fb20d24 [Add devices]Meizu M6 Note (#1305)
Add an unofficial support device
I will follow the updates of KernelSU to maintain the kernel for a long
time
2024-01-22 15:23:38 +08:00
Fede2782
d7625722db [add device]: Samsung Galaxy A34 5G (#1293) 2024-01-19 09:06:55 +08:00
igor
4144f10d9a website: fix translation readme: fix translation (#1297) 2024-01-19 09:06:31 +08:00
aaddaf1a78 website/docs: we don't need to use markdown for this, as it's not exactly a patch or sh file. (#1298)
```
# KernelSU 
CONFIG_KSU=y
```

---------

Signed-off-by: 明 <akariondev@gmail.com>
Signed-off-by: akari <akariondev@gmail.com>
Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-01-19 09:05:56 +08:00
weishu
2fec279de3 ksud: use boot partition when replace kernel 2024-01-18 16:27:11 +08:00
weishu
1e676e5dc2 ksud: Fix relative boot image path 2024-01-16 14:05:10 +08:00
weishu
7b63e099ce ksud: Fix build for win 2024-01-16 11:39:21 +08:00
Ylarod
aef943ebe3 ci: remove a14 6.1 2024-01 (#1290)
Not released

https://android.googlesource.com/kernel/common/+/refs/heads/android14-6.1-2024-01
2024-01-15 23:02:25 +08:00
Mufanc
1637864636 manager: pin the selected items to the top of the groups and capabilities list (#1285) 2024-01-15 20:31:59 +08:00
weishu
e934bfb648 kernel: Add init selinux rules. 2024-01-15 20:28:53 +08:00
weishu
653225bb5b ksud: Add support for boot patch 2024-01-15 20:17:10 +08:00
Ylarod
decbdeb5d7 fix android14 ci (#1288) 2024-01-15 11:04:27 +08:00
loogeo
51ca19f267 Update build-kernel-a14.yml to add ANDROID14-6.1.68 (#1287)
add new 6.1.68
2024-01-14 19:41:07 +08:00
Ylarod
5b920f8230 kernel: fix secctx mem leak (#1283)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-01-14 11:15:52 +08:00
Arthur
601ce2120a website: optimize expression and complete Chinese translation (#1278)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-01-09 09:17:25 +08:00
Salvo Giangreco
6d79060e4c [add device]: Samsung Galaxy A54 5G (#1266)
Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-01-09 09:17:04 +08:00
igor
e95e87a7a4 website: update how to integrate for non gki (#1282) 2024-01-09 09:16:45 +08:00
Ali Beyaz
144b0cc8e9 Update README_TR.md (#1280) 2024-01-09 09:16:19 +08:00
Celica Sylphil
d9d9066316 website: Fix patches display (#1281)
Option does not match the corresponding patch.

![2024-01-08
20-41-45](https://github.com/tiann/KernelSU/assets/64072399/22066923-8263-4fff-b2f8-a9b04e7ca8b5)
![2024-01-08
20-41-51](https://github.com/tiann/KernelSU/assets/64072399/f345e31a-dd5a-4224-a052-ddaf99aedc5a)
![2024-01-08
20-41-55](https://github.com/tiann/KernelSU/assets/64072399/6c7d4f9f-d588-46aa-ac92-d8eb8c003316)
![2024-01-08
20-41-58](https://github.com/tiann/KernelSU/assets/64072399/906bb033-eddd-4c8c-bd13-00cff799b3df)
2024-01-08 21:08:49 +08:00
Celica Sylphil
3af293f991 website/docs: Update Simplified Chinese translation (#1279) 2024-01-08 19:53:43 +08:00
60c9fabb44 website/docs: add missing #ifdef and #endif in ksu_handle_stat [2/2] (#1277)
Signed-off-by: 明 <akariondev@gmail.com>
Signed-off-by: akari <akariondev@gmail.com>
Co-authored-by: Ylarod <me@ylarod.cn>
Co-authored-by: weishu <twsxtd@gmail.com>
2024-01-08 19:52:29 +08:00
Arthur
23ffc2a3b2 website: fix typo (#1276) 2024-01-08 14:42:41 +08:00
2bab388bbf website/docs/guide: Enable KernelSU support (CONFIG_KSU) (#1274)
### enable CONFIG_KSU on the website documentation.

Added support for KernelSU by enabling CONFIG_KSU in the kernel
defconfig located at `arch/arm64/configs/vendor/your_defconfig`. Please
ensure to verify the correct location of the file. Note that on some
devices, the defconfig may be located in `arch/arm64/configs`.

---------

Signed-off-by: 明 <akariondev@gmail.com>
Signed-off-by: akari <akariondev@gmail.com>
2024-01-08 14:42:17 +08:00
weishu
e9997a07c1 kernel: avoding umount when there isn't any module. close #556 2024-01-08 12:55:08 +08:00
weishu
757e69b15e ksud: report module mounted event to kernel 2024-01-08 12:11:54 +08:00
Ylarod
506385cfad ci: build less wsa image in pr (#1273) 2024-01-08 09:54:14 +08:00
Salvo Giangreco
4b27a9a324 website: update Galaxy A52s/M52 repo link (#1267)
Signed-off-by: BlackMesa123 <giangrecosalvo9@gmail.com>
2024-01-08 00:06:55 +08:00
iceBear67
1326fd32c5 Add unofficial support for Galaxy Note9 (#1268)
第一次构建内核,虽然狗屎,总比没有好(

等有空再清理一下更新仓库,现在能正常使用,也没太大问题
2024-01-07 23:12:23 +08:00
259 changed files with 11824 additions and 5124 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.bat eol=crlf

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/tiann/KernelSU/issues/1705
about: "We do not accept external Feature Requests, see this link for more details."

View File

@@ -1,40 +0,0 @@
name: Feature Request
description: "Suggest an idea for this project"
title: "[Feature]"
labels: "feature"
assignees: tiann
body:
- type: markdown
id: feature-info
attributes:
value: "## Feature Infomation"
- type: textarea
id: feature-main
validations:
required: true
attributes:
label: "Is your feature request related to a problem? Please describe."
description: "A clear and concise description of what the problem is."
placeholder: "I'm always frustrated when [...]"
- type: textarea
id: feature-solution
validations:
required: true
attributes:
label: "Describe the solution you'd like."
description: "A clear and concise description of what you want to happen."
- type: textarea
id: feature-describe
validations:
required: true
attributes:
label: "Describe alternatives you've considered."
description: "A clear and concise description of any alternative solutions or features you've considered."
- type: textarea
id: feature-extra
validations:
required: false
attributes:
label: "Additional context"
description: "Add any other context or screenshots about the feature request here."

38
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
groups:
actions:
patterns:
- "*"
- package-ecosystem: cargo
directory: userspace/ksud
schedule:
interval: daily
allow:
- dependency-type: "all"
groups:
crates:
patterns:
- "*"
- package-ecosystem: gradle
directory: manager
schedule:
interval: daily
groups:
maven:
patterns:
- "*"
- package-ecosystem: npm
directory: website
schedule:
interval: daily
allow:
- dependency-type: "all"
groups:
npm:
patterns:
- "*"

View File

@@ -0,0 +1,71 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--https://ci.android.com/builds/submitted/9964412/kernel_virt_x86_64/latest/manifest_9964412.xml-->
<manifest>
<remote name="aosp" fetch="https://android.googlesource.com/" review="https://android.googlesource.com/" />
<default revision="master" remote="aosp" sync-j="4" />
<superproject name="kernel/superproject" remote="aosp" revision="common-android14-6.1" />
<project path="build/kernel" name="kernel/build" revision="b0377a072bb3f78cdacfd6d809914a9d1b0c0148">
<linkfile dest="tools/bazel" src="kleaf/bazel.sh" />
<linkfile dest="WORKSPACE" src="kleaf/bazel.WORKSPACE" />
<linkfile dest="build/build.sh" src="build.sh" />
<linkfile dest="build/build_abi.sh" src="build_abi.sh" />
<linkfile dest="build/build_test.sh" src="build_test.sh" />
<linkfile dest="build/build_utils.sh" src="build_utils.sh" />
<linkfile dest="build/config.sh" src="config.sh" />
<linkfile dest="build/envsetup.sh" src="envsetup.sh" />
<linkfile dest="build/_setup_env.sh" src="_setup_env.sh" />
<linkfile dest="build/multi-switcher.sh" src="multi-switcher.sh" />
<linkfile dest="build/abi" src="abi" />
<linkfile dest="build/static_analysis" src="static_analysis" />
</project>
<project path="common" name="kernel/common" revision="7e35917775b8b3e3346a87f294e334e258bf15e6">
<linkfile dest=".source_date_epoch_dir" src="." />
</project>
<project path="kernel/tests" name="kernel/tests" revision="c90a1c1b226b975cc31e709fa96fc1c6ecdbe272" />
<project path="kernel/configs" name="kernel/configs" revision="52a7267d6a9f9efabf3cb43839bb5e7f7ff05be3" />
<project path="common-modules/virtual-device" name="kernel/common-modules/virtual-device" revision="0d03de3246301028775f05ea388c2c444344a268" />
<project path="prebuilts/clang/host/linux-x86" name="platform/prebuilts/clang/host/linux-x86" clone-depth="1" revision="4f7e5adc160ab726ac5bafb260de98e612904c50" />
<project path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" clone-depth="1" revision="f7b0d5b0ee369864d5ac3e96ae24ec9e2b6a52da" />
<project path="prebuilts/build-tools" name="platform/prebuilts/build-tools" clone-depth="1" revision="dc92e06585a7647bf739a2309a721b82fcfa01d4" />
<project path="prebuilts/clang-tools" name="platform/prebuilts/clang-tools" clone-depth="1" revision="5611871963f54c688d3ac49e527aecdef21e8567" />
<project path="prebuilts/kernel-build-tools" name="kernel/prebuilts/build-tools" clone-depth="1" revision="2597cb1b5525e419b7fa806373be673054a68d29" />
<project path="tools/mkbootimg" name="platform/system/tools/mkbootimg" revision="2680066d0844544b3e78d6022cd21321d31837c3" />
<project path="prebuilts/bazel/linux-x86_64" name="platform/prebuilts/bazel/linux-x86_64" clone-depth="1" revision="4fdb9395071ff22118311d434d697c2b6fd887b4" />
<project path="prebuilts/jdk/jdk11" name="platform/prebuilts/jdk/jdk11" clone-depth="1" revision="491e6aa056676f29c4541f71bd738e4e876e4ba2" />
<project path="prebuilts/ndk-r23" name="toolchain/prebuilts/ndk/r23" clone-depth="1" revision="19ac7e4eded12adb99d4f613490dde6dd0e72664" />
<project path="external/bazel-skylib" name="platform/external/bazel-skylib" revision="f998e5dc13c03f0eae9e373263d3afff0932c738" />
<project path="build/bazel_common_rules" name="platform/build/bazel_common_rules" revision="707b2c5fe3d0d7d934a93e00a8a4062e83557831" />
<project path="external/stardoc" name="platform/external/stardoc" revision="e83f522ee95419e55d2c5654aa6e0143beeef595" />
<project path="external/python/absl-py" name="platform/external/python/absl-py" revision="393d0b1e3f0fea3e95944a2fd3282cc9f76d4f14" />
</manifest>

View File

@@ -0,0 +1,89 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- https://ci.android.com/builds/submitted/11577653/kernel_virt_aarch64/latest/manifest_11577653.xml -->
<manifest>
<remote name="aosp" fetch="https://android.googlesource.com/" review="https://android.googlesource.com/" />
<default revision="main" remote="aosp" sync-j="4" />
<superproject name="kernel/superproject" remote="aosp" revision="common-android15-6.6" />
<project path="build/kernel" name="kernel/build" groups="ddk" revision="9a2196a1ec1048c2869750c9d3969c88ac18adcd">
<linkfile dest="tools/bazel" src="kleaf/bazel.sh" />
<linkfile dest="WORKSPACE" src="kleaf/bazel.WORKSPACE" />
<linkfile dest="MODULE.bazel" src="kleaf/bzlmod/bazel.MODULE.bazel" />
<linkfile dest="WORKSPACE.bzlmod" src="kleaf/bzlmod/bazel.WORKSPACE.bzlmod" />
</project>
<project path="common" name="kernel/common" revision="ac1a7c65ff1bc7ece5569d62f02b121b4f2364f8" />
<project path="kernel/common-patches" name="kernel/common-patches" revision="3807ce65081de12ef4baa2a04487306672685160">
<linkfile dest="common/patches" src="android-mainline" />
</project>
<project path="kernel/tests" name="kernel/tests" revision="ca9fd66f5b48abc92990c9c770f73380b428362b" />
<project path="kernel/configs" name="kernel/configs" revision="be625f2ccf377a75d0ea86c082c716c322b8d4c6" />
<project path="common-modules/virtual-device" name="kernel/common-modules/virtual-device" revision="60a24583ac921279e40a44f818040e40abb3ef46" />
<project path="prebuilts/clang/host/linux-x86" name="platform/prebuilts/clang/host/linux-x86" revision="93a1369ba33743a87bdf0183373f590a36ff7cb1" clone-depth="1" groups="ddk" />
<project path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" clone-depth="1" groups="ddk" revision="cef8f53bb61fbdb02dbf4d433004f6cb637c3bc6" />
<project path="prebuilts/build-tools" name="platform/prebuilts/build-tools" clone-depth="1" groups="ddk" revision="5aca9957ab19d2668c7f1da1954bbe89652d5fed" />
<project path="prebuilts/clang-tools" name="platform/prebuilts/clang-tools" clone-depth="1" revision="69f9fb9b8e75c6f1ff01f380d5251757785bb823" />
<project path="prebuilts/kernel-build-tools" name="kernel/prebuilts/build-tools" clone-depth="1" groups="ddk" revision="b09295493adc8d804b6d24286660f6e451e387fd" />
<project path="prebuilts/rust" name="platform/prebuilts/rust" revision="adc0e5499c3ddac831ca596d12cbef8d9747f737" clone-depth="1" />
<project path="prebuilts/tradefed" name="platform/tools/tradefederation/prebuilts" clone-depth="1" revision="a76ca09c5593e22e65b0d823d508882c6c64c13e" />
<project path="prebuilts/asuite" name="platform/prebuilts/asuite" clone-depth="1" revision="24510f175cb313a92241500efee917c2930d5d30" />
<project path="tools/mkbootimg" name="platform/system/tools/mkbootimg" revision="28b7934249c2885db8b561f1439d74663fcdce93" />
<project path="prebuilts/jdk/jdk11" name="platform/prebuilts/jdk/jdk11" revision="c6c90521b7c317f13d41bbd9336a8d45ee202cec" clone-depth="1" groups="ddk" />
<project path="prebuilts/ndk-r26" name="toolchain/prebuilts/ndk/r26" clone-depth="1" groups="ddk" revision="e535051ebc04204cec44bde38f62385d63180388" />
<project path="external/bazel-skylib" name="platform/external/bazel-skylib" groups="ddk" revision="6b103c40d8113f001475d5e13672922ef2aa0e5a" />
<project path="build/bazel_common_rules" name="platform/build/bazel_common_rules" groups="ddk" revision="2a10807a06153b5862da0369f4b6b368afc2dd08" />
<project path="external/libcap-ng" name="platform/external/libcap-ng" revision="2bcc92ae19481dd2b8d3ce3abdfbbee49261abe6" />
<project path="external/libcap" name="platform/external/libcap" revision="d7d1a0a38c5be06a7e7d6391d140b54878836f48" />
<project path="external/stardoc" name="platform/external/stardoc" groups="ddk" revision="f31250f9f5b03834d9964aaee7a3794c1d73d4a2" />
<project path="external/python/absl-py" name="platform/external/python/absl-py" groups="ddk" revision="9ae5a78fc57c3cd539398373ae39601a8b923e62" />
<project path="external/bazelbuild-bazel-central-registry" name="platform/external/bazelbuild-bazel-central-registry" revision="3422f064566c274ea66633442521704d4a22486d" groups="ddk" />
<project path="external/bazelbuild-platforms" name="platform/external/bazelbuild-platforms" groups="ddk" revision="e352aabd0131f3ac3f340282a43ba85ffc3fe8fa" />
<project path="external/bazelbuild-apple_support" name="platform/external/bazelbuild-apple_support" groups="ddk" revision="f6003e1e3763f8aad9fb9acae79cfa5fff9ae988" />
<project path="external/bazelbuild-rules_cc" name="platform/external/bazelbuild-rules_cc" groups="ddk" revision="f0df148dbeb9b9ed3816aad328ebe7c65efaaa24" />
<project path="external/bazelbuild-rules_java" name="platform/external/bazelbuild-rules_java" groups="ddk" revision="8e548c7053dffd1717d565f0409a88992f401da1" />
<project path="external/bazelbuild-rules_license" name="platform/external/bazelbuild-rules_license" groups="ddk" revision="f578df4fd057ffe2023728444759535685631548" />
<project path="external/bazelbuild-rules_pkg" name="platform/external/bazelbuild-rules_pkg" groups="ddk" revision="429887dfd8db834498ad95e99043f771a3882af0" />
<project path="external/bazelbuild-rules_python" name="platform/external/bazelbuild-rules_python" groups="ddk" revision="f71847ac898655b67634bb14e77a7408c4fb5e00" />
<project path="external/bazelbuild-rules_rust" name="platform/external/bazelbuild-rules_rust" groups="ddk" revision="1520b49835be9122c2424231357d4db80069cc38" />
<project path="external/pigz" name="platform/external/pigz" groups="ddk" revision="9bc9fa17d499ddde88b77820f6d063e16c0cdd42" />
<project path="external/zlib" name="platform/external/zlib" groups="ddk" revision="eff168fd731068a3faddd9aae056875e10014a51" />
<project path="external/zopfli" name="platform/external/zopfli" groups="ddk" revision="36c79f00e5229800d2aaa13fc42c301ec8ef1153" />
</manifest>

View File

@@ -0,0 +1,89 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- https://ci.android.com/builds/submitted/11577653/kernel_virt_x86_64/latest/manifest_11577653.xml -->
<manifest>
<remote name="aosp" fetch="https://android.googlesource.com/" review="https://android.googlesource.com/" />
<default revision="main" remote="aosp" sync-j="4" />
<superproject name="kernel/superproject" remote="aosp" revision="common-android15-6.6" />
<project path="build/kernel" name="kernel/build" groups="ddk" revision="9a2196a1ec1048c2869750c9d3969c88ac18adcd">
<linkfile dest="tools/bazel" src="kleaf/bazel.sh" />
<linkfile dest="WORKSPACE" src="kleaf/bazel.WORKSPACE" />
<linkfile dest="MODULE.bazel" src="kleaf/bzlmod/bazel.MODULE.bazel" />
<linkfile dest="WORKSPACE.bzlmod" src="kleaf/bzlmod/bazel.WORKSPACE.bzlmod" />
</project>
<project path="common" name="kernel/common" revision="ac1a7c65ff1bc7ece5569d62f02b121b4f2364f8" />
<project path="kernel/common-patches" name="kernel/common-patches" revision="3807ce65081de12ef4baa2a04487306672685160">
<linkfile dest="common/patches" src="android-mainline" />
</project>
<project path="kernel/tests" name="kernel/tests" revision="ca9fd66f5b48abc92990c9c770f73380b428362b" />
<project path="kernel/configs" name="kernel/configs" revision="be625f2ccf377a75d0ea86c082c716c322b8d4c6" />
<project path="common-modules/virtual-device" name="kernel/common-modules/virtual-device" revision="60a24583ac921279e40a44f818040e40abb3ef46" />
<project path="prebuilts/clang/host/linux-x86" name="platform/prebuilts/clang/host/linux-x86" revision="93a1369ba33743a87bdf0183373f590a36ff7cb1" clone-depth="1" groups="ddk" />
<project path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8" clone-depth="1" groups="ddk" revision="cef8f53bb61fbdb02dbf4d433004f6cb637c3bc6" />
<project path="prebuilts/build-tools" name="platform/prebuilts/build-tools" clone-depth="1" groups="ddk" revision="5aca9957ab19d2668c7f1da1954bbe89652d5fed" />
<project path="prebuilts/clang-tools" name="platform/prebuilts/clang-tools" clone-depth="1" revision="69f9fb9b8e75c6f1ff01f380d5251757785bb823" />
<project path="prebuilts/kernel-build-tools" name="kernel/prebuilts/build-tools" clone-depth="1" groups="ddk" revision="b09295493adc8d804b6d24286660f6e451e387fd" />
<project path="prebuilts/rust" name="platform/prebuilts/rust" revision="adc0e5499c3ddac831ca596d12cbef8d9747f737" clone-depth="1" />
<project path="prebuilts/tradefed" name="platform/tools/tradefederation/prebuilts" clone-depth="1" revision="a76ca09c5593e22e65b0d823d508882c6c64c13e" />
<project path="prebuilts/asuite" name="platform/prebuilts/asuite" clone-depth="1" revision="24510f175cb313a92241500efee917c2930d5d30" />
<project path="tools/mkbootimg" name="platform/system/tools/mkbootimg" revision="28b7934249c2885db8b561f1439d74663fcdce93" />
<project path="prebuilts/jdk/jdk11" name="platform/prebuilts/jdk/jdk11" revision="c6c90521b7c317f13d41bbd9336a8d45ee202cec" clone-depth="1" groups="ddk" />
<project path="prebuilts/ndk-r26" name="toolchain/prebuilts/ndk/r26" clone-depth="1" groups="ddk" revision="e535051ebc04204cec44bde38f62385d63180388" />
<project path="external/bazel-skylib" name="platform/external/bazel-skylib" groups="ddk" revision="6b103c40d8113f001475d5e13672922ef2aa0e5a" />
<project path="build/bazel_common_rules" name="platform/build/bazel_common_rules" groups="ddk" revision="2a10807a06153b5862da0369f4b6b368afc2dd08" />
<project path="external/libcap-ng" name="platform/external/libcap-ng" revision="2bcc92ae19481dd2b8d3ce3abdfbbee49261abe6" />
<project path="external/libcap" name="platform/external/libcap" revision="d7d1a0a38c5be06a7e7d6391d140b54878836f48" />
<project path="external/stardoc" name="platform/external/stardoc" groups="ddk" revision="f31250f9f5b03834d9964aaee7a3794c1d73d4a2" />
<project path="external/python/absl-py" name="platform/external/python/absl-py" groups="ddk" revision="9ae5a78fc57c3cd539398373ae39601a8b923e62" />
<project path="external/bazelbuild-bazel-central-registry" name="platform/external/bazelbuild-bazel-central-registry" revision="3422f064566c274ea66633442521704d4a22486d" groups="ddk" />
<project path="external/bazelbuild-platforms" name="platform/external/bazelbuild-platforms" groups="ddk" revision="e352aabd0131f3ac3f340282a43ba85ffc3fe8fa" />
<project path="external/bazelbuild-apple_support" name="platform/external/bazelbuild-apple_support" groups="ddk" revision="f6003e1e3763f8aad9fb9acae79cfa5fff9ae988" />
<project path="external/bazelbuild-rules_cc" name="platform/external/bazelbuild-rules_cc" groups="ddk" revision="f0df148dbeb9b9ed3816aad328ebe7c65efaaa24" />
<project path="external/bazelbuild-rules_java" name="platform/external/bazelbuild-rules_java" groups="ddk" revision="8e548c7053dffd1717d565f0409a88992f401da1" />
<project path="external/bazelbuild-rules_license" name="platform/external/bazelbuild-rules_license" groups="ddk" revision="f578df4fd057ffe2023728444759535685631548" />
<project path="external/bazelbuild-rules_pkg" name="platform/external/bazelbuild-rules_pkg" groups="ddk" revision="429887dfd8db834498ad95e99043f771a3882af0" />
<project path="external/bazelbuild-rules_python" name="platform/external/bazelbuild-rules_python" groups="ddk" revision="f71847ac898655b67634bb14e77a7408c4fb5e00" />
<project path="external/bazelbuild-rules_rust" name="platform/external/bazelbuild-rules_rust" groups="ddk" revision="1520b49835be9122c2424231357d4db80069cc38" />
<project path="external/pigz" name="platform/external/pigz" groups="ddk" revision="9bc9fa17d499ddde88b77820f6d063e16c0cdd42" />
<project path="external/zlib" name="platform/external/zlib" groups="ddk" revision="eff168fd731068a3faddd9aae056875e10014a51" />
<project path="external/zopfli" name="platform/external/zopfli" groups="ddk" revision="36c79f00e5229800d2aaa13fc42c301ec8ef1153" />
</manifest>

View File

@@ -1,48 +0,0 @@
From f1e398602b989ac197cdd0fda4a7c4c323b03eb9 Mon Sep 17 00:00:00 2001
From: DozNaka <dozdguide@gmail.com>
Date: Mon, 11 Apr 2022 20:43:45 -0400
Subject: [PATCH] Makefile: Use CCACHE for faster compilation
---
Makefile | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index e8b8d5894..51e8aac6e 100644
--- a/Makefile
+++ b/Makefile
@@ -442,21 +442,21 @@ KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
# Make variables (CC, etc...)
CPP = $(CC) -E
ifneq ($(LLVM),)
-CC = clang
-LD = ld.lld
-AR = llvm-ar
+CC = $(CCACHE) clang
+LD = $(CCACHE) ld.lld
+AR = $(CCACHE) llvm-ar
NM = llvm-nm
-OBJCOPY = llvm-objcopy
-OBJDUMP = llvm-objdump
+OBJCOPY = $(CCACHE) llvm-objcopy
+OBJDUMP = $(CCACHE) llvm-objdump
READELF = llvm-readelf
STRIP = llvm-strip
else
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-AR = $(CROSS_COMPILE)ar
+CC = $(CCACHE) $(CROSS_COMPILE)gcc
+LD = $(CCACHE) $(CROSS_COMPILE)ld
+AR = $(CCACHE) $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
-OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJDUMP = $(CROSS_COMPILE)objdump
+OBJCOPY = $(CCACHE) $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CCACHE) $(CROSS_COMPILE)objdump
READELF = $(CROSS_COMPILE)readelf
STRIP = $(CROSS_COMPILE)strip
endif
--
2.37.2

View File

@@ -1,48 +0,0 @@
From f1e398602b989ac197cdd0fda4a7c4c323b03eb9 Mon Sep 17 00:00:00 2001
From: DozNaka <dozdguide@gmail.com>
Date: Mon, 11 Apr 2022 20:43:45 -0400
Subject: [PATCH] Makefile: Use CCACHE for faster compilation
---
Makefile | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
index e8b8d5894..51e8aac6e 100644
--- a/Makefile
+++ b/Makefile
@@ -442,21 +442,21 @@ KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
# Make variables (CC, etc...)
CPP = $(CC) -E
ifneq ($(LLVM),)
-CC = clang
-LD = ld.lld
-AR = llvm-ar
+CC = $(CCACHE) clang
+LD = $(CCACHE) ld.lld
+AR = $(CCACHE) llvm-ar
NM = llvm-nm
-OBJCOPY = llvm-objcopy
-OBJDUMP = llvm-objdump
+OBJCOPY = $(CCACHE) llvm-objcopy
+OBJDUMP = $(CCACHE) llvm-objdump
READELF = llvm-readelf
STRIP = llvm-strip
else
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-AR = $(CROSS_COMPILE)ar
+CC = $(CCACHE) $(CROSS_COMPILE)gcc
+LD = $(CCACHE) $(CROSS_COMPILE)ld
+AR = $(CCACHE) $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
-OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJDUMP = $(CROSS_COMPILE)objdump
+OBJCOPY = $(CCACHE) $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CCACHE) $(CROSS_COMPILE)objdump
READELF = $(CROSS_COMPILE)readelf
STRIP = $(CROSS_COMPILE)strip
endif
--
2.37.2

View File

@@ -51,7 +51,7 @@ build_from_image() {
echo "[+] Images to upload"
find . -type f -name "*.gz"
find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU/scripts/ksubot.py {} +
# find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU/scripts/ksubot.py {} +
}
for dir in Image*; do

View File

@@ -30,7 +30,7 @@ build_from_image() {
echo '[+] Images to upload'
find . -type f -name "*.gz"
find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU/scripts/ksubot.py {} +
# find . -type f -name "*.gz" -exec python3 "$GITHUB_WORKSPACE"/KernelSU/scripts/ksubot.py {} +
}
for dir in Image*; do

View File

@@ -26,7 +26,7 @@ jobs:
- name: Make pull request
if: steps.handle-add-device.outputs.success == 'true'
id: cpr
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "[add device]: ${{ steps.handle-add-device.outputs.device }}"
@@ -53,7 +53,7 @@ jobs:
message: "Cannot create pull request. Please check the issue content. Or you can create a pull request manually."
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: close issue
uses: peter-evans/close-issue@v1
uses: peter-evans/close-issue@v3
with:
issue-number: ${{ github.event.issue.number }}
token: ${{ secrets.GITHUB_TOKEN }}

137
.github/workflows/avd-kernel.yml vendored Normal file
View File

@@ -0,0 +1,137 @@
name: GKI Kernel Build
on:
workflow_call:
inputs:
version_name:
required: true
type: string
description: >
With SUBLEVEL of kernel,
for example: android12-5.10.66
arch:
required: true
type: string
description: >
Build arch: aarch64/x86_64
debug:
required: false
type: boolean
default: true
manifest_name:
required: false
type: string
description: >
Local repo manifest xml path,
typically for AVD kernel build.
secrets:
BOOT_SIGN_KEY:
required: false
CHAT_ID:
required: false
BOT_TOKEN:
required: false
MESSAGE_THREAD_ID:
required: false
jobs:
build:
name: Build ${{ inputs.version_name }}
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 8192
temp-reserve-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- uses: actions/checkout@v4
with:
path: KernelSU
fetch-depth: 0
- name: Setup need_upload
id: need_upload
run: |
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
echo "UPLOAD=true" >> $GITHUB_OUTPUT
else
echo "UPLOAD=false" >> $GITHUB_OUTPUT
fi
- name: Setup kernel source
run: |
echo "Free space:"
df -h
cd $GITHUB_WORKSPACE
sudo apt-get install repo -y
mkdir android-kernel && cd android-kernel
repo init --depth=1 -u https://android.googlesource.com/kernel/manifest -m "$GITHUB_WORKSPACE/KernelSU/.github/manifests/${{ inputs.manifest_name }}" --repo-rev=v2.16
repo --version
repo --trace sync -c -j$(nproc --all) --no-tags
df -h
- name: Setup KernelSU
env:
PATCH_PATH: ${{ inputs.patch_path }}
IS_DEBUG_KERNEL: ${{ inputs.debug }}
run: |
cd $GITHUB_WORKSPACE/android-kernel
echo "[+] KernelSU setup"
GKI_ROOT=$(pwd)
echo "[+] GKI_ROOT: $GKI_ROOT"
echo "[+] Copy KernelSU driver to $GKI_ROOT/common/drivers"
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
echo "[+] Add KernelSU driver to Makefile"
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
DRIVER_KCONFIG=$GKI_ROOT/common/drivers/Kconfig
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
echo "[+] Apply KernelSU patches"
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/$PATCH_PATH/*.patch || echo "[-] No patch found"
if [ "$IS_DEBUG_KERNEL" = "true" ]; then
echo "[+] Enable debug features for kernel"
printf "\nccflags-y += -DCONFIG_KSU_DEBUG\n" >> $GITHUB_WORKSPACE/KernelSU/kernel/Makefile
fi
repo status
echo "[+] KernelSU setup done."
cd $GITHUB_WORKSPACE/KernelSU
VERSION=$(($(git rev-list --count HEAD) + 10200))
echo "VERSION: $VERSION"
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
- name: Make working directory clean to avoid dirty
working-directory: android-kernel
run: |
rm common/android/abi_gki_protected_exports_* || echo "No protected exports!"
git config --global user.email "bot@kernelsu.org"
git config --global user.name "KernelSUBot"
cd common/ && git add -A && git commit -a -m "Add KernelSU"
repo status
- name: Build kernel
working-directory: android-kernel
run: |
if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then
export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }}
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
fi
tools/bazel run --config=fast --config=stamp --lto=thin //common-modules/virtual-device:virtual_device_${{ inputs.arch }}_dist -- --dist_dir=dist
NAME=kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
TARGET_IMAGE=dist/bzImage
if [ ! -e $TARGET_IMAGE ]; then
TARGET_IMAGE=dist/Image
fi
mv $TARGET_IMAGE $NAME
echo "file_path=android-kernel/$NAME" >> $GITHUB_ENV
- name: Upload Kernel
uses: actions/upload-artifact@v4
with:
name: kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
path: "${{ env.file_path }}"

View File

@@ -7,9 +7,9 @@ jobs:
uses: ./.github/workflows/gki-kernel.yml
with:
version: android12-5.10
version_name: android12-5.10.185
tag: android12-5.10-2023-09
os_patch_level: 2023-09
version_name: android12-5.10.209
tag: android12-5.10-2024-05
os_patch_level: 2024-05
patch_path: "5.10"
debug: true
build-debug-kernel-a13:
@@ -17,11 +17,11 @@ jobs:
matrix:
include:
- version: "5.10"
sub_level: 187
os_patch_level: 2023-08
sub_level: 209
os_patch_level: 2024-05
- version: "5.15"
sub_level: 119
os_patch_level: 2023-09
sub_level: 148
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
with:
version: android13-${{ matrix.version }}
@@ -29,3 +29,20 @@ jobs:
tag: android13-${{ matrix.version }}-${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
debug: true
build-debug-kernel-a14:
strategy:
matrix:
include:
- version: "5.15"
sub_level: 148
os_patch_level: 2024-05
- version: "6.1"
sub_level: 75
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
with:
version: android14-${{ matrix.version }}
version_name: android14-${{ matrix.version }}.${{ matrix.sub_level }}
tag: android14-${{ matrix.version }}-${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
debug: true

View File

@@ -1,7 +1,7 @@
name: Build Kernel - Android 12
on:
push:
branches: ["main", "ci"]
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-a12.yml"
- ".github/workflows/gki-kernel.yml"
@@ -17,34 +17,16 @@ on:
workflow_call:
jobs:
build-kernel:
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
strategy:
matrix:
include:
- sub_level: 66
os_patch_level: 2022-01
- sub_level: 81
os_patch_level: 2022-03
- sub_level: 101
os_patch_level: 2022-05
- sub_level: 110
os_patch_level: 2022-07
- sub_level: 117
os_patch_level: 2022-09
- sub_level: 136
os_patch_level: 2022-11
- sub_level: 149
os_patch_level: 2023-01
- sub_level: 160
os_patch_level: 2023-03
- sub_level: 168
os_patch_level: 2023-05
- sub_level: 177
os_patch_level: 2023-07
- sub_level: 185
os_patch_level: 2023-09
- sub_level: 198
os_patch_level: 2023-11
os_patch_level: 2024-01
- sub_level: 205
os_patch_level: 2024-03
- sub_level: 209
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
@@ -53,6 +35,7 @@ jobs:
tag: android12-5.10-${{ matrix.os_patch_level }}
os_patch_level: ${{ matrix.os_patch_level }}
patch_path: "5.10"
upload-artifacts:
needs: build-kernel
runs-on: ubuntu-latest
@@ -84,7 +67,7 @@ jobs:
git clone $AOSP_MIRROR/platform/prebuilts/build-tools -b $BRANCH --depth 1 build-tools
git clone $AOSP_MIRROR/kernel/prebuilts/build-tools -b $BRANCH --depth 1 kernel-build-tools
git clone $AOSP_MIRROR/platform/system/tools/mkbootimg -b $BRANCH --depth 1
pip3 install telethon==1.31.1
pip3 install telethon
- name: Set boot sign key
env:
@@ -96,7 +79,8 @@ jobs:
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v3
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
@@ -124,11 +108,11 @@ jobs:
path: Image-android12*/*.img.gz
check-build-kernel:
if: github.event_name == 'pull_request' && !github.event.pull_request.draft
if: (github.event_name == 'pull_request' && !github.event.pull_request.draft) || github.ref == 'refs/heads/checkci'
uses: ./.github/workflows/gki-kernel.yml
with:
version: android12-5.10
version_name: android12-5.10.177
tag: android12-5.10-2023-06
os_patch_level: 2023-06
patch_path: "5.10"
version_name: android12-5.10.209
tag: android12-5.10-2024-05
os_patch_level: 2024-05
patch_path: "5.10"

View File

@@ -1,7 +1,7 @@
name: Build Kernel - Android 13
on:
push:
branches: ["main", "ci"]
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-a13.yml"
- ".github/workflows/gki-kernel.yml"
@@ -17,61 +17,34 @@ on:
workflow_call:
jobs:
build-kernel:
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
strategy:
matrix:
include:
- version: "5.10"
sub_level: 107
os_patch_level: 2022-11
- version: "5.10"
sub_level: 149
os_patch_level: 2023-01
- version: "5.10"
sub_level: 157
os_patch_level: 2023-03
- version: "5.10"
sub_level: 168
os_patch_level: 2023-05
- version: "5.10"
sub_level: 177
os_patch_level: 2023-06
- version: "5.10"
sub_level: 186
os_patch_level: 2023-08
- version: "5.10"
sub_level: 186
os_patch_level: 2023-09
- version: "5.10"
sub_level: 189
os_patch_level: 2023-11
- version: "5.10"
sub_level: 198
os_patch_level: 2023-12
- version: "5.15"
sub_level: 41
os_patch_level: 2022-11
- version: "5.15"
sub_level: 74
os_patch_level: 2023-01
- version: "5.15"
sub_level: 78
os_patch_level: 2023-03
- version: "5.15"
sub_level: 94
os_patch_level: 2023-05
- version: "5.15"
sub_level: 104
os_patch_level: 2023-07
- version: "5.15"
sub_level: 119
os_patch_level: 2023-09
os_patch_level: 2024-01
- version: "5.10"
sub_level: 205
os_patch_level: 2024-03
- version: "5.10"
sub_level: 209
os_patch_level: 2024-05
- version: "5.15"
sub_level: 123
os_patch_level: 2023-11
- version: "5.15"
sub_level: 137
os_patch_level: 2023-12
os_patch_level: 2024-01
- version: "5.15"
sub_level: 144
os_patch_level: 2024-03
- version: "5.15"
sub_level: 148
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
@@ -80,6 +53,7 @@ jobs:
tag: android13-${{ matrix.version }}-${{ matrix.os_patch_level }}
os_patch_level: ${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
upload-artifacts:
needs: build-kernel
runs-on: ubuntu-latest
@@ -111,7 +85,7 @@ jobs:
git clone $AOSP_MIRROR/platform/prebuilts/build-tools -b $BRANCH --depth 1 build-tools
git clone $AOSP_MIRROR/kernel/prebuilts/build-tools -b $BRANCH --depth 1 kernel-build-tools
git clone $AOSP_MIRROR/platform/system/tools/mkbootimg -b $BRANCH --depth 1
pip3 install telethon==1.31.1
pip3 install telethon
- name: Set boot sign key
env:
@@ -123,7 +97,8 @@ jobs:
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v3
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
@@ -151,20 +126,20 @@ jobs:
path: Image-android13*/*.img.gz
check-build-kernel:
if: github.event_name == 'pull_request' && !github.event.pull_request.draft
if: (github.event_name == 'pull_request' && !github.event.pull_request.draft) || github.ref == 'refs/heads/checkci'
strategy:
matrix:
include:
- version: "5.10"
sub_level: 189
os_patch_level: 2023-10
sub_level: 209
os_patch_level: 2024-05
- version: "5.15"
sub_level: 123
os_patch_level: 2023-10
sub_level: 148
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
with:
version: android13-${{ matrix.version }}
version_name: android13-${{ matrix.version }}.${{ matrix.sub_level }}
tag: android13-${{ matrix.version }}-${{ matrix.os_patch_level }}
os_patch_level: ${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
patch_path: ${{ matrix.version }}

View File

@@ -1,7 +1,7 @@
name: Build Kernel - Android 14
on:
push:
branches: ["main", "ci"]
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-a14.yml"
- ".github/workflows/gki-kernel.yml"
@@ -17,16 +17,22 @@ on:
workflow_call:
jobs:
build-kernel:
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
strategy:
matrix:
include:
- version: "5.15"
sub_level: 110
os_patch_level: 2023-09
- version: "5.15"
sub_level: 131
os_patch_level: 2023-11
- version: "5.15"
sub_level: 137
os_patch_level: 2024-01
- version: "5.15"
sub_level: 144
os_patch_level: 2024-03
- version: "5.15"
sub_level: 148
os_patch_level: 2024-05
- version: "6.1"
sub_level: 25
os_patch_level: 2023-10
@@ -35,7 +41,13 @@ jobs:
os_patch_level: 2023-11
- version: "6.1"
sub_level: 57
os_patch_level: 2023-12
os_patch_level: 2024-01
- version: "6.1"
sub_level: 68
os_patch_level: 2024-03
- version: "6.1"
sub_level: 75
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
@@ -44,6 +56,7 @@ jobs:
tag: android14-${{ matrix.version }}-${{ matrix.os_patch_level }}
os_patch_level: ${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
upload-artifacts:
needs: build-kernel
runs-on: ubuntu-latest
@@ -75,7 +88,7 @@ jobs:
git clone $AOSP_MIRROR/platform/prebuilts/build-tools -b $BRANCH --depth 1 build-tools
git clone $AOSP_MIRROR/kernel/prebuilts/build-tools -b $BRANCH --depth 1 kernel-build-tools
git clone $AOSP_MIRROR/platform/system/tools/mkbootimg -b $BRANCH --depth 1
pip3 install telethon==1.31.1
pip3 install telethon
- name: Set boot sign key
env:
@@ -87,7 +100,8 @@ jobs:
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v3
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
@@ -115,17 +129,20 @@ jobs:
path: Image-android14*/*.img.gz
check-build-kernel:
if: github.event_name == 'pull_request' && !github.event.pull_request.draft
if: (github.event_name == 'pull_request' && !github.event.pull_request.draft) || github.ref == 'refs/heads/checkci'
strategy:
matrix:
include:
- version: "5.15"
sub_level: 110
os_patch_level: 2023-09
sub_level: 148
os_patch_level: 2024-05
- version: "6.1"
sub_level: 75
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
with:
version: android14-${{ matrix.version }}
version_name: android14-${{ matrix.version }}.${{ matrix.sub_level }}
tag: android14-${{ matrix.version }}-${{ matrix.os_patch_level }}
os_patch_level: ${{ matrix.os_patch_level }}
patch_path: ${{ matrix.version }}
patch_path: ${{ matrix.version }}

View File

@@ -1,7 +1,7 @@
name: Build Kernel - ChromeOS ARCVM
on:
push:
branches: ["main"]
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-arcvm.yml"
- "kernel/**"
@@ -13,17 +13,23 @@ on:
workflow_call:
workflow_dispatch:
env:
git_tag: chromeos-5.10-arcvm
jobs:
build:
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && !github.event.pull_request.draft)
strategy:
matrix:
arch: [x86_64]
version: ["5.10.178"]
include:
- arch: x86_64
git_tag: chromeos-5.10-arcvm
file_name: "bzImage"
kernel_image_name: bzImage
build_config: build.config.gki.x86_64
defconfig: x86_64_arcvm_defconfig
- arch: arm64
kernel_image_name: Image
build_config: build.config.gki.aarch64
defconfig: arm64_arcvm_defconfig
name: Build ChromeOS ARCVM kernel
runs-on: ubuntu-20.04
@@ -66,8 +72,17 @@ jobs:
fetch-depth: 0
- name: Setup kernel source
run: git clone https://chromium.googlesource.com/chromiumos/third_party/kernel.git -b ${{ matrix.git_tag }} --depth=1
run: git clone https://chromium.googlesource.com/chromiumos/third_party/kernel.git -b ${{ env.git_tag }} --depth=1
- name: Extract version from Makefile
working-directory: kernel
run: |
VERSION=$(grep -E '^VERSION = ' Makefile | awk '{print $3}')
PATCHLEVEL=$(grep -E '^PATCHLEVEL = ' Makefile | awk '{print $3}')
SUBLEVEL=$(grep -E '^SUBLEVEL = ' Makefile | awk '{print $3}')
echo "ChromeOS ARCVM Linux kernel version: $VERSION.$PATCHLEVEL.$SUBLEVEL"
echo "version=$VERSION.$PATCHLEVEL.$SUBLEVEL" >> $GITHUB_ENV
- name: Setup KernelSU
working-directory: kernel
run: |
@@ -82,22 +97,25 @@ jobs:
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
echo "[+] Apply KernelSU patches"
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.10/*.patch
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.10/*.patch || echo "[-] No patch found"
echo "[+] Patch script/setlocalversion"
sed -i 's/-dirty//g' $KERNEL_ROOT/scripts/setlocalversion
echo "[+] KernelSU setup done."
cd $GITHUB_WORKSPACE/KernelSU
VERSION=$(($(git rev-list --count HEAD) + 10200))
echo "VERSION: $VERSION"
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
KSU_VERSION=$(($(git rev-list --count HEAD) + 10200))
echo "KernelSU version: $KSU_VERSION"
echo "kernelsu_version=$KSU_VERSION" >> $GITHUB_ENV
- name: Build Kernel
working-directory: kernel
env:
KERNEL_IMAGE_NAME: ${{ matrix.kernel_image_name }}
ARCH: ${{ matrix.arch }}
run: |
set -a && . build.config.gki.x86_64; set +a
export DEFCONFIG=x86_64_arcvm_defconfig
set -a && . ${{ matrix.build_config }}; set +a
export DEFCONFIG=${{ matrix.defconfig }}
if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then
export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }}
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
@@ -106,43 +124,12 @@ jobs:
make LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc O=${PWD} mrproper
make LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc O=${PWD} ${DEFCONFIG} < /dev/null
scripts/config --file .config -e LTO_CLANG -d LTO_NONE -e LTO_CLANG_THIN -d LTO_CLANG_FULL -e THINLTO
make LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc O=${PWD} -j$(nproc) bzImage modules prepare-objtool
make LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc O=${PWD} -j$(nproc) ${KERNEL_IMAGE_NAME} modules prepare-objtool
ls -l -h ${PWD}/arch/${ARCH}/boot
echo "file_path=${PWD}/arch/${ARCH}/boot/${KERNEL_IMAGE_NAME}" >> $GITHUB_ENV
echo "file_path=${PWD}/arch/x86/boot/bzImage" >> $GITHUB_ENV
- name: Upload kernel-ARCVM-${{ matrix.arch }}-${{ matrix.version }}
- name: Upload kernel-ARCVM-${{ matrix.arch }}-${{ env.version }}
uses: actions/upload-artifact@v4
with:
name: kernel-ARCVM-${{ matrix.arch }}-${{ matrix.version }}
name: kernel-ARCVM-${{ matrix.arch }}-${{ env.version }}
path: "${{ env.file_path }}"
- name: Bot session cache
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
id: bot_session_cache
uses: actions/cache@v3
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Post to Telegram
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
TITLE=kernel-ARCVM-${{ matrix.arch }}-${{ matrix.version }}
echo "[+] title: $TITLE"
export TITLE
export VERSION="${{ env.kernelsu_version }}"
echo "[+] Compress images"
gzip -n -f -9 "${{ env.file_path }}"
echo "[+] Image to upload"
ls -l "${{ env.file_path }}.gz"
if [ -n "${{ secrets.BOT_TOKEN }}" ]; then
pip3 install telethon==1.31.1
python3 "$GITHUB_WORKSPACE/KernelSU/scripts/ksubot.py" "${{ env.file_path }}.gz"
fi

40
.github/workflows/build-kernel-avd.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Build Kernel - AVD
on:
push:
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-avd.yml"
- ".github/workflows/avd-kernel.yml"
- ".github/workflows/manifests/*xml"
- "kernel/**"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/build-kernel-avd.yml"
- ".github/workflows/avd-kernel.yml"
- ".github/workflows/manifests/*.xml"
- "kernel/**"
workflow_call:
workflow_dispatch:
jobs:
build-kernel:
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
uses: ./.github/workflows/avd-kernel.yml
secrets: inherit
strategy:
matrix:
include:
- version: "android-14-avd_x86_64"
manifest: "android-14-avd_x86_64.xml"
arch: "x86_64"
- version: "android-15-avd_aarch64"
manifest: "android-15-avd_aarch64.xml"
arch: "aarch64"
- version: "android-15-avd_x86_64"
manifest: "android-15-avd_x86_64.xml"
arch: "x86_64"
with:
version_name: ${{ matrix.version }}
manifest_name: ${{ matrix.manifest }}
arch: ${{ matrix.arch }}
debug: true

View File

@@ -1,142 +1,38 @@
name: Build Kernel - WSA
on:
push:
branches: ["main"]
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-kernel-wsa.yml"
- ".github/workflows/wsa-kernel.yml"
- "kernel/**"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/build-kernel-wsa.yml"
- ".github/workflows/wsa-kernel.yml"
- "kernel/**"
workflow_call:
workflow_dispatch:
jobs:
build:
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && !github.event.pull_request.draft)
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/checkci'
strategy:
matrix:
arch: [x86_64, arm64]
version: ["5.15.94.2", "5.15.104.1", "5.15.104.2", "5.15.104.3", "5.15.104.4"]
uses: ./.github/workflows/wsa-kernel.yml
with:
arch: ${{ matrix.arch }}
version: ${{ matrix.version }}
name: Build WSA-Kernel-${{ matrix.version }}-${{ matrix.arch }}
runs-on: ubuntu-20.04
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
steps:
- name: Install Build Tools
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: bc bison build-essential flex libelf-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu gzip ccache
version: 1.0
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: ./llvm
key: llvm-12.0.1
- name: Setup LLVM
uses: KyleMayes/install-llvm-action@v1
with:
version: "12.0.1"
force-version: true
ubuntu-version: "16.04"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Checkout KernelSU
uses: actions/checkout@v4
with:
path: KernelSU
fetch-depth: 0
- name: Setup kernel source
uses: actions/checkout@v4
with:
repository: microsoft/WSA-Linux-Kernel
ref: android-lts/latte-2/${{ matrix.version }}
path: WSA-Linux-Kernel
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: WSA-Kernel-${{ matrix.version }}-${{ matrix.arch }}
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
max-size: 2G
- name: Setup KernelSU
working-directory: WSA-Linux-Kernel
run: |
echo "[+] KernelSU setup"
KERNEL_ROOT=$GITHUB_WORKSPACE/WSA-Linux-Kernel
echo "[+] KERNEL_ROOT: $KERNEL_ROOT"
echo "[+] Copy KernelSU driver to $KERNEL_ROOT/drivers"
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $KERNEL_ROOT/drivers/kernelsu
echo "[+] Add KernelSU driver to Makefile"
DRIVER_MAKEFILE=$KERNEL_ROOT/drivers/Makefile
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
echo "[+] Apply KernelSU patches"
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.15/*.patch
echo "[+] KernelSU setup done."
cd $GITHUB_WORKSPACE/KernelSU
VERSION=$(($(git rev-list --count HEAD) + 10200))
echo "VERSION: $VERSION"
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
- name: Build Kernel
working-directory: WSA-Linux-Kernel
run: |
if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then
export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }}
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
fi
declare -A ARCH_MAP=(["x86_64"]="x64" ["arm64"]="arm64")
cp configs/wsa/config-wsa-${ARCH_MAP[${{ matrix.arch }}]} .config
make olddefconfig
declare -A FILE_NAME=(["x86_64"]="bzImage" ["arm64"]="Image")
make -j`nproc` LLVM=1 ARCH=${{ matrix.arch }} $(if [ "${{ matrix.arch }}" == "arm64" ]; then echo CROSS_COMPILE=aarch64-linux-gnu; fi) ${FILE_NAME[${{ matrix.arch }}]} CCACHE="/usr/bin/ccache"
declare -A ARCH_MAP_FILE=(["x86_64"]="x86" ["arm64"]="arm64")
echo "file_path=WSA-Linux-Kernel/arch/${ARCH_MAP_FILE[${{ matrix.arch }}]}/boot/${FILE_NAME[${{ matrix.arch }}]}" >> $GITHUB_ENV
- name: Upload kernel-${{ matrix.arch }}-${{ matrix.version }}
uses: actions/upload-artifact@v4
with:
name: kernel-WSA-${{ matrix.arch }}-${{ matrix.version }}
path: "${{ env.file_path }}"
- name: Bot session cache
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag'
id: bot_session_cache
uses: actions/cache@v3
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Post to Telegram
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag'
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
TITLE=kernel-${{ matrix.arch }}-WSA-${{ matrix.version }}
echo "[+] title: $TITLE"
export TITLE
export VERSION="${{ env.kernelsu_version }}"
echo "[+] Compress images"
gzip -n -f -9 "${{ env.file_path }}"
echo "[+] Image to upload"
ls -l "${{ env.file_path }}.gz"
if [ -n "${{ secrets.BOT_TOKEN }}" ]; then
pip3 install telethon==1.31.1
python3 "$GITHUB_WORKSPACE/KernelSU/scripts/ksubot.py" "${{ env.file_path }}.gz"
fi
check_build:
if: (github.event_name == 'pull_request' && !github.event.pull_request.draft) || github.ref == 'refs/heads/checkci'
uses: ./.github/workflows/wsa-kernel.yml
strategy:
matrix:
arch: [x86_64, arm64]
with:
arch: ${{ matrix.arch }}
version: "5.15.104.4"

View File

@@ -1,25 +0,0 @@
name: Build KSUD
on:
push:
branches: [ "main", "ci" ]
paths:
- '.github/workflows/build-ksud.yml'
- '.github/workflows/ksud.yml'
- 'userspace/ksud/**'
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/build-ksud.yml'
- '.github/workflows/ksud.yml'
- 'userspace/ksud/**'
jobs:
build:
strategy:
matrix:
include:
- target: aarch64-linux-android
- target: x86_64-linux-android
- target: x86_64-pc-windows-gnu # only for build
uses: ./.github/workflows/ksud.yml
with:
target: ${{ matrix.target }}

38
.github/workflows/build-lkm.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Build LKM for KernelSU
on:
push:
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/build-lkm.yml"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/build-lkm.yml"
workflow_call:
jobs:
build-lkm:
strategy:
matrix:
include:
- version: "android12-5.10"
sub_level: 209
os_patch_level: 2024-05
- version: "android13-5.10"
sub_level: 209
os_patch_level: 2024-05
- version: "android13-5.15"
sub_level: 148
os_patch_level: 2024-05
- version: "android14-5.15"
sub_level: 148
os_patch_level: 2024-05
- version: "android14-6.1"
sub_level: 75
os_patch_level: 2024-05
uses: ./.github/workflows/gki-kernel.yml
with:
version: ${{ matrix.version }}
version_name: ${{ matrix.version }}.${{ matrix.sub_level }}
tag: ${{ matrix.version }}-${{ matrix.os_patch_level }}
os_patch_level: ${{ matrix.os_patch_level }}
build_lkm: true

View File

@@ -2,10 +2,11 @@ name: Build Manager
on:
push:
branches: [ "main" ]
branches: [ "main", "ci" ]
paths:
- '.github/workflows/build-manager.yml'
- 'manager/**'
- 'kernel/**'
- 'userspace/ksud/**'
pull_request:
branches: [ "main" ]
@@ -14,15 +15,33 @@ on:
workflow_call:
jobs:
build-lkm:
uses: ./.github/workflows/build-lkm.yml
secrets: inherit
build-ksud:
needs: build-lkm
strategy:
matrix:
include:
- target: aarch64-linux-android
os: ubuntu-latest
- target: x86_64-linux-android
os: ubuntu-latest
- target: x86_64-pc-windows-gnu # windows pc
os: ubuntu-latest
- target: x86_64-apple-darwin # Intel mac
os: macos-latest
- target: aarch64-apple-darwin # M chip mac
os: macos-latest
- target: aarch64-unknown-linux-musl # arm64 Linux
os: ubuntu-latest
- target: x86_64-unknown-linux-musl # x86 Linux
os: ubuntu-latest
uses: ./.github/workflows/ksud.yml
with:
target: ${{ matrix.target }}
os: ${{ matrix.os }}
build-manager:
needs: build-ksud
@@ -50,24 +69,29 @@ jobs:
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
echo KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' >> gradle.properties
echo KEY_ALIAS='${{ secrets.KEY_ALIAS }}' >> gradle.properties
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}' >> gradle.properties
echo KEYSTORE_FILE='../key.jks' >> gradle.properties
echo ${{ secrets.KEYSTORE }} | base64 --decode > key.jks
{
echo KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}'
echo KEY_ALIAS='${{ secrets.KEY_ALIAS }}'
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}'
echo KEYSTORE_FILE='key.jks'
} >> gradle.properties
echo ${{ secrets.KEYSTORE }} | base64 -d > key.jks
fi
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Download arm64 ksud
uses: actions/download-artifact@v4
with:
@@ -100,14 +124,22 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v4
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
with:
name: manager
path: manager/app/build/outputs/apk/release/*.apk
- name: Upload mappings
uses: actions/upload-artifact@v4
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
with:
name: "mappings"
path: "manager/app/build/outputs/mapping/release/"
- name: Bot session cache
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
id: bot_session_cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
@@ -126,6 +158,6 @@ jobs:
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
export VERSION=$(git rev-list --count HEAD)
APK=$(find ./app/build/outputs/apk/release -name "*.apk")
pip3 install telethon==1.31.1
pip3 install telethon
python3 $GITHUB_WORKSPACE/scripts/ksubot.py $APK
fi

View File

@@ -28,7 +28,7 @@ jobs:
fi
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25c
ndk-version: r26d
- name: Build su
working-directory: ./userspace/su
run: ndk-build
@@ -36,29 +36,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: su
path: ./userspace/su/libs
- name: Bot session cache
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
id: bot_session_cache
uses: actions/cache@v3
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Upload to telegram
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
env:
CHAT_ID: ${{ secrets.CHAT_ID }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }}
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_URL: ${{ github.event.head_commit.url }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
TITLE: SU
run: |
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
export VERSION=$(git rev-list --count HEAD)
pip3 install telethon==1.31.1
mv ./userspace/su/libs/arm64-v8a/su su-arm64
mv ./userspace/su/libs/x86_64/su su-x86_64
python3 scripts/ksubot.py su-arm64 su-x86_64
fi
path: ./userspace/su/libs

View File

@@ -22,14 +22,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# cross build failed after Rust 1.68, see https://github.com/cross-rs/cross/issues/1222
- run: rustup default 1.67.0
- run: rustup update --force-non-host stable-x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
workspaces: userspace/ksud
- name: Install cross
run: cargo install cross --locked
run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1
- name: Run clippy
run: |

View File

@@ -37,11 +37,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: yarn # or pnpm / yarn
cache-dependency-path: website/yarn.lock
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build with VitePress

View File

@@ -29,7 +29,7 @@ on:
for example: 2021-11
default: 2022-05
patch_path:
required: true
required: false
type: string
description: >
Directory name of .github/patches/<patch_path>
@@ -49,6 +49,10 @@ on:
required: false
type: boolean
default: false
build_lkm:
required: false
type: boolean
default: false
secrets:
BOOT_SIGN_KEY:
required: false
@@ -124,13 +128,15 @@ jobs:
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $GKI_ROOT/common/drivers/kernelsu
echo "[+] Add KernelSU driver to Makefile"
DRIVER_MAKEFILE=$GKI_ROOT/common/drivers/Makefile
grep -q "kernelsu" $DRIVER_MAKEFILE || echo "obj-y += kernelsu/" >> $DRIVER_MAKEFILE
DRIVER_KCONFIG=$GKI_ROOT/common/drivers/Kconfig
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
echo "[+] Apply KernelSU patches"
cd $GKI_ROOT/common/ && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/$PATCH_PATH/*.patch || echo "[-] No patch found"
if [ "$IS_DEBUG_KERNEL" = "true" ]; then
echo "[+] Enable debug features for kernel"
echo "ccflags-y += -DCONFIG_KSU_DEBUG" >> $GITHUB_WORKSPACE/KernelSU/kernel/Makefile
printf "\nccflags-y += -DCONFIG_KSU_DEBUG\n" >> $GITHUB_WORKSPACE/KernelSU/kernel/Makefile
fi
repo status
echo "[+] KernelSU setup done."
@@ -148,12 +154,40 @@ jobs:
- name: Setup ccache
if: inputs.use_cache == true
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@v1
with:
key: gki-kernel-aarch64-${{ inputs.version_name }}
max-size: 2G
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- name: Setup for LKM
if: ${{ inputs.build_lkm == true }}
working-directory: android-kernel
run: |
pip install ast-grep-cli
sudo apt-get install llvm-15 -y
ast-grep -U -p '$$$ check_exports($$$) {$$$}' -r '' common/scripts/mod/modpost.c
ast-grep -U -p 'check_exports($$$);' -r '' common/scripts/mod/modpost.c
sed -i '/config KSU/,/help/{s/default y/default m/}' common/drivers/kernelsu/Kconfig
echo "drivers/kernelsu/kernelsu.ko" >> common/android/gki_aarch64_modules
# bazel build, android14-5.15, android14-6.1 use bazel
if [ ! -e build/build.sh ]; then
sed -i 's/needs unknown symbol/Dont abort when unknown symbol/g' build/kernel/*.sh || echo "No unknown symbol scripts found"
if [ -e common/modules.bzl ]; then
sed -i 's/_COMMON_GKI_MODULES_LIST = \[/_COMMON_GKI_MODULES_LIST = \[ "drivers\/kernelsu\/kernelsu.ko",/g' common/modules.bzl
fi
else
TARGET_FILE="build/kernel/build.sh"
if [ ! -e "$TARGET_FILE" ]; then
TARGET_FILE="build/build.sh"
fi
sed -i 's/needs unknown symbol/Dont abort when unknown symbol/g' $TARGET_FILE || echo "No unknown symbol in $TARGET_FILE"
sed -i 's/if ! diff -u "\${KERNEL_DIR}\/\${MODULES_ORDER}" "\${OUT_DIR}\/modules\.order"; then/if false; then/g' $TARGET_FILE
sed -i 's@${ROOT_DIR}/build/abi/compare_to_symbol_list@echo@g' $TARGET_FILE
sed -i 's/needs unknown symbol/Dont abort when unknown symbol/g' build/kernel/*.sh || echo "No unknown symbol scripts found"
fi
- name: Make working directory clean to avoid dirty
working-directory: android-kernel
run: |
@@ -163,7 +197,7 @@ jobs:
cd common/ && git add -A && git commit -a -m "Add KernelSU"
repo status
- name: Build boot.img
- name: Build Kernel/LKM
working-directory: android-kernel
run: |
if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then
@@ -171,7 +205,7 @@ jobs:
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
fi
if [ -e build/build.sh ]; then
CCACHE="/usr/bin/ccache" LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh CC="/usr/bin/ccache clang"
else
tools/bazel run --disk_cache=/home/runner/.cache/bazel --config=fast --config=stamp --lto=thin //common:kernel_aarch64_dist -- --dist_dir=dist
fi
@@ -184,20 +218,34 @@ jobs:
OUTDIR=android-kernel/dist
fi
mkdir output
cp $OUTDIR/Image ./output/
cp $OUTDIR/Image.lz4 ./output/
git clone https://github.com/Kernel-SU/AnyKernel3
rm -rf ./AnyKernel3/.git
cp $OUTDIR/Image ./AnyKernel3/
if [ "${{ inputs.build_lkm}}" = "true" ]; then
llvm-strip-15 -d $OUTDIR/kernelsu.ko
mv $OUTDIR/kernelsu.ko ./output/${{ inputs.version }}_kernelsu.ko
else
cp $OUTDIR/Image ./output/
cp $OUTDIR/Image.lz4 ./output/
git clone https://github.com/Kernel-SU/AnyKernel3
rm -rf ./AnyKernel3/.git
cp $OUTDIR/Image ./AnyKernel3/
fi
- name: Upload Image and Image.gz
uses: actions/upload-artifact@v4
if: ${{ inputs.build_lkm == false }}
with:
name: Image-${{ inputs.version_name }}_${{ inputs.os_patch_level }}
path: ./output/*
- name: Upload AnyKernel3
if: ${{ inputs.build_lkm == false }}
uses: actions/upload-artifact@v4
with:
name: AnyKernel3-${{ inputs.version_name }}_${{ inputs.os_patch_level }}
path: ./AnyKernel3/*
- name: Upload LKM
uses: actions/upload-artifact@v4
if: ${{ inputs.build_lkm == true }}
with:
name: ${{ inputs.version }}-lkm
path: ./output/*_kernelsu.ko

View File

@@ -5,32 +5,53 @@ on:
target:
required: true
type: string
os:
required: false
type: string
default: ubuntu-latest
pack_lkm:
required: false
type: boolean
default: true
use_cache:
required: false
type: boolean
default: true
jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# cross build failed after Rust 1.68, see https://github.com/cross-rs/cross/issues/1222
- run: rustup default 1.67.0
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Prepare LKM fies
if: ${{ inputs.pack_lkm }}
run: |
cp android*-lkm/*_kernelsu.ko ./userspace/ksud/bin/aarch64/
- name: Setup rustup
run: |
rustup update stable
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
- uses: Swatinem/rust-cache@v2
with:
workspaces: userspace/ksud
cache-targets: false
- name: Install cross
run: cargo install cross --locked
run: |
cargo install cross --git https://github.com/cross-rs/cross --rev 66845c1
- name: Build ksud
run: cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
run: CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
- name: Upload ksud artifact
uses: actions/upload-artifact@v4
with:
name: ksud-${{ inputs.target }}
path: userspace/ksud/target/**/release/ksud
path: userspace/ksud/target/**/release/ksud*

View File

@@ -67,11 +67,13 @@ jobs:
run: ls -R
- name: release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
manager/*.apk
android*-lkm/*_kernelsu.ko
AnyKernel3-*.zip
boot-images-*/Image-*/*.img.gz
kernel-WSA*.zip
kernel-ARCVM*.zip
ksud-*

106
.github/workflows/wsa-kernel.yml vendored Normal file
View File

@@ -0,0 +1,106 @@
name: Build Kernel - WSA
on:
workflow_call:
inputs:
arch:
required: true
type: string
description: >
Build arch: x86_64 / arm64
version:
required: true
type: string
description: >
Build version
jobs:
build:
name: Build WSA-Kernel-${{ inputs.version }}-${{ inputs.arch }}
runs-on: ubuntu-22.04
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
CCACHE_HARDLINK: "true"
steps:
- name: Install Build Tools
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: bc bison build-essential flex libelf-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu gzip ccache
version: 1.0
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v4
with:
path: ./llvm
key: llvm-12.0.1
- name: Setup LLVM
uses: KyleMayes/install-llvm-action@v1
with:
version: "12.0.1"
force-version: true
ubuntu-version: "16.04"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Checkout KernelSU
uses: actions/checkout@v4
with:
path: KernelSU
fetch-depth: 0
- name: Setup kernel source
uses: actions/checkout@v4
with:
repository: microsoft/WSA-Linux-Kernel
ref: android-lts/latte-2/${{ inputs.version }}
path: WSA-Linux-Kernel
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: WSA-Kernel-${{ inputs.version }}-${{ inputs.arch }}
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
max-size: 2G
- name: Setup KernelSU
working-directory: WSA-Linux-Kernel
run: |
echo "[+] KernelSU setup"
KERNEL_ROOT=$GITHUB_WORKSPACE/WSA-Linux-Kernel
echo "[+] KERNEL_ROOT: $KERNEL_ROOT"
echo "[+] Copy KernelSU driver to $KERNEL_ROOT/drivers"
ln -sf $GITHUB_WORKSPACE/KernelSU/kernel $KERNEL_ROOT/drivers/kernelsu
echo "[+] Add KernelSU driver to Makefile"
DRIVER_MAKEFILE=$KERNEL_ROOT/drivers/Makefile
DRIVER_KCONFIG=$KERNEL_ROOT/drivers/Kconfig
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
echo "[+] Apply KernelSU patches"
cd $KERNEL_ROOT && git apply $GITHUB_WORKSPACE/KernelSU/.github/patches/5.15/*.patch || echo "[-] No patch found"
echo "[+] KernelSU setup done."
cd $GITHUB_WORKSPACE/KernelSU
VERSION=$(($(git rev-list --count HEAD) + 10200))
echo "VERSION: $VERSION"
echo "kernelsu_version=$VERSION" >> $GITHUB_ENV
- name: Build Kernel
working-directory: WSA-Linux-Kernel
run: |
if [ ! -z ${{ vars.EXPECTED_SIZE }} ] && [ ! -z ${{ vars.EXPECTED_HASH }} ]; then
export KSU_EXPECTED_SIZE=${{ vars.EXPECTED_SIZE }}
export KSU_EXPECTED_HASH=${{ vars.EXPECTED_HASH }}
fi
declare -A ARCH_MAP=(["x86_64"]="x64" ["arm64"]="arm64")
cp configs/wsa/config-wsa-${ARCH_MAP[${{ inputs.arch }}]} .config
make olddefconfig
declare -A FILE_NAME=(["x86_64"]="bzImage" ["arm64"]="Image")
make -j`nproc` LLVM=1 ARCH=${{ inputs.arch }} $(if [ "${{ inputs.arch }}" == "arm64" ]; then echo CROSS_COMPILE=aarch64-linux-gnu; fi) ${FILE_NAME[${{ inputs.arch }}]} CCACHE="/usr/bin/ccache"
declare -A ARCH_MAP_FILE=(["x86_64"]="x86" ["arm64"]="arm64")
echo "file_path=WSA-Linux-Kernel/arch/${ARCH_MAP_FILE[${{ inputs.arch }}]}/boot/${FILE_NAME[${{ inputs.arch }}]}" >> $GITHUB_ENV
- name: Upload kernel-${{ inputs.arch }}-${{ inputs.version }}
uses: actions/upload-artifact@v4
with:
name: kernel-WSA-${{ inputs.arch }}-${{ inputs.version }}
path: "${{ env.file_path }}"

View File

@@ -1,5 +1,4 @@
**English** | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
**English** | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
@@ -7,13 +6,12 @@
A Kernel-based root solution for Android devices.
[![latest release badge](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Features
1. Kernel-based `su` and root access management.
@@ -43,12 +41,13 @@ To help translate KernelSU or improve existing translations, please use [Weblate
- Telegram: [@KernelSU](https://t.me/KernelSU)
## Security
For information on reporting security vulnerabilities in KernelSU, see [SECURITY.md](/SECURITY.md).
## License
- Files under the `kernel` directory are [GPL-2.0-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- All other parts except the `kernel` directory are [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html)
- Files under the `kernel` directory are [GPL-2.0-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- All other parts except the `kernel` directory are [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Credits

View File

@@ -1,14 +1,22 @@
[English](README.md) | [Español](README_ES.md) | **简体中文** | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | **简体中文** | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
一个 Android 上基于内核的 root 方案。
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## 特性
- 基于内核的 su 和权限管理。
- 基于 overlayfs 的模块系统。
- [App Profile](https://kernelsu.org/guide/app-profile.html): 把 Root 权限关进笼子里。
- 基于内核的 `su` 和权限管理。
- 基于 [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS) 的模块系统。
- [App Profile](https://kernelsu.org/zh_CN/guide/app-profile.html): 把 Root 权限关进笼子里。
## 兼容状态
@@ -16,25 +24,30 @@ KernelSU 官方支持 GKI 2.0 的设备内核版本5.10以上);旧内核
WSA, ChromeOS 和运行在容器上的 Android 也可以与 KernelSU 一起工作。
目前支持架构 : `arm64-v8a``x86_64`
目前支持架构 : `arm64-v8a``x86_64`
## 使用方法
- [安装教程](https://kernelsu.org/zh_CN/guide/installation.html)
- [如何构建?](https://kernelsu.org/zh_CN/guide/how-to-build.html)
- [官方网站](https://kernelsu.org/zh_CN/)
## 参与翻译
要将 KernelSU 翻译成您的语言,或完善现有的翻译,请使用 [Weblate](https://hosted.weblate.org/engage/kernelsu/)。
要将 KernelSU 翻译成您的语言,或完善现有的翻译,请使用 [Weblate](https://hosted.weblate.org/engage/kernelsu/)。现已不再接受有关管理器翻译的PR因为这会与Weblate冲突。
## 讨论
- Telegram: [@KernelSU](https://t.me/KernelSU)
## 安全性
有关报告 KernelSU 安全漏洞的信息,请参阅 [SECURITY.md](/SECURITY.md)。
## 许可证
- 目录 `kernel` 下所有文件为 [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
-`kernel` 目录的其他部分均为 [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- 目录 `kernel` 下所有文件为 [GPL-2.0-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
-`kernel` 目录的其他部分均为 [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html)
## 鸣谢

View File

@@ -1,47 +1,56 @@
[ 🇬🇧 English](README.md) | 🇪🇸 **Español** | [🇨🇳 简体中文](README_CN.md) | [🇹🇼 繁體中文](README_TW.md) | [ 🇯🇵 日本語](README_JP.md) | [🇵🇱 Polski](README_PL.md) | [🇧🇷 Portuguese-Brazil](README_PT-BR.md) | [🇹🇷 Türkçe](README_TR.md) | [🇷🇺Русский](README_RU.md) | [🇻🇳Tiếng Việt](README_VI.md) | [ɪᴅ indonesia](README_ID.md) | [עברית](README_iw.md) | [🇮🇳हिंदी](README_IN.md)
[English](README.md) | **Español** | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
<div style="display: flex; align-items: center;">
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="">
<div style="margin-left: 20px;">
<span style="font-size: large; "><b>KernelSU</b></span>
<br>
<span style="font-size: medium; "><i>Una solución root basada en el kernel para dispositivos Android.</i></span>
</div>
</div>
# KernelSU
## 🚀 Características
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
**1.** Binario `su` basado en el kernel y gestión de acceso root.<br/>
**2.** Sistema de módulos basado en **OverlayFS**.
Una solución root basada en el kernel para dispositivos Android.
## ✅ Estado de compatibilidad
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localización-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Seguir-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/Licencia-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Características
1. Binario `su` basado en el kernel y gestión de acceso root.
2. Sistema de módulos basado en [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
## Estado de compatibilidad
**KernelSU** soporta de forma oficial dispositivos Android con **GKI 2.0** (a partir de la versión **5.10** del kernel). Los kernels antiguos (a partir de la versión **4.14**) también son compatibles, pero necesitas compilarlos por tu cuenta.
El **Subsistema de Windows para Android (WSA)** e implementaciones de Android basadas en contenedores, como **Waydroid**, también deberían funcionar con **KernelSU** integrado.
Con esto, WSA, ChromeOS y Android basado en contenedores están todos compatibles.
Actualmente se soportan las siguientes **ABIs**: `arm64-v8a`; `x86_64`.
Actualmente, solo se admiten las arquitecturas `arm64-v8a` y `x86_64`.
## 📖 Uso
## Uso
[¿Cómo instalarlo?](https://kernelsu.org/guide/installation.html)
- [¿Cómo instalarlo?](https://kernelsu.org/guide/installation.html)
- [¿Cómo compilarlo?](https://kernelsu.org/guide/how-to-build.html)
- [Site oficial](https://kernelsu.org/)
## 🔨 Compilación
## Traducción
[¿Cómo compilarlo?](https://kernelsu.org/guide/how-to-build.html)
Para ayudar a traducir KernelSU o mejorar las traducciones existentes, utilice [Weblate](https://hosted.weblate.org/engage/kernelsu/). Ya no se aceptan PR de la traducción de Manager porque entrará en conflicto con Weblate.
## 💬 Discusión
## Discusión
- Telegram: [@KernelSU](https://t.me/KernelSU)
## ⚖️ Licencia
## Seguridad
- Los archivos bajo el directorio `kernel` están licenciados bajo [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Todas las demás partes, a excepción del directorio `kernel`, están licenciados bajo [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html).
Para obtener información sobre cómo informar vulnerabilidades de seguridad en KernelSU, consulte [SECURITY.md](/SECURITY.md).
## 👥 Créditos
## Licencia
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): la idea de **KernelSU**.
- [genuine](https://github.com/brevent/genuine/): la validación del **esquema de firmas APK v2**.
- Los archivos bajo el directorio `kernel` están licenciados bajo [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Todas las demás partes, a excepción del directorio `kernel`, están licenciados bajo [GPL-3-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Créditos
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): la idea de KernelSU.
- [Magisk](https://github.com/topjohnwu/Magisk): la poderosa herramienta root.
- [genuine](https://github.com/brevent/genuine/): validación de firma apk v2.
- [Diamorphine](https://github.com/m0nad/Diamorphine): algunas habilidades de rootkit.
- [Magisk](https://github.com/topjohnwu/Magisk): la implementación de la **política de SELinux (SEPolicy)**.

View File

@@ -1,13 +1,21 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portugis-Brasil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | **Indonesia** | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | **Indonesia** | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
Solusi root berbasis Kernel untuk perangkat Android.
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Fitur
1. Manajemen akses root dan `su` berbasis kernel.
2. Sistem modul berdasarkan overlayfs.
2. Sistem modul berdasarkan [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
3. [Profil Aplikasi](https://kernelsu.org/guide/app-profile.html): Kunci daya root di dalam sangkar.
## Status Kompatibilitas
@@ -20,9 +28,9 @@ Dan ABI yang didukung saat ini adalah: `arm64-v8a` dan `x86_64`
## Penggunaan
- [Petunjuk Instalasi](https://kernelsu.org/guide/installation.html)
- [Bagaimana cara membuat?](https://kernelsu.org/guide/how-to-build.html)
- [Situs Web Resmi](https://kernelsu.org/)
- [Petunjuk Instalasi](https://kernelsu.org/id_ID/guide/installation.html)
- [Bagaimana cara membuat?](https://kernelsu.org/id_ID/guide/how-to-build.html)
- [Situs Web Resmi](https://kernelsu.org/id_ID/)
## Terjemahan
@@ -34,8 +42,8 @@ Untuk menerjemahkan KernelSU ke dalam bahasa Anda atau menyempurnakan terjemahan
## Lisensi
- File di bawah direktori `kernel` adalah [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- Semua bagian lain kecuali direktori `kernel` adalah [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- File di bawah direktori `kernel` adalah [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Semua bagian lain kecuali direktori `kernel` adalah [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Kredit

View File

@@ -1,19 +1,21 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | **हिंदी**
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | **हिंदी**
# KernelSU
<div style="display: flex; align-items: center;">
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="">
<div style="margin-left: 20px;">
<span style="font-size: large; "><b>KernelSU</b></span>
<br>
<span style="font-size: medium; "><i>Android उपकरणों के लिए कर्नेल-आधारित रूट समाधान।</i></span>
</div>
</div>
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
Android उपकरणों के लिए कर्नेल-आधारित रूट समाधान।
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## विशेषताएँ
1. कर्नेल-आधारित `su` और रूट एक्सेस प्रबंधन।
2. Overlayfs पर आधारित मॉड्यूल प्रणाली।
2. [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS) पर आधारित मॉड्यूल प्रणाली।
3. [App Profile](https://kernelsu.org/guide/app-profile.html): Root शक्ति को पिंजरे में बंद कर दो।
## अनुकूलता अवस्था
@@ -40,8 +42,8 @@ KernelSU का अनुवाद करने या मौजूदा अन
## लाइसेंस
- `Kernel` निर्देशिका के अंतर्गत फ़ाइलें हैं [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- `Kernel` निर्देशिका को छोड़कर अन्य सभी भाग हैं [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- `Kernel` निर्देशिका के अंतर्गत फ़ाइलें हैं [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- `Kernel` निर्देशिका को छोड़कर अन्य सभी भाग हैं [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html)
## आभार सूची

View File

@@ -1,13 +1,21 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | **עברית** | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | **עברית** | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
פתרון לניהול root מבוסס על Kernel עבור מכשירי Android.
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## תכונות
1. ניהול root ו־`su` מבוססים על Kernel.
2. מערכת מודולים מבוססת overlayfs.
2. מערכת מודולים מבוססת [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
3. [פרופיל אפליקציה](https://kernelsu.org/guide/app-profile.html): נעילת גישת root בכלוב.
## מצב תאימות
@@ -34,12 +42,12 @@ KernelSU תומך במכשירי Android GKI 2.0 (kernel 5.10+) באופן רש
## רשיון
- קבצים תחת הספרייה `kernel` מוגנים על פי [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- כל החלקים האחרים, למעט הספרייה `kernel`, מוגנים על פי [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- קבצים תחת הספרייה `kernel` מוגנים על פי [GPL-2.0-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- כל החלקים האחרים, למעט הספרייה `kernel`, מוגנים על פי [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## קרדיטים
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): הרעיון של KernelSU.
- [Magisk](https://github.com/topjohnwu/Magisk): הכלי הסופר חזק לניהול root.
- [genuine](https://github.com/brevent/genuine/): אימות חתימת apk v2.
- [Diamorphine](https://github.com/m0nad/Diamorphine): כמה יכולות רוט.
- [Diamorphine](https://github.com/m0nad/Diamorphine): כמה יכולות רוט.

View File

@@ -1,4 +1,4 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | **日本語** | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | **日本語** | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
@@ -6,19 +6,18 @@
Android におけるカーネルベースの root ソリューションです。
[![latest release badge](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![weblate](https://img.shields.io/badge/Localização-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Siga-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/Licença-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## 特徴
1. カーネルベースの `su` と権限管理
2. OverlayFS に基づくモジュールシステム
1. カーネルベースの `su` と権限管理
2. [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS) に基づくモジュールシステム
3. [アプリのプロファイル](https://kernelsu.org/guide/app-profile.html): root の権限をケージ内に閉じ込めます。
## 対応状況
KernelSU は GKI 2.0 デバイス(カーネルバージョン 5.10 以上を公式にサポートしています。古いカーネル4.14以上)とも互換性がありますが、自分でカーネルをビルドする必要があります。
@@ -31,7 +30,7 @@ WSA 、ChromeOS とコンテナ上で動作する Android でも KernelSU を統
- [インストール方法はこちら](https://kernelsu.org/ja_JP/guide/installation.html)
- [ビルド方法はこちら](https://kernelsu.org/guide/how-to-build.html)
- [公式サイト](https://kernelsu.org)
- [公式サイト](https://kernelsu.org/ja_JP/)
## 翻訳
@@ -43,13 +42,12 @@ KernelSU をあなたの言語に翻訳するか、既存の翻訳を改善す
## ライセンス
- `kernel` ディレクトリの下にあるすべてのファイル: [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- `kernel` ディレクトリ以外のすべてのファイル: [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- `kernel` ディレクトリの下にあるすべてのファイル: [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- `kernel` ディレクトリ以外のすべてのファイル: [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html)
## クレジット
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/)KernelSU のアイデア元
- [Magisk](https://github.com/topjohnwu/Magisk):強力な root ツール
- [genuine](https://github.com/brevent/genuine/)apk v2 の署名検証
- [Diamorphine](https://github.com/m0nad/Diamorphine): rootkit のスキル
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/)KernelSU のアイデア元
- [Magisk](https://github.com/topjohnwu/Magisk):強力な root ツール
- [genuine](https://github.com/brevent/genuine/)apk v2 の署名検証
- [Diamorphine](https://github.com/m0nad/Diamorphine): rootkit のスキル

57
docs/README_KR.md Normal file
View File

@@ -0,0 +1,57 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | **한국어** | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
안드로이드 기기에서 사용되는 커널 기반 루팅 솔루션입니다.
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## 기능들
1. 커널 기반 `su` 및 루트 액세스 관리.
2. [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS) 기반 모듈 시스템.
3. [App Profile](https://kernelsu.org/guide/app-profile.html): 루트 권한을 케이지에 가둡니다.
## 호환 상태
KernelSU는 공식적으로 안드로이드 GKI 2.0 디바이스(커널 5.10 이상)를 지원합니다. 오래된 커널(4.14 이상)도 사용할 수 있지만, 커널을 수동으로 빌드해야 합니다.
KernelSU는 WSA, ChromeOS, 컨테이너 기반 안드로이드 모두를 지원합니다.
현재는 `arm64-v8a``x86_64`만 지원됩니다.
## 사용 방법
- [설치 방법](https://kernelsu.org/guide/installation.html)
- [어떻게 빌드하나요?](https://kernelsu.org/guide/how-to-build.html)
- [공식 웹사이트](https://kernelsu.org/)
## 번역
KernelSU 번역을 돕거나 기존 번역을 개선하려면 [Weblate](https://hosted.weblate.org/engage/kernelsu/)를 이용해 주세요. 매니저의 번역은 Weblate와 충돌할 수 있으므로 더 이상 허용되지 않습니다.
## 토론
- 텔레그램: [@KernelSU](https://t.me/KernelSU)
## 보안
KernelSU의 보안 취약점 보고에 대한 자세한 내용은 [SECURITY.md](/SECURITY.md)를 참조하세요.
## 저작권
- `kernel` 디렉터리 아래의 파일은 [GPL-2.0 전용](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)입니다.
- `kernel` 디렉토리를 제외한 다른 모든 부분은 [GPL-3.0-이상](https://www.gnu.org/licenses/gpl-3.0.html)입니다.
## 크래딧
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): KernelSU의 아이디어.
- [Magisk](https://github.com/topjohnwu/Magisk): 강력한 루팅 도구.
- [genuine](https://github.com/brevent/genuine/): apk v2 서명 유효성 검사.
- [Diamorphine](https://github.com/m0nad/Diamorphine): 일부 rootkit 스킬.

View File

@@ -1,13 +1,21 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | **Polski** | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | **Polski** | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
Rozwiązanie root oparte na jądrze dla urządzeń z systemem Android.
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Cechy
1. Oparte na jądrze `su` i zarządzanie dostępem roota.
2. System modułów oparty na overlayfs.
2. System modułów oparty na [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
## Kompatybilność
@@ -19,24 +27,29 @@ Aktualnie obsługiwane ABI to : `arm64-v8a` i `x86_64`.
## Użycie
[Instalacja](https://kernelsu.org/guide/installation.html)
- [Instalacja](https://kernelsu.org/guide/installation.html)
- [Jak skompilować?](https://kernelsu.org/guide/how-to-build.html)
## Kompilacja
## Tłumaczenie
[Jak skompilować?](https://kernelsu.org/guide/how-to-build.html)
Aby pomóc w tłumaczeniu KernelSU lub ulepszyć istniejące tłumaczenia, użyj [Weblate](https://hosted.weblate.org/engage/kernelsu/). PR tłumaczenia Managera nie jest już akceptowany, ponieważ będzie kolidował z Weblate.
## Dyskusja
- Telegram: [@KernelSU](https://t.me/KernelSU)
## Bezpieczeństwo
Informacje na temat zgłaszania luk w zabezpieczeniach w KernelSU można znaleźć w pliku [SECURITY.md](/SECURITY.md).
## Licencja
- Pliki w katalogu `kernel` są na licencji [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- Wszystkie inne części poza katalogiem `kernel` są na licencji [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- Pliki w katalogu `kernel` są na licencji [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Wszystkie inne części poza katalogiem `kernel` są na licencji [GPL-3-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Podziękowania
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): pomysłodawca KernelSU.
- [Magisk](https://github.com/topjohnwu/Magisk): implementacja sepolicy.
- [genuine](https://github.com/brevent/genuine/): walidacja podpisu apk v2.
- [Diamorphine](https://github.com/m0nad/Diamorphine): cenna znajomość rootkitów.
- [Magisk](https://github.com/topjohnwu/Magisk): implementacja sepolicy.

View File

@@ -1,4 +1,4 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | **Português (Brasil)** | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | **Português (Brasil)** | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
@@ -6,21 +6,19 @@
Uma solução root baseada em kernel para dispositivos Android.
[![latest release badge](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![weblate](https://img.shields.io/badge/Localização-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Siga-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localização-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Seguir-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/Licença-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Características
1. `su` e gerenciamento de acesso root baseado em kernel.
2. Sistema modular baseado em overlayfs.
2. Sistema modular 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
## 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.
@@ -29,22 +27,27 @@ Com isso, WSA, ChromeOS e Android baseado em contêiner são todos suportados.
Atualmente, apenas `arm64-v8a` e `x86_64` são suportados.
## Uso
- [Instalação](https://kernelsu.org/pt_BR/guide/installation.html)
- [Como construir o KernelSU?](https://kernelsu.org/pt_BR/guide/how-to-build.html)
- [Como compilar o KernelSU?](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.
## Discussão
- Telegram: [@KernelSU](https://t.me/KernelSU)
## Segurança
Para obter informações sobre como relatar vulnerabilidades de segurança do KernelSU, consulte [SECURITY.md](/SECURITY.md).
## Licença
- Os arquivos no diretório `kernel` são [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- Todas as outras partes, exceto o diretório `kernel` são [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- Os arquivos no diretório `kernel` são [GPL-2.0-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Todas as outras partes, exceto o diretório `kernel` são [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Créditos

View File

@@ -1,13 +1,22 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | **Русский** | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | **Русский** | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
Решение на основе ядра root для Android-устройств.
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Особенности
1. Управление `su` и root-доступом на основе ядра.
2. Система модулей на основе overlayfs.
2. Система модулей на основе [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
3. [Профиль приложений](https://kernelsu.org/ru_RU/guide/app-profile.html): Запри корневую силу в клетке.
## Совместимость
@@ -19,11 +28,9 @@ WSA и Android на основе контейнеров также должны
## Использование
[Установка](https://kernelsu.org/ru_RU/guide/installation.html)
## Сборка
[Как собрать?](https://kernelsu.org/ru_RU/guide/how-to-build.html)
- [Установка](https://kernelsu.org/ru_RU/guide/installation.html)
- [Как собрать?](https://kernelsu.org/ru_RU/guide/how-to-build.html)
- [официальный сайт](https://kernelsu.org/ru_RU/)
## Обсуждение
@@ -31,12 +38,12 @@ WSA и Android на основе контейнеров также должны
## Лицензия
- Файлы в директории `kernel` - [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- Все остальные части, кроме директории `kernel` - [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- Файлы в директории `kernel` [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Все остальные части, кроме директории `kernel` [GPL-3-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Благодарности
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): идея KernelSU.
- [Magisk](https://github.com/topjohnwu/Magisk): реализация sepolicy.
- [genuine](https://github.com/brevent/genuine/): проверка подписи apk v2.
- [Diamorphine](https://github.com/m0nad/Diamorphine): некоторые навыки руткита.
- [Magisk](https://github.com/topjohnwu/Magisk): реализация sepolicy.

View File

@@ -1,4 +1,4 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | **Türkçe** | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | **Türkçe** | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
@@ -6,17 +6,16 @@
Android cihazlar için kernel tabanlı root çözümü.
[![latest release badge](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Özellikler
1. Kernel-tabanlı `su` ve root erişimi yönetimi.
2. Overlayfs'ye dayalı modül sistemi.
2. [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS)'ye dayalı modül sistemi.
3. [Uygulama profili](https://kernelsu.org/guide/app-profile.html): Root gücünü bir kafese kapatın.
## Uyumluluk Durumu
@@ -35,16 +34,20 @@ Bununla birlikte; WSA, ChromeOS ve konteyner tabanlı Android'in tamamı destekl
## Çeviri
KernelSU'nun çevirisine veya mevcut çevirilerin iyileştirilmesine yardımcı olmak için lütfen [Weblate](https://hosted.weblate.org/engage/kernelsu/) kullanın. Yönetici uygulamasının PR ile çevirisi, Weblate ile çakışacağından artık kabul edilmeyecektir.
KernelSU'nun başka dillere çevrilmesine veya mevcut çevirilerin iyileştirilmesine yardımcı olmak için lütfen [Weblate](https://hosted.weblate.org/engage/kernelsu/) kullanın. Yönetici uygulamasının PR ile çevirisi, Weblate ile çakışacağından artık kabul edilmeyecektir.
## Tartışma
- Telegram: [@KernelSU](https://t.me/KernelSU)
## Güvenlik
KernelSU'daki güvenlik açıklarını bildirme hakkında bilgi için, bkz [SECURITY.md](/SECURITY.md).
## Lisans
- `kernel` klasöründeki dosyalar [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) lisansı altındadır.
- `kernel` klasörü dışındaki bütün diğer bölümler [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html) lisansı altındadır.
- `kernel` klasöründeki dosyalar [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html) lisansı altındadır.
- `kernel` klasörü dışındaki bütün diğer bölümler [GPL-3-veya-sonraki](https://www.gnu.org/licenses/gpl-3.0.html) lisansı altındadır.
## Krediler

View File

@@ -1,42 +1,56 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | **繁體中文** | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | **繁體中文** | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | [Tiếng Việt](README_VI.md) | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
一個基於核心的 Android 裝置 Root 解決方案
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## 功能
- 基於核心的 Su 和 Root 存取權管理。
- 基於 Overlayfs 的模組系統。
- 基於核心的 `su` 和 Root 存取權管理。
- 基於 [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS) 的模組系統。
- [App Profile](https://kernelsu.org/zh_TW/guide/app-profile.html): 將 Root 的權限鎖在牢籠中.
## 相容性狀態
KernelSU 官方支援 Android GKI 2.0 的裝置 (核心版本 5.10+);舊版核心同樣相容 (最低 4.14+),但需要自行編譯核心。
KernelSU 官方支援 Android GKI 2.0 的裝置 (核心版本 5.10+ );舊版核心同樣相容 (最低 4.14+ ),但需要自行編譯核心。
WSA 和執行在容器中的 Android 也可以與 KernelSU 一同運作。
WSA和ChromeOS和執行在容器中的 Android 也可以與 KernelSU 一同運作。
目前支援架構:`arm64-v8a``x86_64`
目前支援架構:`arm64-v8a``x86_64`
## 使用方法
[安裝教學](https://kernelsu.org/zh_TW/guide/installation.html)
- [安裝教學](https://kernelsu.org/zh_TW/guide/installation.html)
- [如何建置?](https://kernelsu.org/zh_TW/guide/how-to-build.html)
- [官方網站](https://kernelsu.org/zh_TW/)
## 建置
## 翻譯
[如何建置?](https://kernelsu.org/zh_TW/guide/how-to-build.html)
若要協助翻譯 KernelSU 或改進現有翻譯,請使用 [Weblate](https://hosted.weblate.org/engage/kernelsu/)。 翻譯管理器的PR不再被接受因為它會與Weblate衝突。
### 討論
- Telegram[@KernelSU](https://t.me/KernelSU)
## 安全
有關報告 KernelSU 中的安全漏洞的資訊,請參閱 [SECURITY.md](/SECURITY.md)。
## 授權
- 目錄 `kernel` 下所有檔案為 [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
-`kernel` 目錄的其他部分均為 [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- 目錄 `kernel` 下所有檔案為 [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
-`kernel` 目錄的其他部分均為 [GPL-3-or-later](https://www.gnu.org/licenses/gpl-3.0.html)
## 致謝
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/)KernelSU 的靈感。
- [Magisk](https://github.com/topjohnwu/Magisk)sepolicy 實作。
- [genuine](https://github.com/brevent/genuine/)apk v2 簽章驗證。
- [Diamorphine](https://github.com/m0nad/Diamorphine):一些 rootkit 技巧。
- [Magisk](https://github.com/topjohnwu/Magisk)sepolicy 實作。

View File

@@ -1,13 +1,21 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [Polski](README_PL.md) | [Portuguese-Brazil](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | **Tiếng Việt** | [Indonesia](README_ID.md) | [עברית](README_iw.md) | [हिंदी](README_IN.md)
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.md) | [한국어](README_KR.md) | [Polski](README_PL.md) | [Português (Brasil)](README_PT-BR.md) | [Türkçe](README_TR.md) | [Русский](README_RU.md) | **Tiếng Việt** | [Indonesia](README_ID.md) | [עברית](README_IW.md) | [हिंदी](README_IN.md)
# KernelSU
<img src="https://kernelsu.org/logo.png" style="width: 96px;" alt="logo">
Giải pháp root thông qua thay đổi trên Kernel hệ điều hành cho các thiết bị Android.
[![Latest release](https://img.shields.io/github/v/release/tiann/KernelSU?label=Release&logo=github)](https://github.com/tiann/KernelSU/releases/latest)
[![Weblate](https://img.shields.io/badge/Localization-Weblate-teal?logo=weblate)](https://hosted.weblate.org/engage/kernelsu)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/KernelSU)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-orange.svg?logo=gnu)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![GitHub License](https://img.shields.io/github/license/tiann/KernelSU?logo=gnu)](/LICENSE)
## Tính năng
1. Hỗ trợ gói thực thi `su` và quản lý quyền root.
2. Hệ thống mô-đun thông qua overlayfs.
2. Hệ thống mô-đun thông qua [OverlayFS](https://en.wikipedia.org/wiki/OverlayFS).
3. [App Profile](https://kernelsu.org/guide/app-profile.html): Hạn chế quyền root của ứng dụng.
## Tình trạng tương thích
@@ -16,7 +24,7 @@ KernelSU chính thức hỗ trợ các thiết bị Android với kernel GKI 2.0
WSA, ChromeOS và Android dựa trên container(container-based) cũng được hỗ trợ bởi KernelSU.
Hiên tại Giao diện nhị phân của ứng dụng (ABI) được hỗ trợ bao gồm `arm64-v8a``x86_64`
Hiên tại Giao diện nhị phân của ứng dụng (ABI) được hỗ trợ bao gồm `arm64-v8a``x86_64`.
## Sử dụng
@@ -34,12 +42,12 @@ Nếu bạn muốn hỗ trợ dịch KernelSU sang một ngôn ngữ khác hoặ
## Giấy phép
- Tất cả các file trong thư mục `kernel` dùng giấy phép [GPL-2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
- Tất cả các thành phần khác ngoại trừ thư mục `kernel` dùng giấy phép [GPL-3](https://www.gnu.org/licenses/gpl-3.0.html)
- Tất cả các file trong thư mục `kernel` dùng giấy phép [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
- Tất cả các thành phần khác ngoại trừ thư mục `kernel` dùng giấy phép [GPL-3-or-later](https://www.gnu.org/licenses/gpl-3.0.html).
## Lời cảm ơn
- [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/about/): ý tưởng cho KernelSU.
- [Magisk](https://github.com/topjohnwu/Magisk): công cụ root mạnh mẽ.
- [genuine](https://github.com/brevent/genuine/): phương pháp xác thực apk v2.
- [Diamorphine](https://github.com/m0nad/Diamorphine): các phương pháp ẩn của rootkit .
- [Diamorphine](https://github.com/m0nad/Diamorphine): các phương pháp ẩn của rootkit.

111
js/README.md Normal file
View File

@@ -0,0 +1,111 @@
# Library for KernelSU's module WebUI
## Install
```sh
yarn add kernelsu
```
## API
### exec
Spawns a **root** shell and runs a command within that shell, passing the `stdout` and `stderr` to a Promise when complete.
- `command` `<string>` The command to run, with space-separated arguments.
- `options` `<Object>`
- `cwd` - Current working directory of the child process
- `env` - Environment key-value pairs
```javascript
import { exec } from 'kernelsu';
const { errno, stdout, stderr } = await exec('ls -l', { cwd: '/tmp' });
if (errno === 0) {
// success
console.log(stdout);
}
```
### spawn
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.
- `command` `<string>` The command to run.
- `args` `<string[]>` List of string arguments.
- `options` `<Object>`:
- `cwd` `<string>` - Current working directory of the child process
- `env` `<Object>` - Environment key-value pairs
Example of running `ls -lh /data`, capturing `stdout`, `stderr`, and the exit code:
```javascript
import { spawn } from 'kernelsu';
const ls = spawn('ls', ['-lh', '/data']);
ls.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
});
ls.stderr.on('data', (data) => {
console.log(`stderr: ${data}`);
});
ls.on('exit', (code) => {
console.log(`child process exited with code ${code}`);
});
```
#### ChildProcess
##### Event 'exit'
- `code` `<number>` The exit code if the child 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
##### Event 'error'
- `err` `<Error>` The error.
The `'error'` event is emitted whenever:
- The process could not be spawned.
- The process could not be killed.
##### `stdout`
A `Readable Stream` that represents the child process's `stdout`.
```javascript
const subprocess = spawn('ls');
subprocess.stdout.on('data', (data) => {
console.log(`Received chunk ${data}`);
});
```
#### `stderr`
A `Readable Stream` that represents the child process's `stderr`.
### fullScreen
Request the WebView enter/exit full screen.
```javascript
import { fullScreen } from 'kernelsu';
fullScreen(true);
```
### toast
Show a toast message.
```javascript
import { toast } from 'kernelsu';
toast('Hello, world!');
```

45
js/index.d.ts vendored Normal file
View File

@@ -0,0 +1,45 @@
interface ExecOptions {
cwd?: string,
env?: { [key: string]: string }
}
interface ExecResults {
errno: number,
stdout: string,
stderr: string
}
declare function exec(command: string): Promise<ExecResults>;
declare function exec(command: string, options: ExecOptions): Promise<ExecResults>;
interface SpawnOptions {
cwd?: string,
env?: { [key: string]: string }
}
interface Stdio {
on(event: 'data', callback: (data: string) => void)
}
interface ChildProcess {
stdout: Stdio,
stderr: Stdio,
on(event: 'exit', callback: (code: number) => void)
on(event: 'error', callback: (err: any) => void)
}
declare function spawn(command: string): ChildProcess;
declare function spawn(command: string, args: string[]): ChildProcess;
declare function spawn(command: string, options: SpawnOptions): ChildProcess;
declare function spawn(command: string, args: string[], options: SpawnOptions): ChildProcess;
declare function fullScreen(isFullScreen: boolean);
declare function toast(message: string);
export {
exec,
spawn,
fullScreen,
toast
}

115
js/index.js Normal file
View File

@@ -0,0 +1,115 @@
let callbackCounter = 0;
function getUniqueCallbackName(prefix) {
return `${prefix}_callback_${Date.now()}_${callbackCounter++}`;
}
export function exec(command, options) {
if (typeof options === "undefined") {
options = {};
}
return new Promise((resolve, reject) => {
// Generate a unique callback function name
const callbackFuncName = getUniqueCallbackName("exec");
// Define the success callback function
window[callbackFuncName] = (errno, stdout, stderr) => {
resolve({ errno, stdout, stderr });
cleanup(callbackFuncName);
};
function cleanup(successName) {
delete window[successName];
}
try {
ksu.exec(command, JSON.stringify(options), callbackFuncName);
} catch (error) {
reject(error);
cleanup(callbackFuncName);
}
});
}
function Stdio() {
this.listeners = {};
}
Stdio.prototype.on = function (event, listener) {
if (!this.listeners[event]) {
this.listeners[event] = [];
}
this.listeners[event].push(listener);
};
Stdio.prototype.emit = function (event, ...args) {
if (this.listeners[event]) {
this.listeners[event].forEach((listener) => listener(...args));
}
};
function ChildProcess() {
this.listeners = {};
this.stdin = new Stdio();
this.stdout = new Stdio();
this.stderr = new Stdio();
}
ChildProcess.prototype.on = function (event, listener) {
if (!this.listeners[event]) {
this.listeners[event] = [];
}
this.listeners[event].push(listener);
};
ChildProcess.prototype.emit = function (event, ...args) {
if (this.listeners[event]) {
this.listeners[event].forEach((listener) => listener(...args));
}
};
export function spawn(command, args, options) {
if (typeof args === "undefined") {
args = [];
} else if (!(args instanceof Array)) {
// allow for (command, options) signature
options = args;
}
if (typeof options === "undefined") {
options = {};
}
const child = new ChildProcess();
const childCallbackName = getUniqueCallbackName("spawn");
window[childCallbackName] = child;
function cleanup(name) {
delete window[name];
}
child.on("exit", code => {
cleanup(childCallbackName);
});
try {
ksu.spawn(
command,
JSON.stringify(args),
JSON.stringify(options),
childCallbackName
);
} catch (error) {
child.emit("error", error);
cleanup(childCallbackName);
}
return child;
}
export function fullScreen(isFullScreen) {
ksu.fullScreen(isFullScreen);
}
export function toast(message) {
ksu.toast(message);
}

26
js/package.json Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "kernelsu",
"version": "1.0.6",
"description": "Library for KernelSU's module WebUI",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "npm run test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tiann/KernelSU.git"
},
"keywords": [
"su",
"kernelsu",
"module",
"webui"
],
"author": "weishu",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/tiann/KernelSU/issues"
},
"homepage": "https://github.com/tiann/KernelSU#readme"
}

14
justfile Normal file
View File

@@ -0,0 +1,14 @@
alias bk := build_ksud
alias bm := build_manager
build_ksud:
cross build --target aarch64-linux-android --release --manifest-path ./userspace/ksud/Cargo.toml
build_manager: build_ksud
cp userspace/ksud/target/aarch64-linux-android/release/ksud manager/app/src/main/jniLibs/arm64-v8a/libksud.so
cd manager && ./gradlew aDebug
clippy:
cargo fmt --manifest-path ./userspace/ksud/Cargo.toml
cross clippy --target x86_64-pc-windows-gnu --release --manifest-path ./userspace/ksud/Cargo.toml
cross clippy --target aarch64-linux-android --release --manifest-path ./userspace/ksud/Cargo.toml

View File

@@ -5,13 +5,15 @@ config KSU
depends on OVERLAY_FS
default y
help
Enable kernel-level root privileges on Android System.
Enable kernel-level root privileges on Android System.
To compile as a module, choose M here: the
module will be called kernelsu.
config KSU_DEBUG
bool "KernelSU debug mode"
depends on KSU
default n
help
Enable KernelSU debug mode
Enable KernelSU debug mode.
endmenu

View File

@@ -1,19 +1,24 @@
obj-y += ksu.o
obj-y += allowlist.o
kernelsu-objs := apk_sign.o
obj-y += kernelsu.o
obj-y += module_api.o
obj-y += sucompat.o
obj-y += uid_observer.o
obj-y += manager.o
obj-y += core_hook.o
obj-y += ksud.o
obj-y += embed_ksud.o
obj-y += kernel_compat.o
kernelsu-objs := ksu.o
kernelsu-objs += allowlist.o
kernelsu-objs += apk_sign.o
kernelsu-objs += sucompat.o
kernelsu-objs += throne_tracker.o
kernelsu-objs += core_hook.o
kernelsu-objs += ksud.o
kernelsu-objs += embed_ksud.o
kernelsu-objs += kernel_compat.o
kernelsu-objs += selinux/selinux.o
kernelsu-objs += selinux/sepolicy.o
kernelsu-objs += selinux/rules.o
ccflags-y += -I$(srctree)/security/selinux -I$(srctree)/security/selinux/include
ccflags-y += -I$(objtree)/security/selinux -include $(srctree)/include/uapi/asm-generic/errno.h
obj-$(CONFIG_KSU) += kernelsu.o
obj-y += selinux/
# .git is a text file while the module is imported by 'git submodule add'.
ifeq ($(shell test -e $(srctree)/$(src)/../.git; echo $$?),0)
$(shell cd $(srctree)/$(src); /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin [ -f ../.git/shallow ] && git fetch --unshallow)
KSU_GIT_VERSION := $(shell cd $(srctree)/$(src); /usr/bin/env PATH="$$PATH":/usr/bin:/usr/local/bin git rev-list --count HEAD)
# ksu_version: major * 10000 + git version + 200 for historical reasons
$(eval KSU_VERSION=$(shell expr 10000 + $(KSU_GIT_VERSION) + 200))
@@ -42,5 +47,8 @@ $(info -- KernelSU Manager signature hash: $(KSU_EXPECTED_HASH))
ccflags-y += -DEXPECTED_SIZE=$(KSU_EXPECTED_SIZE)
ccflags-y += -DEXPECTED_HASH=\"$(KSU_EXPECTED_HASH)\"
ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -Wno-gcc-compat
ccflags-y += -Wno-declaration-after-statement
ccflags-y += -Wno-declaration-after-statement -Wno-unused-function
# Keep a new line here!! Because someone may append config

View File

@@ -1,21 +1,20 @@
#include "ksu.h"
#include "linux/compiler.h"
#include "linux/fs.h"
#include "linux/gfp.h"
#include "linux/kernel.h"
#include "linux/list.h"
#include "linux/printk.h"
#include "linux/slab.h"
#include "linux/types.h"
#include "linux/version.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
#include "linux/compiler_types.h"
#endif
#include <linux/compiler.h>
#include <linux/fs.h>
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/version.h>
#include <linux/compiler_types.h>
#include "ksu.h"
#include "klog.h" // IWYU pragma: keep
#include "selinux/selinux.h"
#include "kernel_compat.h"
#include "allowlist.h"
#include "manager.h"
#define FILE_MAGIC 0x7f4b5355 // ' KSU', u32
#define FILE_FORMAT_VERSION 3 // u32
@@ -274,6 +273,11 @@ bool __ksu_is_allow_uid(uid_t uid)
return false;
}
if (likely(ksu_is_manager_uid_valid()) && unlikely(ksu_get_manager_uid() == uid)) {
// manager is always allowed!
return true;
}
if (likely(uid <= BITMAP_UID_MAX)) {
return !!(allow_list_bitmap[uid / BITS_PER_BYTE] & (1 << (uid % BITS_PER_BYTE)));
} else {
@@ -289,6 +293,10 @@ bool __ksu_is_allow_uid(uid_t uid)
bool ksu_uid_should_umount(uid_t uid)
{
struct app_profile profile = { .current_uid = uid };
if (likely(ksu_is_manager_uid_valid()) && unlikely(ksu_get_manager_uid() == uid)) {
// we should not umount on manager!
return false;
}
bool found = ksu_get_app_profile(&profile);
if (!found) {
// no app profile found, it must be non root app

View File

@@ -1,7 +1,7 @@
#ifndef __KSU_H_ALLOWLIST
#define __KSU_H_ALLOWLIST
#include "linux/types.h"
#include <linux/types.h>
#include "ksu.h"
void ksu_allowlist_init(void);

View File

@@ -1,21 +1,23 @@
#include "linux/err.h"
#include "linux/fs.h"
#include "linux/gfp.h"
#include "linux/kernel.h"
#include "linux/moduleparam.h"
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/version.h>
#ifdef CONFIG_KSU_DEBUG
#include <linux/moduleparam.h>
#endif
#include <crypto/hash.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
#include <crypto/sha2.h>
#else
#include <crypto/sha.h>
#endif
#include "apk_sign.h"
#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h"
#include "crypto/hash.h"
#include "linux/slab.h"
#include "linux/version.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
#include "crypto/sha2.h"
#else
#include "crypto/sha.h"
#endif
struct sdesc {
struct shash_desc shash;
@@ -188,7 +190,7 @@ static __always_inline bool check_v2_signature(char *path,
struct file *fp = ksu_filp_open_compat(path, O_RDONLY, 0);
if (IS_ERR(fp)) {
pr_err("open %s error.\n", path);
return PTR_ERR(fp);
return false;
}
// disable inotify for this file
@@ -229,7 +231,8 @@ static __always_inline bool check_v2_signature(char *path,
goto clean;
}
for (;;) {
int loop_count = 0;
while (loop_count++ < 10) {
uint32_t id;
uint32_t offset;
ksu_kernel_read_compat(fp, &size8, 0x8,
@@ -239,7 +242,6 @@ static __always_inline bool check_v2_signature(char *path,
}
ksu_kernel_read_compat(fp, &id, 0x4, &pos); // id
offset = 4;
pr_info("id: 0x%08x\n", id);
if (id == 0x7109871au) {
v2_signing_blocks++;
v2_signing_valid =
@@ -251,13 +253,19 @@ static __always_inline bool check_v2_signature(char *path,
} else if (id == 0x1b93ad61u) {
// http://aospxref.com/android-14.0.0_r2/xref/frameworks/base/core/java/android/util/apk/ApkSignatureSchemeV3Verifier.java#74
v3_1_signing_exist = true;
} else {
#ifdef CONFIG_KSU_DEBUG
pr_info("Unknown id: 0x%08x\n", id);
#endif
}
pos += (size8 - offset);
}
if (v2_signing_blocks != 1) {
#ifdef CONFIG_KSU_DEBUG
pr_err("Unexpected v2 signature count: %d\n",
v2_signing_blocks);
#endif
v2_signing_valid = false;
}
@@ -273,7 +281,9 @@ clean:
filp_close(fp, 0);
if (v3_signing_exist || v3_1_signing_exist) {
#ifdef CONFIG_KSU_DEBUG
pr_err("Unexpected v3 signature scheme found!\n");
#endif
return false;
}
@@ -282,25 +292,15 @@ clean:
#ifdef CONFIG_KSU_DEBUG
unsigned ksu_expected_size = EXPECTED_SIZE;
const char *ksu_expected_hash = EXPECTED_HASH;
int ksu_debug_manager_uid = -1;
#include "manager.h"
static int set_expected_size(const char *val, const struct kernel_param *kp)
{
int rv = param_set_uint(val, kp);
ksu_invalidate_manager_uid();
pr_info("ksu_expected_size set to %x\n", ksu_expected_size);
return rv;
}
static int set_expected_hash(const char *val, const struct kernel_param *kp)
{
pr_info("set_expected_hash: %s\n", val);
int rv = param_set_charp(val, kp);
ksu_invalidate_manager_uid();
pr_info("ksu_expected_hash set to %s\n", ksu_expected_hash);
ksu_set_manager_uid(ksu_debug_manager_uid);
pr_info("ksu_manager_uid set to %d\n", ksu_debug_manager_uid);
return rv;
}
@@ -309,27 +309,12 @@ static struct kernel_param_ops expected_size_ops = {
.get = param_get_uint,
};
static struct kernel_param_ops expected_hash_ops = {
.set = set_expected_hash,
.get = param_get_charp,
.free = param_free_charp,
};
module_param_cb(ksu_debug_manager_uid, &expected_size_ops,
&ksu_debug_manager_uid, S_IRUSR | S_IWUSR);
module_param_cb(ksu_expected_size, &expected_size_ops, &ksu_expected_size,
S_IRUSR | S_IWUSR);
module_param_cb(ksu_expected_hash, &expected_hash_ops, &ksu_expected_hash,
S_IRUSR | S_IWUSR);
bool is_manager_apk(char *path)
{
return check_v2_signature(path, ksu_expected_size, ksu_expected_hash);
}
#else
#endif
bool is_manager_apk(char *path)
{
return check_v2_signature(path, EXPECTED_SIZE, EXPECTED_HASH);
}
#endif
}

View File

@@ -1,7 +1,7 @@
#ifndef __KSU_H_APK_V2_SIGN
#define __KSU_H_APK_V2_SIGN
#include "linux/types.h"
#include <linux/types.h>
bool is_manager_apk(char *path);

View File

@@ -1,7 +1,7 @@
#ifndef __KSU_H_ARCH
#define __KSU_H_ARCH
#include "linux/version.h"
#include <linux/version.h>
#if defined(__aarch64__)
@@ -18,11 +18,11 @@
#define __PT_SP_REG sp
#define __PT_IP_REG pc
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
#define PRCTL_SYMBOL "__arm64_sys_prctl"
#else
#define PRCTL_SYMBOL "sys_prctl"
#endif
#define SYS_READ_SYMBOL "__arm64_sys_read"
#define SYS_NEWFSTATAT_SYMBOL "__arm64_sys_newfstatat"
#define SYS_FACCESSAT_SYMBOL "__arm64_sys_faccessat"
#define SYS_EXECVE_SYMBOL "__arm64_sys_execve"
#elif defined(__x86_64__)
@@ -39,11 +39,11 @@
#define __PT_RC_REG ax
#define __PT_SP_REG sp
#define __PT_IP_REG ip
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
#define PRCTL_SYMBOL "__x64_sys_prctl"
#else
#define PRCTL_SYMBOL "sys_prctl"
#endif
#define SYS_READ_SYMBOL "__x64_sys_read"
#define SYS_NEWFSTATAT_SYMBOL "__x64_sys_newfstatat"
#define SYS_FACCESSAT_SYMBOL "__x64_sys_faccessat"
#define SYS_EXECVE_SYMBOL "__x64_sys_execve"
#else
#error "Unsupported arch"
@@ -67,4 +67,6 @@
#define PT_REGS_SP(x) (__PT_REGS_CAST(x)->__PT_SP_REG)
#define PT_REGS_IP(x) (__PT_REGS_CAST(x)->__PT_IP_REG)
#define PT_REAL_REGS(regs) ((struct pt_regs *)PT_REGS_PARM1(regs))
#endif

View File

@@ -1,23 +1,36 @@
#include "linux/capability.h"
#include "linux/cred.h"
#include "linux/dcache.h"
#include "linux/err.h"
#include "linux/init.h"
#include "linux/init_task.h"
#include "linux/kernel.h"
#include "linux/kprobes.h"
#include "linux/lsm_hooks.h"
#include "linux/nsproxy.h"
#include "linux/path.h"
#include "linux/printk.h"
#include "linux/uaccess.h"
#include "linux/uidgid.h"
#include "linux/version.h"
#include "linux/mount.h"
#include <linux/capability.h>
#include <linux/cred.h>
#include <linux/dcache.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/init_task.h>
#include <linux/kallsyms.h>
#include <linux/kernel.h>
#include <linux/kprobes.h>
#include <linux/lsm_hooks.h>
#include <linux/mm.h>
#include <linux/nsproxy.h>
#include <linux/path.h>
#include <linux/printk.h>
#include <linux/sched.h>
#include <linux/security.h>
#include <linux/stddef.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/uidgid.h>
#include <linux/version.h>
#include <linux/mount.h>
#include "linux/fs.h"
#include "linux/namei.h"
#include "linux/rcupdate.h"
#include <linux/fs.h>
#include <linux/namei.h>
#ifdef MODULE
#include <linux/list.h>
#include <linux/irqflags.h>
#include <linux/mm_types.h>
#include <linux/rcupdate.h>
#include <linux/vmalloc.h>
#endif
#include "allowlist.h"
#include "arch.h"
@@ -27,9 +40,12 @@
#include "ksud.h"
#include "manager.h"
#include "selinux/selinux.h"
#include "uid_observer.h"
#include "throne_tracker.h"
#include "throne_tracker.h"
#include "kernel_compat.h"
static bool ksu_module_mounted = false;
extern int handle_sepolicy(unsigned long arg3, void __user *arg4);
static inline bool is_allow_su()
@@ -41,16 +57,11 @@ static inline bool is_allow_su()
return ksu_is_allow_uid(current_uid().val);
}
static inline bool is_isolated_uid(uid_t uid)
static inline bool is_unsupported_uid(uid_t uid)
{
#define FIRST_ISOLATED_UID 99000
#define LAST_ISOLATED_UID 99999
#define FIRST_APP_ZYGOTE_ISOLATED_UID 90000
#define LAST_APP_ZYGOTE_ISOLATED_UID 98999
#define LAST_APPLICATION_UID 19999
uid_t appid = uid % 100000;
return (appid >= FIRST_ISOLATED_UID && appid <= LAST_ISOLATED_UID) ||
(appid >= FIRST_APP_ZYGOTE_ISOLATED_UID &&
appid <= LAST_APP_ZYGOTE_ISOLATED_UID);
return appid > LAST_APPLICATION_UID;
}
static struct group_info root_groups = { .usage = ATOMIC_INIT(2) };
@@ -87,11 +98,7 @@ static void setup_groups(struct root_profile *profile, struct cred *cred)
put_group_info(group_info);
return;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
group_info->gid[i] = kgid;
#else
GROUP_AT(group_info, i) = kgid;
#endif
}
groups_sort(group_info);
@@ -126,7 +133,8 @@ void escape_to_root(void)
// setup capabilities
// we need CAP_DAC_READ_SEARCH becuase `/data/adb/ksud` is not accessible for non root process
// we add it here but don't add it to cap_inhertiable, it would be dropped automaticly after exec!
u64 cap_for_ksud = profile->capabilities.effective | CAP_DAC_READ_SEARCH;
u64 cap_for_ksud =
profile->capabilities.effective | CAP_DAC_READ_SEARCH;
memcpy(&cred->cap_effective, &cap_for_ksud,
sizeof(cred->cap_effective));
memcpy(&cred->cap_inheritable, &profile->capabilities.effective,
@@ -191,7 +199,7 @@ int ksu_handle_rename(struct dentry *old_dentry, struct dentry *new_dentry)
pr_info("renameat: %s -> %s, new path: %s\n", old_dentry->d_iname,
new_dentry->d_iname, buf);
update_uid();
track_throne();
return 0;
}
@@ -207,83 +215,33 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}
// always ignore isolated app uid
if (is_isolated_uid(current_uid().val)) {
// TODO: find it in throne tracker!
uid_t current_uid_val = current_uid().val;
uid_t manager_uid = ksu_get_manager_uid();
if (current_uid_val != manager_uid &&
current_uid_val % 100000 == manager_uid) {
ksu_set_manager_uid(current_uid_val);
}
bool from_root = 0 == current_uid().val;
bool from_manager = is_manager();
if (!from_root && !from_manager) {
// only root or manager can access this interface
return 0;
}
static uid_t last_failed_uid = -1;
if (last_failed_uid == current_uid().val) {
return 0;
}
// pr_info("option: 0x%x, cmd: %ld\n", option, arg2);
#ifdef CONFIG_KSU_DEBUG
pr_info("option: 0x%x, cmd: %ld\n", option, arg2);
#endif
if (arg2 == CMD_BECOME_MANAGER) {
// quick check
if (is_manager()) {
if (from_manager) {
if (copy_to_user(result, &reply_ok, sizeof(reply_ok))) {
pr_err("become_manager: prctl reply error\n");
}
return 0;
}
if (ksu_is_manager_uid_valid()) {
pr_info("manager already exist: %d\n",
ksu_get_manager_uid());
return 0;
}
// someone wants to be root manager, just check it!
// arg3 should be `/data/user/<userId>/<manager_package_name>`
char param[128];
if (ksu_strncpy_from_user_nofault(param, arg3, sizeof(param)) ==
-EFAULT) {
#ifdef CONFIG_KSU_DEBUG
pr_err("become_manager: copy param err\n");
#endif
return 0;
}
// for user 0, it is /data/data
// for user 999, it is /data/user/999
const char *prefix;
char prefixTmp[64];
int userId = current_uid().val / 100000;
if (userId == 0) {
prefix = "/data/data";
} else {
snprintf(prefixTmp, sizeof(prefixTmp), "/data/user/%d",
userId);
prefix = prefixTmp;
}
if (startswith(param, (char *)prefix) != 0) {
pr_info("become_manager: invalid param: %s\n", param);
return 0;
}
// stat the param, app must have permission to do this
// otherwise it may fake the path!
struct path path;
if (kern_path(param, LOOKUP_DIRECTORY, &path)) {
pr_err("become_manager: kern_path err\n");
return 0;
}
if (path.dentry->d_inode->i_uid.val != current_uid().val) {
pr_err("become_manager: path uid != current uid\n");
path_put(&path);
return 0;
}
char *pkg = param + strlen(prefix);
pr_info("become_manager: param pkg: %s\n", pkg);
bool success = become_manager(pkg);
if (success) {
if (copy_to_user(result, &reply_ok, sizeof(reply_ok))) {
pr_err("become_manager: prctl reply error\n");
}
}
path_put(&path);
return 0;
}
@@ -300,17 +258,23 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
// Both root manager and root processes should be allowed to get version
if (arg2 == CMD_GET_VERSION) {
if (is_manager() || 0 == current_uid().val) {
u32 version = KERNEL_SU_VERSION;
if (copy_to_user(arg3, &version, sizeof(version))) {
pr_err("prctl reply error, cmd: %lu\n", arg2);
}
u32 version = KERNEL_SU_VERSION;
if (copy_to_user(arg3, &version, sizeof(version))) {
pr_err("prctl reply error, cmd: %lu\n", arg2);
}
#ifdef MODULE
u32 is_lkm = 0x1;
#else
u32 is_lkm = 0x0;
#endif
if (arg4 && copy_to_user(arg4, &is_lkm, sizeof(is_lkm))) {
pr_err("prctl reply error, cmd: %lu\n", arg2);
}
return 0;
}
if (arg2 == CMD_REPORT_EVENT) {
if (0 != current_uid().val) {
if (!from_root) {
return 0;
}
switch (arg3) {
@@ -331,6 +295,11 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
}
break;
}
case EVENT_MODULE_MOUNTED: {
ksu_module_mounted = true;
pr_info("module mounted!\n");
break;
}
default:
break;
}
@@ -338,7 +307,7 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
}
if (arg2 == CMD_SET_SEPOLICY) {
if (0 != current_uid().val) {
if (!from_root) {
return 0;
}
if (!handle_sepolicy(arg3, arg4)) {
@@ -351,9 +320,6 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
}
if (arg2 == CMD_CHECK_SAFEMODE) {
if (!is_manager() && 0 != current_uid().val) {
return 0;
}
if (ksu_is_safe_mode()) {
pr_warn("safemode enabled!\n");
if (copy_to_user(result, &reply_ok, sizeof(reply_ok))) {
@@ -364,57 +330,49 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
}
if (arg2 == CMD_GET_ALLOW_LIST || arg2 == CMD_GET_DENY_LIST) {
if (is_manager() || 0 == current_uid().val) {
u32 array[128];
u32 array_length;
bool success =
ksu_get_allow_list(array, &array_length,
arg2 == CMD_GET_ALLOW_LIST);
if (success) {
if (!copy_to_user(arg4, &array_length,
sizeof(array_length)) &&
!copy_to_user(arg3, array,
sizeof(u32) * array_length)) {
if (copy_to_user(result, &reply_ok,
sizeof(reply_ok))) {
pr_err("prctl reply error, cmd: %lu\n",
arg2);
}
} else {
pr_err("prctl copy allowlist error\n");
}
}
}
return 0;
}
if (arg2 == CMD_UID_GRANTED_ROOT || arg2 == CMD_UID_SHOULD_UMOUNT) {
if (is_manager() || 0 == current_uid().val) {
uid_t target_uid = (uid_t)arg3;
bool allow = false;
if (arg2 == CMD_UID_GRANTED_ROOT) {
allow = ksu_is_allow_uid(target_uid);
} else if (arg2 == CMD_UID_SHOULD_UMOUNT) {
allow = ksu_uid_should_umount(target_uid);
} else {
pr_err("unknown cmd: %lu\n", arg2);
}
if (!copy_to_user(arg4, &allow, sizeof(allow))) {
u32 array[128];
u32 array_length;
bool success = ksu_get_allow_list(array, &array_length,
arg2 == CMD_GET_ALLOW_LIST);
if (success) {
if (!copy_to_user(arg4, &array_length,
sizeof(array_length)) &&
!copy_to_user(arg3, array,
sizeof(u32) * array_length)) {
if (copy_to_user(result, &reply_ok,
sizeof(reply_ok))) {
pr_err("prctl reply error, cmd: %lu\n",
arg2);
}
} else {
pr_err("prctl copy err, cmd: %lu\n", arg2);
pr_err("prctl copy allowlist error\n");
}
}
return 0;
}
if (arg2 == CMD_UID_GRANTED_ROOT || arg2 == CMD_UID_SHOULD_UMOUNT) {
uid_t target_uid = (uid_t)arg3;
bool allow = false;
if (arg2 == CMD_UID_GRANTED_ROOT) {
allow = ksu_is_allow_uid(target_uid);
} else if (arg2 == CMD_UID_SHOULD_UMOUNT) {
allow = ksu_uid_should_umount(target_uid);
} else {
pr_err("unknown cmd: %lu\n", arg2);
}
if (!copy_to_user(arg4, &allow, sizeof(allow))) {
if (copy_to_user(result, &reply_ok, sizeof(reply_ok))) {
pr_err("prctl reply error, cmd: %lu\n", arg2);
}
} else {
pr_err("prctl copy err, cmd: %lu\n", arg2);
}
return 0;
}
// all other cmds are for 'root manager'
if (!is_manager()) {
last_failed_uid = current_uid().val;
if (!from_manager) {
return 0;
}
@@ -489,14 +447,10 @@ static bool should_umount(struct path *path)
static void ksu_umount_mnt(struct path *path, int flags)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
int err = path_umount(path, flags);
if (err) {
pr_info("umount %s failed: %d\n", path->dentry->d_iname, err);
}
#else
// TODO: umount for non GKI kernel
#endif
}
static void try_umount(const char *mnt, bool check_mnt, int flags)
@@ -522,6 +476,11 @@ static void try_umount(const char *mnt, bool check_mnt, int flags)
int ksu_handle_setuid(struct cred *new, const struct cred *old)
{
// this hook is used for umounting overlayfs for some uid, if there isn't any module mounted, just ignore it!
if (!ksu_module_mounted) {
return 0;
}
if (!new || !old) {
return 0;
}
@@ -534,7 +493,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
return 0;
}
if (!is_appuid(new_uid) || is_isolated_uid(new_uid.val)) {
if (!is_appuid(new_uid) || is_unsupported_uid(new_uid.val)) {
// pr_info("handle setuid ignore non application or isolated uid: %d\n", new_uid.val);
return 0;
}
@@ -557,11 +516,15 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
// when we umount for such process, that is a disaster!
bool is_zygote_child = is_zygote(old->security);
if (!is_zygote_child) {
pr_info("handle umount ignore non zygote child: %d\n", current->pid);
pr_info("handle umount ignore non zygote child: %d\n",
current->pid);
return 0;
}
#ifdef CONFIG_KSU_DEBUG
// umount the target mnt
pr_info("handle umount for uid: %d, pid: %d\n", new_uid.val, current->pid);
pr_info("handle umount for uid: %d, pid: %d\n", new_uid.val,
current->pid);
#endif
// fixme: use `collect_mounts` and `iterate_mount` to iterate all mountpoint and
// filter the mountpoint whose target is `/data/adb`
@@ -581,22 +544,12 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
static int handler_pre(struct kprobe *p, struct pt_regs *regs)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
struct pt_regs *real_regs = (struct pt_regs *)PT_REGS_PARM1(regs);
#else
struct pt_regs *real_regs = regs;
#endif
struct pt_regs *real_regs = PT_REAL_REGS(regs);
int option = (int)PT_REGS_PARM1(real_regs);
unsigned long arg2 = (unsigned long)PT_REGS_PARM2(real_regs);
unsigned long arg3 = (unsigned long)PT_REGS_PARM3(real_regs);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
// PRCTL_SYMBOL is the arch-specificed one, which receive raw pt_regs from syscall
unsigned long arg4 = (unsigned long)PT_REGS_SYSCALL_PARM4(real_regs);
#else
// PRCTL_SYMBOL is the common one, called by C convention in do_syscall_64
// https://elixir.bootlin.com/linux/v4.15.18/source/arch/x86/entry/common.c#L287
unsigned long arg4 = (unsigned long)PT_REGS_CCALL_PARM4(real_regs);
#endif
unsigned long arg5 = (unsigned long)PT_REGS_PARM5(real_regs);
return ksu_handle_prctl(option, arg2, arg3, arg4, arg5);
@@ -656,23 +609,7 @@ static int ksu_task_prctl(int option, unsigned long arg2, unsigned long arg3,
ksu_handle_prctl(option, arg2, arg3, arg4, arg5);
return -ENOSYS;
}
// kernel 4.4 and 4.9
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
static int ksu_key_permission(key_ref_t key_ref, const struct cred *cred,
unsigned perm)
{
if (init_session_keyring != NULL) {
return 0;
}
if (strcmp(current->comm, "init")) {
// we are only interested in `init` process
return 0;
}
init_session_keyring = cred->session_keyring;
pr_info("kernel_compat: got init_session_keyring\n");
return 0;
}
#endif
static int ksu_inode_rename(struct inode *old_inode, struct dentry *old_dentry,
struct inode *new_inode, struct dentry *new_dentry)
{
@@ -685,40 +622,196 @@ static int ksu_task_fix_setuid(struct cred *new, const struct cred *old,
return ksu_handle_setuid(new, old);
}
#ifndef MODULE
static struct security_hook_list ksu_hooks[] = {
LSM_HOOK_INIT(task_prctl, ksu_task_prctl),
LSM_HOOK_INIT(inode_rename, ksu_inode_rename),
LSM_HOOK_INIT(task_fix_setuid, ksu_task_fix_setuid),
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
LSM_HOOK_INIT(key_permission, ksu_key_permission)
#endif
};
void __init ksu_lsm_hook_init(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
security_add_hooks(ksu_hooks, ARRAY_SIZE(ksu_hooks), "ksu");
#else
// https://elixir.bootlin.com/linux/v4.10.17/source/include/linux/lsm_hooks.h#L1892
security_add_hooks(ksu_hooks, ARRAY_SIZE(ksu_hooks));
#endif
}
#else
static int override_security_head(void *head, const void *new_head, size_t len)
{
unsigned long base = (unsigned long)head & PAGE_MASK;
unsigned long offset = offset_in_page(head);
// this is impossible for our case because the page alignment
// but be careful for other cases!
BUG_ON(offset + len > PAGE_SIZE);
struct page *page = phys_to_page(__pa(base));
if (!page) {
return -EFAULT;
}
void *addr = vmap(&page, 1, VM_MAP, PAGE_KERNEL);
if (!addr) {
return -ENOMEM;
}
local_irq_disable();
memcpy(addr + offset, new_head, len);
local_irq_enable();
vunmap(addr);
return 0;
}
static void free_security_hook_list(struct hlist_head *head)
{
struct hlist_node *temp;
struct security_hook_list *entry;
if (!head)
return;
hlist_for_each_entry_safe (entry, temp, head, list) {
hlist_del(&entry->list);
kfree(entry);
}
kfree(head);
}
struct hlist_head *copy_security_hlist(struct hlist_head *orig)
{
struct hlist_head *new_head = kmalloc(sizeof(*new_head), GFP_KERNEL);
if (!new_head)
return NULL;
INIT_HLIST_HEAD(new_head);
struct security_hook_list *entry;
struct security_hook_list *new_entry;
hlist_for_each_entry (entry, orig, list) {
new_entry = kmalloc(sizeof(*new_entry), GFP_KERNEL);
if (!new_entry) {
free_security_hook_list(new_head);
return NULL;
}
*new_entry = *entry;
hlist_add_tail_rcu(&new_entry->list, new_head);
}
return new_head;
}
#define LSM_SEARCH_MAX 180 // This should be enough to iterate
static void *find_head_addr(void *security_ptr, int *index)
{
if (!security_ptr) {
return NULL;
}
struct hlist_head *head_start =
(struct hlist_head *)&security_hook_heads;
for (int i = 0; i < LSM_SEARCH_MAX; i++) {
struct hlist_head *head = head_start + i;
struct security_hook_list *pos;
hlist_for_each_entry (pos, head, list) {
if (pos->hook.capget == security_ptr) {
if (index) {
*index = i;
}
return head;
}
}
}
return NULL;
}
#define GET_SYMBOL_ADDR(sym) \
({ \
void *addr = kallsyms_lookup_name(#sym ".cfi_jt"); \
if (!addr) { \
addr = kallsyms_lookup_name(#sym); \
} \
addr; \
})
#define KSU_LSM_HOOK_HACK_INIT(head_ptr, name, func) \
do { \
static struct security_hook_list hook = { \
.hook = { .name = func } \
}; \
hook.head = head_ptr; \
hook.lsm = "ksu"; \
struct hlist_head *new_head = copy_security_hlist(hook.head); \
if (!new_head) { \
pr_err("Failed to copy security list: %s\n", #name); \
break; \
} \
hlist_add_tail_rcu(&hook.list, new_head); \
if (override_security_head(hook.head, new_head, \
sizeof(*new_head))) { \
free_security_hook_list(new_head); \
pr_err("Failed to hack lsm for: %s\n", #name); \
} \
} while (0)
void __init ksu_lsm_hook_init(void)
{
void *cap_prctl = GET_SYMBOL_ADDR(cap_task_prctl);
void *prctl_head = find_head_addr(cap_prctl, NULL);
if (prctl_head) {
if (prctl_head != &security_hook_heads.task_prctl) {
pr_warn("prctl's address has shifted!\n");
}
KSU_LSM_HOOK_HACK_INIT(prctl_head, task_prctl, ksu_task_prctl);
} else {
pr_warn("Failed to find task_prctl!\n");
}
int inode_killpriv_index = -1;
void *cap_killpriv = GET_SYMBOL_ADDR(cap_inode_killpriv);
find_head_addr(cap_killpriv, &inode_killpriv_index);
if (inode_killpriv_index < 0) {
pr_warn("Failed to find inode_rename, use kprobe instead!\n");
register_kprobe(&renameat_kp);
} else {
int inode_rename_index = inode_killpriv_index +
&security_hook_heads.inode_rename -
&security_hook_heads.inode_killpriv;
struct hlist_head *head_start =
(struct hlist_head *)&security_hook_heads;
void *inode_rename_head = head_start + inode_rename_index;
if (inode_rename_head != &security_hook_heads.inode_rename) {
pr_warn("inode_rename's address has shifted!\n");
}
KSU_LSM_HOOK_HACK_INIT(inode_rename_head, inode_rename,
ksu_inode_rename);
}
void *cap_setuid = GET_SYMBOL_ADDR(cap_task_fix_setuid);
void *setuid_head = find_head_addr(cap_setuid, NULL);
if (setuid_head) {
if (setuid_head != &security_hook_heads.task_fix_setuid) {
pr_warn("setuid's address has shifted!\n");
}
KSU_LSM_HOOK_HACK_INIT(setuid_head, task_fix_setuid,
ksu_task_fix_setuid);
} else {
pr_warn("Failed to find task_fix_setuid!\n");
}
smp_mb();
}
#endif
void __init ksu_core_init(void)
{
#ifndef MODULE
pr_info("ksu_lsm_hook_init\n");
ksu_lsm_hook_init();
#else
pr_info("ksu_kprobe_init\n");
ksu_kprobe_init();
#endif
}
void ksu_core_exit(void)
{
#ifndef MODULE
pr_info("ksu_kprobe_exit\n");
ksu_kprobe_exit();
#ifdef CONFIG_KPROBES
pr_info("ksu_core_kprobe_exit\n");
// we dont use this now
// ksu_kprobe_exit();
#endif
}

View File

@@ -1,7 +1,7 @@
#ifndef __KSU_H_KSU_CORE
#define __KSU_H_KSU_CORE
#include "linux/init.h"
#include <linux/init.h>
void __init ksu_core_init(void);
void ksu_core_exit(void);

View File

@@ -1,8 +1,8 @@
#ifndef __KSU_H_KSHOOK
#define __KSU_H_KSHOOK
#include "linux/fs.h"
#include "linux/types.h"
#include <linux/fs.h>
#include <linux/types.h>
// For sucompat

View File

@@ -1,41 +1,10 @@
#include "linux/version.h"
#include "linux/fs.h"
#include "linux/nsproxy.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
#include "linux/sched/task.h"
#include "linux/uaccess.h"
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
#include "linux/uaccess.h"
#include "linux/sched.h"
#else
#include "linux/sched.h"
#endif
#include <linux/version.h>
#include <linux/fs.h>
#include <linux/nsproxy.h>
#include <linux/sched/task.h>
#include <linux/uaccess.h>
#include "klog.h" // IWYU pragma: keep
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
#include "linux/key.h"
#include "linux/errno.h"
#include "linux/cred.h"
struct key *init_session_keyring = NULL;
static inline int install_session_keyring(struct key *keyring)
{
struct cred *new;
int ret;
new = prepare_creds();
if (!new)
return -ENOMEM;
ret = install_session_keyring_to_cred(new, keyring);
if (ret < 0) {
abort_creds(new);
return ret;
}
return commit_creds(new);
}
#endif
#include "kernel_compat.h"
extern struct task_struct init_task;
@@ -81,13 +50,6 @@ void ksu_android_ns_fs_check()
struct file *ksu_filp_open_compat(const char *filename, int flags, umode_t mode)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
if (init_session_keyring != NULL && !current_cred()->session_keyring &&
(current->flags & PF_WQ_WORKER)) {
pr_info("installing init session keyring for older kernel\n");
install_session_keyring(init_session_keyring);
}
#endif
// switch mnt_ns even if current is not wq_worker, to ensure what we open is the correct file in android mnt_ns, rather than user created mnt_ns
struct ksu_ns_fs_saved saved;
if (android_context_saved_enabled) {
@@ -110,69 +72,17 @@ struct file *ksu_filp_open_compat(const char *filename, int flags, umode_t mode)
ssize_t ksu_kernel_read_compat(struct file *p, void *buf, size_t count,
loff_t *pos)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
return kernel_read(p, buf, count, pos);
#else
loff_t offset = pos ? *pos : 0;
ssize_t result = kernel_read(p, offset, (char *)buf, count);
if (pos && result > 0) {
*pos = offset + result;
}
return result;
#endif
}
ssize_t ksu_kernel_write_compat(struct file *p, const void *buf, size_t count,
loff_t *pos)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
return kernel_write(p, buf, count, pos);
#else
loff_t offset = pos ? *pos : 0;
ssize_t result = kernel_write(p, buf, count, offset);
if (pos && result > 0) {
*pos = offset + result;
}
return result;
#endif
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
long ksu_strncpy_from_user_nofault(char *dst, const void __user *unsafe_addr,
long count)
{
return strncpy_from_user_nofault(dst, unsafe_addr, count);
}
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
long ksu_strncpy_from_user_nofault(char *dst, const void __user *unsafe_addr,
long count)
{
return strncpy_from_unsafe_user(dst, unsafe_addr, count);
}
#else
// Copied from: https://elixir.bootlin.com/linux/v4.9.337/source/mm/maccess.c#L201
long ksu_strncpy_from_user_nofault(char *dst, const void __user *unsafe_addr,
long count)
{
mm_segment_t old_fs = get_fs();
long ret;
if (unlikely(count <= 0))
return 0;
set_fs(USER_DS);
pagefault_disable();
ret = strncpy_from_user(dst, unsafe_addr, count);
pagefault_enable();
set_fs(old_fs);
if (ret >= count) {
ret = count;
dst[ret - 1] = '\0';
} else if (ret > 0) {
ret++;
}
return ret;
}
#endif

View File

@@ -1,18 +1,29 @@
#ifndef __KSU_H_KERNEL_COMPAT
#define __KSU_H_KERNEL_COMPAT
#include "linux/fs.h"
#include <linux/fs.h>
#include <linux/version.h>
#include "ss/policydb.h"
#include "linux/key.h"
#include "linux/version.h"
/*
* Adapt to Huawei HISI kernel without affecting other kernels ,
* Huawei Hisi Kernel EBITMAP Enable or Disable Flag ,
* From ss/ebitmap.h
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)) && \
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)) && \
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0))
#ifdef HISI_SELINUX_EBITMAP_RO
#define CONFIG_IS_HW_HISI
#endif
#endif
extern long ksu_strncpy_from_user_nofault(char *dst,
const void __user *unsafe_addr,
long count);
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
extern struct key *init_session_keyring;
#endif
extern void ksu_android_ns_fs_check();
extern struct file *ksu_filp_open_compat(const char *filename, int flags,
umode_t mode);

View File

@@ -1,13 +1,15 @@
#include "linux/fs.h"
#include "linux/module.h"
#include "linux/workqueue.h"
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include "allowlist.h"
#include "arch.h"
#include "core_hook.h"
#include "klog.h" // IWYU pragma: keep
#include "ksu.h"
#include "uid_observer.h"
#include "throne_tracker.h"
static struct workqueue_struct *ksu_workqueue;
@@ -30,8 +32,10 @@ int ksu_handle_execveat(int *fd, struct filename **filename_ptr, void *argv,
flags);
}
extern void ksu_enable_sucompat();
extern void ksu_enable_ksud();
extern void ksu_sucompat_init();
extern void ksu_sucompat_exit();
extern void ksu_ksud_init();
extern void ksu_ksud_exit();
int __init kernelsu_init(void)
{
@@ -51,15 +55,20 @@ int __init kernelsu_init(void)
ksu_allowlist_init();
ksu_uid_observer_init();
ksu_throne_tracker_init();
#ifdef CONFIG_KPROBES
ksu_enable_sucompat();
ksu_enable_ksud();
ksu_sucompat_init();
ksu_ksud_init();
#else
pr_alert("KPROBES is disabled, KernelSU may not work, please check https://kernelsu.org/guide/how-to-integrate-for-non-gki.html");
#endif
#ifdef MODULE
#ifndef CONFIG_KSU_DEBUG
kobject_del(&THIS_MODULE->mkobj.kobj);
#endif
#endif
return 0;
}
@@ -67,10 +76,15 @@ void kernelsu_exit(void)
{
ksu_allowlist_exit();
ksu_uid_observer_exit();
ksu_throne_tracker_exit();
destroy_workqueue(ksu_workqueue);
#ifdef CONFIG_KPROBES
ksu_ksud_exit();
ksu_sucompat_exit();
#endif
ksu_core_exit();
}
@@ -80,7 +94,4 @@ module_exit(kernelsu_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("weishu");
MODULE_DESCRIPTION("Android KernelSU");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
#endif

View File

@@ -1,8 +1,8 @@
#ifndef __KSU_H_KSU
#define __KSU_H_KSU
#include "linux/types.h"
#include "linux/workqueue.h"
#include <linux/types.h>
#include <linux/workqueue.h>
#define KERNEL_SU_VERSION KSU_VERSION
#define KERNEL_SU_OPTION 0xDEADBEEF
@@ -24,6 +24,7 @@
#define EVENT_POST_FS_DATA 1
#define EVENT_BOOT_COMPLETED 2
#define EVENT_MODULE_MOUNTED 3
#define KSU_APP_PROFILE_VER 2
#define KSU_MAX_PACKAGE_NAME 256

View File

@@ -1,15 +1,17 @@
#include "asm/current.h"
#include "linux/compat.h"
#include "linux/dcache.h"
#include "linux/err.h"
#include "linux/fs.h"
#include "linux/input-event-codes.h"
#include "linux/kprobes.h"
#include "linux/printk.h"
#include "linux/types.h"
#include "linux/uaccess.h"
#include "linux/version.h"
#include "linux/workqueue.h"
#include <asm/current.h>
#include <linux/compat.h>
#include <linux/cred.h>
#include <linux/dcache.h>
#include <linux/err.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/version.h>
#include <linux/input-event-codes.h>
#include <linux/kprobes.h>
#include <linux/printk.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/workqueue.h>
#include "allowlist.h"
#include "arch.h"
@@ -55,6 +57,8 @@ bool ksu_execveat_hook __read_mostly = true;
bool ksu_input_hook __read_mostly = true;
#endif
u32 ksu_devpts_sid;
void on_post_fs_data(void)
{
static bool done = false;
@@ -67,6 +71,9 @@ void on_post_fs_data(void)
ksu_load_allow_list();
// sanity check, this may influence the performance
stop_input_hook();
ksu_devpts_sid = ksu_get_devpts_sid();
pr_info("devpts sid: %d\n", ksu_devpts_sid);
}
#define MAX_ARG_STRINGS 0x7FFFFFFF
@@ -107,7 +114,7 @@ static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
* count() counts the number of strings in array ARGV.
*/
/*
/*
* Make sure old GCC compiler can use __maybe_unused,
* Test passed in 4.4.x ~ 4.9.x when use GCC.
*/
@@ -140,7 +147,8 @@ static int __maybe_unused count(struct user_arg_ptr argv, int max)
// IMPORTANT NOTE: the call from execve_handler_pre WON'T provided correct value for envp and flags in GKI version
int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
struct user_arg_ptr *argv, struct user_arg_ptr *envp, int *flags)
struct user_arg_ptr *argv,
struct user_arg_ptr *envp, int *flags)
{
#ifndef CONFIG_KPROBES
if (!ksu_execveat_hook) {
@@ -166,8 +174,9 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
return 0;
}
if (unlikely(!memcmp(filename->name, system_bin_init,
sizeof(system_bin_init) - 1) && argv)) {
if (unlikely(!memcmp(filename->name, system_bin_init,
sizeof(system_bin_init) - 1) &&
argv)) {
// /system/bin/init executed
int argc = count(*argv, MAX_ARG_STRINGS);
pr_info("/system/bin/init argc: %d\n", argc);
@@ -175,8 +184,10 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
const char __user *p = get_user_arg_ptr(*argv, 1);
if (p && !IS_ERR(p)) {
char first_arg[16];
ksu_strncpy_from_user_nofault(first_arg, p, sizeof(first_arg));
pr_info("/system/bin/init first arg: %s\n", first_arg);
ksu_strncpy_from_user_nofault(
first_arg, p, sizeof(first_arg));
pr_info("/system/bin/init first arg: %s\n",
first_arg);
if (!strcmp(first_arg, "second_stage")) {
pr_info("/system/bin/init second_stage executed\n");
apply_kernelsu_rules();
@@ -188,7 +199,8 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
}
}
} else if (unlikely(!memcmp(filename->name, old_system_init,
sizeof(old_system_init) - 1) && argv)) {
sizeof(old_system_init) - 1) &&
argv)) {
// /init executed
int argc = count(*argv, MAX_ARG_STRINGS);
pr_info("/init argc: %d\n", argc);
@@ -197,7 +209,8 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
const char __user *p = get_user_arg_ptr(*argv, 1);
if (p && !IS_ERR(p)) {
char first_arg[16];
ksu_strncpy_from_user_nofault(first_arg, p, sizeof(first_arg));
ksu_strncpy_from_user_nofault(
first_arg, p, sizeof(first_arg));
pr_info("/init first arg: %s\n", first_arg);
if (!strcmp(first_arg, "--second-stage")) {
pr_info("/init second_stage executed\n");
@@ -214,13 +227,15 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
if (envc > 0) {
int n;
for (n = 1; n <= envc; n++) {
const char __user *p = get_user_arg_ptr(*envp, n);
const char __user *p =
get_user_arg_ptr(*envp, n);
if (!p || IS_ERR(p)) {
continue;
}
char env[256];
// Reading environment variable strings from user space
if (ksu_strncpy_from_user_nofault(env, p, sizeof(env)) < 0)
if (ksu_strncpy_from_user_nofault(
env, p, sizeof(env)) < 0)
continue;
// Parsing environment variable names and values
char *env_name = env;
@@ -231,10 +246,14 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
*env_value = '\0';
env_value++;
// Check if the environment variable name and value are matching
if (!strcmp(env_name, "INIT_SECOND_STAGE") && (!strcmp(env_value, "1") || !strcmp(env_value, "true"))) {
if (!strcmp(env_name,
"INIT_SECOND_STAGE") &&
(!strcmp(env_value, "1") ||
!strcmp(env_value, "true"))) {
pr_info("/init second_stage executed\n");
apply_kernelsu_rules();
init_second_stage_executed = true;
init_second_stage_executed =
true;
ksu_android_ns_fs_check();
}
}
@@ -242,10 +261,11 @@ int ksu_handle_execveat_ksud(int *fd, struct filename **filename_ptr,
}
}
if (unlikely(first_app_process &&
!memcmp(filename->name, app_process, sizeof(app_process) - 1))) {
if (unlikely(first_app_process && !memcmp(filename->name, app_process,
sizeof(app_process) - 1))) {
first_app_process = false;
pr_info("exec app_process, /data prepared, second_stage: %d\n", init_second_stage_executed);
pr_info("exec app_process, /data prepared, second_stage: %d\n",
init_second_stage_executed);
on_post_fs_data(); // we keep this for old ksud
stop_execve_hook();
}
@@ -264,7 +284,8 @@ static ssize_t read_proxy(struct file *file, char __user *buf, size_t count,
bool first_read = file->f_pos == 0;
ssize_t ret = orig_read(file, buf, count, pos);
if (first_read) {
pr_info("read_proxy append %ld + %ld\n", ret, read_count_append);
pr_info("read_proxy append %ld + %ld\n", ret,
read_count_append);
ret += read_count_append;
}
return ret;
@@ -376,6 +397,18 @@ int ksu_handle_vfs_read(struct file **file_ptr, char __user **buf_ptr,
return 0;
}
int ksu_handle_sys_read(unsigned int fd, char __user **buf_ptr,
size_t *count_ptr)
{
struct file *file = fget(fd);
if (!file) {
return 0;
}
int result = ksu_handle_vfs_read(&file, buf_ptr, count_ptr, NULL);
fput(file);
return result;
}
static unsigned int volumedown_pressed_count = 0;
static bool is_volumedown_enough(unsigned int count)
@@ -430,35 +463,37 @@ bool ksu_is_safe_mode()
#ifdef CONFIG_KPROBES
// https://elixir.bootlin.com/linux/v5.10.158/source/fs/exec.c#L1864
static int execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
static int sys_execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
int *fd = (int *)&PT_REGS_PARM1(regs);
struct filename **filename_ptr =
(struct filename **)&PT_REGS_PARM2(regs);
struct user_arg_ptr argv;
#ifdef CONFIG_COMPAT
argv.is_compat = PT_REGS_PARM3(regs);
if (unlikely(argv.is_compat)) {
argv.ptr.compat = PT_REGS_CCALL_PARM4(regs);
} else {
argv.ptr.native = PT_REGS_CCALL_PARM4(regs);
}
#else
argv.ptr.native = PT_REGS_PARM3(regs);
#endif
struct pt_regs *real_regs = PT_REAL_REGS(regs);
const char __user **filename_user =
(const char **)&PT_REGS_PARM1(real_regs);
const char __user *const __user *__argv =
(const char __user *const __user *)PT_REGS_PARM2(real_regs);
struct user_arg_ptr argv = { .ptr.native = __argv };
struct filename filename_in, *filename_p;
char path[32];
return ksu_handle_execveat_ksud(fd, filename_ptr, &argv, NULL, NULL);
if (!filename_user)
return 0;
memset(path, 0, sizeof(path));
ksu_strncpy_from_user_nofault(path, *filename_user, 32);
filename_in.name = path;
filename_p = &filename_in;
return ksu_handle_execveat_ksud(AT_FDCWD, &filename_p, &argv, NULL,
NULL);
}
static int read_handler_pre(struct kprobe *p, struct pt_regs *regs)
static int sys_read_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
struct file **file_ptr = (struct file **)&PT_REGS_PARM1(regs);
char __user **buf_ptr = (char **)&PT_REGS_PARM2(regs);
size_t *count_ptr = (size_t *)&PT_REGS_PARM3(regs);
loff_t **pos_ptr = (loff_t **)&PT_REGS_CCALL_PARM4(regs);
struct pt_regs *real_regs = PT_REAL_REGS(regs);
unsigned int fd = PT_REGS_PARM1(real_regs);
char __user **buf_ptr = (char __user **)&PT_REGS_PARM2(real_regs);
size_t count_ptr = (size_t *)&PT_REGS_PARM3(real_regs);
return ksu_handle_vfs_read(file_ptr, buf_ptr, count_ptr, pos_ptr);
return ksu_handle_sys_read(fd, buf_ptr, count_ptr);
}
static int input_handle_event_handler_pre(struct kprobe *p,
@@ -471,23 +506,18 @@ static int input_handle_event_handler_pre(struct kprobe *p,
}
static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
.symbol_name = "__do_execve_file",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
.symbol_name = "do_execveat_common",
#endif
.pre_handler = execve_handler_pre,
.symbol_name = SYS_EXECVE_SYMBOL,
.pre_handler = sys_execve_handler_pre,
};
static struct kprobe vfs_read_kp = {
.symbol_name = "vfs_read",
.pre_handler = read_handler_pre,
.symbol_name = SYS_READ_SYMBOL,
.pre_handler = sys_read_handler_pre,
};
static struct kprobe input_handle_event_kp = {
.symbol_name = "input_handle_event",
static struct kprobe input_event_kp = {
.symbol_name = "input_event",
.pre_handler = input_handle_event_handler_pre,
};
@@ -503,7 +533,7 @@ static void do_stop_execve_hook(struct work_struct *work)
static void do_stop_input_hook(struct work_struct *work)
{
unregister_kprobe(&input_handle_event_kp);
unregister_kprobe(&input_event_kp);
}
#endif
@@ -546,7 +576,7 @@ static void stop_input_hook()
}
// ksud: module support
void ksu_enable_ksud()
void ksu_ksud_init()
{
#ifdef CONFIG_KPROBES
int ret;
@@ -557,11 +587,21 @@ void ksu_enable_ksud()
ret = register_kprobe(&vfs_read_kp);
pr_info("ksud: vfs_read_kp: %d\n", ret);
ret = register_kprobe(&input_handle_event_kp);
pr_info("ksud: input_handle_event_kp: %d\n", ret);
ret = register_kprobe(&input_event_kp);
pr_info("ksud: input_event_kp: %d\n", ret);
INIT_WORK(&stop_vfs_read_work, do_stop_vfs_read_hook);
INIT_WORK(&stop_execve_hook_work, do_stop_execve_hook);
INIT_WORK(&stop_input_hook_work, do_stop_input_hook);
#endif
}
void ksu_ksud_exit()
{
#ifdef CONFIG_KPROBES
unregister_kprobe(&execve_kp);
// this should be done before unregister vfs_read_kp
// unregister_kprobe(&vfs_read_kp);
unregister_kprobe(&input_event_kp);
#endif
}

View File

@@ -1,10 +1,14 @@
#ifndef __KSU_H_KSUD
#define __KSU_H_KSUD
#include <linux/types.h>
#define KSUD_PATH "/data/adb/ksud"
void on_post_fs_data(void);
bool ksu_is_safe_mode(void);
extern u32 ksu_devpts_sid;
#endif

View File

@@ -1,102 +0,0 @@
#include "linux/cred.h"
#include "linux/gfp.h"
#include "linux/slab.h"
#include "linux/uidgid.h"
#include "linux/version.h"
#include "linux/fdtable.h"
#include "linux/fs.h"
#include "linux/rcupdate.h"
#include "apk_sign.h"
#include "klog.h" // IWYU pragma: keep
#include "ksu.h"
#include "manager.h"
uid_t ksu_manager_uid = KSU_INVALID_UID;
bool become_manager(char *pkg)
{
struct fdtable *files_table;
int i = 0;
struct path files_path;
char *cwd;
char *buf;
bool result = false;
#ifdef KSU_MANAGER_PACKAGE
// pkg is `/<real package>`
if (strncmp(pkg + 1, KSU_MANAGER_PACKAGE,
sizeof(KSU_MANAGER_PACKAGE)) != 0) {
pr_info("manager package is inconsistent with kernel build: %s\n",
KSU_MANAGER_PACKAGE);
return false;
}
#endif
// must be zygote's direct child, otherwise any app can fork a new process and
// open manager's apk
if (task_uid(current->real_parent).val != 0) {
pr_info("parent is not zygote!\n");
return false;
}
buf = (char *)kmalloc(PATH_MAX, GFP_ATOMIC);
if (!buf) {
pr_err("kalloc path failed.\n");
return false;
}
files_table = files_fdtable(current->files);
int pkg_len = strlen(pkg);
// todo: use iterate_fd
for (i = 0; files_table->fd[i] != NULL; i++) {
files_path = files_table->fd[i]->f_path;
if (!d_is_reg(files_path.dentry)) {
continue;
}
cwd = d_path(&files_path, buf, PATH_MAX);
if (startswith(cwd, "/data/app/") != 0 ||
endswith(cwd, "==/base.apk") != 0) {
// AOSP generate ramdom base64 with 16bit, without NO_PADDING, so it must have two "="
continue;
}
// we have found the apk!
pr_info("found apk: %s\n", cwd);
char *pkg_index = strstr(cwd, pkg);
if (!pkg_index) {
pr_info("apk path not match package name!\n");
continue;
}
char *next_char = pkg_index + pkg_len;
// because we ensure the cwd must startswith `/data/app` and endswith `base.apk`
// we don't need to check if the pointer is out of bounds
if (*next_char != '-') {
// from android 8.1: http://aospxref.com/android-8.1.0_r81/xref/frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java#17612
// to android 13: http://aospxref.com/android-13.0.0_r3/xref/frameworks/base/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java#1208
// /data/app/~~[randomStringA]/[packageName]-[randomStringB]
// the previous char must be `/` and the next char must be `-`
// because we use strstr instead of equals, this is a strong verfication.
pr_info("invalid pkg: %s\n", pkg);
continue;
}
if (is_manager_apk(cwd)) {
// check passed
uid_t uid = current_uid().val;
pr_info("manager uid: %d\n", uid);
ksu_set_manager_uid(uid);
result = true;
goto clean;
} else {
pr_info("manager signature invalid!\n");
}
break;
}
clean:
kfree(buf);
return result;
}

View File

@@ -1,8 +1,8 @@
#ifndef __KSU_H_KSU_MANAGER
#define __KSU_H_KSU_MANAGER
#include "linux/cred.h"
#include "linux/types.h"
#include <linux/cred.h>
#include <linux/types.h>
#define KSU_INVALID_UID -1
@@ -33,6 +33,4 @@ static inline void ksu_invalidate_manager_uid()
ksu_manager_uid = KSU_INVALID_UID;
}
bool become_manager(char *pkg);
#endif

View File

@@ -1,33 +0,0 @@
#include "linux/kallsyms.h"
#define RE_EXPORT_SYMBOL1(ret, func, t1, v1) \
ret ksu_##func(t1 v1) \
{ \
return func(v1); \
} \
EXPORT_SYMBOL(ksu_##func);
#define RE_EXPORT_SYMBOL2(ret, func, t1, v1, t2, v2) \
ret ksu_##func(t1 v1, t2 v2) \
{ \
return func(v1, v2); \
} \
EXPORT_SYMBOL(ksu_##func);
RE_EXPORT_SYMBOL1(unsigned long, kallsyms_lookup_name, const char *, name)
// RE_EXPORT_SYMBOL2(int, register_kprobe, struct kprobe *, p)
// RE_EXPORT_SYMBOL2(void, unregister_kprobe, struct kprobe *, p)
// RE_EXPORT_SYMBOL2(int, register_kprobe, struct kprobe *, p)
// RE_EXPORT_SYMBOL2(void, unregister_kprobe, struct kprobe *, p)
// int ksu_register_kprobe(struct kprobe *p);
// void ksu_unregister_kprobe(struct kprobe *p);
// int ksu_register_kprobes(struct kprobe **kps, int num);
// void ksu_unregister_kprobes(struct kprobe **kps, int num);
// int ksu_register_kretprobe(struct kretprobe *rp);
// void unregister_kretprobe(struct kretprobe *rp);
// int register_kretprobes(struct kretprobe **rps, int num);
// void unregister_kretprobes(struct kretprobe **rps, int num);

View File

@@ -1,6 +1,6 @@
#include "linux/uaccess.h"
#include "linux/types.h"
#include "linux/version.h"
#include <linux/uaccess.h>
#include <linux/types.h>
#include <linux/version.h>
#include "../klog.h" // IWYU pragma: keep
#include "selinux.h"
@@ -9,9 +9,7 @@
#include "linux/lsm_audit.h"
#include "xfrm.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
#define SELINUX_POLICY_INSTEAD_SELINUX_SS
#endif
#define KERNEL_SU_DOMAIN "su"
#define KERNEL_SU_FILE "ksu_file"
@@ -21,18 +19,8 @@
static struct policydb *get_policydb(void)
{
struct policydb *db;
// selinux_state does not exists before 4.19
#ifdef KSU_COMPAT_USE_SELINUX_STATE
#ifdef SELINUX_POLICY_INSTEAD_SELINUX_SS
struct selinux_policy *policy = rcu_dereference(selinux_state.policy);
db = &policy->policydb;
#else
struct selinux_ss *ss = rcu_dereference(selinux_state.ss);
db = &ss->policydb;
#endif
#else
db = &policydb;
#endif
return db;
}
@@ -69,6 +57,11 @@ void apply_kernelsu_rules()
// we need to save allowlist in /data/adb/ksu
ksu_allow(db, "kernel", "adb_data_file", "dir", ALL);
ksu_allow(db, "kernel", "adb_data_file", "file", ALL);
// we need to search /data/app
ksu_allow(db, "kernel", "apk_data_file", "file", "open");
ksu_allow(db, "kernel", "apk_data_file", "dir", "open");
ksu_allow(db, "kernel", "apk_data_file", "dir", "read");
ksu_allow(db, "kernel", "apk_data_file", "dir", "search");
// we may need to do mount on shell
ksu_allow(db, "kernel", "shell_data_file", "file", ALL);
// we need to read /data/system/packages.list
@@ -84,6 +77,7 @@ void apply_kernelsu_rules()
ksu_allow(db, "kernel", "system_data_file", "dir", ALL);
// our ksud triggered by init
ksu_allow(db, "init", "adb_data_file", "file", ALL);
ksu_allow(db, "init", "adb_data_file", "dir", ALL); // #1289
ksu_allow(db, "init", KERNEL_SU_DOMAIN, ALL, ALL);
// we need to umount modules in zygote
ksu_allow(db, "zygote", "adb_data_file", "dir", "search");
@@ -124,11 +118,9 @@ void apply_kernelsu_rules()
// Allow all binder transactions
ksu_allow(db, ALL, KERNEL_SU_DOMAIN, "binder", ALL);
// Allow system server devpts
ksu_allow(db, "system_server", "untrusted_app_all_devpts", "chr_file",
"read");
ksu_allow(db, "system_server", "untrusted_app_all_devpts", "chr_file",
"write");
// Allow system server kill su process
ksu_allow(db, "system_server", KERNEL_SU_DOMAIN, "process", "getpgid");
ksu_allow(db, "system_server", KERNEL_SU_DOMAIN, "process", "sigkill");
rcu_read_unlock();
}
@@ -177,8 +169,7 @@ static int get_object(char *buf, char __user *user_object, size_t buf_sz,
// reset avc cache table, otherwise the new rules will not take effect if already denied
static void reset_avc_cache()
{
#if ((!defined(KSU_COMPAT_USE_SELINUX_STATE)) || \
LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0))
avc_ss_reset(0);
selnl_notify_policyload(0);
selinux_status_update_policyload(0);

View File

@@ -2,9 +2,6 @@
#include "objsec.h"
#include "linux/version.h"
#include "../klog.h" // IWYU pragma: keep
#ifndef KSU_COMPAT_USE_SELINUX_STATE
#include "avc.h"
#endif
#define KERNEL_SU_DOMAIN "u:r:su:s0"
@@ -55,32 +52,20 @@ if (!is_domain_permissive) {
void setenforce(bool enforce)
{
#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
#ifdef KSU_COMPAT_USE_SELINUX_STATE
selinux_state.enforcing = enforce;
#else
selinux_enforcing = enforce;
#endif
#endif
}
bool getenforce()
{
#ifdef CONFIG_SECURITY_SELINUX_DISABLE
#ifdef KSU_COMPAT_USE_SELINUX_STATE
if (selinux_state.disabled) {
#else
if (selinux_disabled) {
#endif
return false;
}
#endif
#ifdef CONFIG_SECURITY_SELINUX_DEVELOP
#ifdef KSU_COMPAT_USE_SELINUX_STATE
return selinux_state.enforcing;
#else
return selinux_enforcing;
#endif
#else
return true;
#endif
@@ -103,11 +88,14 @@ bool is_ksu_domain()
{
char *domain;
u32 seclen;
bool result;
int err = security_secid_to_secctx(current_sid(), &domain, &seclen);
if (err) {
return false;
}
return strncmp(KERNEL_SU_DOMAIN, domain, seclen) == 0;
result = strncmp(KERNEL_SU_DOMAIN, domain, seclen) == 0;
security_release_secctx(domain, seclen);
return result;
}
bool is_zygote(void *sec)
@@ -118,9 +106,25 @@ bool is_zygote(void *sec)
}
char *domain;
u32 seclen;
bool result;
int err = security_secid_to_secctx(tsec->sid, &domain, &seclen);
if (err) {
return false;
}
return strncmp("u:r:zygote:s0", domain, seclen) == 0;
}
result = strncmp("u:r:zygote:s0", domain, seclen) == 0;
security_release_secctx(domain, seclen);
return result;
}
#define DEVPTS_DOMAIN "u:object_r:ksu_file:s0"
u32 ksu_get_devpts_sid()
{
u32 devpts_sid = 0;
int err = security_secctx_to_secid(DEVPTS_DOMAIN, strlen(DEVPTS_DOMAIN),
&devpts_sid);
if (err) {
pr_info("get devpts sid err %d\n", err);
}
return devpts_sid;
}

View File

@@ -4,10 +4,6 @@
#include "linux/types.h"
#include "linux/version.h"
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || defined(KSU_COMPAT_HAS_SELINUX_STATE)
#define KSU_COMPAT_USE_SELINUX_STATE
#endif
void setup_selinux(const char *);
void setenforce(bool);
@@ -20,4 +16,6 @@ bool is_zygote(void *cred);
void apply_kernelsu_rules();
u32 ksu_get_devpts_sid();
#endif

View File

@@ -1,26 +1,15 @@
#include "sepolicy.h"
#include "linux/gfp.h"
#include "linux/printk.h"
#include "linux/slab.h"
#include "linux/version.h"
#include <linux/gfp.h>
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/version.h>
#include "sepolicy.h"
#include "../klog.h" // IWYU pragma: keep
#include "ss/symtab.h"
#include "../kernel_compat.h" // Add check Huawei Device
#define KSU_SUPPORT_ADD_TYPE
/*
* Adapt to Huawei HISI kernel without affecting other kernels ,
* Huawei Hisi Kernel EBITMAP Enable or Disable Flag ,
* From ss/ebitmap.h
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \
LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
#ifdef HISI_SELINUX_EBITMAP_RO
#define CONFIG_IS_HW_HISI
#endif
#endif
//////////////////////////////////////////////////////
// Declaration
//////////////////////////////////////////////////////
@@ -535,7 +524,6 @@ static bool add_filename_trans(struct policydb *db, const char *s,
return false;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
struct filename_trans_key key;
key.ttype = tgt->value;
key.tclass = cls->value;
@@ -543,13 +531,8 @@ static bool add_filename_trans(struct policydb *db, const char *s,
struct filename_trans_datum *last = NULL;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
struct filename_trans_datum *trans =
policydb_filenametr_search(db, &key);
#else
struct filename_trans_datum *trans =
hashtab_search(&db->filename_trans, &key);
#endif
while (trans) {
if (ebitmap_get_bit(&trans->stypes, src->value - 1)) {
// Duplicate, overwrite existing data and return
@@ -578,39 +561,6 @@ static bool add_filename_trans(struct policydb *db, const char *s,
db->compat_filename_trans_count++;
return ebitmap_set_bit(&trans->stypes, src->value - 1, 1) == 0;
#else // < 5.7.0, has no filename_trans_key, but struct filename_trans
struct filename_trans key;
key.ttype = tgt->value;
key.tclass = cls->value;
key.name = (char *)o;
struct filename_trans_datum *trans =
hashtab_search(db->filename_trans, &key);
if (trans == NULL) {
trans = (struct filename_trans_datum *)kcalloc(sizeof(*trans),
1, GFP_ATOMIC);
if (!trans) {
pr_err("add_filename_trans: Failed to alloc datum\n");
return false;
}
struct filename_trans *new_key =
(struct filename_trans *)kmalloc(sizeof(*new_key),
GFP_ATOMIC);
if (!new_key) {
pr_err("add_filename_trans: Failed to alloc new_key\n");
return false;
}
*new_key = key;
new_key->name = kstrdup(key.name, GFP_ATOMIC);
trans->otype = def->value;
hashtab_insert(db->filename_trans, new_key, trans);
}
return ebitmap_set_bit(&db->filename_trans_ttypes, src->value - 1, 1) ==
0;
#endif
}
static bool add_genfscon(struct policydb *db, const char *fs_name,
@@ -619,9 +569,24 @@ static bool add_genfscon(struct policydb *db, const char *fs_name,
return false;
}
static void *ksu_realloc(void *old, size_t new_size, size_t old_size)
{
// we can't use krealloc, because it may be read-only
void *new = kzalloc(new_size, GFP_ATOMIC);
if (!new) {
return NULL;
}
if (old_size) {
memcpy(new, old, old_size);
}
// we can't use kfree, because it may be read-only
// there maybe some leaks, maybe we can check ptr_write, but it's not a big deal
// kfree(old);
return new;
}
static bool add_type(struct policydb *db, const char *type_name, bool attr)
{
#ifdef KSU_SUPPORT_ADD_TYPE
struct type_datum *type = symtab_search(&db->p_types, type_name);
if (type) {
pr_warn("Type %s already exists\n", type_name);
@@ -651,30 +616,30 @@ static bool add_type(struct policydb *db, const char *type_name, bool attr)
return false;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
size_t new_size = sizeof(struct ebitmap) * db->p_types.nprim;
struct ebitmap *new_type_attr_map_array =
(krealloc(db->type_attr_map_array, new_size, GFP_ATOMIC));
struct type_datum **new_type_val_to_struct =
krealloc(db->type_val_to_struct,
sizeof(*db->type_val_to_struct) * db->p_types.nprim,
GFP_ATOMIC);
ksu_realloc(db->type_attr_map_array,
value * sizeof(struct ebitmap),
(value - 1) * sizeof(struct ebitmap));
if (!new_type_attr_map_array) {
pr_err("add_type: alloc type_attr_map_array failed\n");
return false;
}
struct type_datum **new_type_val_to_struct =
ksu_realloc(db->type_val_to_struct,
sizeof(*db->type_val_to_struct) * value,
sizeof(*db->type_val_to_struct) * (value - 1));
if (!new_type_val_to_struct) {
pr_err("add_type: alloc type_val_to_struct failed\n");
return false;
}
char **new_val_to_name_types =
krealloc(db->sym_val_to_name[SYM_TYPES],
sizeof(char *) * db->symtab[SYM_TYPES].nprim,
GFP_KERNEL);
ksu_realloc(db->sym_val_to_name[SYM_TYPES],
sizeof(char *) * value,
sizeof(char *) * (value - 1));
if (!new_val_to_name_types) {
pr_err("add_type: alloc val_to_name failed\n");
return false;
@@ -697,171 +662,6 @@ static bool add_type(struct policydb *db, const char *type_name, bool attr)
}
return true;
#elif defined(CONFIG_IS_HW_HISI)
/*
* Huawei use type_attr_map and type_val_to_struct.
* And use ebitmap not flex_array.
*/
size_t new_size = sizeof(struct ebitmap) * db->p_types.nprim;
struct ebitmap *new_type_attr_map =
(krealloc(db->type_attr_map, new_size, GFP_ATOMIC));
struct type_datum **new_type_val_to_struct =
krealloc(db->type_val_to_struct,
sizeof(*db->type_val_to_struct) * db->p_types.nprim,
GFP_ATOMIC);
if (!new_type_attr_map) {
pr_err("add_type: alloc type_attr_map failed\n");
return false;
}
if (!new_type_val_to_struct) {
pr_err("add_type: alloc type_val_to_struct failed\n");
return false;
}
char **new_val_to_name_types =
krealloc(db->sym_val_to_name[SYM_TYPES],
sizeof(char *) * db->symtab[SYM_TYPES].nprim,
GFP_KERNEL);
if (!new_val_to_name_types) {
pr_err("add_type: alloc val_to_name failed\n");
return false;
}
db->type_attr_map = new_type_attr_map;
ebitmap_init(&db->type_attr_map[value - 1], HISI_SELINUX_EBITMAP_RO);
ebitmap_set_bit(&db->type_attr_map[value - 1], value - 1, 1);
db->type_val_to_struct = new_type_val_to_struct;
db->type_val_to_struct[value - 1] = type;
db->sym_val_to_name[SYM_TYPES] = new_val_to_name_types;
db->sym_val_to_name[SYM_TYPES][value - 1] = key;
int i;
for (i = 0; i < db->p_roles.nprim; ++i) {
ebitmap_set_bit(&db->role_val_to_struct[i]->types, value - 1,
1);
}
return true;
#else
// flex_array is not extensible, we need to create a new bigger one instead
struct flex_array *new_type_attr_map_array =
flex_array_alloc(sizeof(struct ebitmap), db->p_types.nprim,
GFP_ATOMIC | __GFP_ZERO);
struct flex_array *new_type_val_to_struct =
flex_array_alloc(sizeof(struct type_datum *), db->p_types.nprim,
GFP_ATOMIC | __GFP_ZERO);
struct flex_array *new_val_to_name_types =
flex_array_alloc(sizeof(char *), db->symtab[SYM_TYPES].nprim,
GFP_ATOMIC | __GFP_ZERO);
if (!new_type_attr_map_array) {
pr_err("add_type: alloc type_attr_map_array failed\n");
return false;
}
if (!new_type_val_to_struct) {
pr_err("add_type: alloc type_val_to_struct failed\n");
return false;
}
if (!new_val_to_name_types) {
pr_err("add_type: alloc val_to_name failed\n");
return false;
}
// preallocate so we don't have to worry about the put ever failing
if (flex_array_prealloc(new_type_attr_map_array, 0, db->p_types.nprim,
GFP_ATOMIC | __GFP_ZERO)) {
pr_err("add_type: prealloc type_attr_map_array failed\n");
return false;
}
if (flex_array_prealloc(new_type_val_to_struct, 0, db->p_types.nprim,
GFP_ATOMIC | __GFP_ZERO)) {
pr_err("add_type: prealloc type_val_to_struct_array failed\n");
return false;
}
if (flex_array_prealloc(new_val_to_name_types, 0,
db->symtab[SYM_TYPES].nprim,
GFP_ATOMIC | __GFP_ZERO)) {
pr_err("add_type: prealloc val_to_name_types failed\n");
return false;
}
int j;
void *old_elem;
// copy the old data or pointers to new flex arrays
for (j = 0; j < db->type_attr_map_array->total_nr_elements; j++) {
old_elem = flex_array_get(db->type_attr_map_array, j);
if (old_elem)
flex_array_put(new_type_attr_map_array, j, old_elem,
GFP_ATOMIC | __GFP_ZERO);
}
for (j = 0; j < db->type_val_to_struct_array->total_nr_elements; j++) {
old_elem = flex_array_get_ptr(db->type_val_to_struct_array, j);
if (old_elem)
flex_array_put_ptr(new_type_val_to_struct, j, old_elem,
GFP_ATOMIC | __GFP_ZERO);
}
for (j = 0; j < db->symtab[SYM_TYPES].nprim; j++) {
old_elem =
flex_array_get_ptr(db->sym_val_to_name[SYM_TYPES], j);
if (old_elem)
flex_array_put_ptr(new_val_to_name_types, j, old_elem,
GFP_ATOMIC | __GFP_ZERO);
}
// store the pointer of old flex arrays first, when assigning new ones we
// should free it
struct flex_array *old_fa;
old_fa = db->type_attr_map_array;
db->type_attr_map_array = new_type_attr_map_array;
if (old_fa) {
flex_array_free(old_fa);
}
ebitmap_init(flex_array_get(db->type_attr_map_array, value - 1));
ebitmap_set_bit(flex_array_get(db->type_attr_map_array, value - 1),
value - 1, 1);
old_fa = db->type_val_to_struct_array;
db->type_val_to_struct_array = new_type_val_to_struct;
if (old_fa) {
flex_array_free(old_fa);
}
flex_array_put_ptr(db->type_val_to_struct_array, value - 1, type,
GFP_ATOMIC | __GFP_ZERO);
old_fa = db->sym_val_to_name[SYM_TYPES];
db->sym_val_to_name[SYM_TYPES] = new_val_to_name_types;
if (old_fa) {
flex_array_free(old_fa);
}
flex_array_put_ptr(db->sym_val_to_name[SYM_TYPES], value - 1, key,
GFP_ATOMIC | __GFP_ZERO);
int i;
for (i = 0; i < db->p_roles.nprim; ++i) {
ebitmap_set_bit(&db->role_val_to_struct[i]->types, value - 1,
1);
}
return true;
#endif
#else
return false;
#endif
}
static bool set_type_state(struct policydb *db, const char *type_name,
@@ -896,18 +696,7 @@ static bool set_type_state(struct policydb *db, const char *type_name,
static void add_typeattribute_raw(struct policydb *db, struct type_datum *type,
struct type_datum *attr)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
struct ebitmap *sattr = &db->type_attr_map_array[type->value - 1];
#elif defined(CONFIG_IS_HW_HISI)
/*
* HISI_SELINUX_EBITMAP_RO is Huawei's unique features.
*/
struct ebitmap *sattr = &db->type_attr_map[type->value - 1],
HISI_SELINUX_EBITMAP_RO;
#else
struct ebitmap *sattr =
flex_array_get(db->type_attr_map_array, type->value - 1);
#endif
ebitmap_set_bit(sattr, attr->value - 1, 1);
struct hashtab_node *node;

View File

@@ -1,7 +1,7 @@
#ifndef __KSU_H_SEPOLICY
#define __KSU_H_SEPOLICY
#include "linux/types.h"
#include <linux/types.h>
#include "ss/policydb.h"

View File

@@ -1,50 +1,75 @@
#!/bin/sh
set -eux
set -eu
GKI_ROOT=$(pwd)
echo "[+] GKI_ROOT: $GKI_ROOT"
display_usage() {
echo "Usage: $0 [--cleanup | <commit-or-tag>]"
echo " --cleanup: Cleans up previous modifications made by the script."
echo " <commit-or-tag>: Sets up or updates the KernelSU to specified tag or commit."
echo " -h, --help: Displays this usage information."
echo " (no args): Sets up or updates the KernelSU environment to the latest tagged version."
}
if test -d "$GKI_ROOT/common/drivers"; then
DRIVER_DIR="$GKI_ROOT/common/drivers"
elif test -d "$GKI_ROOT/drivers"; then
DRIVER_DIR="$GKI_ROOT/drivers"
initialize_variables() {
if test -d "$GKI_ROOT/common/drivers"; then
DRIVER_DIR="$GKI_ROOT/common/drivers"
elif test -d "$GKI_ROOT/drivers"; then
DRIVER_DIR="$GKI_ROOT/drivers"
else
echo '[ERROR] "drivers/" directory not found.'
exit 127
fi
DRIVER_MAKEFILE=$DRIVER_DIR/Makefile
DRIVER_KCONFIG=$DRIVER_DIR/Kconfig
}
# Reverts modifications made by this script
perform_cleanup() {
echo "[+] Cleaning up..."
[ -L "$DRIVER_DIR/kernelsu" ] && rm "$DRIVER_DIR/kernelsu" && echo "[-] Symlink removed."
grep -q "kernelsu" "$DRIVER_MAKEFILE" && sed -i '/kernelsu/d' "$DRIVER_MAKEFILE" && echo "[-] Makefile reverted."
grep -q "drivers/kernelsu/Kconfig" "$DRIVER_KCONFIG" && sed -i '/drivers\/kernelsu\/Kconfig/d' "$DRIVER_KCONFIG" && echo "[-] Kconfig reverted."
if [ -d "$GKI_ROOT/KernelSU" ]; then
rm -rf "$GKI_ROOT/KernelSU" && echo "[-] KernelSU directory deleted."
fi
}
# Sets up or update KernelSU environment
setup_kernelsu() {
echo "[+] Setting up KernelSU..."
test -d "$GKI_ROOT/KernelSU" || git clone https://github.com/tiann/KernelSU && echo "[+] Repository cloned."
cd "$GKI_ROOT/KernelSU"
git stash && echo "[-] Stashed current changes."
if [ "$(git status | grep -Po 'v\d+(\.\d+)*' | head -n1)" ]; then
git checkout main && echo "[-] Switched to main branch."
fi
git pull && echo "[+] Repository updated."
if [ -z "${1-}" ]; then
git checkout "$(git describe --abbrev=0 --tags)" && echo "[-] Checked out latest tag."
else
git checkout "$1" && echo "[-] Checked out $1." || echo "[-] Checkout default branch"
fi
cd "$DRIVER_DIR"
ln -sf "$(realpath --relative-to="$DRIVER_DIR" "$GKI_ROOT/KernelSU/kernel")" "kernelsu" && echo "[+] Symlink created."
# Add entries in Makefile and Kconfig if not already existing
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "\nobj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE" && echo "[+] Modified Makefile."
grep -q "source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG" && echo "[+] Modified Kconfig."
echo '[+] Done.'
}
# Process command-line arguments
if [ "$#" -eq 0 ]; then
initialize_variables
setup_kernelsu
elif [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
display_usage
elif [ "$1" = "--cleanup" ]; then
initialize_variables
perform_cleanup
else
echo '[ERROR] "drivers/" directory is not found.'
echo '[+] You should modify this script by yourself.'
exit 127
initialize_variables
setup_kernelsu "$@"
fi
test -d "$GKI_ROOT/KernelSU" || git clone https://github.com/tiann/KernelSU
cd "$GKI_ROOT/KernelSU"
git stash
if [ "$(git status | grep -Po 'v\d+(\.\d+)*' | head -n1)" ]; then
git checkout main
fi
git pull
if [ -z "${1-}" ]; then
git checkout "$(git describe --abbrev=0 --tags)"
else
git checkout "$1"
fi
cd "$GKI_ROOT"
echo "[+] GKI_ROOT: $GKI_ROOT"
echo "[+] Copy kernel su driver to $DRIVER_DIR"
cd "$DRIVER_DIR"
if test -d "$GKI_ROOT/common/drivers"; then
ln -sf "../../KernelSU/kernel" "kernelsu"
elif test -d "$GKI_ROOT/drivers"; then
ln -sf "../KernelSU/kernel" "kernelsu"
fi
cd "$GKI_ROOT"
echo '[+] Add kernel su driver to Makefile'
DRIVER_MAKEFILE=$DRIVER_DIR/Makefile
DRIVER_KCONFIG=$DRIVER_DIR/Kconfig
grep -q "kernelsu" "$DRIVER_MAKEFILE" || printf "obj-\$(CONFIG_KSU) += kernelsu/\n" >> "$DRIVER_MAKEFILE"
grep -q "kernelsu" "$DRIVER_KCONFIG" || sed -i "/endmenu/i\\source \"drivers/kernelsu/Kconfig\"" "$DRIVER_KCONFIG"
echo '[+] Done.'

View File

@@ -1,17 +1,16 @@
#include "asm/current.h"
#include "linux/cred.h"
#include "linux/err.h"
#include "linux/fs.h"
#include "linux/kprobes.h"
#include "linux/types.h"
#include "linux/uaccess.h"
#include "linux/version.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include "linux/sched/task_stack.h"
#else
#include "linux/sched.h"
#endif
#include <linux/dcache.h>
#include <linux/security.h>
#include <asm/current.h>
#include <linux/cred.h>
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/kprobes.h>
#include <linux/types.h>
#include <linux/uaccess.h>
#include <linux/version.h>
#include <linux/sched/task_stack.h>
#include "objsec.h"
#include "allowlist.h"
#include "arch.h"
#include "klog.h" // IWYU pragma: keep
@@ -39,8 +38,15 @@ static char __user *sh_user_path(void)
return userspace_stack_buffer(sh_path, sizeof(sh_path));
}
static char __user *ksud_user_path(void)
{
static const char ksud_path[] = KSUD_PATH;
return userspace_stack_buffer(ksud_path, sizeof(ksud_path));
}
int ksu_handle_faccessat(int *dfd, const char __user **filename_user, int *mode,
int *flags)
int *__unused_flags)
{
const char su[] = SU_PATH;
@@ -75,11 +81,12 @@ int ksu_handle_stat(int *dfd, const char __user **filename_user, int *flags)
char path[sizeof(su) + 1];
memset(path, 0, sizeof(path));
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
// Remove this later!! we use syscall hook, so this will never happen!!!!!
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) && 0
// it becomes a `struct filename *` after 5.18
// https://elixir.bootlin.com/linux/v5.18/source/fs/stat.c#L216
const char sh[] = SH_PATH;
struct filename *filename = * ((struct filename **) filename_user);
struct filename *filename = *((struct filename **)filename_user);
if (IS_ERR(filename)) {
return 0;
}
@@ -101,7 +108,8 @@ int ksu_handle_stat(int *dfd, const char __user **filename_user, int *flags)
// the call from execve_handler_pre won't provided correct value for __never_use_argument, use them after fix execve_handler_pre, keeping them for consistence for manually patched code
int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr,
void *__never_use_argv, void *__never_use_envp, int *__never_use_flags)
void *__never_use_argv, void *__never_use_envp,
int *__never_use_flags)
{
struct filename *filename;
const char sh[] = KSUD_PATH;
@@ -129,77 +137,124 @@ int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr,
return 0;
}
#ifdef CONFIG_KPROBES
static int faccessat_handler_pre(struct kprobe *p, struct pt_regs *regs)
int ksu_handle_execve_sucompat(int *fd, const char __user **filename_user,
void *__never_use_argv, void *__never_use_envp,
int *__never_use_flags)
{
int *dfd = (int *)PT_REGS_PARM1(regs);
const char __user **filename_user = (const char **)&PT_REGS_PARM2(regs);
int *mode = (int *)&PT_REGS_PARM3(regs);
// Both sys_ and do_ is C function
int *flags = (int *)&PT_REGS_CCALL_PARM4(regs);
const char su[] = SU_PATH;
char path[sizeof(su) + 1];
return ksu_handle_faccessat(dfd, filename_user, mode, flags);
if (unlikely(!filename_user))
return 0;
memset(path, 0, sizeof(path));
ksu_strncpy_from_user_nofault(path, *filename_user, sizeof(path));
if (likely(memcmp(path, su, sizeof(su))))
return 0;
if (!ksu_is_allow_uid(current_uid().val))
return 0;
pr_info("sys_execve su found\n");
*filename_user = ksud_user_path();
escape_to_root();
return 0;
}
static int newfstatat_handler_pre(struct kprobe *p, struct pt_regs *regs)
int ksu_handle_devpts(struct inode *inode)
{
int *dfd = (int *)&PT_REGS_PARM1(regs);
const char __user **filename_user = (const char **)&PT_REGS_PARM2(regs);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
// static int vfs_statx(int dfd, const char __user *filename, int flags, struct kstat *stat, u32 request_mask)
int *flags = (int *)&PT_REGS_PARM3(regs);
#else
// int vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat,int flag)
int *flags = (int *)&PT_REGS_CCALL_PARM4(regs);
#endif
if (!current->mm) {
return 0;
}
uid_t uid = current_uid().val;
if (uid % 100000 < 10000) {
// not untrusted_app, ignore it
return 0;
}
if (!ksu_is_allow_uid(uid))
return 0;
if (ksu_devpts_sid) {
struct inode_security_struct *sec = selinux_inode(inode);
if (sec) {
sec->sid = ksu_devpts_sid;
}
}
return 0;
}
#ifdef CONFIG_KPROBES
static int sys_faccessat_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
struct pt_regs *real_regs = PT_REAL_REGS(regs);
int *dfd = (int *)&PT_REGS_PARM1(real_regs);
const char __user **filename_user =
(const char **)&PT_REGS_PARM2(real_regs);
int *mode = (int *)&PT_REGS_PARM3(real_regs);
return ksu_handle_faccessat(dfd, filename_user, mode, NULL);
}
static int sys_newfstatat_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
struct pt_regs *real_regs = PT_REAL_REGS(regs);
int *dfd = (int *)&PT_REGS_PARM1(real_regs);
const char __user **filename_user = (const char **)&PT_REGS_PARM2(real_regs);
int *flags = (int *)&PT_REGS_SYSCALL_PARM4(real_regs);
return ksu_handle_stat(dfd, filename_user, flags);
}
// https://elixir.bootlin.com/linux/v5.10.158/source/fs/exec.c#L1864
static int execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
static int sys_execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
int *fd = (int *)&PT_REGS_PARM1(regs);
struct filename **filename_ptr =
(struct filename **)&PT_REGS_PARM2(regs);
struct pt_regs *real_regs = PT_REAL_REGS(regs);
const char __user **filename_user =
(const char **)&PT_REGS_PARM1(real_regs);
return ksu_handle_execveat_sucompat(fd, filename_ptr, NULL, NULL, NULL);
return ksu_handle_execve_sucompat(AT_FDCWD, filename_user, NULL, NULL,
NULL);
}
static struct kprobe faccessat_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
.symbol_name = "do_faccessat",
#else
.symbol_name = "sys_faccessat",
#endif
.pre_handler = faccessat_handler_pre,
.symbol_name = SYS_FACCESSAT_SYMBOL,
.pre_handler = sys_faccessat_handler_pre,
};
static struct kprobe newfstatat_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
.symbol_name = "vfs_statx",
#else
.symbol_name = "vfs_fstatat",
#endif
.pre_handler = newfstatat_handler_pre,
.symbol_name = SYS_NEWFSTATAT_SYMBOL,
.pre_handler = sys_newfstatat_handler_pre,
};
static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
.symbol_name = "__do_execve_file",
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
.symbol_name = "do_execveat_common",
#endif
.pre_handler = execve_handler_pre,
.symbol_name = SYS_EXECVE_SYMBOL,
.pre_handler = sys_execve_handler_pre,
};
static int pts_unix98_lookup_pre(struct kprobe *p, struct pt_regs *regs)
{
struct inode *inode;
struct file *file = (struct file *)PT_REGS_PARM2(regs);
inode = file->f_path.dentry->d_inode;
return ksu_handle_devpts(inode);
}
static struct kprobe pts_unix98_lookup_kp = { .symbol_name =
"pts_unix98_lookup",
.pre_handler =
pts_unix98_lookup_pre };
#endif
// sucompat: permited process can execute 'su' to gain root access.
void ksu_enable_sucompat()
void ksu_sucompat_init()
{
#ifdef CONFIG_KPROBES
int ret;
@@ -209,5 +264,17 @@ void ksu_enable_sucompat()
pr_info("sucompat: newfstatat_kp: %d\n", ret);
ret = register_kprobe(&faccessat_kp);
pr_info("sucompat: faccessat_kp: %d\n", ret);
ret = register_kprobe(&pts_unix98_lookup_kp);
pr_info("sucompat: devpts_kp: %d\n", ret);
#endif
}
void ksu_sucompat_exit()
{
#ifdef CONFIG_KPROBES
unregister_kprobe(&execve_kp);
unregister_kprobe(&newfstatat_kp);
unregister_kprobe(&faccessat_kp);
unregister_kprobe(&pts_unix98_lookup_kp);
#endif
}

378
kernel/throne_tracker.c Normal file
View File

@@ -0,0 +1,378 @@
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/version.h>
#include "allowlist.h"
#include "klog.h" // IWYU pragma: keep
#include "ksu.h"
#include "manager.h"
#include "throne_tracker.h"
#include "kernel_compat.h"
uid_t ksu_manager_uid = KSU_INVALID_UID;
#define SYSTEM_PACKAGES_LIST_PATH "/data/system/packages.list.tmp"
struct uid_data {
struct list_head list;
u32 uid;
char package[KSU_MAX_PACKAGE_NAME];
};
static int get_pkg_from_apk_path(char *pkg, const char *path)
{
int len = strlen(path);
if (len >= KSU_MAX_PACKAGE_NAME || len < 1)
return -1;
const char *last_slash = NULL;
const char *second_last_slash = NULL;
int i;
for (i = len - 1; i >= 0; i--) {
if (path[i] == '/') {
if (!last_slash) {
last_slash = &path[i];
} else {
second_last_slash = &path[i];
break;
}
}
}
if (!last_slash || !second_last_slash)
return -1;
const char *last_hyphen = strchr(second_last_slash, '-');
if (!last_hyphen || last_hyphen > last_slash)
return -1;
int pkg_len = last_hyphen - second_last_slash - 1;
if (pkg_len >= KSU_MAX_PACKAGE_NAME || pkg_len <= 0)
return -1;
// Copying the package name
strncpy(pkg, second_last_slash + 1, pkg_len);
pkg[pkg_len] = '\0';
return 0;
}
static void crown_manager(const char *apk, struct list_head *uid_data)
{
char pkg[KSU_MAX_PACKAGE_NAME];
if (get_pkg_from_apk_path(pkg, apk) < 0) {
pr_err("Failed to get package name from apk path: %s\n", apk);
return;
}
pr_info("manager pkg: %s\n", pkg);
#ifdef KSU_MANAGER_PACKAGE
// pkg is `/<real package>`
if (strncmp(pkg, KSU_MANAGER_PACKAGE, sizeof(KSU_MANAGER_PACKAGE))) {
pr_info("manager package is inconsistent with kernel build: %s\n",
KSU_MANAGER_PACKAGE);
return;
}
#endif
struct list_head *list = (struct list_head *)uid_data;
struct uid_data *np;
list_for_each_entry (np, list, list) {
if (strncmp(np->package, pkg, KSU_MAX_PACKAGE_NAME) == 0) {
pr_info("Crowning manager: %s(uid=%d)\n", pkg, np->uid);
ksu_set_manager_uid(np->uid);
break;
}
}
}
#define DATA_PATH_LEN 384 // 384 is enough for /data/app/<package>/base.apk
struct data_path {
char dirpath[DATA_PATH_LEN];
int depth;
struct list_head list;
};
struct apk_path_hash {
unsigned int hash;
bool exists;
struct list_head list;
};
static struct list_head apk_path_hash_list = LIST_HEAD_INIT(apk_path_hash_list);
struct my_dir_context {
struct dir_context ctx;
struct list_head *data_path_list;
char *parent_dir;
void *private_data;
int depth;
int *stop;
};
// https://docs.kernel.org/filesystems/porting.html
// filldir_t (readdir callbacks) calling conventions have changed. Instead of returning 0 or -E... it returns bool now. false means "no more" (as -E... used to) and true - "keep going" (as 0 in old calling conventions). Rationale: callers never looked at specific -E... values anyway. -> iterate_shared() instances require no changes at all, all filldir_t ones in the tree converted.
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)
#define FILLDIR_RETURN_TYPE bool
#define FILLDIR_ACTOR_CONTINUE true
#define FILLDIR_ACTOR_STOP false
#else
#define FILLDIR_RETURN_TYPE int
#define FILLDIR_ACTOR_CONTINUE 0
#define FILLDIR_ACTOR_STOP -EINVAL
#endif
FILLDIR_RETURN_TYPE my_actor(struct dir_context *ctx, const char *name,
int namelen, loff_t off, u64 ino,
unsigned int d_type)
{
struct my_dir_context *my_ctx =
container_of(ctx, struct my_dir_context, ctx);
char dirpath[DATA_PATH_LEN];
if (!my_ctx) {
pr_err("Invalid context\n");
return FILLDIR_ACTOR_STOP;
}
if (my_ctx->stop && *my_ctx->stop) {
pr_info("Stop searching\n");
return FILLDIR_ACTOR_STOP;
}
if (!strncmp(name, "..", namelen) || !strncmp(name, ".", namelen))
return FILLDIR_ACTOR_CONTINUE; // Skip "." and ".."
if (snprintf(dirpath, DATA_PATH_LEN, "%s/%.*s", my_ctx->parent_dir,
namelen, name) >= DATA_PATH_LEN) {
pr_err("Path too long: %s/%.*s\n", my_ctx->parent_dir, namelen,
name);
return FILLDIR_ACTOR_CONTINUE;
}
if (d_type == DT_DIR && my_ctx->depth > 0 &&
(my_ctx->stop && !*my_ctx->stop)) {
struct data_path *data = kmalloc(sizeof(struct data_path), GFP_ATOMIC);
if (!data) {
pr_err("Failed to allocate memory for %s\n", dirpath);
return FILLDIR_ACTOR_CONTINUE;
}
strscpy(data->dirpath, dirpath, DATA_PATH_LEN);
data->depth = my_ctx->depth - 1;
list_add_tail(&data->list, my_ctx->data_path_list);
} else {
if ((namelen == 8) && (strncmp(name, "base.apk", namelen) == 0)) {
struct apk_path_hash *pos, *n;
unsigned int hash = full_name_hash(NULL, dirpath, strlen(dirpath));
list_for_each_entry(pos, &apk_path_hash_list, list) {
if (hash == pos->hash) {
pos->exists = true;
return FILLDIR_ACTOR_CONTINUE;
}
}
bool is_manager = is_manager_apk(dirpath);
pr_info("Found new base.apk at path: %s, is_manager: %d\n",
dirpath, is_manager);
if (is_manager) {
crown_manager(dirpath, my_ctx->private_data);
*my_ctx->stop = 1;
// Manager found, clear APK cache list
list_for_each_entry_safe(pos, n, &apk_path_hash_list, list) {
list_del(&pos->list);
kfree(pos);
}
} else {
struct apk_path_hash *apk_data = kmalloc(sizeof(struct apk_path_hash), GFP_ATOMIC);
apk_data->hash = hash;
apk_data->exists = true;
list_add_tail(&apk_data->list, &apk_path_hash_list);
}
}
}
return FILLDIR_ACTOR_CONTINUE;
}
void search_manager(const char *path, int depth, struct list_head *uid_data)
{
int i, stop = 0;
struct list_head data_path_list;
INIT_LIST_HEAD(&data_path_list);
// Initialize APK cache list
struct apk_path_hash *pos, *n;
list_for_each_entry(pos, &apk_path_hash_list, list) {
pos->exists = false;
}
// First depth
struct data_path data;
strscpy(data.dirpath, path, DATA_PATH_LEN);
data.depth = depth;
list_add_tail(&data.list, &data_path_list);
for (i = depth; i > 0; i--) {
struct data_path *pos, *n;
list_for_each_entry_safe(pos, n, &data_path_list, list) {
struct my_dir_context ctx = { .ctx.actor = my_actor,
.data_path_list = &data_path_list,
.parent_dir = pos->dirpath,
.private_data = uid_data,
.depth = pos->depth,
.stop = &stop };
struct file *file;
if (!stop) {
file = ksu_filp_open_compat(pos->dirpath, O_RDONLY | O_NOFOLLOW, 0);
if (IS_ERR(file)) {
pr_err("Failed to open directory: %s, err: %ld\n", pos->dirpath, PTR_ERR(file));
goto skip_iterate;
}
iterate_dir(file, &ctx.ctx);
filp_close(file, NULL);
}
skip_iterate:
list_del(&pos->list);
if (pos != &data)
kfree(pos);
}
}
// Remove stale cached APK entries
list_for_each_entry_safe(pos, n, &apk_path_hash_list, list) {
if (!pos->exists) {
list_del(&pos->list);
kfree(pos);
}
}
}
static bool is_uid_exist(uid_t uid, char *package, void *data)
{
struct list_head *list = (struct list_head *)data;
struct uid_data *np;
bool exist = false;
list_for_each_entry (np, list, list) {
if (np->uid == uid % 100000 &&
strncmp(np->package, package, KSU_MAX_PACKAGE_NAME) == 0) {
exist = true;
break;
}
}
return exist;
}
void track_throne()
{
struct file *fp =
ksu_filp_open_compat(SYSTEM_PACKAGES_LIST_PATH, O_RDONLY, 0);
if (IS_ERR(fp)) {
pr_err("%s: open " SYSTEM_PACKAGES_LIST_PATH " failed: %ld\n",
__func__, PTR_ERR(fp));
return;
}
struct list_head uid_list;
INIT_LIST_HEAD(&uid_list);
char chr = 0;
loff_t pos = 0;
loff_t line_start = 0;
char buf[KSU_MAX_PACKAGE_NAME];
for (;;) {
ssize_t count =
ksu_kernel_read_compat(fp, &chr, sizeof(chr), &pos);
if (count != sizeof(chr))
break;
if (chr != '\n')
continue;
count = ksu_kernel_read_compat(fp, buf, sizeof(buf),
&line_start);
struct uid_data *data =
kzalloc(sizeof(struct uid_data), GFP_ATOMIC);
if (!data) {
filp_close(fp, 0);
goto out;
}
char *tmp = buf;
const char *delim = " ";
char *package = strsep(&tmp, delim);
char *uid = strsep(&tmp, delim);
if (!uid || !package) {
pr_err("update_uid: package or uid is NULL!\n");
break;
}
u32 res;
if (kstrtou32(uid, 10, &res)) {
pr_err("update_uid: uid parse err\n");
break;
}
data->uid = res;
strncpy(data->package, package, KSU_MAX_PACKAGE_NAME);
list_add_tail(&data->list, &uid_list);
// reset line start
line_start = pos;
}
filp_close(fp, 0);
// now update uid list
struct uid_data *np;
struct uid_data *n;
// first, check if manager_uid exist!
bool manager_exist = false;
list_for_each_entry (np, &uid_list, list) {
// if manager is installed in work profile, the uid in packages.list is still equals main profile
// don't delete it in this case!
int manager_uid = ksu_get_manager_uid() % 100000;
if (np->uid == manager_uid) {
manager_exist = true;
break;
}
}
if (!manager_exist) {
if (ksu_is_manager_uid_valid()) {
pr_info("manager is uninstalled, invalidate it!\n");
ksu_invalidate_manager_uid();
}
pr_info("Searching manager...\n");
search_manager("/data/app", 2, &uid_list);
pr_info("Search manager finished\n");
}
// then prune the allowlist
ksu_prune_allowlist(is_uid_exist, &uid_list);
out:
// free uid_list
list_for_each_entry_safe (np, n, &uid_list, list) {
list_del(&np->list);
kfree(np);
}
}
void ksu_throne_tracker_init()
{
// nothing to do
}
void ksu_throne_tracker_exit()
{
// nothing to do
}

10
kernel/throne_tracker.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef __KSU_H_UID_OBSERVER
#define __KSU_H_UID_OBSERVER
void ksu_throne_tracker_init();
void ksu_throne_tracker_exit();
void track_throne();
#endif

View File

@@ -1,144 +0,0 @@
#include "linux/err.h"
#include "linux/fs.h"
#include "linux/list.h"
#include "linux/slab.h"
#include "linux/string.h"
#include "linux/types.h"
#include "linux/version.h"
#include "linux/workqueue.h"
#include "allowlist.h"
#include "klog.h" // IWYU pragma: keep
#include "ksu.h"
#include "manager.h"
#include "uid_observer.h"
#include "kernel_compat.h"
#define SYSTEM_PACKAGES_LIST_PATH "/data/system/packages.list"
static struct work_struct ksu_update_uid_work;
struct uid_data {
struct list_head list;
u32 uid;
char package[KSU_MAX_PACKAGE_NAME];
};
static bool is_uid_exist(uid_t uid, char *package, void *data)
{
struct list_head *list = (struct list_head *)data;
struct uid_data *np;
bool exist = false;
list_for_each_entry (np, list, list) {
if (np->uid == uid % 100000 &&
strncmp(np->package, package, KSU_MAX_PACKAGE_NAME) == 0) {
exist = true;
break;
}
}
return exist;
}
static void do_update_uid(struct work_struct *work)
{
struct file *fp =
ksu_filp_open_compat(SYSTEM_PACKAGES_LIST_PATH, O_RDONLY, 0);
if (IS_ERR(fp)) {
pr_err("do_update_uid, open " SYSTEM_PACKAGES_LIST_PATH
" failed: %ld\n",
PTR_ERR(fp));
return;
}
struct list_head uid_list;
INIT_LIST_HEAD(&uid_list);
char chr = 0;
loff_t pos = 0;
loff_t line_start = 0;
char buf[KSU_MAX_PACKAGE_NAME];
for (;;) {
ssize_t count =
ksu_kernel_read_compat(fp, &chr, sizeof(chr), &pos);
if (count != sizeof(chr))
break;
if (chr != '\n')
continue;
count = ksu_kernel_read_compat(fp, buf, sizeof(buf),
&line_start);
struct uid_data *data =
kzalloc(sizeof(struct uid_data), GFP_ATOMIC);
if (!data) {
goto out;
}
char *tmp = buf;
const char *delim = " ";
char *package = strsep(&tmp, delim);
char *uid = strsep(&tmp, delim);
if (!uid || !package) {
pr_err("update_uid: package or uid is NULL!\n");
break;
}
u32 res;
if (kstrtou32(uid, 10, &res)) {
pr_err("update_uid: uid parse err\n");
break;
}
data->uid = res;
strncpy(data->package, package, KSU_MAX_PACKAGE_NAME);
list_add_tail(&data->list, &uid_list);
// reset line start
line_start = pos;
}
// now update uid list
struct uid_data *np;
struct uid_data *n;
// first, check if manager_uid exist!
bool manager_exist = false;
list_for_each_entry (np, &uid_list, list) {
// if manager is installed in work profile, the uid in packages.list is still equals main profile
// don't delete it in this case!
int manager_uid = ksu_get_manager_uid() % 100000;
if (np->uid == manager_uid) {
manager_exist = true;
break;
}
}
if (!manager_exist && ksu_is_manager_uid_valid()) {
pr_info("manager is uninstalled, invalidate it!\n");
ksu_invalidate_manager_uid();
}
// then prune the allowlist
ksu_prune_allowlist(is_uid_exist, &uid_list);
out:
// free uid_list
list_for_each_entry_safe (np, n, &uid_list, list) {
list_del(&np->list);
kfree(np);
}
filp_close(fp, 0);
}
void update_uid()
{
ksu_queue_work(&ksu_update_uid_work);
}
int ksu_uid_observer_init()
{
INIT_WORK(&ksu_update_uid_work, do_update_uid);
return 0;
}
int ksu_uid_observer_exit()
{
return 0;
}

View File

@@ -1,10 +0,0 @@
#ifndef __KSU_H_UID_OBSERVER
#define __KSU_H_UID_OBSERVER
int ksu_uid_observer_init();
int ksu_uid_observer_exit();
void update_uid();
#endif

View File

@@ -3,6 +3,7 @@ import com.android.build.gradle.internal.api.BaseVariantOutputImpl
plugins {
alias(libs.plugins.agp.app)
alias(libs.plugins.kotlin)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.ksp)
alias(libs.plugins.lsplugin.apksign)
id("kotlin-parcelize")
@@ -33,14 +34,11 @@ android {
aidl = true
buildConfig = true
compose = true
prefab = true
}
kotlinOptions {
jvmTarget = "17"
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
jvmTarget = "21"
}
packaging {
@@ -93,12 +91,14 @@ dependencies {
implementation(libs.com.google.accompanist.drawablepainter)
implementation(libs.com.google.accompanist.navigation.animation)
implementation(libs.com.google.accompanist.systemuicontroller)
implementation(libs.com.google.accompanist.webview)
implementation(libs.compose.destinations.animations.core)
ksp(libs.compose.destinations.ksp)
implementation(libs.com.github.topjohnwu.libsu.core)
implementation(libs.com.github.topjohnwu.libsu.service)
implementation(libs.com.github.topjohnwu.libsu.io)
implementation(libs.dev.rikka.rikkax.parcelablelist)
@@ -113,4 +113,7 @@ dependencies {
implementation(libs.sheet.compose.dialogs.input)
implementation(libs.markdown)
}
implementation(libs.androidx.webkit)
implementation(libs.lsposed.cxx)
}

View File

@@ -13,8 +13,9 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/Theme.KernelSU"
tools:targetApi="33">
tools:targetApi="34">
<activity
android:name=".ui.MainActivity"
android:exported="true"
@@ -30,6 +31,12 @@
android:value="" />
</activity>
<activity android:name=".ui.webui.WebUIActivity"
android:autoRemoveFromRecents="true"
android:documentLaunchMode="intoExisting"
android:exported="false"
android:theme="@style/Theme.KernelSU.WebUI" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
@@ -41,4 +48,4 @@
</provider>
</application>
</manifest>
</manifest>

View File

@@ -7,6 +7,9 @@ cmake_minimum_required(VERSION 3.18.1)
project("kernelsu")
find_package(cxx REQUIRED CONFIG)
link_libraries(cxx::cxx)
add_library(kernelsu
SHARED
jni.cc

View File

@@ -46,6 +46,12 @@ Java_me_weishu_kernelsu_Natives_isSafeMode(JNIEnv *env, jclass clazz) {
return is_safe_mode();
}
extern "C"
JNIEXPORT jboolean JNICALL
Java_me_weishu_kernelsu_Natives_isLkmMode(JNIEnv *env, jclass clazz) {
return is_lkm_mode();
}
static void fillIntArray(JNIEnv *env, jobject list, int *data, int count) {
auto cls = env->GetObjectClass(list);
auto add = env->GetMethodID(cls, "add", "(Ljava/lang/Object;)Z");

View File

@@ -47,10 +47,14 @@ bool become_manager(const char* pkg) {
return ksuctl(CMD_BECOME_MANAGER, param, nullptr);
}
// cache the result to avoid unnecessary syscall
static bool is_lkm;
int get_version() {
int32_t version = -1;
if (ksuctl(CMD_GET_VERSION, &version, nullptr)) {
return version;
int32_t lkm = 0;
ksuctl(CMD_GET_VERSION, &version, &lkm);
if (!is_lkm && lkm != 0) {
is_lkm = true;
}
return version;
}
@@ -63,6 +67,11 @@ bool is_safe_mode() {
return ksuctl(CMD_CHECK_SAFEMODE, nullptr, nullptr);
}
bool is_lkm_mode() {
// you should call get_version first!
return is_lkm;
}
bool uid_should_umount(int uid) {
bool should;
return ksuctl(CMD_IS_UID_SHOULD_UMOUNT, reinterpret_cast<void*>(uid), &should) && should;

View File

@@ -17,6 +17,8 @@ bool uid_should_umount(int uid);
bool is_safe_mode();
bool is_lkm_mode();
#define KSU_APP_PROFILE_VER 2
#define KSU_MAX_PACKAGE_NAME 256
// NGROUPS_MAX for Linux is 65535 generally, but we only supports 32 groups.

View File

@@ -5,6 +5,7 @@ import coil.Coil
import coil.ImageLoader
import me.zhanghai.android.appiconloader.coil.AppIconFetcher
import me.zhanghai.android.appiconloader.coil.AppIconKeyer
import java.io.File
lateinit var ksuApp: KernelSUApplication
@@ -24,6 +25,11 @@ class KernelSUApplication : Application() {
}
.build()
)
val webroot = File(dataDir, "webroot")
if (!webroot.exists()) {
webroot.mkdir()
}
}

View File

@@ -18,6 +18,9 @@ object Natives {
// 11071: Fix the issue of failing to set a custom SELinux type.
const val MINIMAL_SUPPORTED_KERNEL = 11071
// 11640: Support query working mode, LKM or GKI
// when MINIMAL_SUPPORTED_KERNEL > 11640, we can remove this constant.
const val MINIMAL_SUPPORTED_KERNEL_LKM = 11648
const val KERNEL_SU_DOMAIN = "u:r:su:s0"
const val ROOT_UID = 0
@@ -39,6 +42,9 @@ object Natives {
val isSafeMode: Boolean
external get
val isLkmMode: Boolean
external get
external fun uidShouldUmount(uid: Int): Boolean
/**

View File

@@ -3,7 +3,6 @@ package me.weishu.kernelsu.ui
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Icon
import androidx.compose.material3.NavigationBar
@@ -20,28 +19,26 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import com.google.accompanist.navigation.animation.rememberAnimatedNavController
import androidx.navigation.compose.rememberNavController
import com.ramcosta.composedestinations.DestinationsNavHost
import com.ramcosta.composedestinations.navigation.popBackStack
import com.ramcosta.composedestinations.utils.isRouteOnBackStackAsState
import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.ksuApp
import me.weishu.kernelsu.ui.component.rememberDialogHostState
import me.weishu.kernelsu.ui.screen.BottomBarDestination
import me.weishu.kernelsu.ui.screen.NavGraphs
import me.weishu.kernelsu.ui.theme.KernelSUTheme
import me.weishu.kernelsu.ui.util.LocalDialogHost
import me.weishu.kernelsu.ui.util.LocalSnackbarHost
import me.weishu.kernelsu.ui.util.rootAvailable
class MainActivity : ComponentActivity() {
@OptIn(ExperimentalAnimationApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
KernelSUTheme {
val navController = rememberAnimatedNavController()
val navController = rememberNavController()
val snackbarHostState = remember { SnackbarHostState() }
Scaffold(
bottomBar = { BottomBar(navController) },
@@ -49,7 +46,6 @@ class MainActivity : ComponentActivity() {
) { innerPadding ->
CompositionLocalProvider(
LocalSnackbarHost provides snackbarHostState,
LocalDialogHost provides rememberDialogHostState(),
) {
DestinationsNavHost(
modifier = Modifier.padding(innerPadding),
@@ -66,9 +62,9 @@ class MainActivity : ComponentActivity() {
@Composable
private fun BottomBar(navController: NavHostController) {
val isManager = Natives.becomeManager(ksuApp.packageName)
val fullFeatured = isManager && !Natives.requireNewKernel()
val fullFeatured = isManager && !Natives.requireNewKernel() && rootAvailable()
NavigationBar(tonalElevation = 8.dp) {
BottomBarDestination.values().forEach { destination ->
BottomBarDestination.entries.forEach { destination ->
if (!fullFeatured && destination.rootRequired) return@forEach
val isCurrentDestOnBackStack by navController.isRouteOnBackStackAsState(destination.direction)
NavigationBarItem(

View File

@@ -17,7 +17,6 @@ import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
@@ -52,11 +51,9 @@ fun AboutCard() {
}
@Composable
fun AboutDialog(showAboutDialog: MutableState<Boolean>) {
if (showAboutDialog.value) {
Dialog(onDismissRequest = { showAboutDialog.value = false }) {
AboutCard()
}
fun AboutDialog(dismiss: () -> Unit) {
Dialog(onDismissRequest = { dismiss() }) {
AboutCard()
}
}

View File

@@ -1,8 +1,10 @@
package me.weishu.kernelsu.ui.component
import android.graphics.text.LineBreaker
import android.os.Parcelable
import android.text.Layout
import android.text.method.LinkMovementMethod
import android.util.Log
import android.view.ViewGroup
import android.widget.TextView
import androidx.compose.foundation.layout.Box
@@ -10,14 +12,10 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.Saver
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.toArgb
@@ -28,48 +26,48 @@ import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import io.noties.markwon.Markwon
import io.noties.markwon.utils.NoCopySpannableFactory
import kotlinx.coroutines.CancellableContinuation
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import me.weishu.kernelsu.ui.util.LocalDialogHost
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.ReceiveChannel
import kotlinx.coroutines.flow.FlowCollector
import kotlinx.coroutines.flow.consumeAsFlow
import kotlinx.coroutines.flow.onEach
import kotlinx.parcelize.Parcelize
import kotlin.coroutines.resume
interface DialogVisuals
private const val TAG = "DialogComponent"
interface LoadingDialogVisuals : DialogVisuals
interface PromptDialogVisuals : DialogVisuals {
interface ConfirmDialogVisuals : Parcelable {
val title: String
val content: String
}
interface ConfirmDialogVisuals : PromptDialogVisuals {
val isMarkdown: Boolean
val confirm: String?
val dismiss: String?
val isMarkdown: Boolean
}
sealed interface DialogData {
val visuals: DialogVisuals
@Parcelize
private data class ConfirmDialogVisualsImpl(
override val title: String,
override val content: String,
override val isMarkdown: Boolean,
override val confirm: String?,
override val dismiss: String?,
) : ConfirmDialogVisuals {
companion object {
val Empty: ConfirmDialogVisuals = ConfirmDialogVisualsImpl("", "", false, null, null)
}
}
interface LoadingDialogData : DialogData {
override val visuals: LoadingDialogVisuals
fun dismiss()
interface DialogHandle {
val isShown: Boolean
val dialogType: String
fun show()
fun hide()
}
interface PromptDialogData : DialogData {
override val visuals: PromptDialogVisuals
fun dismiss()
}
interface ConfirmDialogData : PromptDialogData {
override val visuals: ConfirmDialogVisuals
fun confirm()
interface LoadingDialogHandle : DialogHandle {
suspend fun <R> withLoading(block: suspend () -> R): R
fun showLoading()
}
sealed interface ConfirmResult {
@@ -77,143 +75,313 @@ sealed interface ConfirmResult {
object Canceled : ConfirmResult
}
class DialogHostState {
interface ConfirmDialogHandle : DialogHandle {
val visuals: ConfirmDialogVisuals
private object LoadingDialogVisualsImpl : LoadingDialogVisuals
private data class PromptDialogVisualsImpl(
override val title: String, override val content: String
) : PromptDialogVisuals
private data class ConfirmDialogVisualsImpl(
override val title: String,
override val content: String,
override val confirm: String?,
override val dismiss: String?,
override val isMarkdown: Boolean,
) : ConfirmDialogVisuals
private data class LoadingDialogDataImpl(
override val visuals: LoadingDialogVisuals,
private val continuation: CancellableContinuation<Unit>,
) : LoadingDialogData {
override fun dismiss() {
if (continuation.isActive) continuation.resume(Unit)
}
}
private data class PromptDialogDataImpl(
override val visuals: PromptDialogVisuals,
private val continuation: CancellableContinuation<Unit>,
) : PromptDialogData {
override fun dismiss() {
if (continuation.isActive) continuation.resume(Unit)
}
}
private data class ConfirmDialogDataImpl(
override val visuals: ConfirmDialogVisuals,
private val continuation: CancellableContinuation<ConfirmResult>
) : ConfirmDialogData {
override fun confirm() {
if (continuation.isActive) continuation.resume(ConfirmResult.Confirmed)
}
override fun dismiss() {
if (continuation.isActive) continuation.resume(ConfirmResult.Canceled)
}
}
private val mutex = Mutex()
var currentDialogData by mutableStateOf<DialogData?>(null)
private set
suspend fun showLoading() {
try {
mutex.withLock {
suspendCancellableCoroutine { continuation ->
currentDialogData = LoadingDialogDataImpl(
visuals = LoadingDialogVisualsImpl, continuation = continuation
)
}
}
} finally {
currentDialogData = null
}
}
suspend fun <R> withLoading(block: suspend () -> R) = coroutineScope {
val showLoading = launch {
showLoading()
}
val result = block()
showLoading.cancel()
result
}
suspend fun showPrompt(title: String, content: String) {
try {
mutex.withLock {
suspendCancellableCoroutine { continuation ->
currentDialogData = PromptDialogDataImpl(
visuals = PromptDialogVisualsImpl(title, content),
continuation = continuation
)
}
}
} finally {
currentDialogData = null
}
}
suspend fun showConfirm(
fun showConfirm(
title: String,
content: String,
markdown: Boolean = false,
confirm: String? = null,
dismiss: String? = null
): ConfirmResult = mutex.withLock {
try {
return@withLock suspendCancellableCoroutine { continuation ->
currentDialogData = ConfirmDialogDataImpl(
visuals = ConfirmDialogVisualsImpl(title, content, confirm, dismiss, markdown),
continuation = continuation
)
)
suspend fun awaitConfirm(
title: String,
content: String,
markdown: Boolean = false,
confirm: String? = null,
dismiss: String? = null
): ConfirmResult
}
private abstract class DialogHandleBase(
protected val visible: MutableState<Boolean>,
protected val coroutineScope: CoroutineScope
) : DialogHandle {
override val isShown: Boolean
get() = visible.value
override fun show() {
coroutineScope.launch {
visible.value = true
}
}
final override fun hide() {
coroutineScope.launch {
visible.value = false
}
}
override fun toString(): String {
return dialogType
}
}
private class LoadingDialogHandleImpl(
visible: MutableState<Boolean>,
coroutineScope: CoroutineScope
) : LoadingDialogHandle, DialogHandleBase(visible, coroutineScope) {
override suspend fun <R> withLoading(block: suspend () -> R): R {
return coroutineScope.async {
try {
visible.value = true
block()
} finally {
visible.value = false
}
}.await()
}
override fun showLoading() {
show()
}
override val dialogType: String get() = "LoadingDialog"
}
typealias NullableCallback = (() -> Unit)?
interface ConfirmCallback {
val onConfirm: NullableCallback
val onDismiss: NullableCallback
val isEmpty: Boolean get() = onConfirm == null && onDismiss == null
companion object {
operator fun invoke(onConfirmProvider: () -> NullableCallback, onDismissProvider: () -> NullableCallback): ConfirmCallback {
return object : ConfirmCallback {
override val onConfirm: NullableCallback
get() = onConfirmProvider()
override val onDismiss: NullableCallback
get() = onDismissProvider()
}
} finally {
currentDialogData = null
}
}
}
private class ConfirmDialogHandleImpl(
visible: MutableState<Boolean>,
coroutineScope: CoroutineScope,
callback: ConfirmCallback,
override var visuals: ConfirmDialogVisuals = ConfirmDialogVisualsImpl.Empty,
private val resultFlow: ReceiveChannel<ConfirmResult>
) : ConfirmDialogHandle, DialogHandleBase(visible, coroutineScope) {
private class ResultCollector(
private val callback: ConfirmCallback
) : FlowCollector<ConfirmResult> {
fun handleResult(result: ConfirmResult) {
Log.d(TAG, "handleResult: ${result.javaClass.simpleName}")
when (result) {
ConfirmResult.Confirmed -> onConfirm()
ConfirmResult.Canceled -> onDismiss()
}
}
fun onConfirm() {
callback.onConfirm?.invoke()
}
fun onDismiss() {
callback.onDismiss?.invoke()
}
override suspend fun emit(value: ConfirmResult) {
handleResult(value)
}
}
private val resultCollector = ResultCollector(callback)
private var awaitContinuation: CancellableContinuation<ConfirmResult>? = null
private val isCallbackEmpty = callback.isEmpty
init {
coroutineScope.launch {
resultFlow
.consumeAsFlow()
.onEach { result ->
awaitContinuation?.let {
awaitContinuation = null
if (it.isActive) {
it.resume(result)
}
}
}
.onEach { hide() }
.collect(resultCollector)
}
}
private suspend fun awaitResult(): ConfirmResult {
return suspendCancellableCoroutine {
awaitContinuation = it.apply {
if (isCallbackEmpty) {
invokeOnCancellation {
visible.value = false
}
}
}
}
}
fun updateVisuals(visuals: ConfirmDialogVisuals) {
this.visuals = visuals
}
override fun show() {
if (visuals !== ConfirmDialogVisualsImpl.Empty) {
super.show()
} else {
throw UnsupportedOperationException("can't show confirm dialog with the Empty visuals")
}
}
override fun showConfirm(
title: String,
content: String,
markdown: Boolean,
confirm: String?,
dismiss: String?
) {
coroutineScope.launch {
updateVisuals(ConfirmDialogVisualsImpl(title, content, markdown, confirm, dismiss))
show()
}
}
override suspend fun awaitConfirm(
title: String,
content: String,
markdown: Boolean,
confirm: String?,
dismiss: String?
): ConfirmResult {
coroutineScope.launch {
updateVisuals(ConfirmDialogVisualsImpl(title, content, markdown, confirm, dismiss))
show()
}
return awaitResult()
}
override val dialogType: String get() = "ConfirmDialog"
override fun toString(): String {
return "${super.toString()}(visuals: $visuals)"
}
companion object {
fun Saver(
visible: MutableState<Boolean>,
coroutineScope: CoroutineScope,
callback: ConfirmCallback,
resultChannel: ReceiveChannel<ConfirmResult>
) = Saver<ConfirmDialogHandle, ConfirmDialogVisuals>(
save = {
it.visuals
},
restore = {
Log.d(TAG, "ConfirmDialog restore, visuals: $it")
ConfirmDialogHandleImpl(visible, coroutineScope, callback, it, resultChannel)
}
)
}
}
private class CustomDialogHandleImpl(
visible: MutableState<Boolean>,
coroutineScope: CoroutineScope
) : DialogHandleBase(visible, coroutineScope) {
override val dialogType: String get() = "CustomDialog"
}
@Composable
fun rememberDialogHostState(): DialogHostState {
fun rememberLoadingDialog(): LoadingDialogHandle {
val visible = remember {
mutableStateOf(false)
}
val coroutineScope = rememberCoroutineScope()
if (visible.value) {
LoadingDialog()
}
return remember {
DialogHostState()
}
}
private inline fun <reified T : DialogData> DialogData?.tryInto(): T? {
return when (this) {
is T -> this
else -> null
LoadingDialogHandleImpl(visible, coroutineScope)
}
}
@Composable
fun LoadingDialog(
state: DialogHostState = LocalDialogHost.current,
) {
state.currentDialogData.tryInto<LoadingDialogData>() ?: return
val dialogProperties = remember {
DialogProperties(dismissOnClickOutside = false, dismissOnBackPress = false)
private fun rememberConfirmDialog(visuals: ConfirmDialogVisuals, callback: ConfirmCallback): ConfirmDialogHandle {
val visible = rememberSaveable {
mutableStateOf(false)
}
Dialog(onDismissRequest = {}, properties = dialogProperties) {
val coroutineScope = rememberCoroutineScope()
val resultChannel = remember {
Channel<ConfirmResult>()
}
val handle = rememberSaveable(
saver = ConfirmDialogHandleImpl.Saver(visible, coroutineScope, callback, resultChannel),
init = {
ConfirmDialogHandleImpl(visible, coroutineScope, callback, visuals, resultChannel)
}
)
if (visible.value) {
ConfirmDialog(
handle.visuals,
confirm = { coroutineScope.launch { resultChannel.send(ConfirmResult.Confirmed) } },
dismiss = { coroutineScope.launch { resultChannel.send(ConfirmResult.Canceled) } }
)
}
return handle
}
@Composable
fun rememberConfirmCallback(onConfirm: NullableCallback, onDismiss: NullableCallback): ConfirmCallback {
val currentOnConfirm by rememberUpdatedState(newValue = onConfirm)
val currentOnDismiss by rememberUpdatedState(newValue = onDismiss)
return remember {
ConfirmCallback({ currentOnConfirm }, { currentOnDismiss })
}
}
@Composable
fun rememberConfirmDialog(onConfirm: NullableCallback = null, onDismiss: NullableCallback = null): ConfirmDialogHandle {
return rememberConfirmDialog(rememberConfirmCallback(onConfirm, onDismiss))
}
@Composable
fun rememberConfirmDialog(callback: ConfirmCallback): ConfirmDialogHandle {
return rememberConfirmDialog(ConfirmDialogVisualsImpl.Empty, callback)
}
@Composable
fun rememberCustomDialog(composable: @Composable (dismiss: () -> Unit) -> Unit): DialogHandle {
val visible = rememberSaveable {
mutableStateOf(false)
}
val coroutineScope = rememberCoroutineScope()
if (visible.value) {
composable { visible.value = false }
}
return remember {
CustomDialogHandleImpl(visible, coroutineScope)
}
}
@Composable
private fun LoadingDialog() {
Dialog(
onDismissRequest = {},
properties = DialogProperties(dismissOnClickOutside = false, dismissOnBackPress = false)
) {
Surface(
modifier = Modifier.size(100.dp), shape = RoundedCornerShape(8.dp)
) {
@@ -227,41 +395,10 @@ fun LoadingDialog(
}
@Composable
fun PromptDialog(
state: DialogHostState = LocalDialogHost.current,
) {
val promptDialogData = state.currentDialogData.tryInto<PromptDialogData>() ?: return
val visuals = promptDialogData.visuals
private fun ConfirmDialog(visuals: ConfirmDialogVisuals, confirm: () -> Unit, dismiss: () -> Unit) {
AlertDialog(
onDismissRequest = {
promptDialogData.dismiss()
},
title = {
Text(text = visuals.title)
},
text = {
Text(text = visuals.content)
},
confirmButton = {
TextButton(onClick = { promptDialogData.dismiss() }) {
Text(text = stringResource(id = android.R.string.ok))
}
},
dismissButton = null,
)
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ConfirmDialog(state: DialogHostState = LocalDialogHost.current) {
val confirmDialogData = state.currentDialogData.tryInto<ConfirmDialogData>() ?: return
val visuals = confirmDialogData.visuals
AlertDialog(
onDismissRequest = {
confirmDialogData.dismiss()
dismiss()
},
title = {
Text(text = visuals.title)
@@ -274,17 +411,18 @@ fun ConfirmDialog(state: DialogHostState = LocalDialogHost.current) {
}
},
confirmButton = {
TextButton(onClick = { confirmDialogData.confirm() }) {
TextButton(onClick = confirm) {
Text(text = visuals.confirm ?: stringResource(id = android.R.string.ok))
}
},
dismissButton = {
TextButton(onClick = { confirmDialogData.dismiss() }) {
TextButton(onClick = dismiss) {
Text(text = visuals.dismiss ?: stringResource(id = android.R.string.cancel))
}
},
)
}
@Composable
private fun MarkdownContent(content: String) {
val contentColor = LocalContentColor.current
@@ -307,5 +445,6 @@ private fun MarkdownContent(content: String) {
update = {
Markwon.create(it.context).setMarkdown(it, content)
it.setTextColor(contentColor.toArgb())
})
}
)
}

View File

@@ -10,9 +10,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.outlined.ArrowBack
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@@ -27,7 +27,6 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
@@ -39,7 +38,7 @@ import androidx.compose.ui.unit.dp
private const val TAG = "SearchBar"
@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterial3Api::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SearchAppBar(
title: @Composable () -> Unit,
@@ -115,7 +114,7 @@ fun SearchAppBar(
if (onBackClick != null) {
IconButton(
onClick = onBackClick,
content = { Icon(Icons.Outlined.ArrowBack, null) }
content = { Icon(Icons.AutoMirrored.Outlined.ArrowBack, null) }
)
}
},

View File

@@ -1,11 +1,13 @@
package me.weishu.kernelsu.ui.component
import androidx.compose.foundation.clickable
import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem
import androidx.compose.material3.RadioButton
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
@Composable
@@ -18,6 +20,9 @@ fun SwitchItem(
onCheckedChange: (Boolean) -> Unit
) {
ListItem(
modifier = Modifier.clickable {
onCheckedChange.invoke(!checked)
},
headlineContent = {
Text(title)
},

View File

@@ -22,14 +22,13 @@ import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedCard
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.OutlinedTextFieldDefaults
import androidx.compose.material3.Text
import androidx.compose.material3.TextFieldDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.stringResource
@@ -53,6 +52,7 @@ import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.R
import me.weishu.kernelsu.profile.Capabilities
import me.weishu.kernelsu.profile.Groups
import me.weishu.kernelsu.ui.component.rememberCustomDialog
import me.weishu.kernelsu.ui.util.isSepolicyValid
@OptIn(ExperimentalMaterial3Api::class)
@@ -146,7 +146,7 @@ fun RootProfileConfig(
val selectedGroups = profile.groups.ifEmpty { listOf(0) }.let { e ->
e.mapNotNull { g ->
Groups.values().find { it.gid == g }
Groups.entries.find { it.gid == g }
}
}
GroupsPanel(selectedGroups) {
@@ -159,7 +159,7 @@ fun RootProfileConfig(
}
val selectedCaps = profile.capabilities.mapNotNull { e ->
Capabilities.values().find { it.cap == e }
Capabilities.entries.find { it.cap == e }
}
CapsPanel(selectedCaps) {
@@ -187,18 +187,20 @@ fun RootProfileConfig(
@OptIn(ExperimentalLayoutApi::class)
@Composable
fun GroupsPanel(selected: List<Groups>, closeSelection: (selection: Set<Groups>) -> Unit) {
val selectGroupsDialog = rememberCustomDialog { dismiss: () -> Unit ->
val groups = Groups.entries.toTypedArray().sortedWith(
compareBy<Groups> { if (selected.contains(it)) 0 else 1 }
.then(compareBy {
when (it) {
Groups.ROOT -> 0
Groups.SYSTEM -> 1
Groups.SHELL -> 2
else -> Int.MAX_VALUE
}
})
.then(compareBy { it.name })
var showDialog by remember { mutableStateOf(false) }
if (showDialog) {
val groups = Groups.values().sortedWith(compareBy<Groups> {
when (it) {
Groups.ROOT -> 0
Groups.SYSTEM -> 1
Groups.SHELL -> 2
else -> Int.MAX_VALUE
}
}.then(compareBy { it.name }))
)
val options = groups.map { value ->
ListOption(
titleText = value.display,
@@ -212,7 +214,7 @@ fun GroupsPanel(selected: List<Groups>, closeSelection: (selection: Set<Groups>)
state = rememberUseCaseState(visible = true, onFinishedRequest = {
closeSelection(selection)
}, onCloseRequest = {
showDialog = false
dismiss()
}),
header = Header.Default(
title = stringResource(R.string.profile_groups),
@@ -236,7 +238,7 @@ fun GroupsPanel(selected: List<Groups>, closeSelection: (selection: Set<Groups>)
.fillMaxWidth()
.padding(16.dp)
.clickable {
showDialog = true
selectGroupsDialog.show()
}) {
Column(modifier = Modifier.padding(16.dp)) {
@@ -260,11 +262,11 @@ fun CapsPanel(
selected: Collection<Capabilities>,
closeSelection: (selection: Set<Capabilities>) -> Unit
) {
var showDialog by remember { mutableStateOf(false) }
if (showDialog) {
val caps = Capabilities.values().sortedBy { it.name }
val selectCapabilitiesDialog = rememberCustomDialog { dismiss ->
val caps = Capabilities.entries.toTypedArray().sortedWith(
compareBy<Capabilities> { if (selected.contains(it)) 0 else 1 }
.then(compareBy { it.name })
)
val options = caps.map { value ->
ListOption(
titleText = value.display,
@@ -278,7 +280,7 @@ fun CapsPanel(
state = rememberUseCaseState(visible = true, onFinishedRequest = {
closeSelection(selection)
}, onCloseRequest = {
showDialog = false
dismiss()
}),
header = Header.Default(
title = stringResource(R.string.profile_capabilities),
@@ -301,7 +303,7 @@ fun CapsPanel(
.fillMaxWidth()
.padding(16.dp)
.clickable {
showDialog = true
selectCapabilitiesDialog.show()
}) {
Column(modifier = Modifier.padding(16.dp)) {
@@ -319,7 +321,6 @@ fun CapsPanel(
}
}
@OptIn(ExperimentalComposeUiApi::class)
@Composable
private fun UidPanel(uid: Int, label: String, onUidChange: (Int) -> Unit) {
@@ -369,8 +370,7 @@ private fun SELinuxPanel(
profile: Natives.Profile,
onSELinuxChange: (domain: String, rules: String) -> Unit
) {
var showDialog by remember { mutableStateOf(false) }
if (showDialog) {
val editSELinuxDialog = rememberCustomDialog { dismiss ->
var domain by remember { mutableStateOf(profile.context) }
var rules by remember { mutableStateOf(profile.rules) }
@@ -422,7 +422,7 @@ private fun SELinuxPanel(
onSELinuxChange(domain, rules)
},
onCloseRequest = {
showDialog = false
dismiss()
}),
header = Header.Default(
title = stringResource(R.string.profile_selinux_context),
@@ -441,10 +441,10 @@ private fun SELinuxPanel(
modifier = Modifier
.fillMaxWidth()
.clickable {
showDialog = true
editSELinuxDialog.show()
},
enabled = false,
colors = TextFieldDefaults.outlinedTextFieldColors(
colors = OutlinedTextFieldDefaults.colors(
disabledTextColor = MaterialTheme.colorScheme.onSurface,
disabledBorderColor = MaterialTheme.colorScheme.outline,
disabledPlaceholderColor = MaterialTheme.colorScheme.onSurfaceVariant,

View File

@@ -2,10 +2,10 @@ package me.weishu.kernelsu.ui.component.profile
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ReadMore
import androidx.compose.material.icons.filled.ArrowDropDown
import androidx.compose.material.icons.filled.ArrowDropUp
import androidx.compose.material.icons.filled.Create
import androidx.compose.material.icons.filled.ReadMore
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuBox
@@ -105,7 +105,7 @@ fun TemplateConfig(
IconButton(onClick = {
onViewTemplate(tid)
}) {
Icon(Icons.Filled.ReadMore, null)
Icon(Icons.AutoMirrored.Filled.ReadMore, null)
}
}
)

View File

@@ -15,15 +15,15 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.AccountCircle
import androidx.compose.material.icons.filled.Android
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Security
import androidx.compose.material3.Divider
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FilterChip
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
@@ -183,7 +183,7 @@ private fun AppProfileInner(
} else {
Mode.Custom
}
var mode by remember {
var mode by rememberSaveable {
mutableStateOf(initialMode)
}
ProfileBox(mode, true) {
@@ -246,12 +246,11 @@ private fun TopBar(onBack: () -> Unit) {
navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.Filled.ArrowBack, contentDescription = null) }
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
},
)
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun ProfileBox(
mode: Mode,
@@ -263,7 +262,7 @@ private fun ProfileBox(
supportingContent = { Text(mode.text) },
leadingContent = { Icon(Icons.Filled.AccountCircle, null) },
)
Divider(thickness = Dp.Hairline)
HorizontalDivider(thickness = Dp.Hairline)
ListItem(headlineContent = {
Row(
modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceEvenly

View File

@@ -0,0 +1,238 @@
package me.weishu.kernelsu.ui.screen
import android.net.Uri
import android.os.Environment
import android.os.Parcelable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Save
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExtendedFloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.key
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.KeyEventBlocker
import me.weishu.kernelsu.ui.util.LkmSelection
import me.weishu.kernelsu.ui.util.LocalSnackbarHost
import me.weishu.kernelsu.ui.util.flashModule
import me.weishu.kernelsu.ui.util.installBoot
import me.weishu.kernelsu.ui.util.reboot
import me.weishu.kernelsu.ui.util.restoreBoot
import me.weishu.kernelsu.ui.util.uninstallPermanently
import java.io.File
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
enum class FlashingStatus {
FLASHING,
SUCCESS,
FAILED
}
/**
* @author weishu
* @date 2023/1/1.
*/
@Composable
@Destination
fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) {
var text by rememberSaveable { mutableStateOf("") }
val logContent = rememberSaveable { StringBuilder() }
var showFloatAction by rememberSaveable { mutableStateOf(false) }
val snackBarHost = LocalSnackbarHost.current
val scope = rememberCoroutineScope()
val scrollState = rememberScrollState()
var flashing by rememberSaveable {
mutableStateOf(FlashingStatus.FLASHING)
}
LaunchedEffect(Unit) {
if (text.isNotEmpty()) {
return@LaunchedEffect
}
withContext(Dispatchers.IO) {
flashIt(flashIt, onFinish = { showReboot, code ->
if (code != 0) {
text += "Error: exit code = $code.\nPlease save and check the log.\n"
}
if (showReboot) {
text += "\n\n\n"
showFloatAction = true
}
flashing = if (code == 0) FlashingStatus.SUCCESS else FlashingStatus.FAILED
}, onStdout = {
text += "$it\n"
logContent.append(it).append("\n")
}, onStderr = {
logContent.append(it).append("\n")
})
}
}
Scaffold(
topBar = {
TopBar(
flashing,
onBack = {
navigator.popBackStack()
},
onSave = {
scope.launch {
val format = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault())
val date = format.format(Date())
val file = File(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),
"KernelSU_install_log_${date}.log"
)
file.writeText(logContent.toString())
snackBarHost.showSnackbar("Log saved to ${file.absolutePath}")
}
}
)
},
floatingActionButton = {
if (showFloatAction) {
val reboot = stringResource(id = R.string.reboot)
ExtendedFloatingActionButton(
onClick = {
scope.launch {
withContext(Dispatchers.IO) {
reboot()
}
}
},
icon = { Icon(Icons.Filled.Refresh, reboot) },
text = { Text(text = reboot) },
)
}
}
) { innerPadding ->
KeyEventBlocker {
it.key == Key.VolumeDown || it.key == Key.VolumeUp
}
Column(
modifier = Modifier
.fillMaxSize(1f)
.padding(innerPadding)
.verticalScroll(scrollState),
) {
LaunchedEffect(text) {
scrollState.animateScrollTo(scrollState.maxValue)
}
Text(
modifier = Modifier.padding(8.dp),
text = text,
fontSize = MaterialTheme.typography.bodySmall.fontSize,
fontFamily = FontFamily.Monospace,
lineHeight = MaterialTheme.typography.bodySmall.lineHeight,
)
}
}
}
@Parcelize
sealed class FlashIt : Parcelable {
data class FlashBoot(val boot: Uri? = null, val lkm: LkmSelection, val ota: Boolean) :
FlashIt()
data class FlashModule(val uri: Uri) : FlashIt()
data object FlashRestore : FlashIt()
data object FlashUninstall : FlashIt()
}
fun flashIt(
flashIt: FlashIt, onFinish: (Boolean, Int) -> Unit,
onStdout: (String) -> Unit,
onStderr: (String) -> Unit
) {
when (flashIt) {
is FlashIt.FlashBoot -> installBoot(
flashIt.boot,
flashIt.lkm,
flashIt.ota,
onFinish,
onStdout,
onStderr
)
is FlashIt.FlashModule -> flashModule(flashIt.uri, onFinish, onStdout, onStderr)
FlashIt.FlashRestore -> restoreBoot(onFinish, onStdout, onStderr)
FlashIt.FlashUninstall -> uninstallPermanently(onFinish, onStdout, onStderr)
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun TopBar(status: FlashingStatus, onBack: () -> Unit = {}, onSave: () -> Unit = {}) {
TopAppBar(
title = {
Text(
stringResource(
when (status) {
FlashingStatus.FLASHING -> R.string.flashing
FlashingStatus.SUCCESS -> R.string.flash_success
FlashingStatus.FAILED -> R.string.flash_failed
}
)
)
},
navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
},
actions = {
IconButton(onClick = onSave) {
Icon(
imageVector = Icons.Filled.Save,
contentDescription = "Localized description"
)
}
}
)
}
@Preview
@Composable
fun InstallPreview() {
InstallScreen(EmptyDestinationsNavigator)
}

View File

@@ -5,11 +5,13 @@ import android.os.Build
import android.os.PowerManager
import android.system.Os
import androidx.annotation.StringRes
import androidx.compose.animation.*
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Archive
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material.icons.outlined.Block
@@ -29,22 +31,26 @@ import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.annotation.RootNavGraph
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import me.weishu.kernelsu.*
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.ConfirmDialog
import me.weishu.kernelsu.ui.component.ConfirmResult
import me.weishu.kernelsu.ui.component.rememberConfirmDialog
import me.weishu.kernelsu.ui.screen.destinations.InstallScreenDestination
import me.weishu.kernelsu.ui.screen.destinations.SettingScreenDestination
import me.weishu.kernelsu.ui.util.*
import me.weishu.kernelsu.ui.util.module.LatestVersionInfo
@RootNavGraph(start = true)
@Destination
@Composable
fun HomeScreen(navigator: DestinationsNavigator) {
val kernelVersion = getKernelVersion()
Scaffold(topBar = {
TopBar(onSettingsClick = {
TopBar(kernelVersion, onSettingsClick = {
navigator.navigate(SettingScreenDestination)
}, onInstallClick = {
navigator.navigate(InstallScreenDestination)
})
}) { innerPadding ->
Column(
@@ -54,14 +60,18 @@ fun HomeScreen(navigator: DestinationsNavigator) {
.verticalScroll(rememberScrollState()),
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
val kernelVersion = getKernelVersion()
val isManager = Natives.becomeManager(ksuApp.packageName)
SideEffect {
if (isManager) install()
}
val ksuVersion = if (isManager) Natives.version else null
val lkmMode = ksuVersion?.let {
if (it >= Natives.MINIMAL_SUPPORTED_KERNEL_LKM && kernelVersion.isGKI()) Natives.isLkmMode else null
}
StatusCard(kernelVersion, ksuVersion)
StatusCard(kernelVersion, ksuVersion, lkmMode) {
navigator.navigate(InstallScreenDestination)
}
if (isManager && Natives.requireNewKernel()) {
WarningCard(
stringResource(id = R.string.require_kernel_version).format(
@@ -69,12 +79,21 @@ fun HomeScreen(navigator: DestinationsNavigator) {
)
)
}
UpdateCard()
if (ksuVersion != null && !rootAvailable()) {
WarningCard(
stringResource(id = R.string.grant_root_failed)
)
}
val checkUpdate =
LocalContext.current.getSharedPreferences("settings", Context.MODE_PRIVATE)
.getBoolean("check_update", true)
if (checkUpdate) {
UpdateCard()
}
InfoCard()
DonateCard()
LearnMoreCard()
Spacer(Modifier)
ConfirmDialog()
}
}
}
@@ -82,35 +101,42 @@ fun HomeScreen(navigator: DestinationsNavigator) {
@Composable
fun UpdateCard() {
val context = LocalContext.current
val newVersion by produceState(initialValue = Triple(0, "", "")) {
value = withContext(Dispatchers.IO) { checkNewVersion() }
}
val currentVersionCode = getManagerVersion(context).second
val newVersionCode = newVersion.first
val newVersionUrl = newVersion.second
val changelog = newVersion.third
if (newVersionCode <= currentVersionCode) {
return
val latestVersionInfo = LatestVersionInfo()
val newVersion by produceState(initialValue = latestVersionInfo) {
value = withContext(Dispatchers.IO){
checkNewVersion()
}
}
val currentVersionCode = getManagerVersion(context).second
val newVersionCode = newVersion.versionCode
val newVersionUrl = newVersion.downloadUrl
val changelog = newVersion.changelog
val uriHandler = LocalUriHandler.current
val dialogHost = LocalDialogHost.current
val title = stringResource(id = R.string.module_changelog)
val updateText = stringResource(id = R.string.module_update)
val scope = rememberCoroutineScope()
WarningCard(
message = stringResource(id = R.string.new_version_available).format(newVersionCode),
MaterialTheme.colorScheme.outlineVariant
AnimatedVisibility(
visible = newVersionCode > currentVersionCode,
enter = fadeIn() + expandVertically(),
exit = shrinkVertically() + fadeOut()
) {
scope.launch {
if (changelog.isEmpty() || dialogHost.showConfirm(
val updateDialog = rememberConfirmDialog(onConfirm = { uriHandler.openUri(newVersionUrl) })
WarningCard(
message = stringResource(id = R.string.new_version_available).format(newVersionCode),
MaterialTheme.colorScheme.outlineVariant
) {
if (changelog.isEmpty()) {
uriHandler.openUri(newVersionUrl)
} else {
updateDialog.showConfirm(
title = title,
content = changelog,
markdown = true,
confirm = updateText,
) == ConfirmResult.Confirmed
) {
uriHandler.openUri(newVersionUrl)
confirm = updateText
)
}
}
}
@@ -127,8 +153,21 @@ fun RebootDropdownItem(@StringRes id: Int, reason: String = "") {
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun TopBar(onSettingsClick: () -> Unit) {
private fun TopBar(
kernelVersion: KernelVersion,
onInstallClick: () -> Unit,
onSettingsClick: () -> Unit
) {
TopAppBar(title = { Text(stringResource(R.string.app_name)) }, actions = {
if (kernelVersion.isGKI()) {
IconButton(onClick = onInstallClick) {
Icon(
imageVector = Icons.Filled.Archive,
contentDescription = stringResource(id = R.string.install)
)
}
}
var showDropdown by remember { mutableStateOf(false) }
IconButton(onClick = {
showDropdown = true
@@ -166,33 +205,46 @@ private fun TopBar(onSettingsClick: () -> Unit) {
}
@Composable
private fun StatusCard(kernelVersion: KernelVersion, ksuVersion: Int?) {
private fun StatusCard(
kernelVersion: KernelVersion,
ksuVersion: Int?,
lkmMode: Boolean?,
onClickInstall: () -> Unit = {}
) {
ElevatedCard(
colors = CardDefaults.elevatedCardColors(containerColor = run {
if (ksuVersion != null) MaterialTheme.colorScheme.secondaryContainer
else MaterialTheme.colorScheme.errorContainer
})
) {
val uriHandler = LocalUriHandler.current
Row(modifier = Modifier
.fillMaxWidth()
.clickable {
if (kernelVersion.isGKI() && ksuVersion == null) {
uriHandler.openUri("https://kernelsu.org/guide/installation.html")
if (kernelVersion.isGKI()) {
onClickInstall()
}
}
.padding(24.dp), verticalAlignment = Alignment.CenterVertically) {
when {
ksuVersion != null -> {
val appendText = if (Natives.isSafeMode) {
" [${stringResource(id = R.string.safe_mode)}]"
} else {
""
val safeMode = when {
Natives.isSafeMode -> " [${stringResource(id = R.string.safe_mode)}]"
else -> ""
}
val workingMode = when (lkmMode) {
null -> ""
true -> " <LKM>"
else -> " <GKI>"
}
val workingText =
"${stringResource(id = R.string.home_working)}$workingMode$safeMode"
Icon(Icons.Outlined.CheckCircle, stringResource(R.string.home_working))
Column(Modifier.padding(start = 20.dp)) {
Text(
text = stringResource(R.string.home_working) + appendText,
text = workingText,
style = MaterialTheme.typography.titleMedium
)
Spacer(Modifier.height(4.dp))
@@ -283,7 +335,7 @@ fun LearnMoreCard() {
uriHandler.openUri(url)
}
.padding(24.dp), verticalAlignment = Alignment.CenterVertically) {
Column() {
Column {
Text(
text = stringResource(R.string.home_learn_kernelsu),
style = MaterialTheme.typography.titleSmall
@@ -310,7 +362,7 @@ fun DonateCard() {
uriHandler.openUri("https://patreon.com/weishu")
}
.padding(24.dp), verticalAlignment = Alignment.CenterVertically) {
Column() {
Column {
Text(
text = stringResource(R.string.home_support_title),
style = MaterialTheme.typography.titleSmall
@@ -364,17 +416,18 @@ private fun InfoCard() {
}
fun getManagerVersion(context: Context): Pair<String, Int> {
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
return Pair(packageInfo.versionName, packageInfo.versionCode)
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)!!
return Pair(packageInfo.versionName!!, packageInfo.versionCode)
}
@Preview
@Composable
private fun StatusCardPreview() {
Column {
StatusCard(KernelVersion(5, 10, 101), 1)
StatusCard(KernelVersion(5, 10, 101), null)
StatusCard(KernelVersion(4, 10, 101), null)
StatusCard(KernelVersion(5, 10, 101), 1, null)
StatusCard(KernelVersion(5, 10, 101), 20000, true)
StatusCard(KernelVersion(5, 10, 101), null, true)
StatusCard(KernelVersion(4, 10, 101), null, false)
}
}

View File

@@ -1,160 +1,311 @@
package me.weishu.kernelsu.ui.screen
import android.app.Activity
import android.content.Intent
import android.net.Uri
import android.os.Environment
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.StringRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Save
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.FileUpload
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.RadioButton
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.produceState
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.key
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.maxkeppeker.sheets.core.models.base.Header
import com.maxkeppeker.sheets.core.models.base.rememberUseCaseState
import com.maxkeppeler.sheets.list.ListDialog
import com.maxkeppeler.sheets.list.models.ListOption
import com.maxkeppeler.sheets.list.models.ListSelection
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.KeyEventBlocker
import me.weishu.kernelsu.ui.util.LocalSnackbarHost
import me.weishu.kernelsu.ui.util.installModule
import me.weishu.kernelsu.ui.util.reboot
import java.io.File
import java.text.SimpleDateFormat
import java.util.*
import me.weishu.kernelsu.ui.component.DialogHandle
import me.weishu.kernelsu.ui.component.rememberConfirmDialog
import me.weishu.kernelsu.ui.component.rememberCustomDialog
import me.weishu.kernelsu.ui.screen.destinations.FlashScreenDestination
import me.weishu.kernelsu.ui.util.LkmSelection
import me.weishu.kernelsu.ui.util.getCurrentKmi
import me.weishu.kernelsu.ui.util.getSupportedKmis
import me.weishu.kernelsu.ui.util.isAbDevice
import me.weishu.kernelsu.ui.util.isInitBoot
import me.weishu.kernelsu.ui.util.rootAvailable
/**
* @author weishu
* @date 2023/1/1.
* @date 2024/3/12.
*/
@OptIn(ExperimentalComposeUiApi::class)
@Composable
@Destination
fun InstallScreen(navigator: DestinationsNavigator, uri: Uri) {
@Composable
fun InstallScreen(navigator: DestinationsNavigator) {
var installMethod by remember {
mutableStateOf<InstallMethod?>(null)
}
var text by rememberSaveable { mutableStateOf("") }
val logContent = StringBuilder()
var showFloatAction by rememberSaveable { mutableStateOf(false) }
var lkmSelection by remember {
mutableStateOf<LkmSelection>(LkmSelection.KmiNone)
}
val snackBarHost = LocalSnackbarHost.current
val scope = rememberCoroutineScope()
val scrollState = rememberScrollState()
LaunchedEffect(Unit) {
if (text.isNotEmpty()) {
return@LaunchedEffect
}
withContext(Dispatchers.IO) {
installModule(uri, onFinish = { success ->
if (success) {
showFloatAction = true
}
}, onStdout = {
text += "$it\n"
scope.launch {
scrollState.animateScrollTo(scrollState.maxValue)
}
logContent.append(it).append("\n")
}, onStderr = {
logContent.append(it).append("\n")
});
val onInstall = {
installMethod?.let { method ->
val flashIt = FlashIt.FlashBoot(
boot = if (method is InstallMethod.SelectFile) method.uri else null,
lkm = lkmSelection,
ota = method is InstallMethod.DirectInstallToInactiveSlot
)
navigator.navigate(FlashScreenDestination(flashIt))
}
}
Scaffold(
topBar = {
TopBar(
onBack = {
navigator.popBackStack()
},
onSave = {
scope.launch {
val format = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault())
val date = format.format(Date())
val file = File(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),
"KernelSU_install_log_${date}.log"
)
file.writeText(logContent.toString())
snackBarHost.showSnackbar("Log saved to ${file.absolutePath}")
}
val currentKmi by produceState(initialValue = "") { value = getCurrentKmi() }
val selectKmiDialog = rememberSelectKmiDialog { kmi ->
kmi?.let {
lkmSelection = LkmSelection.KmiString(it)
onInstall()
}
}
val onClickNext = {
if (lkmSelection == LkmSelection.KmiNone && currentKmi.isBlank()) {
// no lkm file selected and cannot get current kmi
selectKmiDialog.show()
} else {
onInstall()
}
}
val selectLkmLauncher =
rememberLauncherForActivityResult(contract = ActivityResultContracts.StartActivityForResult()) {
if (it.resultCode == Activity.RESULT_OK) {
it.data?.data?.let { uri ->
lkmSelection = LkmSelection.LkmUri(uri)
}
)
},
floatingActionButton = {
if (showFloatAction) {
val reboot = stringResource(id = R.string.reboot)
ExtendedFloatingActionButton(
onClick = {
scope.launch {
withContext(Dispatchers.IO) {
reboot()
}
}
},
icon = { Icon(Icons.Filled.Refresh, reboot) },
text = { Text(text = reboot) },
)
}
}
val onLkmUpload = {
selectLkmLauncher.launch(Intent(Intent.ACTION_GET_CONTENT).apply {
type = "application/octet-stream"
})
}
Scaffold(topBar = {
TopBar(
onBack = { navigator.popBackStack() }, onLkmUpload = onLkmUpload
)
}) {
Column(modifier = Modifier.padding(it)) {
SelectInstallMethod { method ->
installMethod = method
}
Column(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp)
) {
(lkmSelection as? LkmSelection.LkmUri)?.let {
Text(
stringResource(
id = R.string.selected_lkm,
it.uri.lastPathSegment ?: "(file)"
)
)
}
Button(modifier = Modifier.fillMaxWidth(),
enabled = installMethod != null,
onClick = {
onClickNext()
}) {
Text(
stringResource(id = R.string.install_next),
fontSize = MaterialTheme.typography.bodyMedium.fontSize
)
}
}
}
) { innerPadding ->
KeyEventBlocker {
it.key == Key.VolumeDown || it.key == Key.VolumeUp
}
}
sealed class InstallMethod {
data class SelectFile(
val uri: Uri? = null,
@StringRes override val label: Int = R.string.select_file,
override val summary: String?
) : InstallMethod()
data object DirectInstall : InstallMethod() {
override val label: Int
get() = R.string.direct_install
}
data object DirectInstallToInactiveSlot : InstallMethod() {
override val label: Int
get() = R.string.install_inactive_slot
}
abstract val label: Int
open val summary: String? = null
}
@Composable
private fun SelectInstallMethod(onSelected: (InstallMethod) -> Unit = {}) {
val rootAvailable = rootAvailable()
val isAbDevice = isAbDevice()
val selectFileTip = stringResource(
id = R.string.select_file_tip, if (isInitBoot()) "init_boot" else "boot"
)
val radioOptions =
mutableListOf<InstallMethod>(InstallMethod.SelectFile(summary = selectFileTip))
if (rootAvailable) {
radioOptions.add(InstallMethod.DirectInstall)
if (isAbDevice) {
radioOptions.add(InstallMethod.DirectInstallToInactiveSlot)
}
Column(
modifier = Modifier
.fillMaxSize(1f)
.padding(innerPadding)
.verticalScroll(scrollState),
) {
Text(
modifier = Modifier.padding(8.dp),
text = text,
fontSize = MaterialTheme.typography.bodySmall.fontSize,
fontFamily = FontFamily.Monospace,
lineHeight = MaterialTheme.typography.bodySmall.lineHeight,
)
}
var selectedOption by remember { mutableStateOf<InstallMethod?>(null) }
val selectImageLauncher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.StartActivityForResult()
) {
if (it.resultCode == Activity.RESULT_OK) {
it.data?.data?.let { uri ->
val option = InstallMethod.SelectFile(uri, summary = selectFileTip)
selectedOption = option
onSelected(option)
}
}
}
val confirmDialog = rememberConfirmDialog(onConfirm = {
selectedOption = InstallMethod.DirectInstallToInactiveSlot
onSelected(InstallMethod.DirectInstallToInactiveSlot)
}, onDismiss = null)
val dialogTitle = stringResource(id = android.R.string.dialog_alert_title)
val dialogContent = stringResource(id = R.string.install_inactive_slot_warning)
val onClick = { option: InstallMethod ->
when (option) {
is InstallMethod.SelectFile -> {
selectImageLauncher.launch(Intent(Intent.ACTION_GET_CONTENT).apply {
type = "application/octet-stream"
})
}
is InstallMethod.DirectInstall -> {
selectedOption = option
onSelected(option)
}
is InstallMethod.DirectInstallToInactiveSlot -> {
confirmDialog.showConfirm(dialogTitle, dialogContent)
}
}
}
Column {
radioOptions.forEach { option ->
Row(verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.clickable {
onClick(option)
}) {
RadioButton(selected = option.javaClass == selectedOption?.javaClass, onClick = {
onClick(option)
})
Column {
Text(
text = stringResource(id = option.label),
fontSize = MaterialTheme.typography.titleMedium.fontSize,
fontFamily = MaterialTheme.typography.titleMedium.fontFamily,
fontStyle = MaterialTheme.typography.titleMedium.fontStyle
)
option.summary?.let {
Text(
text = it,
fontSize = MaterialTheme.typography.bodySmall.fontSize,
fontFamily = MaterialTheme.typography.bodySmall.fontFamily,
fontStyle = MaterialTheme.typography.bodySmall.fontStyle
)
}
}
}
}
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun TopBar(onBack: () -> Unit = {}, onSave: () -> Unit = {}) {
TopAppBar(
title = { Text(stringResource(R.string.install)) },
navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.Filled.ArrowBack, contentDescription = null) }
},
actions = {
IconButton(onClick = onSave) {
Icon(
imageVector = Icons.Filled.Save,
contentDescription = "Localized description"
)
}
fun rememberSelectKmiDialog(onSelected: (String?) -> Unit): DialogHandle {
return rememberCustomDialog { dismiss ->
val supportedKmi by produceState(initialValue = emptyList<String>()) {
value = getSupportedKmis()
}
)
val options = supportedKmi.map { value ->
ListOption(
titleText = value
)
}
var selection by remember { mutableStateOf<String?>(null) }
ListDialog(state = rememberUseCaseState(visible = true, onFinishedRequest = {
onSelected(selection)
}, onCloseRequest = {
dismiss()
}), header = Header.Default(
title = stringResource(R.string.select_kmi),
), selection = ListSelection.Single(
showRadioButtons = true,
options = options,
) { _, option ->
selection = option.titleText
})
}
}
@Preview
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun InstallPreview() {
// InstallScreen(DestinationsNavigator(), uri = Uri.EMPTY)
private fun TopBar(onBack: () -> Unit = {}, onLkmUpload: () -> Unit = {}) {
TopAppBar(title = { Text(stringResource(R.string.install)) }, navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
}, actions = {
IconButton(onClick = onLkmUpload) {
Icon(Icons.Filled.FileUpload, contentDescription = null)
}
})
}
@Composable
@Preview
fun SelectInstall_Preview() {
InstallScreen(EmptyDestinationsNavigator)
}

View File

@@ -7,7 +7,18 @@ import android.util.Log
import android.widget.Toast
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -17,9 +28,29 @@ import androidx.compose.material.icons.filled.Add
import androidx.compose.material.pullrefresh.PullRefreshIndicator
import androidx.compose.material.pullrefresh.pullRefresh
import androidx.compose.material.pullrefresh.rememberPullRefreshState
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.material3.Button
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.ElevatedCard
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExtendedFloatingActionButton
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarResult
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.produceState
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
@@ -39,18 +70,26 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.ConfirmDialog
import me.weishu.kernelsu.ui.component.ConfirmResult
import me.weishu.kernelsu.ui.component.LoadingDialog
import me.weishu.kernelsu.ui.screen.destinations.InstallScreenDestination
import me.weishu.kernelsu.ui.util.*
import me.weishu.kernelsu.ui.component.rememberConfirmDialog
import me.weishu.kernelsu.ui.component.rememberLoadingDialog
import me.weishu.kernelsu.ui.screen.destinations.FlashScreenDestination
import me.weishu.kernelsu.ui.util.DownloadListener
import me.weishu.kernelsu.ui.util.LocalSnackbarHost
import me.weishu.kernelsu.ui.util.download
import me.weishu.kernelsu.ui.util.hasMagisk
import me.weishu.kernelsu.ui.util.reboot
import me.weishu.kernelsu.ui.util.toggleModule
import me.weishu.kernelsu.ui.util.uninstallModule
import me.weishu.kernelsu.ui.viewmodel.ModuleViewModel
import me.weishu.kernelsu.ui.webui.WebUIActivity
import okhttp3.OkHttpClient
@Destination
@Composable
fun ModuleScreen(navigator: DestinationsNavigator) {
val viewModel = viewModel<ModuleViewModel>()
val context = LocalContext.current
LaunchedEffect(Unit) {
if (viewModel.moduleList.isEmpty() || viewModel.isNeedRefresh) {
@@ -79,7 +118,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
val data = it.data ?: return@rememberLauncherForActivityResult
val uri = data.data ?: return@rememberLauncherForActivityResult
navigator.navigate(InstallScreenDestination(uri))
navigator.navigate(FlashScreenDestination(FlashIt.FlashModule(uri)))
viewModel.markNeedRefresh()
@@ -99,10 +138,6 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
}
}) { innerPadding ->
ConfirmDialog()
LoadingDialog()
when {
hasMagisk -> {
Box(
@@ -122,10 +157,19 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
ModuleList(
viewModel = viewModel, modifier = Modifier
.padding(innerPadding)
.fillMaxSize()
) {
navigator.navigate(InstallScreenDestination(it))
}
.fillMaxSize(),
onInstallModule =
{
navigator.navigate(FlashScreenDestination(FlashIt.FlashModule(it)))
}, onClickModule = { id, name, hasWebUi ->
if (hasWebUi) {
context.startActivity(Intent(context, WebUIActivity::class.java)
.setData(Uri.parse("kernelsu://webui/$id"))
.putExtra("id", id)
.putExtra("name", name)
)
}
})
}
}
}
@@ -134,7 +178,10 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
@OptIn(ExperimentalMaterialApi::class)
@Composable
private fun ModuleList(
viewModel: ModuleViewModel, modifier: Modifier = Modifier, onInstallModule: (Uri) -> Unit
viewModel: ModuleViewModel,
modifier: Modifier = Modifier,
onInstallModule: (Uri) -> Unit,
onClickModule: (id: String, name: String, hasWebUi: Boolean) -> Unit
) {
val failedEnable = stringResource(R.string.module_failed_to_enable)
val failedDisable = stringResource(R.string.module_failed_to_disable)
@@ -152,17 +199,19 @@ private fun ModuleList(
val startDownloadingText = stringResource(R.string.module_start_downloading)
val fetchChangeLogFailed = stringResource(R.string.module_changelog_failed)
val dialogHost = LocalDialogHost.current
val snackBarHost = LocalSnackbarHost.current
val context = LocalContext.current
val loadingDialog = rememberLoadingDialog()
val confirmDialog = rememberConfirmDialog()
suspend fun onModuleUpdate(
module: ModuleViewModel.ModuleInfo,
changelogUrl: String,
downloadUrl: String,
fileName: String
) {
val changelogResult = dialogHost.withLoading {
val changelogResult = loadingDialog.withLoading {
withContext(Dispatchers.IO) {
runCatching {
OkHttpClient().newCall(
@@ -172,7 +221,7 @@ private fun ModuleList(
}
}
val showToast: suspend (String) -> Unit = {msg->
val showToast: suspend (String) -> Unit = { msg ->
withContext(Dispatchers.Main) {
Toast.makeText(
context,
@@ -191,7 +240,7 @@ private fun ModuleList(
}
// changelog is not empty, show it and wait for confirm
val confirmResult = dialogHost.showConfirm(
val confirmResult = confirmDialog.awaitConfirm(
changelogText,
content = changelog,
markdown = true,
@@ -222,7 +271,7 @@ private fun ModuleList(
}
suspend fun onModuleUninstall(module: ModuleViewModel.ModuleInfo) {
val confirmResult = dialogHost.showConfirm(
val confirmResult = confirmDialog.awaitConfirm(
moduleStr,
content = moduleUninstallConfirm.format(module.name),
confirm = uninstall,
@@ -232,7 +281,7 @@ private fun ModuleList(
return
}
val success = dialogHost.withLoading {
val success = loadingDialog.withLoading {
withContext(Dispatchers.IO) {
uninstallModule(module.id)
}
@@ -317,7 +366,7 @@ private fun ModuleList(
scope.launch { onModuleUninstall(module) }
}, onCheckChanged = {
scope.launch {
val success = dialogHost.withLoading {
val success = loadingDialog.withLoading {
withContext(Dispatchers.IO) {
toggleModule(module.id, !isChecked)
}
@@ -346,6 +395,8 @@ private fun ModuleList(
"${module.name}-${updatedModule.second}.zip"
)
}
}, onClick = {
onClickModule(it.id, it.name, it.hasWebUi)
})
// fix last item shadow incomplete in LazyColumn
@@ -379,6 +430,7 @@ private fun ModuleItem(
onUninstall: (ModuleViewModel.ModuleInfo) -> Unit,
onCheckChanged: (Boolean) -> Unit,
onUpdate: (ModuleViewModel.ModuleInfo) -> Unit,
onClick: (ModuleViewModel.ModuleInfo) -> Unit
) {
ElevatedCard(
modifier = Modifier.fillMaxWidth(),
@@ -387,7 +439,7 @@ private fun ModuleItem(
val textDecoration = if (!module.remove) null else TextDecoration.LineThrough
Column(modifier = Modifier.padding(24.dp, 16.dp, 24.dp, 0.dp)) {
Column(modifier = Modifier.clickable { onClick(module) }.padding(24.dp, 16.dp, 24.dp, 0.dp)) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
@@ -452,7 +504,7 @@ private fun ModuleItem(
Spacer(modifier = Modifier.height(16.dp))
Divider(thickness = Dp.Hairline)
HorizontalDivider(thickness = Dp.Hairline)
Row(
horizontalArrangement = Arrangement.SpaceBetween,
@@ -487,6 +539,18 @@ private fun ModuleItem(
text = stringResource(R.string.uninstall),
)
}
if (module.hasWebUi) {
TextButton(
onClick = { onClick(module) },
) {
Text(
fontFamily = MaterialTheme.typography.labelMedium.fontFamily,
fontSize = MaterialTheme.typography.labelMedium.fontSize,
text = stringResource(R.string.open),
)
}
}
}
}
}
@@ -505,7 +569,8 @@ fun ModuleItemPreview() {
enabled = true,
update = true,
remove = true,
updateJson = ""
updateJson = "",
hasWebUi = false,
)
ModuleItem(module, true, "", {}, {}, {})
ModuleItem(module, true, "", {}, {}, {}, {})
}

View File

@@ -1,24 +1,69 @@
package me.weishu.kernelsu.ui.screen
import android.content.ContentResolver
import android.content.Context
import android.content.Intent
import android.database.Cursor
import android.net.Uri
import android.provider.OpenableColumns
import android.util.Log
import android.widget.Toast
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.Undo
import androidx.compose.material.icons.filled.BugReport
import androidx.compose.material.icons.filled.Compress
import androidx.compose.material.icons.filled.ContactPage
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.DeleteForever
import androidx.compose.material.icons.filled.DeveloperMode
import androidx.compose.material.icons.filled.Fence
import androidx.compose.material.icons.filled.RemoveModerator
import androidx.compose.material3.*
import androidx.compose.runtime.*
import androidx.compose.material.icons.filled.Save
import androidx.compose.material.icons.filled.Share
import androidx.compose.material.icons.filled.Update
import androidx.compose.material3.BottomSheetScaffold
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.LineHeightStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.content.FileProvider
import com.maxkeppeker.sheets.core.models.base.Header
import com.maxkeppeker.sheets.core.models.base.IconSource
import com.maxkeppeker.sheets.core.models.base.rememberUseCaseState
import com.maxkeppeler.sheets.list.ListDialog
import com.maxkeppeler.sheets.list.models.ListOption
import com.maxkeppeler.sheets.list.models.ListSelection
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -26,20 +71,28 @@ import me.weishu.kernelsu.BuildConfig
import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.AboutDialog
import me.weishu.kernelsu.ui.component.LoadingDialog
import me.weishu.kernelsu.ui.component.ConfirmResult
import me.weishu.kernelsu.ui.component.DialogHandle
import me.weishu.kernelsu.ui.component.SwitchItem
import me.weishu.kernelsu.ui.component.rememberConfirmDialog
import me.weishu.kernelsu.ui.component.rememberCustomDialog
import me.weishu.kernelsu.ui.component.rememberLoadingDialog
import me.weishu.kernelsu.ui.screen.destinations.AppProfileTemplateScreenDestination
import me.weishu.kernelsu.ui.util.LocalDialogHost
import me.weishu.kernelsu.ui.screen.destinations.FlashScreenDestination
import me.weishu.kernelsu.ui.util.getBugreportFile
import me.weishu.kernelsu.ui.util.getFileNameFromUri
import me.weishu.kernelsu.ui.util.shrinkModules
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
/**
* @author weishu
* @date 2023/1/1.
*/
@OptIn(ExperimentalMaterial3Api::class)
@Destination
@Composable
fun SettingScreen(navigator: DestinationsNavigator) {
Scaffold(
topBar = {
TopBar(onBack = {
@@ -47,24 +100,28 @@ fun SettingScreen(navigator: DestinationsNavigator) {
})
}
) { paddingValues ->
LoadingDialog()
val aboutDialog = rememberCustomDialog {
AboutDialog(it)
}
val loadingDialog = rememberLoadingDialog()
val shrinkDialog = rememberConfirmDialog()
val showAboutDialog = remember { mutableStateOf(false) }
AboutDialog(showAboutDialog)
Column(modifier = Modifier.padding(paddingValues)) {
Column(
modifier = Modifier
.padding(paddingValues)
.verticalScroll(rememberScrollState())
) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
val dialogHost = LocalDialogHost.current
val profileTemplate = stringResource(id = R.string.settings_profile_template)
ListItem(
leadingContent = { Icon(Icons.Filled.Fence, profileTemplate) },
headlineContent = { Text(profileTemplate) },
supportingContent = { Text(stringResource(id = R.string.settings_profile_template_summary))},
supportingContent = { Text(stringResource(id = R.string.settings_profile_template_summary)) },
modifier = Modifier.clickable {
navigator.navigate(AppProfileTemplateScreenDestination)
navigator.navigate(AppProfileTemplateScreenDestination)
}
)
@@ -82,50 +139,320 @@ fun SettingScreen(navigator: DestinationsNavigator) {
}
}
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
var checkUpdate by rememberSaveable {
mutableStateOf(
prefs.getBoolean("check_update", true)
)
}
SwitchItem(
icon = Icons.Filled.Update,
title = stringResource(id = R.string.settings_check_update),
summary = stringResource(id = R.string.settings_check_update_summary),
checked = checkUpdate
) {
prefs.edit().putBoolean("check_update", it).apply()
checkUpdate = it
}
var enableWebDebugging by rememberSaveable {
mutableStateOf(
prefs.getBoolean("enable_web_debugging", false)
)
}
SwitchItem(
icon = Icons.Filled.DeveloperMode,
title = stringResource(id = R.string.enable_web_debugging),
summary = stringResource(id = R.string.enable_web_debugging_summary),
checked = enableWebDebugging
) {
prefs.edit().putBoolean("enable_web_debugging", it).apply()
enableWebDebugging = it
}
var showBottomsheet by remember { mutableStateOf(false) }
ListItem(
leadingContent = { Icon(Icons.Filled.BugReport, stringResource(id = R.string.send_log)) },
leadingContent = {
Icon(
Icons.Filled.BugReport,
stringResource(id = R.string.send_log)
)
},
headlineContent = { Text(stringResource(id = R.string.send_log)) },
modifier = Modifier.clickable {
scope.launch {
val bugreport = dialogHost.withLoading {
withContext(Dispatchers.IO) {
getBugreportFile(context)
showBottomsheet = true
}
)
if (showBottomsheet){
ModalBottomSheet(
onDismissRequest = { showBottomsheet = false },
content = {
Row(modifier = Modifier.padding(10.dp)
.align(Alignment.CenterHorizontally)
) {
Box{
Column(
modifier = Modifier.padding(16.dp)
.clickable {
scope.launch {
val bugreport = loadingDialog.withLoading {
withContext(Dispatchers.IO) {
getBugreportFile(context)
}
}
val uri: Uri =
FileProvider.getUriForFile(
context,
"${BuildConfig.APPLICATION_ID}.fileprovider",
bugreport
)
val filename = getFileNameFromUri(context , uri)
val savefile = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "application/zip"
putExtra(Intent.EXTRA_STREAM, uri)
putExtra(Intent.EXTRA_TITLE, filename)
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
}
context.startActivity(
Intent.createChooser(
savefile,
context.getString(R.string.save_log)
)
)
}
}
) {
Icon(
Icons.Filled.Save,
contentDescription = null,
modifier = Modifier.align(Alignment.CenterHorizontally)
)
Text(
text = stringResource(id = R.string.save_log),
modifier = Modifier.padding(top = 16.dp),
textAlign = TextAlign.Center.also {
LineHeightStyle(
alignment = LineHeightStyle.Alignment.Center,
trim = LineHeightStyle.Trim.None
)
}
)
}
}
Box{
Column(
modifier = Modifier.padding(16.dp)
.clickable {
scope.launch {
val bugreport = loadingDialog.withLoading {
withContext(Dispatchers.IO) {
getBugreportFile(context)
}
}
val uri: Uri =
FileProvider.getUriForFile(
context,
"${BuildConfig.APPLICATION_ID}.fileprovider",
bugreport
)
val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.putExtra(Intent.EXTRA_STREAM, uri)
shareIntent.setDataAndType(uri, "application/zip")
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
context.startActivity(
Intent.createChooser(
shareIntent,
context.getString(R.string.send_log)
)
)
}
}
) {
Icon(
Icons.Filled.Share,
contentDescription = null,
modifier = Modifier.align(Alignment.CenterHorizontally)
)
Text(
text = stringResource(id = R.string.send_log),
modifier = Modifier.padding(top = 16.dp),
textAlign = TextAlign.Center.also {
LineHeightStyle(
alignment = LineHeightStyle.Alignment.Center,
trim = LineHeightStyle.Trim.None
)
}
)
}
}
}
}
)
val uri: Uri =
FileProvider.getUriForFile(
context,
"${BuildConfig.APPLICATION_ID}.fileprovider",
bugreport
)
val shareIntent = Intent(Intent.ACTION_SEND)
shareIntent.putExtra(Intent.EXTRA_STREAM, uri)
shareIntent.setDataAndType(uri, "application/zip")
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
}
context.startActivity(
Intent.createChooser(
shareIntent,
context.getString(R.string.send_log)
)
)
val shrink = stringResource(id = R.string.shrink_sparse_image)
val shrinkMessage = stringResource(id = R.string.shrink_sparse_image_message)
ListItem(
leadingContent = {
Icon(
Icons.Filled.Compress,
shrink
)
},
headlineContent = { Text(shrink) },
modifier = Modifier.clickable {
scope.launch {
val result =
shrinkDialog.awaitConfirm(title = shrink, content = shrinkMessage)
if (result == ConfirmResult.Confirmed) {
loadingDialog.withLoading {
shrinkModules()
}
}
}
}
)
val lkmMode =
Natives.version >= Natives.MINIMAL_SUPPORTED_KERNEL_LKM && Natives.isLkmMode
if (lkmMode) {
UninstallItem(navigator) {
loadingDialog.withLoading(it)
}
}
val about = stringResource(id = R.string.about)
ListItem(
leadingContent = { Icon(Icons.Filled.ContactPage, stringResource(id = R.string.about)) },
leadingContent = {
Icon(
Icons.Filled.ContactPage,
stringResource(id = R.string.about)
)
},
headlineContent = { Text(about) },
modifier = Modifier.clickable {
showAboutDialog.value = true
aboutDialog.show()
}
)
}
}
}
@Composable
fun UninstallItem(
navigator: DestinationsNavigator,
withLoading: suspend (suspend () -> Unit) -> Unit
) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
val uninstallConfirmDialog = rememberConfirmDialog()
val showTodo = {
Toast.makeText(context, "TODO", Toast.LENGTH_SHORT).show()
}
val uninstallDialog = rememberUninstallDialog { uninstallType ->
scope.launch {
val result = uninstallConfirmDialog.awaitConfirm(
title = context.getString(uninstallType.title),
content = context.getString(uninstallType.message)
)
if (result == ConfirmResult.Confirmed) {
withLoading {
when (uninstallType) {
UninstallType.TEMPORARY -> showTodo()
UninstallType.PERMANENT -> navigator.navigate(
FlashScreenDestination(FlashIt.FlashUninstall)
)
UninstallType.RESTORE_STOCK_IMAGE -> navigator.navigate(
FlashScreenDestination(FlashIt.FlashRestore)
)
UninstallType.NONE -> Unit
}
}
}
}
}
val uninstall = stringResource(id = R.string.settings_uninstall)
ListItem(
leadingContent = {
Icon(
Icons.Filled.Delete,
uninstall
)
},
headlineContent = { Text(uninstall) },
modifier = Modifier.clickable {
uninstallDialog.show()
}
)
}
enum class UninstallType(val title: Int, val message: Int, val icon: ImageVector) {
TEMPORARY(
R.string.settings_uninstall_temporary,
R.string.settings_uninstall_temporary_message,
Icons.Filled.Delete
),
PERMANENT(
R.string.settings_uninstall_permanent,
R.string.settings_uninstall_permanent_message,
Icons.Filled.DeleteForever
),
RESTORE_STOCK_IMAGE(
R.string.settings_restore_stock_image,
R.string.settings_restore_stock_image_message,
Icons.AutoMirrored.Filled.Undo
),
NONE(0, 0, Icons.Filled.Delete)
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun rememberUninstallDialog(onSelected: (UninstallType) -> Unit): DialogHandle {
return rememberCustomDialog { dismiss ->
val options = listOf(
// UninstallType.TEMPORARY,
UninstallType.PERMANENT,
UninstallType.RESTORE_STOCK_IMAGE
)
val listOptions = options.map {
ListOption(
titleText = stringResource(it.title),
subtitleText = if (it.message != 0) stringResource(it.message) else null,
icon = IconSource(it.icon)
)
}
var selection = UninstallType.NONE
ListDialog(state = rememberUseCaseState(visible = true, onFinishedRequest = {
if (selection != UninstallType.NONE) {
onSelected(selection)
}
}, onCloseRequest = {
dismiss()
}), header = Header.Default(
title = stringResource(R.string.settings_uninstall),
), selection = ListSelection.Single(
showRadioButtons = false,
options = listOptions,
) { index, _ ->
selection = options[index]
})
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
@@ -135,7 +462,13 @@ private fun TopBar(onBack: () -> Unit = {}) {
navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.Filled.ArrowBack, contentDescription = null) }
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
},
)
}
@Preview
@Composable
private fun SettingsPreview() {
SettingScreen(EmptyDestinationsNavigator)
}

Some files were not shown because too many files have changed in this diff Show More