Compare commits

...

156 Commits

Author SHA1 Message Date
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
167 changed files with 4672 additions and 2322 deletions

View File

@@ -2,7 +2,6 @@ name: Feature Request
description: "Suggest an idea for this project"
title: "[Feature]"
labels: "feature"
assignees: tiann
body:
- type: markdown
id: feature-info

View File

@@ -1,37 +1,89 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- https://ci.android.com/builds/submitted/11577653/kernel_virt_aarch64/latest/manifest_11577653.xml -->
<manifest>
<!-- https://ci.android.com/builds/submitted/11275718/kernel_virt_aarch64/latest/manifest_11275718.xml -->
<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="43337ece156eabd735426a0b007637bb52fa7339">
<linkfile dest="tools/bazel" src="kleaf/bazel.sh"/>
<linkfile dest="WORKSPACE" src="kleaf/bazel.WORKSPACE"/>
<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="515a956763d8c874d9a7e23528332bf907b31748"/>
<project path="kernel/common-patches" name="kernel/common-patches" revision="495419530db8761a40f8db9fb734a9be78fa25fd">
<linkfile dest="common/patches" src="android-mainline"/>
<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="99abfd276063ab3a7748939aa55e107aaca903f6"/>
<project path="kernel/configs" name="kernel/configs" revision="786dab5f2f49b983b7c448d45a50c62d36e9f7f9"/>
<project path="common-modules/virtual-device" name="kernel/common-modules/virtual-device" revision="5c7466d6fc47f7ee2245f9ee6471cd78e6ff82f0"/>
<project path="prebuilts/clang/host/linux-x86" name="platform/prebuilts/clang/host/linux-x86" revision="1400cf7d2f0d28c425737d7b58c1f67c52db087f" 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="99e41849eb3895574b1dc7e854ca15cb3fb11a71"/>
<project path="prebuilts/build-tools" name="platform/prebuilts/build-tools" clone-depth="1" groups="ddk" revision="93e69718fd53f0c3dd7f0087657dfe2e78926830"/>
<project path="prebuilts/clang-tools" name="platform/prebuilts/clang-tools" clone-depth="1" revision="bf33473342630944198190ff74e6ca09a9bcfdeb"/>
<project path="prebuilts/kernel-build-tools" name="kernel/prebuilts/build-tools" clone-depth="1" groups="ddk" revision="4b68c02455e6ce5c87ccf8e09e629f0177771a8c"/>
<project path="prebuilts/rust" name="platform/prebuilts/rust" revision="7e636e2a1b7cf415c3c01981e439d98843dc4973" clone-depth="1"/>
<project path="prebuilts/tradefed" name="platform/tools/tradefederation/prebuilts" clone-depth="1" revision="79d9ec16c1e4e747b0bfad9a80a1665080c42d7b"/>
<project path="prebuilts/asuite" name="platform/prebuilts/asuite" clone-depth="1" revision="9e2738f6242785a3b2096010ce63363a160c122f"/>
<project path="tools/mkbootimg" name="platform/system/tools/mkbootimg" revision="722e6fa37d508b190fafa9a8ce9f6d571fad3a8c"/>
<project path="prebuilts/jdk/jdk11" name="platform/prebuilts/jdk/jdk11" revision="06351a976e772d8a9cdb133bb982032c64ee9e53" clone-depth="1" groups="ddk"/>
<project path="prebuilts/ndk-r26" name="toolchain/prebuilts/ndk/r26" clone-depth="1" groups="ddk" revision="e87abe7cbe9143d239ba54f32c64ca697adcba75"/>
<project path="external/bazel-skylib" name="platform/external/bazel-skylib" groups="ddk" revision="930baaa09975eb3809629a72806acbe9494dd224"/>
<project path="build/bazel_common_rules" name="platform/build/bazel_common_rules" groups="ddk" revision="5fb8d26dfb2565e0e2d8b6630d241b5f5675e0b1"/>
<project path="external/libcap-ng" name="platform/external/libcap-ng" revision="2bcc92ae19481dd2b8d3ce3abdfbbee49261abe6"/>
<project path="external/libcap" name="platform/external/libcap" revision="9577b17009379649c9220edca7d0077311445b95"/>
<project path="external/stardoc" name="platform/external/stardoc" groups="ddk" revision="85b0f239303220d902ad919ff27d2da475fc12e2"/>
<project path="external/python/absl-py" name="platform/external/python/absl-py" groups="ddk" revision="8cc5fc4798ef442b0c5b70c1ecc7e45a8f6eb2f8"/>
<project path="external/bazelbuild-rules_cc" name="platform/external/bazelbuild-rules_cc" groups="ddk" revision="9a4853f0327e0266818c8d6b4967e2e8f36b1a88"/>
<project path="external/bazelbuild-rules_python" name="platform/external/bazelbuild-rules_python" groups="ddk" revision="3e21f23d9400ba51f10e9b76016ff6d472829b4e"/>
<project path="external/bazelbuild-rules_rust" name="platform/external/bazelbuild-rules_rust" revision="bdd24099a80555ff8a4441e8bb47f4c7cfe413f8"/>
<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

@@ -88,7 +88,9 @@ 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" || printf "\nobj-y += kernelsu/\n" >> "$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"
@@ -132,4 +134,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: kernel-${{ inputs.arch }}-avd-${{ inputs.version_name }}-${{ env.kernelsu_version }}
path: "${{ env.file_path }}"
path: "${{ env.file_path }}"

View File

@@ -71,7 +71,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==1.34.0
- name: Set boot sign key
env:
@@ -116,7 +116,7 @@ jobs:
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
version_name: android12-5.10.205
tag: android12-5.10-2024-03
os_patch_level: 2024-03
patch_path: "5.10"

View File

@@ -48,6 +48,9 @@ jobs:
- version: "5.10"
sub_level: 205
os_patch_level: 2024-03
- version: "5.10"
sub_level: 209
os_patch_level: 2024-04
- version: "5.15"
sub_level: 94
os_patch_level: 2023-05
@@ -65,7 +68,10 @@ jobs:
os_patch_level: 2023-12
- version: "5.15"
sub_level: 144
os_patch_level: 2024-02
os_patch_level: 2024-03
- version: "5.15"
sub_level: 148
os_patch_level: 2024-04
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
@@ -106,7 +112,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==1.34.0
- name: Set boot sign key
env:

View File

@@ -33,6 +33,9 @@ jobs:
- version: "5.15"
sub_level: 144
os_patch_level: 2024-03
- version: "5.15"
sub_level: 148
os_patch_level: 2024-04
- version: "6.1"
sub_level: 25
os_patch_level: 2023-10
@@ -45,6 +48,9 @@ jobs:
- version: "6.1"
sub_level: 68
os_patch_level: 2024-03
- version: "6.1"
sub_level: 75
os_patch_level: 2024-04
uses: ./.github/workflows/gki-kernel.yml
secrets: inherit
with:
@@ -85,7 +91,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==1.34.0
- name: Set boot sign key
env:
@@ -134,8 +140,8 @@ jobs:
sub_level: 110
os_patch_level: 2023-09
- version: "6.1"
sub_level: 68
os_patch_level: 2024-03
sub_level: 75
os_patch_level: 2024-04
uses: ./.github/workflows/gki-kernel.yml
with:
version: android14-${{ matrix.version }}

View File

@@ -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: |
@@ -89,15 +104,18 @@ jobs:
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,12 +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 }}
path: "${{ env.file_path }}"
name: kernel-ARCVM-${{ matrix.arch }}-${{ env.version }}
path: "${{ env.file_path }}"

View File

@@ -30,6 +30,9 @@ jobs:
- 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 }}

View File

@@ -1,41 +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-lkm:
uses: ./.github/workflows/build-lkm.yml
secrets: inherit
build:
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 }}

View File

@@ -3,15 +3,11 @@ on:
push:
branches: ["main", "ci", "checkci"]
paths:
- ".github/workflows/gki-kernel.yml"
- ".github/workflows/build-lkm.yml"
- "kernel/**"
pull_request:
branches: ["main"]
paths:
- ".github/workflows/gki-kernel.yml"
- ".github/workflows/build-lkm.yml"
- "kernel/**"
workflow_call:
jobs:
build-lkm:

View File

@@ -25,10 +25,23 @@ jobs:
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
@@ -60,7 +73,7 @@ jobs:
echo KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}'
echo KEY_ALIAS='${{ secrets.KEY_ALIAS }}'
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}'
echo KEYSTORE_FILE='../key.jks'
echo KEYSTORE_FILE='key.jks'
} >> gradle.properties
echo ${{ secrets.KEYSTORE }} | base64 -d > key.jks
fi
@@ -68,11 +81,11 @@ jobs:
- 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@v3
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
@@ -142,6 +155,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==1.34.0
python3 $GITHUB_WORKSPACE/scripts/ksubot.py $APK
fi
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

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

@@ -154,7 +154,7 @@ 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
@@ -248,4 +248,4 @@ jobs:
if: ${{ inputs.build_lkm == true }}
with:
name: ${{ inputs.version }}-lkm
path: ./output/*_kernelsu.ko
path: ./output/*_kernelsu.ko

View File

@@ -76,3 +76,4 @@ jobs:
boot-images-*/Image-*/*.img.gz
kernel-WSA*.zip
kernel-ARCVM*.zip
ksud-*

View File

@@ -15,7 +15,7 @@ on:
jobs:
build:
name: Build WSA-Kernel-${{ inputs.version }}-${{ inputs.arch }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
CCACHE_NOHASHDIR: "true"
@@ -57,7 +57,7 @@ jobs:
path: WSA-Linux-Kernel
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@v1
with:
key: WSA-Kernel-${{ inputs.version }}-${{ inputs.arch }}
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
@@ -73,7 +73,9 @@ jobs:
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
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."

View File

@@ -1,4 +1,4 @@
**English** | [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)
**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

View File

@@ -1,4 +1,4 @@
[English](README.md) | [Español](README_ES.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)
[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

View File

@@ -1,4 +1,4 @@
[English](README.md) | **Español** | [简体中文](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)
[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)
# KernelSU

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)](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

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)](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) | [한국어](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) | **हिंदी**
# KernelSU

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)](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

View File

@@ -1,4 +1,4 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.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)
[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

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,4 +1,4 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.md) | [繁體中文](README_TW.md) | [日本語](README_JP.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)
[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

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
@@ -29,7 +29,7 @@ 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

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)](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

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)](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
@@ -34,7 +34,7 @@ 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

View File

@@ -1,4 +1,4 @@
[English](README.md) | [Español](README_ES.md) | [简体中文](README_CN.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)
[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
@@ -16,12 +16,13 @@
- 基於核心的 `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`
@@ -29,11 +30,19 @@ WSA 和執行在容器中的 Android 也可以與 KernelSU 一同運作。
- [安裝教學](https://kernelsu.org/zh_TW/guide/installation.html)
- [如何建置?](https://kernelsu.org/zh_TW/guide/how-to-build.html)
- [官方網站](https://kernelsu.org/zh_TW/)
## 翻譯
若要協助翻譯 KernelSU 或改進現有翻譯,請使用 [Weblate](https://hosted.weblate.org/engage/kernelsu/)。 翻譯管理器的PR不再被接受因為它會與Weblate衝突。
### 討論
- Telegram[@KernelSU](https://t.me/KernelSU)
## 安全
有關報告 KernelSU 中的安全漏洞的資訊,請參閱 [SECURITY.md](/SECURITY.md)。
## 授權
- 目錄 `kernel` 下所有檔案為 [GPL-2-only](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)。

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)](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

View File

@@ -2,8 +2,7 @@ kernelsu-objs := ksu.o
kernelsu-objs += allowlist.o
kernelsu-objs += apk_sign.o
kernelsu-objs += sucompat.o
kernelsu-objs += uid_observer.o
kernelsu-objs += manager.o
kernelsu-objs += throne_tracker.o
kernelsu-objs += core_hook.o
kernelsu-objs += ksud.o
kernelsu-objs += embed_ksud.o
@@ -61,7 +60,7 @@ ifeq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0)
ccflags-y += -DKSU_UMOUNT
else
$(info -- Did you know you can backport path_umount to fs/namespace.c from 5.9?)
$(info -- Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path_umount)
$(info -- Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount)
endif
ccflags-y += -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-int-conversion -Wno-gcc-compat

View File

@@ -1,21 +1,22 @@
#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"
#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"
#include <linux/compiler_types.h>
#endif
#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 +275,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 +295,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__)
@@ -23,11 +23,13 @@
#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"
#else
#define PRCTL_SYMBOL "sys_prctl"
#define SYS_READ_SYMBOL "sys_read"
#define SYS_NEWFSTATAT_SYMBOL "sys_newfstatat"
#define SYS_FACCESSAT_SYMBOL "sys_faccessat"
#define SYS_EXECVE_SYMBOL "sys_execve"
#endif
#elif defined(__x86_64__)
@@ -50,11 +52,13 @@
#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
#define PRCTL_SYMBOL "sys_prctl"
#define SYS_READ_SYMBOL "sys_read"
#define SYS_NEWFSTATAT_SYMBOL "sys_newfstatat"
#define SYS_FACCESSAT_SYMBOL "sys_faccessat"
#define SYS_EXECVE_SYMBOL "sys_execve"
#endif
#else
@@ -79,4 +83,10 @@
#define PT_REGS_SP(x) (__PT_REGS_CAST(x)->__PT_SP_REG)
#define PT_REGS_IP(x) (__PT_REGS_CAST(x)->__PT_IP_REG)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
#define PT_REAL_REGS(regs) ((struct pt_regs *)PT_REGS_PARM1(regs))
#else
#define PT_REAL_REGS(regs) ((regs))
#endif
#endif

View File

@@ -1,32 +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/irqflags.h"
#include "linux/kallsyms.h"
#include "linux/kernel.h"
#include "linux/kprobes.h"
#include "linux/list.h"
#include "linux/lsm_hooks.h"
#include "linux/mm.h"
#include "linux/mm_types.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/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"
@@ -34,10 +38,10 @@
#include "klog.h" // IWYU pragma: keep
#include "ksu.h"
#include "ksud.h"
#include "linux/vmalloc.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;
@@ -199,7 +203,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;
}
@@ -215,13 +219,11 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
return 0;
}
// always ignore unsupported app uid, such as isolated uid, sdk sandbox uid
if (is_unsupported_uid(current_uid().val)) {
return 0;
}
bool from_root = 0 == current_uid().val;
bool from_manager = is_manager();
static uid_t last_failed_uid = -1;
if (last_failed_uid == current_uid().val) {
if (!from_root && !from_manager) {
// only root or manager can access this interface
return 0;
}
@@ -230,75 +232,12 @@ int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3,
#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()) {
#ifdef CONFIG_KSU_DEBUG
pr_info("manager already exist: %d\n",
ksu_get_manager_uid());
#endif
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
goto block;
}
// 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);
goto block;
}
// 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");
goto block;
}
uid_t inode_uid = path.dentry->d_inode->i_uid.val;
path_put(&path);
if (inode_uid != current_uid().val) {
pr_err("become_manager: path uid != current uid\n");
goto block;
}
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");
}
return 0;
}
block:
last_failed_uid = current_uid().val;
return 0;
}
@@ -315,26 +254,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;
u32 is_lkm = 0x1;
#else
u32 is_lkm = 0x0;
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);
}
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) {
@@ -367,7 +303,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)) {
@@ -380,9 +316,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))) {
@@ -393,57 +326,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;
}
@@ -516,15 +441,13 @@ static bool should_umount(struct path *path)
return false;
}
static void ksu_umount_mnt(struct path *path, int flags)
static int ksu_umount_mnt(struct path *path, int flags)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) || defined(KSU_UMOUNT)
int err = path_umount(path, flags);
if (err) {
pr_info("umount %s failed: %d\n", path->dentry->d_iname, err);
}
return path_umount(path, flags);
#else
// TODO: umount for non GKI kernel
return -ENOSYS;
#endif
}
@@ -546,7 +469,10 @@ static void try_umount(const char *mnt, bool check_mnt, int flags)
return;
}
ksu_umount_mnt(&path, flags);
err = ksu_umount_mnt(&path, flags);
if (err) {
pr_warn("umount %s failed: %d\n", mnt, err);
}
}
int ksu_handle_setuid(struct cred *new, const struct cred *old)
@@ -595,9 +521,11 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
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);
#endif
// fixme: use `collect_mounts` and `iterate_mount` to iterate all mountpoint and
// filter the mountpoint whose target is `/data/adb`
@@ -617,11 +545,7 @@ 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);
@@ -693,7 +617,7 @@ static int ksu_task_prctl(int option, unsigned long arg2, unsigned long arg3,
return -ENOSYS;
}
// kernel 4.4 and 4.9
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
static int ksu_key_permission(key_ref_t key_ref, const struct cred *cred,
unsigned perm)
{
@@ -726,7 +650,7 @@ 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)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
LSM_HOOK_INIT(key_permission, ksu_key_permission)
#endif
};
@@ -916,5 +840,9 @@ void __init ksu_core_init(void)
void ksu_core_exit(void)
{
pr_info("ksu_kprobe_exit\n");
#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,18 +1,19 @@
#include "linux/version.h"
#include "linux/fs.h"
#include "linux/nsproxy.h"
#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/sched/task.h>
#else
#include "linux/sched.h"
#include <linux/sched.h>
#endif
#include "linux/uaccess.h"
#include <linux/uaccess.h>
#include "klog.h" // IWYU pragma: keep
#include "kernel_compat.h" // Add check Huawei Device
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
#include "linux/key.h"
#include "linux/errno.h"
#include "linux/cred.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
#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)
@@ -78,7 +79,7 @@ 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 LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
if (init_session_keyring != NULL && !current_cred()->session_keyring &&
(current->flags & PF_WQ_WORKER)) {
pr_info("installing init session keyring for older kernel\n");

View File

@@ -1,15 +1,30 @@
#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)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || defined(CONFIG_IS_HW_HISI)
extern struct key *init_session_keyring;
#endif

View File

@@ -1,15 +1,15 @@
#include "linux/export.h"
#include "linux/fs.h"
#include "linux/kobject.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;
@@ -32,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)
{
@@ -53,11 +55,11 @@ 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
@@ -74,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();
}

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

View File

@@ -1,25 +1,24 @@
#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 <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>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
#include "linux/input-event-codes.h"
#include <linux/input-event-codes.h>
#else
#include "uapi/linux/input.h"
#include <uapi/linux/input.h>
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
#include "linux/aio.h"
#include <linux/aio.h>
#endif
#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 <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"
@@ -65,6 +64,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;
@@ -77,6 +78,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
@@ -117,7 +121,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.
*/
@@ -150,7 +154,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) {
@@ -176,8 +181,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);
@@ -185,8 +191,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();
@@ -198,7 +206,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);
@@ -207,7 +216,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");
@@ -224,13 +234,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;
@@ -241,10 +253,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();
}
}
@@ -252,10 +268,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();
}
@@ -274,7 +291,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;
@@ -386,7 +404,8 @@ 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)
int ksu_handle_sys_read(unsigned int fd, char __user **buf_ptr,
size_t *count_ptr)
{
struct file *file = fget(fd);
if (!file) {
@@ -472,8 +491,32 @@ static int execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
return ksu_handle_execveat_ksud(fd, filename_ptr, &argv, NULL, NULL);
}
static int sys_execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
{
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];
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);
}
// remove this later!
__maybe_unused static int vfs_read_handler_pre(struct kprobe *p, struct pt_regs *regs)
__maybe_unused static int vfs_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);
@@ -485,14 +528,10 @@ __maybe_unused static int vfs_read_handler_pre(struct kprobe *p, struct pt_regs
static int sys_read_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);
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);
size_t count_ptr = (size_t *)&PT_REGS_PARM3(real_regs);
return ksu_handle_sys_read(fd, buf_ptr, count_ptr);
}
@@ -506,6 +545,12 @@ static int input_handle_event_handler_pre(struct kprobe *p,
return ksu_handle_input_handle_event(type, code, value);
}
#if 1
static struct kprobe execve_kp = {
.symbol_name = SYS_EXECVE_SYMBOL,
.pre_handler = sys_execve_handler_pre,
};
#else
static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
@@ -516,8 +561,9 @@ static struct kprobe execve_kp = {
#endif
.pre_handler = execve_handler_pre,
};
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
#if 1
static struct kprobe vfs_read_kp = {
.symbol_name = SYS_READ_SYMBOL,
.pre_handler = sys_read_handler_pre,
@@ -529,8 +575,8 @@ static struct kprobe vfs_read_kp = {
};
#endif
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,
};
@@ -546,7 +592,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
@@ -589,7 +635,7 @@ static void stop_input_hook()
}
// ksud: module support
void ksu_enable_ksud()
void ksu_ksud_init()
{
#ifdef CONFIG_KPROBES
int ret;
@@ -600,11 +646,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,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"
@@ -69,6 +69,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
@@ -125,12 +130,6 @@ 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");

View File

@@ -129,4 +129,17 @@ bool is_zygote(void *sec)
result = strncmp("u:r:zygote:s0", domain, seclen) == 0;
security_release_secctx(domain, seclen);
return result;
}
#define DEVPTS_DOMAIN "u:object_r:devpts: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

@@ -20,4 +20,6 @@ bool is_zygote(void *cred);
void apply_kernelsu_rules();
u32 ksu_get_devpts_sid();
#endif

View File

@@ -1,28 +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) || \
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
//////////////////////////////////////////////////////
// Declaration
//////////////////////////////////////////////////////

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 "\nobj-\$(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,20 @@
#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/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>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include "linux/sched/task_stack.h"
#include <linux/sched/task_stack.h>
#else
#include "linux/sched.h"
#include <linux/sched.h>
#endif
#include "objsec.h"
#include "allowlist.h"
#include "arch.h"
#include "klog.h" // IWYU pragma: keep
@@ -39,8 +42,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 * __unused_flags)
int *__unused_flags)
{
const char su[] = SU_PATH;
@@ -80,7 +90,7 @@ int ksu_handle_stat(int *dfd, const char __user **filename_user, int *flags)
// 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;
}
@@ -102,7 +112,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;
@@ -130,11 +141,70 @@ int ksu_handle_execveat_sucompat(int *fd, struct filename **filename_ptr,
return 0;
}
int ksu_handle_execve_sucompat(int *fd, const char __user **filename_user,
void *__never_use_argv, void *__never_use_envp,
int *__never_use_flags)
{
const char su[] = SU_PATH;
char path[sizeof(su) + 1];
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;
}
int ksu_handle_devpts(struct inode *inode)
{
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) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
struct inode_security_struct *sec = selinux_inode(inode);
#else
struct inode_security_struct *sec = (struct inode_security_struct *) inode->i_security;
#endif
if (sec) {
sec->sid = ksu_devpts_sid;
inode->i_uid.val = 0;
inode->i_gid.val = 0;
}
}
return 0;
}
#ifdef CONFIG_KPROBES
__maybe_unused static int faccessat_handler_pre(struct kprobe *p, struct pt_regs *regs)
__maybe_unused static int faccessat_handler_pre(struct kprobe *p,
struct pt_regs *regs)
{
int *dfd = (int *)PT_REGS_PARM1(regs);
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
@@ -145,27 +215,25 @@ __maybe_unused static int faccessat_handler_pre(struct kprobe *p, struct pt_regs
static int sys_faccessat_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
int *dfd = (int *)PT_REGS_PARM1(real_regs);
const char __user **filename_user = (const char **)&PT_REGS_PARM2(real_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);
}
__maybe_unused static int newfstatat_handler_pre(struct kprobe *p, struct pt_regs *regs)
__maybe_unused static int newfstatat_handler_pre(struct kprobe *p,
struct pt_regs *regs)
{
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)
// 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 vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat,int flag)
int *flags = (int *)&PT_REGS_CCALL_PARM4(regs);
#endif
@@ -174,13 +242,10 @@ __maybe_unused static int newfstatat_handler_pre(struct kprobe *p, struct pt_reg
static int sys_newfstatat_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 *dfd = (int *)&PT_REGS_PARM1(real_regs);
const char __user **filename_user = (const char **)&PT_REGS_PARM2(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);
@@ -196,7 +261,17 @@ static int execve_handler_pre(struct kprobe *p, struct pt_regs *regs)
return ksu_handle_execveat_sucompat(fd, filename_ptr, NULL, NULL, NULL);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
static int sys_execve_handler_pre(struct kprobe *p, struct pt_regs *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_execve_sucompat(AT_FDCWD, filename_user, NULL, NULL,
NULL);
}
#if 1
static struct kprobe faccessat_kp = {
.symbol_name = SYS_FACCESSAT_SYMBOL,
.pre_handler = sys_faccessat_handler_pre,
@@ -212,7 +287,7 @@ static struct kprobe faccessat_kp = {
};
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
#if 1
static struct kprobe newfstatat_kp = {
.symbol_name = SYS_NEWFSTATAT_SYMBOL,
.pre_handler = sys_newfstatat_handler_pre,
@@ -228,6 +303,12 @@ static struct kprobe newfstatat_kp = {
};
#endif
#if 1
static struct kprobe execve_kp = {
.symbol_name = SYS_EXECVE_SYMBOL,
.pre_handler = sys_execve_handler_pre,
};
#else
static struct kprobe execve_kp = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
.symbol_name = "do_execveat_common",
@@ -238,11 +319,29 @@ static struct kprobe execve_kp = {
#endif
.pre_handler = execve_handler_pre,
};
#endif
static int devpts_get_priv_pre(struct kprobe *p, struct pt_regs *regs)
{
struct inode *inode;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
struct dentry *dentry = (struct dentry *)PT_REGS_PARM1(regs);
inode = dentry->d_inode;
#else
inode = (struct inode *)PT_REGS_PARM1(real_regs);
#endif
return ksu_handle_devpts(inode);
}
static struct kprobe devpts_get_priv_kp = { .symbol_name = "devpts_get_priv",
.pre_handler =
devpts_get_priv_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;
@@ -252,5 +351,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(&devpts_get_priv_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(&devpts_get_priv_kp);
#endif
}

319
kernel/throne_tracker.c Normal file
View File

@@ -0,0 +1,319 @@
#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 "throne_tracker.h"
#include "kernel_compat.h"
uid_t ksu_manager_uid = KSU_INVALID_UID;
#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 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;
}
}
}
struct my_dir_context {
struct dir_context ctx;
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);
struct file *file;
char dirpath[384]; // 384 is enough for /data/app/<package>/base.apk
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, sizeof(dirpath), "%s/%.*s", my_ctx->parent_dir,
namelen, name) >= sizeof(dirpath)) {
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 my_dir_context sub_ctx = { .ctx.actor = my_actor,
.parent_dir = dirpath,
.private_data =
my_ctx->private_data,
.depth = my_ctx->depth - 1,
.stop = my_ctx->stop };
file = ksu_filp_open_compat(dirpath, O_RDONLY | O_NOFOLLOW, 0);
if (IS_ERR(file)) {
pr_err("Failed to open directory: %s, err: %ld\n",
dirpath, PTR_ERR(file));
return FILLDIR_ACTOR_CONTINUE;
}
iterate_dir(file, &sub_ctx.ctx);
filp_close(file, NULL);
} else {
if ((namelen == 8) && (strncmp(name, "base.apk", namelen) == 0)) {
bool is_manager = is_manager_apk(dirpath);
pr_info("Found 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;
}
}
}
return FILLDIR_ACTOR_CONTINUE;
}
void search_manager(const char *path, int depth, struct list_head *uid_data)
{
struct file *file;
int stop = 0;
struct my_dir_context ctx = { .ctx.actor = my_actor,
.parent_dir = (char *)path,
.private_data = uid_data,
.depth = depth,
.stop = &stop };
file = ksu_filp_open_compat(path, O_RDONLY | O_NOFOLLOW, 0);
if (IS_ERR(file)) {
pr_err("Failed to open directory: %s\n", path);
return;
}
iterate_dir(file, &ctx.ctx);
filp_close(file, NULL);
}
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) {
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 track_throne()
{
ksu_queue_work(&ksu_update_uid_work);
}
void ksu_throne_tracker_init()
{
INIT_WORK(&ksu_update_uid_work, do_update_uid);
}
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

@@ -36,7 +36,7 @@ android {
}
kotlinOptions {
jvmTarget = "17"
jvmTarget = "21"
}
composeOptions {
@@ -116,4 +116,4 @@ dependencies {
implementation(libs.markdown)
implementation(libs.androidx.webkit)
}
}

View File

@@ -15,7 +15,7 @@
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"
@@ -31,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"
@@ -42,4 +48,4 @@
</provider>
</application>
</manifest>
</manifest>

View File

@@ -37,23 +37,6 @@ fun parseKernelVersion(version: String): KernelVersion {
}
}
fun parseKMI(input: String): String? {
val regex = Regex("(.* )?(\\d+\\.\\d+)(\\S+)?(android\\d+)(.*)")
val result = regex.find(input)
return result?.let {
val androidVersion = it.groups[4]?.value ?: ""
val kernelVersion = it.groups[2]?.value ?: ""
"$androidVersion-$kernelVersion"
}
}
fun getKMI(): String? {
Os.uname().release.let {
return parseKMI(it)
}
}
fun getKernelVersion(): KernelVersion {
Os.uname().release.let {
return parseKernelVersion(it)

View File

@@ -3,9 +3,14 @@ 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.*
import androidx.compose.material3.Icon
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
@@ -14,8 +19,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import androidx.navigation.compose.currentBackStackEntryAsState
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
@@ -29,19 +33,15 @@ 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() }
val navBackStackEntry by navController.currentBackStackEntryAsState()
val route = navBackStackEntry?.destination?.route
val showBottomBar = route == null || !route.startsWith("web_screen")
Scaffold(
bottomBar = { if (showBottomBar) BottomBar(navController) },
bottomBar = { BottomBar(navController) },
snackbarHost = { SnackbarHost(snackbarHostState) }
) { innerPadding ->
CompositionLocalProvider(
@@ -64,7 +64,7 @@ private fun BottomBar(navController: NavHostController) {
val isManager = Natives.becomeManager(ksuApp.packageName)
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

@@ -12,13 +12,11 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.ElevatedCard
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

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,15 +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.rememberUpdatedState
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
@@ -148,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) {
@@ -161,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) {
@@ -190,7 +188,7 @@ fun RootProfileConfig(
@Composable
fun GroupsPanel(selected: List<Groups>, closeSelection: (selection: Set<Groups>) -> Unit) {
val selectGroupsDialog = rememberCustomDialog { dismiss: () -> Unit ->
val groups = Groups.values().sortedWith(
val groups = Groups.entries.toTypedArray().sortedWith(
compareBy<Groups> { if (selected.contains(it)) 0 else 1 }
.then(compareBy {
when (it) {
@@ -265,7 +263,7 @@ fun CapsPanel(
closeSelection: (selection: Set<Capabilities>) -> Unit
) {
val selectCapabilitiesDialog = rememberCustomDialog { dismiss ->
val caps = Capabilities.values().sortedWith(
val caps = Capabilities.entries.toTypedArray().sortedWith(
compareBy<Capabilities> { if (selected.contains(it)) 0 else 1 }
.then(compareBy { it.name })
)
@@ -323,7 +321,6 @@ fun CapsPanel(
}
}
@OptIn(ExperimentalComposeUiApi::class)
@Composable
private fun UidPanel(uid: Int, label: String, onUidChange: (Int) -> Unit) {
@@ -447,7 +444,7 @@ private fun SELinuxPanel(
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
@@ -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

@@ -9,13 +9,24 @@ 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.filled.Refresh
import androidx.compose.material.icons.filled.Save
import androidx.compose.material3.*
import androidx.compose.runtime.*
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.ui.ExperimentalComposeUiApi
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.key.Key
import androidx.compose.ui.input.key.key
@@ -25,25 +36,35 @@ 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.installModule
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.*
import java.util.Date
import java.util.Locale
enum class FlashingStatus {
FLASHING,
SUCCESS,
FAILED
}
/**
* @author weishu
* @date 2023/1/1.
*/
@OptIn(ExperimentalComposeUiApi::class)
@Composable
@Destination
fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) {
@@ -55,31 +76,37 @@ fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) {
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 ->
flashIt(flashIt, onFinish = { showReboot, code ->
if (code != 0) {
text += "Error: exit code = $code.\nPlease save and check the log.\n"
}
if (showReboot) {
for (i in 0..2) {
text += "\n"
}
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()
},
@@ -140,39 +167,58 @@ fun FlashScreen(navigator: DestinationsNavigator, flashIt: FlashIt) {
@Parcelize
sealed class FlashIt : Parcelable {
data class FlashBoot(val bootUri: Uri? = null, val lkmUri: Uri? = null, val ota: Boolean) : FlashIt()
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) -> Unit,
flashIt: FlashIt, onFinish: (Boolean, Int) -> Unit,
onStdout: (String) -> Unit,
onStderr: (String) -> Unit
) {
when (flashIt) {
is FlashIt.FlashBoot -> installBoot(
flashIt.bootUri,
flashIt.lkmUri,
flashIt.boot,
flashIt.lkm,
flashIt.ota,
onFinish,
onStdout,
onStderr
)
is FlashIt.FlashModule -> installModule(flashIt.uri, 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(onBack: () -> Unit = {}, onSave: () -> Unit = {}) {
private fun TopBar(status: FlashingStatus, onBack: () -> Unit = {}, onSave: () -> Unit = {}) {
TopAppBar(
title = { Text(stringResource(R.string.install)) },
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.Filled.ArrowBack, contentDescription = null) }
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
},
actions = {
IconButton(onClick = onSave) {
@@ -188,5 +234,5 @@ private fun TopBar(onBack: () -> Unit = {}, onSave: () -> Unit = {}) {
@Preview
@Composable
fun InstallPreview() {
// InstallScreen(DestinationsNavigator(), uri = Uri.EMPTY)
InstallScreen(EmptyDestinationsNavigator)
}

View File

@@ -327,7 +327,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
@@ -354,7 +354,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

View File

@@ -3,9 +3,6 @@ package me.weishu.kernelsu.ui.screen
import android.app.Activity
import android.content.Intent
import android.net.Uri
import android.util.Log
import android.webkit.DownloadListener
import android.widget.Toast
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.StringRes
@@ -15,7 +12,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
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.filled.FileUpload
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
@@ -29,29 +26,30 @@ 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.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.core.net.toFile
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 com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.ShellUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import me.weishu.kernelsu.R
import me.weishu.kernelsu.ui.component.DialogHandle
import me.weishu.kernelsu.ui.component.rememberConfirmDialog
import me.weishu.kernelsu.ui.component.rememberLoadingDialog
import me.weishu.kernelsu.ui.component.rememberCustomDialog
import me.weishu.kernelsu.ui.screen.destinations.FlashScreenDestination
import me.weishu.kernelsu.ui.util.DownloadListener
import me.weishu.kernelsu.ui.util.download
import me.weishu.kernelsu.ui.util.getLKMUrl
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
@@ -67,40 +65,57 @@ fun InstallScreen(navigator: DestinationsNavigator) {
mutableStateOf<InstallMethod?>(null)
}
var lkmFileUri = null as Uri?
var lkmSelection by remember {
mutableStateOf<LkmSelection>(LkmSelection.KmiNone)
}
val onClickInstall = {
val onInstall = {
installMethod?.let { method ->
val flashIt = FlashIt.FlashBoot(
bootUri = if (method is InstallMethod.SelectFile) method.uri else null,
lkmUri = lkmFileUri,
boot = if (method is InstallMethod.SelectFile) method.uri else null,
lkm = lkmSelection,
ota = method is InstallMethod.DirectInstallToInactiveSlot
)
navigator.navigate(FlashScreenDestination(flashIt))
}
}
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 ->
lkmFileUri = uri
lkmSelection = LkmSelection.LkmUri(uri)
}
}
}
val onLkmUpload = {
selectLkmLauncher.launch(
Intent(Intent.ACTION_GET_CONTENT).apply {
type = "application/octet-stream"
}
)
selectLkmLauncher.launch(Intent(Intent.ACTION_GET_CONTENT).apply {
type = "application/octet-stream"
})
}
Scaffold(topBar = {
TopBar(
onBack = { navigator.popBackStack() },
onLkmUpload = onLkmUpload
onBack = { navigator.popBackStack() }, onLkmUpload = onLkmUpload
)
}) {
Column(modifier = Modifier.padding(it)) {
@@ -108,16 +123,23 @@ fun InstallScreen(navigator: DestinationsNavigator) {
installMethod = method
}
Row(
Column(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp)
) {
Button(
modifier = Modifier.fillMaxWidth(),
(lkmSelection as? LkmSelection.LkmUri)?.let {
Text(
stringResource(
id = R.string.selected_lkm,
it.uri.lastPathSegment ?: "(file)"
)
)
}
Button(modifier = Modifier.fillMaxWidth(),
enabled = installMethod != null,
onClick = {
onClickInstall()
onClickNext()
}) {
Text(
stringResource(id = R.string.install_next),
@@ -136,12 +158,12 @@ sealed class InstallMethod {
override val summary: String?
) : InstallMethod()
object DirectInstall : InstallMethod() {
data object DirectInstall : InstallMethod() {
override val label: Int
get() = R.string.direct_install
}
object DirectInstallToInactiveSlot : InstallMethod() {
data object DirectInstallToInactiveSlot : InstallMethod() {
override val label: Int
get() = R.string.install_inactive_slot
}
@@ -155,8 +177,7 @@ 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"
id = R.string.select_file_tip, if (isInitBoot()) "init_boot" else "boot"
)
val radioOptions =
mutableListOf<InstallMethod>(InstallMethod.SelectFile(summary = selectFileTip))
@@ -192,11 +213,9 @@ private fun SelectInstallMethod(onSelected: (InstallMethod) -> Unit = {}) {
when (option) {
is InstallMethod.SelectFile -> {
selectImageLauncher.launch(
Intent(Intent.ACTION_GET_CONTENT).apply {
type = "application/octet-stream"
}
)
selectImageLauncher.launch(Intent(Intent.ACTION_GET_CONTENT).apply {
type = "application/octet-stream"
})
}
is InstallMethod.DirectInstall -> {
@@ -244,24 +263,49 @@ private fun SelectInstallMethod(onSelected: (InstallMethod) -> Unit = {}) {
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun TopBar(onBack: () -> Unit = {}, onLkmUpload: () -> Unit = {}) {
TopAppBar(
title = { Text(stringResource(R.string.install)) },
navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.Filled.ArrowBack, contentDescription = null) }
},
actions = {
IconButton(onClick = onLkmUpload) {
Icon(Icons.Filled.FileUpload, contentDescription = null)
}
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
})
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
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(DestinationsNavigator())
InstallScreen(EmptyDestinationsNavigator)
}

View File

@@ -8,7 +8,17 @@ import android.widget.Toast
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
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
@@ -18,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
@@ -44,15 +74,22 @@ import me.weishu.kernelsu.ui.component.ConfirmResult
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.screen.destinations.WebScreenDestination
import me.weishu.kernelsu.ui.util.*
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) {
@@ -126,7 +163,11 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
navigator.navigate(FlashScreenDestination(FlashIt.FlashModule(it)))
}, onClickModule = { id, name, hasWebUi ->
if (hasWebUi) {
navigator.navigate(WebScreenDestination(id, name))
context.startActivity(Intent(context, WebUIActivity::class.java)
.setData(Uri.parse("kernelsu://webui/$id"))
.putExtra("id", id)
.putExtra("name", name)
)
}
})
}
@@ -392,15 +433,13 @@ private fun ModuleItem(
onClick: (ModuleViewModel.ModuleInfo) -> Unit
) {
ElevatedCard(
modifier = Modifier
.fillMaxWidth()
.clickable { onClick(module) },
modifier = Modifier.fillMaxWidth(),
colors = CardDefaults.elevatedCardColors(containerColor = MaterialTheme.colorScheme.surface)
) {
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,
@@ -465,7 +504,7 @@ private fun ModuleItem(
Spacer(modifier = Modifier.height(16.dp))
Divider(thickness = Dp.Hairline)
HorizontalDivider(thickness = Dp.Hairline)
Row(
horizontalArrangement = Arrangement.SpaceBetween,

View File

@@ -3,20 +3,52 @@ package me.weishu.kernelsu.ui.screen
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.widget.Toast
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
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.*
import androidx.compose.material3.*
import androidx.compose.runtime.*
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.material.icons.filled.Update
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
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.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
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.tooling.preview.Preview
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
@@ -24,11 +56,16 @@ 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.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.screen.destinations.FlashScreenDestination
import me.weishu.kernelsu.ui.util.getBugreportFile
import me.weishu.kernelsu.ui.util.shrinkModules
/**
* @author weishu
@@ -48,8 +85,13 @@ fun SettingScreen(navigator: DestinationsNavigator) {
AboutDialog(it)
}
val loadingDialog = rememberLoadingDialog()
val shrinkDialog = rememberConfirmDialog()
Column(modifier = Modifier.padding(paddingValues)) {
Column(
modifier = Modifier
.padding(paddingValues)
.verticalScroll(rememberScrollState())
) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
@@ -148,6 +190,37 @@ fun SettingScreen(navigator: DestinationsNavigator) {
}
)
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 = {
@@ -165,6 +238,110 @@ fun SettingScreen(navigator: DestinationsNavigator) {
}
}
@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
private fun TopBar(onBack: () -> Unit = {}) {
@@ -173,7 +350,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)
}

View File

@@ -6,14 +6,15 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.ImportExport
import androidx.compose.material.icons.filled.Sync
import androidx.compose.material.pullrefresh.PullRefreshIndicator
@@ -43,6 +44,7 @@ import androidx.compose.ui.platform.LocalClipboardManager
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
@@ -149,7 +151,9 @@ fun AppProfileTemplateScreen(
.padding(innerPadding)
.pullRefresh(refreshState)
) {
LazyColumn(Modifier.fillMaxSize()) {
LazyColumn(Modifier.fillMaxSize(), contentPadding = remember {
PaddingValues(bottom = 16.dp + 16.dp + 56.dp /* Scaffold Fab Spacing + Fab container height */)
}) {
items(viewModel.templateList, key = { it.id }) { app ->
TemplateItem(navigator, app)
}
@@ -214,7 +218,7 @@ private fun TopBar(
navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.Filled.ArrowBack, contentDescription = null) }
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
},
actions = {
IconButton(onClick = onSync) {

View File

@@ -10,7 +10,7 @@ import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
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.filled.DeleteForever
import androidx.compose.material.icons.filled.Save
import androidx.compose.material3.ExperimentalMaterial3Api
@@ -40,16 +40,12 @@ import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.result.ResultBackNavigator
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.profile.RootProfileConfig
import me.weishu.kernelsu.ui.util.deleteAppProfileTemplate
import me.weishu.kernelsu.ui.util.getAppProfileTemplate
import me.weishu.kernelsu.ui.util.setAppProfileTemplate
import me.weishu.kernelsu.ui.viewmodel.TemplateViewModel
import me.weishu.kernelsu.ui.viewmodel.toJSON
import org.json.JSONArray
import org.json.JSONObject
/**
* @author weishu
@@ -259,7 +255,7 @@ private fun TopBar(
}, navigationIcon = {
IconButton(
onClick = onBack
) { Icon(Icons.Filled.ArrowBack, contentDescription = null) }
) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) }
}, actions = {
if (readOnly) {
return@TopAppBar
@@ -279,7 +275,6 @@ private fun TopBar(
})
}
@OptIn(ExperimentalComposeUiApi::class)
@Composable
private fun TextEdit(
label: String,

View File

@@ -1,77 +0,0 @@
package me.weishu.kernelsu.ui.screen
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.util.Log
import android.webkit.WebResourceRequest
import android.webkit.WebResourceResponse
import android.webkit.WebView
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.webkit.WebViewAssetLoader
import com.google.accompanist.web.AccompanistWebViewClient
import com.google.accompanist.web.WebView
import com.google.accompanist.web.rememberWebViewState
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import me.weishu.kernelsu.ui.webui.SuFilePathHandler
import me.weishu.kernelsu.ui.webui.WebViewInterface
import me.weishu.kernelsu.ui.webui.showSystemUI
import java.io.File
@SuppressLint("SetJavaScriptEnabled")
@Destination
@Composable
fun WebScreen(navigator: DestinationsNavigator, moduleId: String, moduleName: String) {
val context = LocalContext.current
DisposableEffect(Unit) {
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
WebView.setWebContentsDebuggingEnabled(prefs.getBoolean("enable_web_debugging", false))
onDispose {
if (WebViewInterface.isHideSystemUI && context is Activity) {
showSystemUI(context.window)
}
}
}
Scaffold { innerPadding ->
val webRoot = File("/data/adb/modules/${moduleId}/webroot")
val webViewAssetLoader = WebViewAssetLoader.Builder()
.setDomain("mui.kernelsu.org")
.addPathHandler("/",
SuFilePathHandler(context, webRoot)
)
.build()
val webViewClient = object : AccompanistWebViewClient() {
override fun shouldInterceptRequest(
view: WebView,
request: WebResourceRequest
): WebResourceResponse? {
return webViewAssetLoader.shouldInterceptRequest(request.url)
}
}
WebView(
state = rememberWebViewState(url = "https://mui.kernelsu.org/index.html"),
Modifier
.fillMaxSize()
.padding(innerPadding),
client = webViewClient,
factory = { context ->
WebView(context).apply {
settings.javaScriptEnabled = true
settings.domStorageEnabled = true
settings.allowFileAccess = false
addJavascriptInterface(WebViewInterface(context, this), "ksu")
}
})
}
}

View File

@@ -1,17 +1,17 @@
package me.weishu.kernelsu.ui.theme
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.*
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.material3.surfaceColorAtElevation
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.unit.dp
import androidx.core.view.ViewCompat
import com.google.accompanist.systemuicontroller.rememberSystemUiController
private val DarkColorScheme = darkColorScheme(

View File

@@ -7,10 +7,10 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.net.Uri
import android.os.Build
import android.os.Environment
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import me.weishu.kernelsu.getKMI
/**
* @author weishu
@@ -95,38 +95,6 @@ fun checkNewVersion(): Triple<Int, String, String> {
}
return defaultValue
}
fun getLKMUrl(): Result<Pair<String, String>> {
val url = "https://api.github.com/repos/tiann/KernelSU/releases/latest"
val kmi = getKMI() ?: return Result.failure(RuntimeException("Get KMI failed"))
runCatching {
okhttp3.OkHttpClient().newCall(okhttp3.Request.Builder().url(url).build()).execute()
.use { response ->
val body = response.body?.string() ?: return Result.failure(RuntimeException("request body failed"))
if (!response.isSuccessful) {
return Result.failure(RuntimeException("Request failed, code: ${response.code}, message: $body"))
}
val json = org.json.JSONObject(body)
val assets = json.getJSONArray("assets")
for (i in 0 until assets.length()) {
val asset = assets.getJSONObject(i)
val name = asset.getString("name")
if (!name.endsWith(".ko")) {
continue
}
if (name.contains(kmi)) {
return Result.success(Pair(name, asset.getString("browser_download_url")))
}
}
}
}.onFailure {
return Result.failure(it)
}
return Result.failure(RuntimeException("Cannot find LKM for $kmi"))
}
@Composable
fun DownloadListener(context: Context, onDownloaded: (Uri) -> Unit) {
@@ -156,12 +124,20 @@ fun DownloadListener(context: Context, onDownloaded: (Uri) -> Unit) {
}
}
}
context.registerReceiver(
receiver,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)
)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(
receiver,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE),
Context.RECEIVER_EXPORTED
)
} else {
context.registerReceiver(
receiver,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)
)
}
onDispose {
context.unregisterReceiver(receiver)
}
}
}
}

View File

@@ -391,9 +391,9 @@ public class HanziToPinyin {
return sInstance;
}
// Check if zh_CN collation data is available
final Locale locale[] = Collator.getAvailableLocales();
for (int i = 0; i < locale.length; i++) {
if (locale[i].equals(Locale.CHINA) || locale[i].getLanguage().contains("zh")) {
final Locale[] locale = Collator.getAvailableLocales();
for (Locale value : locale) {
if (value.equals(Locale.CHINA) || value.getLanguage().contains("zh")) {
// Do self validation just once.
if (DEBUG) {
Log.d(TAG, "Self validation. Result: " + doSelfValidation());
@@ -508,7 +508,7 @@ public class HanziToPinyin {
* Token. If these is no China collator, the empty token array is returned.
*/
public ArrayList<Token> get(final String input) {
ArrayList<Token> tokens = new ArrayList<Token>();
ArrayList<Token> tokens = new ArrayList<>();
if (!mHasChinaCollator || TextUtils.isEmpty(input)) {
// return empty tokens.
return tokens;

View File

@@ -3,12 +3,16 @@ package me.weishu.kernelsu.ui.util
import android.net.Uri
import android.os.Build
import android.os.Environment
import android.os.Parcelable
import android.os.SystemClock
import android.util.Log
import com.topjohnwu.superuser.CallbackList
import com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.ShellUtils
import com.topjohnwu.superuser.io.SuFile
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize
import me.weishu.kernelsu.BuildConfig
import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.ksuApp
@@ -37,6 +41,13 @@ fun getRootShell(globalMnt: Boolean = false): Shell {
}
}
inline fun <T> withNewRootShell(
globalMnt: Boolean = false,
block: Shell.() -> T
): T {
return createRootShell(globalMnt).use(block)
}
fun createRootShell(globalMnt: Boolean = false): Shell {
Shell.enableVerboseLogging = BuildConfig.DEBUG
val builder = Shell.Builder.create()
@@ -47,19 +58,34 @@ fun createRootShell(globalMnt: Boolean = false): Shell {
builder.build(getKsuDaemonPath(), "debug", "su")
}
} catch (e: Throwable) {
Log.e(TAG, "su failed: ", e)
builder.build("sh")
Log.w(TAG, "ksu failed: ", e)
try {
if (globalMnt) {
builder.build("su")
} else {
builder.build("su", "-mm")
}
} catch (e: Throwable) {
Log.e(TAG, "su failed: ", e)
builder.build("sh")
}
}
}
fun execKsud(args: String): Boolean {
val shell = getRootShell()
return ShellUtils.fastCmdResult(shell, "${getKsuDaemonPath()} $args")
fun execKsud(args: String, newShell: Boolean = false): Boolean {
return if (newShell) {
withNewRootShell {
ShellUtils.fastCmdResult(this, "${getKsuDaemonPath()} $args")
}
} else {
ShellUtils.fastCmdResult(getRootShell(), "${getKsuDaemonPath()} $args")
}
}
fun install() {
val start = SystemClock.elapsedRealtime()
val result = execKsud("install")
val magiskboot = File(ksuApp.applicationInfo.nativeLibraryDir, "libmagiskboot.so").absolutePath
val result = execKsud("install --magiskboot $magiskboot", true)
Log.w(TAG, "install result: $result, cost: ${SystemClock.elapsedRealtime() - start}ms")
}
@@ -89,21 +115,44 @@ fun toggleModule(id: String, enable: Boolean): Boolean {
} else {
"module disable $id"
}
val result = execKsud(cmd)
val result = execKsud(cmd, true)
Log.i(TAG, "$cmd result: $result")
return result
}
fun uninstallModule(id: String): Boolean {
val cmd = "module uninstall $id"
val result = execKsud(cmd)
val result = execKsud(cmd, true)
Log.i(TAG, "uninstall module $id result: $result")
return result
}
fun installModule(
private fun flashWithIO(
cmd: String,
onStdout: (String) -> Unit,
onStderr: (String) -> Unit
): Shell.Result {
val stdoutCallback: CallbackList<String?> = object : CallbackList<String?>() {
override fun onAddElement(s: String?) {
onStdout(s ?: "")
}
}
val stderrCallback: CallbackList<String?> = object : CallbackList<String?>() {
override fun onAddElement(s: String?) {
onStderr(s ?: "")
}
}
return withNewRootShell {
newJob().add(cmd).to(stdoutCallback, stderrCallback).exec()
}
}
fun flashModule(
uri: Uri,
onFinish: (Boolean) -> Unit,
onFinish: (Boolean, Int) -> Unit,
onStdout: (String) -> Unit,
onStderr: (String) -> Unit
): Boolean {
@@ -114,38 +163,50 @@ fun installModule(
this?.copyTo(output)
}
val cmd = "module install ${file.absolutePath}"
val shell = createRootShell()
val stdoutCallback: CallbackList<String?> = object : CallbackList<String?>() {
override fun onAddElement(s: String?) {
onStdout(s ?: "")
}
}
val stderrCallback: CallbackList<String?> = object : CallbackList<String?>() {
override fun onAddElement(s: String?) {
onStderr(s ?: "")
}
}
val result =
shell.newJob().add("${getKsuDaemonPath()} $cmd").to(stdoutCallback, stderrCallback)
.exec()
val result = flashWithIO("${getKsuDaemonPath()} $cmd", onStdout, onStderr)
Log.i("KernelSU", "install module $uri result: $result")
file.delete()
onFinish(result.isSuccess)
onFinish(result.isSuccess, result.code)
return result.isSuccess
}
}
fun restoreBoot(
onFinish: (Boolean, Int) -> Unit, onStdout: (String) -> Unit, onStderr: (String) -> Unit
): Boolean {
val magiskboot = File(ksuApp.applicationInfo.nativeLibraryDir, "libmagiskboot.so")
val result = flashWithIO("${getKsuDaemonPath()} boot-restore -f --magiskboot $magiskboot", onStdout, onStderr)
onFinish(result.isSuccess, result.code)
return result.isSuccess
}
fun uninstallPermanently(
onFinish: (Boolean, Int) -> Unit, onStdout: (String) -> Unit, onStderr: (String) -> Unit
): Boolean {
val magiskboot = File(ksuApp.applicationInfo.nativeLibraryDir, "libmagiskboot.so")
val result = flashWithIO("${getKsuDaemonPath()} uninstall --magiskboot $magiskboot", onStdout, onStderr)
onFinish(result.isSuccess, result.code)
return result.isSuccess
}
suspend fun shrinkModules(): Boolean = withContext(Dispatchers.IO) {
execKsud("module shrink", true)
}
@Parcelize
sealed class LkmSelection : Parcelable {
data class LkmUri(val uri: Uri) : LkmSelection()
data class KmiString(val value: String) : LkmSelection()
data object KmiNone : LkmSelection()
}
fun installBoot(
bootUri: Uri?,
lkmUri: Uri?,
lkm: LkmSelection,
ota: Boolean,
onFinish: (Boolean) -> Unit,
onFinish: (Boolean, Int) -> Unit,
onStdout: (String) -> Unit,
onStderr: (String) -> Unit,
): Boolean {
@@ -162,17 +223,6 @@ fun installBoot(
}
}
val lkmFile = lkmUri?.let { uri ->
with(resolver.openInputStream(uri)) {
val lkmFile = File(ksuApp.cacheDir, "kernelsu-tmp-lkm.ko")
lkmFile.outputStream().use { output ->
this?.copyTo(output)
}
lkmFile
}
}
val magiskboot = File(ksuApp.applicationInfo.nativeLibraryDir, "libmagiskboot.so")
var cmd = "boot-patch --magiskboot ${magiskboot.absolutePath}"
@@ -187,8 +237,27 @@ fun installBoot(
cmd += " -u"
}
lkmFile?.let {
cmd += " -m ${it.absolutePath}"
var lkmFile: File? = null
when (lkm) {
is LkmSelection.LkmUri -> {
lkmFile = with(resolver.openInputStream(lkm.uri)) {
val file = File(ksuApp.cacheDir, "kernelsu-tmp-lkm.ko")
file.outputStream().use { output ->
this?.copyTo(output)
}
file
}
cmd += " -m ${lkmFile.absolutePath}"
}
is LkmSelection.KmiString -> {
cmd += " --kmi ${lkm.value}"
}
LkmSelection.KmiNone -> {
// do nothing
}
}
// output dir
@@ -196,30 +265,14 @@ fun installBoot(
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
cmd += " -o $downloadsDir"
val shell = createRootShell()
val stdoutCallback: CallbackList<String?> = object : CallbackList<String?>() {
override fun onAddElement(s: String?) {
onStdout(s ?: "")
}
}
val stderrCallback: CallbackList<String?> = object : CallbackList<String?>() {
override fun onAddElement(s: String?) {
onStderr(s ?: "")
}
}
val result =
shell.newJob().add("${getKsuDaemonPath()} $cmd").to(stdoutCallback, stderrCallback)
.exec()
val result = flashWithIO("${getKsuDaemonPath()} $cmd", onStdout, onStderr)
Log.i("KernelSU", "install boot result: ${result.isSuccess}")
bootFile?.delete()
lkmFile?.delete()
// if boot uri is empty, it is direct install, when success, we should show reboot button
onFinish(bootUri == null && result.isSuccess)
onFinish(bootUri == null && result.isSuccess, result.code)
return result.isSuccess
}
@@ -257,6 +310,19 @@ fun isInitBoot(): Boolean {
.toInt() >= Build.VERSION_CODES.TIRAMISU
}
suspend fun getCurrentKmi(): String = withContext(Dispatchers.IO) {
val shell = getRootShell()
val cmd = "boot-info current-kmi"
ShellUtils.fastCmd(shell, "${getKsuDaemonPath()} $cmd")
}
suspend fun getSupportedKmis(): List<String> = withContext(Dispatchers.IO) {
val shell = getRootShell()
val cmd = "boot-info supported-kmi"
val out = shell.newJob().add("${getKsuDaemonPath()} $cmd").to(ArrayList(), null).exec().out
out.filter { it.isNotBlank() }.map { it.trim() }
}
fun overlayFsAvailable(): Boolean {
val shell = getRootShell()
// check /proc/filesystems
@@ -292,9 +358,8 @@ fun getSepolicy(pkg: String): String {
fun setSepolicy(pkg: String, rules: String): Boolean {
val shell = getRootShell()
val result =
shell.newJob().add("${getKsuDaemonPath()} profile set-sepolicy $pkg '$rules'")
.to(ArrayList(), null).exec()
val result = shell.newJob().add("${getKsuDaemonPath()} profile set-sepolicy $pkg '$rules'")
.to(ArrayList(), null).exec()
Log.i(TAG, "set sepolicy result: ${result.code}")
return result.isSuccess
}
@@ -308,22 +373,21 @@ fun listAppProfileTemplates(): List<String> {
fun getAppProfileTemplate(id: String): String {
val shell = getRootShell()
return shell.newJob().add("${getKsuDaemonPath()} profile get-template '${id}'")
.to(ArrayList(), null)
.exec().out.joinToString("\n")
.to(ArrayList(), null).exec().out.joinToString("\n")
}
fun setAppProfileTemplate(id: String, template: String): Boolean {
val shell = getRootShell()
return shell.newJob().add("${getKsuDaemonPath()} profile set-template '${id}' '${template}'")
.to(ArrayList(), null)
.exec().isSuccess
val escapedTemplate = template.replace("\"", "\\\"")
val cmd = """${getKsuDaemonPath()} profile set-template "$id" "$escapedTemplate'""""
return shell.newJob().add(cmd)
.to(ArrayList(), null).exec().isSuccess
}
fun deleteAppProfileTemplate(id: String): Boolean {
val shell = getRootShell()
return shell.newJob().add("${getKsuDaemonPath()} profile delete-template '${id}'")
.to(ArrayList(), null)
.exec().isSuccess
.to(ArrayList(), null).exec().isSuccess
}
fun forceStopApp(packageName: String) {
@@ -336,11 +400,13 @@ fun launchApp(packageName: String) {
val shell = getRootShell()
val result =
shell.newJob().add("monkey -p $packageName -c android.intent.category.LAUNCHER 1").exec()
shell.newJob()
.add("cmd package resolve-activity --brief $packageName | tail -n 1 | xargs cmd activity start-activity -n")
.exec()
Log.i(TAG, "launch $packageName result: $result")
}
fun restartApp(packageName: String) {
forceStopApp(packageName)
launchApp(packageName)
}
}

View File

@@ -45,7 +45,7 @@ fun getBugreportFile(context: Context): File {
shell.newJob().add("tar -czf ${tombstonesFile.absolutePath} -C /data/tombstones .").exec()
shell.newJob().add("tar -czf ${dropboxFile.absolutePath} -C /data/system/dropbox .").exec()
shell.newJob().add("tar -czf ${pstoreFile.absolutePath} -C /sys/fs/pstore .").exec()
shell.newJob().add("tar -czf ${diagFile.absolutePath} -C /data/vendor/diag .").exec()
shell.newJob().add("tar -czf ${diagFile.absolutePath} -C /data/vendor/diag . --exclude=./minidump.gz").exec()
shell.newJob().add("tar -czf ${opulsFile.absolutePath} -C /mnt/oplus/op2/media/log/boot_log/ .").exec()
shell.newJob().add("tar -czf ${bootlogFile.absolutePath} -C /data/adb/ksu/log .").exec()

View File

@@ -12,7 +12,9 @@ fun getSELinuxStatus(): String {
.build("sh")
val list = ArrayList<String>()
val result = shell.newJob().add("getenforce").to(list, list).exec()
val result = shell.use {
it.newJob().add("getenforce").to(list, list).exec()
}
val output = result.out.joinToString("\n").trim()
if (result.isSuccess) {

View File

@@ -1,6 +1,5 @@
package me.weishu.kernelsu.ui.viewmodel
import android.net.Uri
import android.os.SystemClock
import android.util.Log
import androidx.compose.runtime.derivedStateOf
@@ -16,7 +15,7 @@ import me.weishu.kernelsu.ui.util.overlayFsAvailable
import org.json.JSONArray
import org.json.JSONObject
import java.text.Collator
import java.util.*
import java.util.Locale
class ModuleViewModel : ViewModel() {

View File

@@ -107,7 +107,7 @@ class SuperUserViewModel : ViewModel() {
}
}
val intent = Intent(ksuApp, KsuService::class.java);
val intent = Intent(ksuApp, KsuService::class.java)
val task = KsuService.bindOrTask(
intent,
@@ -119,7 +119,7 @@ class SuperUserViewModel : ViewModel() {
}
private fun stopKsuService() {
val intent = Intent(ksuApp, KsuService::class.java);
val intent = Intent(ksuApp, KsuService::class.java)
KsuService.stop(intent)
}

View File

@@ -22,6 +22,8 @@ import org.json.JSONArray
import org.json.JSONObject
import java.text.Collator
import java.util.Locale
import java.util.concurrent.TimeUnit
/**
* @author weishu
@@ -136,7 +138,13 @@ class TemplateViewModel : ViewModel() {
private fun fetchRemoteTemplates() {
runCatching {
OkHttpClient().newCall(
val client: OkHttpClient = OkHttpClient.Builder()
.connectTimeout(5, TimeUnit.SECONDS)
.writeTimeout(5, TimeUnit.SECONDS)
.readTimeout(10, TimeUnit.SECONDS)
.build()
client.newCall(
Request.Builder().url(TEMPLATE_INDEX_URL).build()
).execute().use { response ->
if (!response.isSuccessful) {
@@ -146,7 +154,8 @@ private fun fetchRemoteTemplates() {
Log.i(TAG, "fetchRemoteTemplates: $remoteTemplateIds")
0.until(remoteTemplateIds.length()).forEach { i ->
val id = remoteTemplateIds.getString(i)
val templateJson = OkHttpClient().newCall(
Log.i(TAG, "fetch template: $id")
val templateJson = client.newCall(
Request.Builder().url(TEMPLATE_URL.format(id)).build()
).runCatching {
execute().use { response ->
@@ -226,7 +235,7 @@ private fun fromJSON(templateJson: JSONObject): TemplateViewModel.TemplateInfo?
val groupsJsonArray = templateJson.optJSONArray("groups")
val capabilitiesJsonArray = templateJson.optJSONArray("capabilities")
val context = templateJson.optString("context").takeIf { it.isNotEmpty() }
?: Natives.KERNEL_SU_DOMAIN;
?: Natives.KERNEL_SU_DOMAIN
val namespace = templateJson.optString("namespace").takeIf { it.isNotEmpty() }
?: Natives.Profile.Namespace.INHERITED.name
@@ -267,13 +276,13 @@ fun TemplateViewModel.TemplateInfo.toJSON(): JSONObject {
if (template.author.isNotEmpty()) {
put("author", template.author)
}
put("namespace", Natives.Profile.Namespace.values()[template.namespace].name)
put("namespace", Natives.Profile.Namespace.entries[template.namespace].name)
put("uid", template.uid)
put("gid", template.gid)
if (template.groups.isNotEmpty()) {
put("groups", JSONArray(
Groups.values().filter {
Groups.entries.filter {
template.groups.contains(it.gid)
}.map {
it.name
@@ -283,7 +292,7 @@ fun TemplateViewModel.TemplateInfo.toJSON(): JSONObject {
if (template.capabilities.isNotEmpty()) {
put("capabilities", JSONArray(
Capabilities.values().filter {
Capabilities.entries.filter {
template.capabilities.contains(it.cap)
}.map {
it.name

View File

@@ -51,89 +51,38 @@ class MimeUtil {
final String extension = fileName.substring(finalFullStop + 1).toLowerCase();
switch (extension) {
case "webm":
return "video/webm";
case "mpeg":
case "mpg":
return "video/mpeg";
case "mp3":
return "audio/mpeg";
case "wasm":
return "application/wasm";
case "xhtml":
case "xht":
case "xhtm":
return "application/xhtml+xml";
case "flac":
return "audio/flac";
case "ogg":
case "oga":
case "opus":
return "audio/ogg";
case "wav":
return "audio/wav";
case "m4a":
return "audio/x-m4a";
case "gif":
return "image/gif";
case "jpeg":
case "jpg":
case "jfif":
case "pjpeg":
case "pjp":
return "image/jpeg";
case "png":
return "image/png";
case "apng":
return "image/apng";
case "svg":
case "svgz":
return "image/svg+xml";
case "webp":
return "image/webp";
case "mht":
case "mhtml":
return "multipart/related";
case "css":
return "text/css";
case "html":
case "htm":
case "shtml":
case "shtm":
case "ehtml":
return "text/html";
case "js":
case "mjs":
return "application/javascript";
case "xml":
return "text/xml";
case "mp4":
case "m4v":
return "video/mp4";
case "ogv":
case "ogm":
return "video/ogg";
case "ico":
return "image/x-icon";
case "woff":
return "application/font-woff";
case "gz":
case "tgz":
return "application/gzip";
case "json":
return "application/json";
case "pdf":
return "application/pdf";
case "zip":
return "application/zip";
case "bmp":
return "image/bmp";
case "tiff":
case "tif":
return "image/tiff";
default:
return null;
}
return switch (extension) {
case "webm" -> "video/webm";
case "mpeg", "mpg" -> "video/mpeg";
case "mp3" -> "audio/mpeg";
case "wasm" -> "application/wasm";
case "xhtml", "xht", "xhtm" -> "application/xhtml+xml";
case "flac" -> "audio/flac";
case "ogg", "oga", "opus" -> "audio/ogg";
case "wav" -> "audio/wav";
case "m4a" -> "audio/x-m4a";
case "gif" -> "image/gif";
case "jpeg", "jpg", "jfif", "pjpeg", "pjp" -> "image/jpeg";
case "png" -> "image/png";
case "apng" -> "image/apng";
case "svg", "svgz" -> "image/svg+xml";
case "webp" -> "image/webp";
case "mht", "mhtml" -> "multipart/related";
case "css" -> "text/css";
case "html", "htm", "shtml", "shtm", "ehtml" -> "text/html";
case "js", "mjs" -> "application/javascript";
case "xml" -> "text/xml";
case "mp4", "m4v" -> "video/mp4";
case "ogv", "ogm" -> "video/ogg";
case "ico" -> "image/x-icon";
case "woff" -> "application/font-woff";
case "gz", "tgz" -> "application/gzip";
case "json" -> "application/json";
case "pdf" -> "application/pdf";
case "zip" -> "application/zip";
case "bmp" -> "image/bmp";
case "tiff", "tif" -> "image/tiff";
default -> null;
};
}
}

View File

@@ -13,13 +13,10 @@ import com.topjohnwu.superuser.io.SuFile;
import com.topjohnwu.superuser.io.SuFileInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.GZIPInputStream;
import me.weishu.kernelsu.ui.util.KsuCliKt;
/**
* Handler class to open files from file system by root access
* For more information about android storage please refer to
@@ -84,14 +81,14 @@ public final class SuFilePathHandler implements WebViewAssetLoader.PathHandler {
* which files can be loaded.
* @throws IllegalArgumentException if the directory is not allowed.
*/
public SuFilePathHandler(@NonNull Context context, @NonNull File directory) {
public SuFilePathHandler(@NonNull Context context, @NonNull File directory, Shell rootShell) {
try {
mDirectory = new File(getCanonicalDirPath(directory));
if (!isAllowedInternalStorageDir(context)) {
throw new IllegalArgumentException("The given directory \"" + directory
+ "\" doesn't exist under an allowed app internal storage directory");
}
mShell = KsuCliKt.createRootShell(true);
mShell = rootShell;
} catch (IOException e) {
throw new IllegalArgumentException(
"Failed to resolve the canonical path for the given directory: "
@@ -172,8 +169,7 @@ public final class SuFilePathHandler implements WebViewAssetLoader.PathHandler {
return path.endsWith(".svgz") ? new GZIPInputStream(stream) : stream;
}
public static InputStream openFile(@NonNull File file, @NonNull Shell shell) throws FileNotFoundException,
IOException {
public static InputStream openFile(@NonNull File file, @NonNull Shell shell) throws IOException {
SuFile suFile = new SuFile(file.getAbsolutePath());
suFile.setShell(shell);
InputStream fis = SuFileInputStream.open(suFile);

View File

@@ -0,0 +1,68 @@
package me.weishu.kernelsu.ui.webui
import android.annotation.SuppressLint
import android.app.ActivityManager
import android.content.Context
import android.os.Bundle
import android.webkit.WebResourceRequest
import android.webkit.WebResourceResponse
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.activity.ComponentActivity
import androidx.webkit.WebViewAssetLoader
import com.topjohnwu.superuser.Shell
import me.weishu.kernelsu.ui.util.createRootShell
import java.io.File
@SuppressLint("SetJavaScriptEnabled")
class WebUIActivity : ComponentActivity() {
private lateinit var webviewInterface: WebViewInterface
private var rootShell: Shell? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val moduleId = intent.getStringExtra("id")!!
val name = intent.getStringExtra("name")!!
setTaskDescription(ActivityManager.TaskDescription("KernelSU - $name"))
val prefs = getSharedPreferences("settings", Context.MODE_PRIVATE)
WebView.setWebContentsDebuggingEnabled(prefs.getBoolean("enable_web_debugging", false))
val webRoot = File("/data/adb/modules/${moduleId}/webroot")
val rootShell = createRootShell(true).also { this.rootShell = it }
val webViewAssetLoader = WebViewAssetLoader.Builder()
.setDomain("mui.kernelsu.org")
.addPathHandler(
"/",
SuFilePathHandler(this, webRoot, rootShell)
)
.build()
val webViewClient = object : WebViewClient() {
override fun shouldInterceptRequest(
view: WebView,
request: WebResourceRequest
): WebResourceResponse? {
return webViewAssetLoader.shouldInterceptRequest(request.url)
}
}
val webView = WebView(this).apply {
settings.javaScriptEnabled = true
settings.domStorageEnabled = true
settings.allowFileAccess = false
webviewInterface = WebViewInterface(this@WebUIActivity, this)
addJavascriptInterface(webviewInterface, "ksu")
setWebViewClient(webViewClient)
loadUrl("https://mui.kernelsu.org/index.html")
}
setContentView(webView)
}
override fun onDestroy() {
super.onDestroy()
runCatching { rootShell?.close() }
}
}

View File

@@ -15,20 +15,16 @@ import androidx.core.view.WindowInsetsControllerCompat
import com.topjohnwu.superuser.CallbackList
import com.topjohnwu.superuser.ShellUtils
import me.weishu.kernelsu.ui.util.createRootShell
import me.weishu.kernelsu.ui.util.withNewRootShell
import org.json.JSONArray
import org.json.JSONObject
import java.util.concurrent.CompletableFuture
class WebViewInterface(val context: Context, private val webView: WebView) {
companion object {
var isHideSystemUI: Boolean = false
}
@JavascriptInterface
fun exec(cmd: String): String {
val shell = createRootShell(true)
return ShellUtils.fastCmd(shell, cmd)
return withNewRootShell(true) { ShellUtils.fastCmd(this, cmd) }
}
@JavascriptInterface
@@ -63,8 +59,9 @@ class WebViewInterface(val context: Context, private val webView: WebView) {
processOptions(finalCommand, options)
finalCommand.append(cmd)
val shell = createRootShell(true)
val result = shell.newJob().add(finalCommand.toString()).to(ArrayList(), ArrayList()).exec()
val result = withNewRootShell(true) {
newJob().add(finalCommand.toString()).to(ArrayList(), ArrayList()).exec()
}
val stdout = result.out.joinToString(separator = "\n")
val stderr = result.err.joinToString(separator = "\n")
@@ -148,6 +145,8 @@ class WebViewInterface(val context: Context, private val webView: WebView) {
webView.loadUrl(emitErrCode)
}
}
}.whenComplete { _, _ ->
runCatching { shell.close() }
}
}
@@ -167,7 +166,6 @@ class WebViewInterface(val context: Context, private val webView: WebView) {
} else {
showSystemUI(context.window)
}
isHideSystemUI = enable
}
}
}

View File

@@ -6,7 +6,7 @@
<string name="home_working">يعمل</string>
<string name="home_working_version">الإصدار: %d</string>
<string name="home_superuser_count">مستخدمين الجذر: %d</string>
<string name="home_module_count">الوحدات: %d</string>
<string name="home_module_count">الإضافات: %d</string>
<string name="home_unsupported">غير مدعوم</string>
<string name="home_unsupported_reason">KernelSU يدعم GKI kernels فقط</string>
<string name="home_kernel">إصدار النواة</string>
@@ -18,10 +18,10 @@
<string name="selinux_status_permissive">متساهل</string>
<string name="selinux_status_unknown">مجهول</string>
<string name="superuser">مستخدم خارق</string>
<string name="module_failed_to_enable">فشل في تمكين الوحدة: %s</string>
<string name="module_failed_to_disable">فشل تعطيل الوحدة : %s</string>
<string name="module_empty">لا توجد وحدات مثبتة</string>
<string name="module">الوحدات</string>
<string name="module_failed_to_enable">فشل في تمكين الإضافة: %s</string>
<string name="module_failed_to_disable">فشل تعطيل الإضافة : %s</string>
<string name="module_empty">لا توجد إضافات مثبتة</string>
<string name="module">الإضافات</string>
<string name="uninstall">إلغاء التثبيت</string>
<string name="module_install">تثبيت الوحدة</string>
<string name="install">تثبيت</string>
@@ -33,28 +33,28 @@
<string name="reboot_download">إعادة تشغيل إلى وضع Download</string>
<string name="reboot_edl">إعادة تشغيل إلى وضع EDL</string>
<string name="about">من نحن</string>
<string name="module_uninstall_confirm">هل أنت متأكد أنك تريد إلغاء تثبيت الوحدة %s ?</string>
<string name="module_uninstall_confirm">هل أنت متأكد أنك تريد إلغاء تثبيت الإضافة %s ?</string>
<string name="module_uninstall_success">تم إلغاء تثبيتها %s</string>
<string name="module_uninstall_failed">فشل إلغاء التثبيت: %s</string>
<string name="module_version">الإصدار</string>
<string name="module_author">المطور</string>
<string name="module_overlay_fs_not_available">التراكبات غير متوفرة ، لا يمكن للوحدة أن تعمل!</string>
<string name="module_overlay_fs_not_available">التراكبات غير متوفرة ، لا يمكن للإضافة أن تعمل!</string>
<string name="refresh">إنعاش</string>
<string name="show_system_apps">إظهار تطبيقات النظام</string>
<string name="hide_system_apps">إخفاء تطبيقات النظام</string>
<string name="send_log">إرسال السجلات</string>
<string name="safe_mode">الوضع الآمن</string>
<string name="reboot_to_apply">إعادة التشغيل لتطبيق التغييرات</string>
<string name="module_magisk_conflict">تم تعطيل الوحدات النمطية لأنها تتعارض مع Magisk!</string>
<string name="module_magisk_conflict">تم تعطيل الإضافات لأنها تتعارض مع Magisk!</string>
<string name="home_learn_kernelsu">تعلم KernelSU</string>
<string name="home_learn_kernelsu_url">https://kernelsu.org/guide/what-is-kernelsu.html</string>
<string name="home_click_to_learn_kernelsu">تعرف على كيفية تثبيت KernelSU واستخدام الوحدات</string>
<string name="home_click_to_learn_kernelsu">تعرف على كيفية تثبيت KernelSU واستخدام الإضافات</string>
<string name="home_support_title">إدعمنا</string>
<string name="home_support_content">KernelSU سيظل دائماً مجانياً ومفتوح المصدر. مع ذلك، يمكنك أن تظهر لنا أنك تهتم بالتبرع.</string>
<string name="about_source_code"><![CDATA[أنظر إلى مصدر البرمجة في %1$s<br/>إنضم إلى قناتنا في %2$s ]]></string>
<string name="profile_capabilities">القدرات</string>
<string name="module_update">تحديث</string>
<string name="module_downloading">تحمبل الوحدة : %s</string>
<string name="module_downloading">تحميل الإضافة: %s</string>
<string name="module_start_downloading">ابدأ التنزيل: %s</string>
<string name="new_version_available">الإصدار الجديد: %s متاح ، انقر للتحديث</string>
<string name="launch_app">تشغيل</string>
@@ -66,13 +66,13 @@
<string name="profile_groups">مجموعات</string>
<string name="profile_custom">مُخصّص</string>
<string name="profile_namespace">تركيب مساحة الاسم</string>
<string name="profile_umount_modules">الغاء تحميل الوحدات</string>
<string name="profile_umount_modules">الغاء تحميل الإضافات</string>
<string name="failed_to_update_app_profile">فشل تحديث ملف تعريف التطبيق لـ %s</string>
<string name="profile_selinux_context">سياق SELinux</string>
<string name="force_stop_app">ايقاف إجباري</string>
<string name="settings_umount_modules_default">الغاء تحميل الوحدات بشكل افتراضي</string>
<string name="settings_umount_modules_default_summary">القيمة الافتراضية العامة ل \"إلغاء تحميل الوحدات \" في ملفات تعريف التطبيقات. إذا تم تمكينه ، إزالة جميع تعديلات الوحدة النمطية على النظام للتطبيقات التي لا تحتوي على مجموعة ملف تعريف.</string>
<string name="profile_umount_modules_summary">سيسمح تمكين هذا الخيار ل KernelSU باستعادة أي ملفات معدلة بواسطة الوحدات النمطية لهذا التطبيق.</string>
<string name="settings_umount_modules_default">الغاء تحميل الإضافات بشكل افتراضي</string>
<string name="settings_umount_modules_default_summary">القيمة الافتراضية العامة لـ\"إلغاء تحميل الإضافات\" في ملفات تعريف التطبيقات. إذا تم تمكينه، إزالة جميع تعديلات الإضافات على النظام للتطبيقات التي لا تحتوي على مجموعة ملف تعريف.</string>
<string name="profile_umount_modules_summary">سيسمح تمكين هذا الخيار لـKernelSU باستعادة أي ملفات معدلة بواسطة الإضافات لهذا التطبيق.</string>
<string name="profile_selinux_domain">المجال</string>
<string name="profile_selinux_rules">القواعد</string>
<string name="restart_app">إعادة تشغيل التطبيق</string>
@@ -115,4 +115,19 @@
<string name="install_inactive_slot_warning">سيتم **إجبار** جهازك على التمهيد إلى الفتحة غير النشطة الحالية بعد إعادة التشغيل!
\nاستخدم هذا الخيار فقط بعد انتهاء التحديث.
\nأستمرار؟</string>
<string name="select_kmi">اختر KMI</string>
<string name="select_file_tip">يوصى باستخدام صورة القسم %1$s</string>
<string name="shrink_sparse_image">تصغير الصورة المتفرقة</string>
<string name="shrink_sparse_image_message">قم بتغيير حجم الصورة المتفرقة حيث توجد الإضافة إلى حجمها الفعلي. لاحظ أن هذا قد يتسبب في عمل الإضافة بشكل غير طبيعي، لذا يرجى استخدامها فقط عند الضرورة (مثل النسخ الاحتياطي)</string>
<string name="settings_uninstall">إلغاء التثبيت</string>
<string name="settings_uninstall_temporary">إلغاء التثبيت مؤقتًا</string>
<string name="settings_uninstall_permanent">إلغاء التثبيت بشكل دائم</string>
<string name="settings_restore_stock_image">استعادة الصورة الاصلية</string>
<string name="settings_uninstall_permanent_message">‬إلغاء تثبيت KernelSU (الجذر وجميع الوحدات) بشكل كامل ودائم.</string>
<string name="flashing">تركيب</string>
<string name="flash_success">نجح التركيب</string>
<string name="flash_failed">فشل التركيب</string>
<string name="selected_lkm">صورة lkm المحددة: %s</string>
<string name="settings_restore_stock_image_message">استعادة صورة المصنع المخزنة (في حالة وجود نسخة احتياطية)، والتي تُستخدم عادة قبل OTA؛ إذا كنت بحاجة إلى إلغاء تثبيت KernelSU، فيرجى استخدام \"إلغاء التثبيت الدائم\".</string>
<string name="settings_uninstall_temporary_message">قم بإلغاء تثبيت KernelSU مؤقتًا، واستعد إلى حالته الأصلية بعد إعادة التشغيل التالية.</string>
</resources>

View File

@@ -10,20 +10,20 @@
<string name="home_superuser_count">Superuser: %d</string>
<string name="selinux_status_unknown">Unbekannt</string>
<string name="selinux_status_enforcing">Erzwingen</string>
<string name="reboot_bootloader">Neustart mit Bootloader</string>
<string name="reboot_download">Neustart mit Download-Modus</string>
<string name="reboot_bootloader">Neustart in Bootloader</string>
<string name="reboot_download">Neustart in Download-Modus</string>
<string name="reboot_edl">Neustart mit EDL-Modus</string>
<string name="module_author">Autor</string>
<string name="module_overlay_fs_not_available">overlayfs nicht verfügbar, Modul kann nicht funktionieren!</string>
<string name="about">Über</string>
<string name="module_magisk_conflict">Module sind deaktiviert, weil es einen Konflikt mit Magisk gibt!</string>
<string name="home_learn_kernelsu_url">https://kernelsu.org/guide/what-is-kernelsu.html</string>
<string name="home_click_to_learn_kernelsu">Verstehe, wie du KernelSU installieren und Module verwendest</string>
<string name="home_click_to_learn_kernelsu">Erfahren, wie KernelSU installiert und Module verwendet werden</string>
<string name="home_support_title">Unterstütze uns</string>
<string name="home_support_content">KernelSU ist und wird immer frei und quelloffen sein. Du kannst uns jedoch zeigen, dass du dich für uns interessierst, indem du eine Spende tätigst.</string>
<string name="home_support_content">KernelSU ist und wird immer frei und quelloffen sein. Du kannst uns jedoch deine Unterstützung zeigen, indem du eine Spende tätigst.</string>
<string name="profile_selinux_context">SELinux-Kontext</string>
<string name="settings_umount_modules_default">Module standardmäßig aushängen</string>
<string name="settings_umount_modules_default_summary">Globaler Standardwert für \'Module aushängen\' in App-Profilen. Wenn er aktiviert ist, werden alle Moduländerungen im App-System entfernt, für die kein Profil festgelegt ist.</string>
<string name="settings_umount_modules_default_summary">Globaler Standardwert für \'Module aushängen\' in App-Profilen. Falls aktiviert, werden alle Moduländerungen im System für alle Apps entfernt, für die kein Profil festgelegt ist.</string>
<string name="profile_default">Standard</string>
<string name="profile_template">Vorlage</string>
<string name="profile_custom">Benutzerdefiniert</string>
@@ -31,18 +31,18 @@
<string name="profile_namespace_inherited">Vererbt</string>
<string name="profile_namespace_global">Global</string>
<string name="profile_namespace_individual">Individuell</string>
<string name="profile_selinux_domain">Domain</string>
<string name="profile_selinux_domain">Domäne</string>
<string name="module_update">Aktualisieren</string>
<string name="profile_umount_modules_summary">Wenn du diese Option aktivierst, kann KernelSU alle von den Modulen für diese App geänderten Dateien wiederherstellen.</string>
<string name="profile_selinux_rules">Regeln</string>
<string name="module_start_downloading">Herunterladen starten: %s</string>
<string name="module_start_downloading">Herunterladen startet: %s</string>
<string name="failed_to_update_sepolicy">Fehler beim Aktualisieren der SELinux-Regeln für: %s</string>
<string name="launch_app">Starten</string>
<string name="new_version_available">Neue Version: %s verfügbar, tippen zum Aktualisieren</string>
<string name="force_stop_app">Stopp erzwingen</string>
<string name="restart_app">Neustart</string>
<string name="home_module_count">Module: %d</string>
<string name="home_manager_version">Verwalter-Version</string>
<string name="home_manager_version">Manager-Version</string>
<string name="home_selinux_status">SELinux-Status</string>
<string name="selinux_status_disabled">Deaktiviert</string>
<string name="module_failed_to_enable">Modulaktivierung fehlgeschlagen: %s</string>
@@ -51,9 +51,9 @@
<string name="module">Modul</string>
<string name="uninstall">Deinstallieren</string>
<string name="install">Installieren</string>
<string name="reboot">Neustart</string>
<string name="reboot">Neustarten</string>
<string name="settings">Einstellungen</string>
<string name="reboot_recovery">Neustart mit Recovery</string>
<string name="reboot_recovery">Neustart in Recovery</string>
<string name="module_uninstall_success">%s deinstalliert</string>
<string name="module_version">Version</string>
<string name="refresh">Neu laden</string>
@@ -62,7 +62,7 @@
<string name="send_log">Protokoll senden</string>
<string name="home_learn_kernelsu">KernelSU verstehen</string>
<string name="safe_mode">Sicherer Modus</string>
<string name="reboot_to_apply">Neu starten, damit die Effekte auftreten</string>
<string name="reboot_to_apply">Neustarten, damit Änderungen wirksam werden</string>
<string name="about_source_code">Quellcode unter %1$s ansehen<br/>Unserem %2$s-Kanal beitreten</string>
<string name="profile_name">Profilname</string>
<string name="profile_namespace">Namespace einhängen</string>
@@ -75,31 +75,46 @@
<string name="home_kernel">Kernel</string>
<string name="home_fingerprint">Fingerabdruck</string>
<string name="module_install">Installieren</string>
<string name="reboot_userspace">Leichter Neustart</string>
<string name="reboot_userspace">Soft-Reboot</string>
<string name="module_uninstall_confirm">Sicher, dass du das Modul %s deinstallieren möchtest\?</string>
<string name="module_uninstall_failed">Deinstallation fehlgeschlagen: %s</string>
<string name="require_kernel_version">Die aktuelle Kernel-Version %d ist zu alt für diese Manager-Version. Bitte auf Version %d oder höher upgraden!</string>
<string name="module_changelog">Änderungsprotokoll</string>
<string name="app_profile_template_import_success">erfolgreich importiert!</string>
<string name="app_profile_export_to_clipboard">in Zwischenablage exportieren</string>
<string name="app_profile_template_import_success">Erfolgreich importiert</string>
<string name="app_profile_export_to_clipboard">In Zwischenablage exportieren</string>
<string name="app_profile_template_export_empty">Kann lokale Vorlage nicht finden!</string>
<string name="app_profile_template_id_exist">Vorlagen ID existiert bereits!</string>
<string name="app_profile_import_from_clipboard">aus Zwischenablage importieren</string>
<string name="app_profile_template_id_exist">Vorlagen-ID existiert bereits!</string>
<string name="app_profile_import_from_clipboard">Aus Zwischenablage importieren</string>
<string name="module_changelog_failed">Konnte Changelog nicht laden: %s</string>
<string name="app_profile_template_name">Name</string>
<string name="app_profile_template_id_invalid">ungültige Vorlagen id</string>
<string name="app_profile_template_sync">Online Vorlagen synchronisieren</string>
<string name="app_profile_template_create">Erstelle Vorlage</string>
<string name="app_profile_template_readonly">Nur-Lesen</string>
<string name="app_profile_template_id_invalid">Ungültige Vorlagen-ID</string>
<string name="app_profile_template_sync">Online-Vorlagen synchronisieren</string>
<string name="app_profile_template_create">Vorlage erstellen</string>
<string name="app_profile_template_readonly">Schreibgeschützt</string>
<string name="app_profile_import_export">Import/Export</string>
<string name="app_profile_template_save_failed">Fehler beim speichern</string>
<string name="app_profile_template_edit">Bearbeite Vorlage</string>
<string name="app_profile_template_id">id</string>
<string name="settings_profile_template">App Profil Template</string>
<string name="app_profile_template_save_failed">Fehler beim Speichern</string>
<string name="app_profile_template_edit">Vorlage bearbeiten</string>
<string name="app_profile_template_id">ID</string>
<string name="settings_profile_template">App-Profil-Template</string>
<string name="app_profile_template_description">Beschreibung</string>
<string name="app_profile_template_save">Speichern</string>
<string name="settings_profile_template_summary">verwalte lokale und online Profil Vorlagen</string>
<string name="app_profile_template_delete">Löschen</string>
<string name="app_profile_template_import_empty">Zwischenablage ist leer!</string>
<string name="app_profile_template_view">Vorlage ansehen</string>
<string name="enable_web_debugging">WebView-Debugging aktivieren</string>
<string name="enable_web_debugging_summary">Kann verwendet werden zum Debugging von WebUI, bitte nur falls nötig aktivieren.</string>
<string name="select_file_tip">%1$s Partitionsabbild empfohlen</string>
<string name="select_kmi">KMI auswählen</string>
<string name="install_next">Weiter</string>
<string name="direct_install">Direkte Installation (empfohlen)</string>
<string name="select_file">Datei auswählen</string>
<string name="install_inactive_slot">In inaktiven Slot installieren (nach OTA)</string>
<string name="install_inactive_slot_warning">Nach einem Neustart wird dein Gerät **GEZWUNGEN** in den derzeit inaktiven Slot zu booten.
\nBenutze dies nur nach Fertigstellung des OTA.
\nFortfahren?</string>
<string name="grant_root_failed">Root-Zugriff konnte nicht gewährt werden!</string>
<string name="open">Öffnen</string>
<string name="settings_check_update">Updates suchen</string>
<string name="settings_check_update_summary">Automatisch nach Updates suchen beim Öffnen der App</string>
</resources>

View File

@@ -108,7 +108,7 @@
<string name="enable_web_debugging">Activer le débogage de WebView</string>
<string name="enable_web_debugging_summary">Peut être utilisé pour déboguer WebUI, n\'activez cette option que si nécessaire.</string>
<string name="grant_root_failed">Échec de l\'octroi des privilèges root!</string>
<string name="open">Ouvert</string>
<string name="open">Ouvrir</string>
<string name="direct_install">Installation directe (recommandé)</string>
<string name="select_file">Sélectionner un fichier</string>
<string name="install_inactive_slot">Installer dans l\'emplacement inactif (après OTA)</string>
@@ -116,4 +116,19 @@
\nN\'utilisez cette option qu\'une fois la mise à jour OTA terminée.
\nContinuer?</string>
<string name="install_next">Suivant</string>
<string name="select_file_tip">L\'image de la partition %1$s est recommandée</string>
<string name="select_kmi">Sélectionner une KMI</string>
<string name="shrink_sparse_image">Minimiser l\'image clairsemée</string>
<string name="shrink_sparse_image_message">Redimensionne l\'image clairsemée où se trouve le module à sa taille réelle. Notez que cela peut entraîner un dysfonctionnement du module, alors utilisez cette fonctionnalité uniquement lorsque nécessaire (pour la sauvegarde, par exemple)</string>
<string name="settings_uninstall">Désinstaller</string>
<string name="settings_uninstall_temporary">Désinstaller temporairement</string>
<string name="settings_uninstall_permanent">Désinstaller définitivement</string>
<string name="settings_restore_stock_image">Restaurer l\'image stock</string>
<string name="settings_restore_stock_image_message">Restaurer l\'image stock d\'usine (s\'il en existe une sauvegarde), option généralement utilisée avant une mise à jour OTA; si vous avez besoin de désinstaller KernelSU, utilisez plutôt l\'option «Désinstaller définitivement».</string>
<string name="flashing">Flash en cours</string>
<string name="flash_success">Flash réussi</string>
<string name="flash_failed">Échec du flash</string>
<string name="selected_lkm">lkm sélectionné: %s</string>
<string name="settings_uninstall_permanent_message">Désinstallation complète et permanente de KernelSU (root et tous les modules).</string>
<string name="settings_uninstall_temporary_message">Désinstaller KernelSU temporairement et rétablir l\'état original au redémarrage suivant.</string>
</resources>

View File

@@ -1,106 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="home">Beranda</string>
<string name="home_not_installed">Tidak terpasang</string>
<string name="home_click_to_install">Klik untuk memasang</string>
<string name="home_working">Bekerja</string>
<string name="home_not_installed">Tidak terinstal</string>
<string name="home_click_to_install">Klik untuk menginstal</string>
<string name="home_working">Berfungsi</string>
<string name="home_working_version">Versi: %d</string>
<string name="home_superuser_count">Superuser: %d</string>
<string name="home_superuser_count">SuperUser: %d</string>
<string name="home_module_count">Modul: %d</string>
<string name="home_unsupported">Tidak didukung</string>
<string name="home_unsupported_reason">KernelSU saat ini hanya mendukung kernel GKI</string>
<string name="home_kernel">Kernel</string>
<string name="home_manager_version">Versi Manager</string>
<string name="home_fingerprint">Sidik jari</string>
<string name="home_fingerprint">Identitas</string>
<string name="home_selinux_status">Status SELinux</string>
<string name="selinux_status_disabled">Dinonaktifkan</string>
<string name="selinux_status_disabled">Nonaktif</string>
<string name="selinux_status_enforcing">Enforcing</string>
<string name="selinux_status_permissive">Permissive</string>
<string name="selinux_status_unknown">Tidak dikenal</string>
<string name="selinux_status_unknown">Unknown</string>
<string name="superuser">SuperUser</string>
<string name="module_failed_to_enable">Gagal mengaktifkan modul: %s</string>
<string name="module_failed_to_disable">Gagal menonaktifkan modul: %s</string>
<string name="module_empty">Tidak ada modul yang terpasang</string>
<string name="module_empty">Tidak ada modul</string>
<string name="module">Modul</string>
<string name="uninstall">Copot</string>
<string name="module_install">Pasang</string>
<string name="install">Pasang</string>
<string name="reboot">Mulai ulang</string>
<string name="uninstall">Hapus</string>
<string name="module_install">Instal</string>
<string name="install">Instal</string>
<string name="reboot">Reboot</string>
<string name="settings">Pengaturan</string>
<string name="reboot_userspace">Soft Reboot</string>
<string name="reboot_recovery">Mulai ulang ke Recovery</string>
<string name="reboot_bootloader">Mulai ulang ke Bootloader</string>
<string name="reboot_download">Mulai ulang ke Download</string>
<string name="reboot_edl">Mulai ulang ke EDL</string>
<string name="reboot_userspace">SoftReboot</string>
<string name="reboot_recovery">But ke Recovery</string>
<string name="reboot_bootloader">But ke Bootloader</string>
<string name="reboot_download">But ke Download</string>
<string name="reboot_edl">But ke EDL</string>
<string name="about">Tentang</string>
<string name="module_uninstall_confirm">Apakah Anda yakin ingin mencopot modul %s?</string>
<string name="module_uninstall_success">%s Telah dicopot</string>
<string name="module_uninstall_failed">Gagal untuk mencopot: %s</string>
<string name="module_uninstall_confirm">Yakin menghapus modul %s?</string>
<string name="module_uninstall_success">%s berhasil dihapus</string>
<string name="module_uninstall_failed">Gagal menghapus: %s</string>
<string name="module_version">Versi</string>
<string name="module_author">Pembuat</string>
<string name="module_overlay_fs_not_available">overlayfs tidak tersedia, modul tidak dapat bekerja!</string>
<string name="refresh">Segarkan</string>
<string name="show_system_apps">Tampilkan apl sistem</string>
<string name="hide_system_apps">Sembunyikan apl sistem</string>
<string name="module_author">Oleh</string>
<string name="module_overlay_fs_not_available">OverlayFS tidak tersedia, modul tidak berfungsi!</string>
<string name="refresh">Muat ulang</string>
<string name="show_system_apps">Tampilkan aplikasi sistem</string>
<string name="hide_system_apps">Sembunyikan aplikasi sistem</string>
<string name="send_log">Laporkan Log</string>
<string name="safe_mode">Mode aman</string>
<string name="reboot_to_apply">Mulai ulang untuk menerapkan</string>
<string name="module_magisk_conflict">Modul dinonaktifkan karena bertentangan dengan Magisk!</string>
<string name="reboot_to_apply">Reboot agar berfungsi</string>
<string name="module_magisk_conflict">Konflik dengan Magisk, fungsi modul ditiadakan!</string>
<string name="home_learn_kernelsu">Pelajari KernelSU</string>
<string name="home_learn_kernelsu_url">https://kernelsu.org/id_ID/guide/what-is-kernelsu.html</string>
<string name="home_click_to_learn_kernelsu">Pelajari cara memasang KernelSU dan menggunakan modul</string>
<string name="home_click_to_learn_kernelsu">Pelajari cara instal KernelSU dan menggunakan modul</string>
<string name="home_support_title">Dukung Kami</string>
<string name="home_support_content">KernelSU gratis dan bersumber terbuka, dan akan selalu seperti itu. Bagaimanapun juga Anda dapat menunjukan kepedulian Anda kepada kami dengan mengirimkan sedikit donasi.</string>
<string name="about_source_code"><![CDATA[Lihat sumber code di %1$s<br/>Gabung kanal %2$s kami]]></string>
<string name="home_support_content">KernelSU akan selalu menjadi aplikasi gratis dan terbuka. Anda dapat memberikan donasi sebagai bentuk dukungan.</string>
<string name="about_source_code">Lihat kode sumber di %1$s<br/>Gabung kanal %2$s kami</string>
<string name="profile">Profil Apl</string>
<string name="profile_default">Bawaan</string>
<string name="profile_template">Templat</string>
<string name="profile_custom">Khusus</string>
<string name="profile_name">Nama profil</string>
<string name="profile_namespace">Ikat ruang-nama</string>
<string name="profile_namespace">Mount Namespace</string>
<string name="profile_namespace_inherited">Diwariskan</string>
<string name="profile_namespace_global">Universal</string>
<string name="profile_namespace_individual">Personal</string>
<string name="profile_namespace_individual">Individual</string>
<string name="profile_groups">Kelompok</string>
<string name="profile_capabilities">Kemampuan</string>
<string name="profile_selinux_context">Konteks SELinux</string>
<string name="profile_umount_modules">Lepas modul</string>
<string name="failed_to_update_app_profile">Gagal memperbarui Profil Apl untuk %s</string>
<string name="settings_umount_modules_default">Lepas modul secara bawaan</string>
<string name="settings_umount_modules_default_summary">Nilai bawaan universal untuk \"Lepas modul\" di Profil-profil Apl. Jika diaktifkan, ini akan menghapus semua modifikasi modul pada sistem untuk aplikasi yang tidak memiliki set Profil.</string>
<string name="profile_umount_modules_summary">Mengaktifkan opsi ini akan mengizinkan KernelSU memulihkan file-file yang dimodifikasi oleh modul untuk aplikasi ini.</string>
<string name="profile_umount_modules">Umount Modul</string>
<string name="failed_to_update_app_profile">Gagal membarui Profil pada %s</string>
<string name="settings_umount_modules_default">Melepas Modul secara bawaan</string>
<string name="settings_umount_modules_default_summary">Menggunakan \"Umount Modul\" secara universal pada Profil aplikasi. Jika diaktifkan, akan menghapus semua modifikasi sistem untuk aplikasi yang tidak memiliki set Profil.</string>
<string name="profile_umount_modules_summary">Aktifkan opsi ini agar KernelSU dapat memulihkan kembali berkas termodifikasi oleh modul pada aplikasi ini.</string>
<string name="profile_selinux_domain">Domain</string>
<string name="profile_selinux_rules">Aturan</string>
<string name="module_update">Perbarui</string>
<string name="module_downloading">Mengunduh module: %s</string>
<string name="module_update">Membarui</string>
<string name="module_downloading">Mengunduh modul: %s</string>
<string name="module_start_downloading">Mulai mengunduh: %s</string>
<string name="new_version_available">Versi baru: %s sudah tersedia, tap untuk mengunduh</string>
<string name="new_version_available">Tersedia versi terbaru: %s, Klik untuk membarui</string>
<string name="launch_app">Jalankan</string>
<string name="force_stop_app">Paksa Berhenti</string>
<string name="restart_app">Mulai ulang</string>
<string name="failed_to_update_sepolicy">Gagal memperbarui aturan SELinux untuk: %s</string>
<string name="require_kernel_version">Versi KernelSU saat ini %d terlalu rendah bagi manajer untuk dapat berfungsi dengan baik. Harap tingkatkan ke versi %d atau yang lebih tinggi!</string>
<string name="failed_to_update_sepolicy">Gagal membarui aturan SELinux pada: %s</string>
<string name="require_kernel_version">Versi KernelSU %d terlalu rendah agar manajer berfungsi normal. Harap membarui ke versi %d atau di atasnya!</string>
<string name="module_changelog">Catatan Perubahan</string>
<string name="app_profile_template_import_success">Berhasil diimpor</string>
<string name="app_profile_export_to_clipboard">Expor ke clipboard</string>
<string name="app_profile_template_export_empty">Tidak dapat menemukan template lokal untuk di expor!</string>
<string name="app_profile_template_id_exist">Id template telah ada sebelumnya!</string>
<string name="app_profile_import_from_clipboard">Impor dari clipboard</string>
<string name="app_profile_export_to_clipboard">Ekspor ke papan klip</string>
<string name="app_profile_template_export_empty">Tidak ditemukan templat lokal untuk diekspor!</string>
<string name="app_profile_template_id_exist">Id templat sudah ada!</string>
<string name="app_profile_import_from_clipboard">Impor dari papan klip</string>
<string name="module_changelog_failed">Gagal mengambil Changelog: %s</string>
<string name="app_profile_template_name">Nama</string>
<string name="app_profile_template_id_invalid">Id template tidak valid</string>
<string name="app_profile_template_sync">Sinkronkan template online</string>
<string name="app_profile_template_create">Buat Template</string>
<string name="app_profile_import_export">Impor/Expor</string>
<string name="app_profile_template_save_failed">Gagal untuk menyimpan template</string>
<string name="app_profile_template_id_invalid">Id templat tidak valid</string>
<string name="app_profile_template_sync">Sinkronkan templat daring</string>
<string name="app_profile_template_create">Buat Templat</string>
<string name="app_profile_import_export">Impor/Ekspor</string>
<string name="app_profile_template_save_failed">Gagal menyimpan templat</string>
<string name="app_profile_template_edit">Edit Templat</string>
<string name="app_profile_template_id">id</string>
<string name="settings_profile_template">Template Profil Aplikasi</string>
<string name="settings_profile_template">Templat Profil Aplikasi</string>
<string name="app_profile_template_description">Deskripsi</string>
<string name="app_profile_template_save">Simpan</string>
<string name="settings_profile_template_summary">Atur template lokal dan online Profil Aplikasi</string>
<string name="settings_profile_template_summary">Atur templat Profil yang lokal dan daring</string>
<string name="app_profile_template_delete">Hapus</string>
<string name="app_profile_template_import_empty">Clipboard kosong!</string>
<string name="app_profile_template_view">Lihat Template</string>
<string name="app_profile_template_readonly">Hanya baca</string>
<string name="app_profile_template_import_empty">Papan klip kosong!</string>
<string name="app_profile_template_view">Lihat Templat</string>
<string name="app_profile_template_readonly">ReadOnly</string>
<string name="enable_web_debugging">Pengawakutuan WebView</string>
<string name="enable_web_debugging_summary">Dapat mengawakutu WebView, hanya aktifkan jika butuh.</string>
<string name="select_file_tip">%1$s image partisi terekomendasi</string>
<string name="select_kmi">Pilih KMI</string>
<string name="install_next">Selanjutnya</string>
<string name="install_inactive_slot_warning">Gawai akan **DIPAKSA** untuk but ke slot nonaktif!
\nHANYA gunakan setelah proses OTA selesai.
\nLanjutkan?</string>
<string name="direct_install">Instal Langsung (rekomendasi)</string>
<string name="select_file">Pilih berkas</string>
<string name="install_inactive_slot">Instal ke slot nonaktif (setelah OTA)</string>
<string name="grant_root_failed">Gagal memberikan akses root!</string>
<string name="open">Buka</string>
<string name="settings_check_update">Cek terbaru</string>
<string name="settings_check_update_summary">Cek terbaru setiap membuka aplikasi</string>
<string name="shrink_sparse_image">Meminimalkan sparse image</string>
<string name="shrink_sparse_image_message">Mengembalikan sparse image, lokasi modul disimpan, ke ukuran sebenarnya. Dapat menyebabkan modul bekerja abnormal, maka gunakan saat dibutuhkan saja (mis. untuk pencadangan)</string>
<string name="settings_uninstall_permanent_message">Hapus permanen KernelSU (root dan modul).</string>
<string name="settings_uninstall_temporary">Hapus Temporer</string>
<string name="settings_restore_stock_image">Pulihkan Image Asal</string>
<string name="settings_uninstall">Hapus</string>
<string name="settings_uninstall_temporary_message">Hapus Temporer KernelSU, pulihkan ke kondisi asali setelah but berikutnya.</string>
<string name="settings_uninstall_permanent">Hapus Permanen</string>
<string name="settings_restore_stock_image_message">Pulihkan image bawaan ROM (jika cadangan tersedia), umumnya dilakukan sebelum OTA; jika ingin menghapus KernelSU, gunakan fungsi \"Hapus Permanen\".</string>
<string name="flash_success">Pemasangan Berhasil</string>
<string name="selected_lkm">LKM dipilih: %s</string>
<string name="flashing">Pasang</string>
<string name="flash_failed">Pemasangan Gagal</string>
</resources>

View File

@@ -5,14 +5,14 @@
<string name="home_click_to_install">Clicca per installare</string>
<string name="home_working">In esecuzione</string>
<string name="home_working_version">Versione: %d</string>
<string name="home_superuser_count">Superuser: %d</string>
<string name="home_module_count">Moduli: %d</string>
<string name="home_superuser_count">Applicazioni con accesso root: %d</string>
<string name="home_module_count">Moduli installati: %d</string>
<string name="home_unsupported">Non supportato</string>
<string name="home_unsupported_reason">KernelSU ora supporta solo i kernel GKI</string>
<string name="home_kernel">Kernel</string>
<string name="home_manager_version">Versione del manager</string>
<string name="home_fingerprint">Fingerprint</string>
<string name="home_selinux_status">Stato SELinux</string>
<string name="home_fingerprint">Impronta della build di Android</string>
<string name="home_selinux_status">Stato di SELinux</string>
<string name="selinux_status_disabled">Disabilitato</string>
<string name="selinux_status_enforcing">Enforcing</string>
<string name="selinux_status_permissive">Permissive</string>
@@ -21,14 +21,14 @@
<string name="module_failed_to_enable">Impossibile abilitare il modulo: %s</string>
<string name="module_failed_to_disable">Impossibile disabilitare il modulo: %s</string>
<string name="module_empty">Nessun modulo installato</string>
<string name="module">Moduli</string>
<string name="module">Modulo</string>
<string name="uninstall">Disinstalla</string>
<string name="module_install">Installa</string>
<string name="install">Installa</string>
<string name="reboot">Riavvia</string>
<string name="settings">Impostazioni</string>
<string name="reboot_userspace">Riavvio veloce</string>
<string name="reboot_recovery">Riavvia in Recovery</string>
<string name="reboot_userspace">Riavvio rapido</string>
<string name="reboot_recovery">Riavvia in modalità Recovery</string>
<string name="reboot_bootloader">Riavvia in modalità Bootloader</string>
<string name="reboot_download">Riavvia in modalità Download</string>
<string name="reboot_edl">Riavvia in modalità EDL</string>
@@ -38,7 +38,7 @@
<string name="module_uninstall_failed">Impossibile disinstallare: %s</string>
<string name="module_version">Versione</string>
<string name="module_author">Autore</string>
<string name="module_overlay_fs_not_available">overlayfs non è disponibile, il modulo non p funzionare!</string>
<string name="module_overlay_fs_not_available">overlayfs non è disponibile, i moduli non possono funzionare!</string>
<string name="refresh">Ricarica</string>
<string name="show_system_apps">Mostra app di sistema</string>
<string name="hide_system_apps">Nascondi app di sistema</string>
@@ -53,17 +53,17 @@
<string name="home_support_content">KernelSU è, e sempre sarà, gratuito e open source. Puoi comunque mostrarci il tuo apprezzamento facendo una donazione.</string>
<string name="about_source_code"><![CDATA[Visualizza il codice sorgente su %1$s<br/>Unisciti al nostro canale %2$s]]></string>
<string name="profile_name">Nome profilo</string>
<string name="profile_namespace">Namespace di mount</string>
<string name="profile_namespace">Spazio dei nomi del mount</string>
<string name="profile_namespace_global">Globale</string>
<string name="profile_groups">Gruppi</string>
<string name="profile_namespace_inherited">Ereditato</string>
<string name="profile_namespace_individual">Individuale</string>
<string name="profile_default">Predefinito</string>
<string name="profile_custom">Personalizzato</string>
<string name="profile_template">Template</string>
<string name="profile_template">Modello</string>
<string name="profile_umount_modules">Scollega moduli</string>
<string name="profile_selinux_context">Contesto SELinux</string>
<string name="failed_to_update_app_profile">Aggiornamento Profilo per %s fallito</string>
<string name="failed_to_update_app_profile">Aggiornamento App Profile per %s fallito</string>
<string name="module_update">Aggiorna</string>
<string name="launch_app">Apri</string>
<string name="profile_capabilities">Capacità</string>
@@ -77,33 +77,57 @@
<string name="failed_to_update_sepolicy">Aggiornamento regole SELinux per %s fallito</string>
<string name="profile_umount_modules_summary">Attivando questa opzione permetterai a KernelSU di ripristinare ogni file modificato dai moduli per questa app.</string>
<string name="profile_selinux_domain">Dominio</string>
<string name="settings_umount_modules_default_summary">Il valore predefinito per \"Scollega moduli\" in Profili App. Se attivato, rimuoverà tutte le modifiche al sistema da parte dei moduli per le applicazioni che non hanno un profilo impostato.</string>
<string name="settings_umount_modules_default_summary">Il valore predefinito per \"Scollega moduli\" in App Profile. Se attivato, rimuoverà tutte le modifiche al sistema da parte dei moduli per le applicazioni che non hanno un profilo impostato.</string>
<string name="require_kernel_version">La versione attualmente installata di KernelSU (%d) è troppo vecchia ed il gestore non può funzionare correttamente. Si prega di aggiornare alla versione %d o successiva!</string>
<string name="module_changelog">Registro aggiornamenti</string>
<string name="app_profile_template_create">Crea modello</string>
<string name="app_profile_template_edit">Modifica Modello</string>
<string name="app_profile_template_edit">Modifica modello</string>
<string name="app_profile_template_id">identificativo</string>
<string name="app_profile_template_id_invalid">Identificativo modello non valido</string>
<string name="app_profile_template_name">Nome</string>
<string name="app_profile_template_view">Visualizza modello</string>
<string name="app_profile_template_readonly">Sola lettura</string>
<string name="app_profile_template_id_exist">Esiste già l\'identificativo del modello!</string>
<string name="app_profile_template_id_exist">L\'identificativo del modello esiste già!</string>
<string name="app_profile_import_export">Importa/Esporta</string>
<string name="app_profile_import_from_clipboard">Importa dagli appunti</string>
<string name="app_profile_export_to_clipboard">Esporta negli appunti</string>
<string name="app_profile_template_export_empty">Impossibile trovare profilo locale da esportare!</string>
<string name="app_profile_template_export_empty">Impossibile trovare modello locale da esportare!</string>
<string name="app_profile_template_import_success">Importato con successo</string>
<string name="app_profile_template_sync">Sincronizza i modelli remoti</string>
<string name="app_profile_template_import_empty">Gli appunti sono vuoti!</string>
<string name="grant_root_failed">Impossibile ottenere l\'accesso root!</string>
<string name="settings_profile_template">Modelli Profili App</string>
<string name="settings_profile_template_summary">Gestisci i modelli locali e remoti dei Profili App</string>
<string name="settings_profile_template">Modelli App Profile</string>
<string name="settings_profile_template_summary">Gestisci i modelli locali e remoti di App Profile</string>
<string name="app_profile_template_delete">Elimina</string>
<string name="app_profile_template_description">Descrizione</string>
<string name="app_profile_template_save">Salva</string>
<string name="app_profile_template_save_failed">Impossibile salvare profilo</string>
<string name="app_profile_template_save_failed">Impossibile salvare il modello</string>
<string name="open">Apri</string>
<string name="module_changelog_failed">Impossibile reperire il changelog: %s</string>
<string name="settings_check_update">Controlla aggiornamenti</string>
<string name="settings_check_update_summary">Controlla automaticamente la disponibilità di aggiornamenti all\'apertura dell\'applicazione</string>
<string name="enable_web_debugging">Abilita il Debug di WebView</string>
<string name="enable_web_debugging_summary">Può essere usato per svolgere il debug di WebUI, è consigliato attivarlo solo quando necessario.</string>
<string name="select_file_tip">È consigliato usare immagine della partizione %1$s</string>
<string name="select_kmi">Scegli il KMI</string>
<string name="install_next">Avanti</string>
<string name="direct_install">Installazione diretta (Raccomandata)</string>
<string name="select_file">Scegli un File</string>
<string name="install_inactive_slot">Installa nello Slot Inattivo (Dopo OTA)</string>
<string name="install_inactive_slot_warning">Il tuo dispositivo sarà **FORZATO** ad avviarsi nello slot inattivo dopo il riavvio!
\nUsa questa opzione solo quando l\'applicazione dell\'aggiornamento OTA è terminata.
\nProcedere?</string>
<string name="shrink_sparse_image">Riduci la dimensione dell\'immagine moduli sparse al minimo</string>
<string name="shrink_sparse_image_message">Riduci la dimensione dell\'immagine sparse dei moduli alla sua reale dimenzione. Nota che questo potrebbe causare malfunzionamenti dei moduli quindi utilizzala solo quando necessario (ad esempio in caso di backup)</string>
<string name="settings_uninstall">Disinstalla</string>
<string name="settings_uninstall_temporary">Disinstalla Temporaneamente</string>
<string name="settings_uninstall_permanent">Disinstalla Permanentemente</string>
<string name="settings_restore_stock_image">Ripristina immagine originale del produttore</string>
<string name="settings_uninstall_temporary_message">Disinstalla temporaneamente KernelSU, ripristina lo stato originale dopo il prossimo riavvio.</string>
<string name="settings_uninstall_permanent_message">Disinstalla KernelSU (Root e tutti i moduli) completamente e permanentemente.</string>
<string name="flashing">Installazione</string>
<string name="flash_success">Installazione completata</string>
<string name="flash_failed">Installazione fallita</string>
<string name="selected_lkm">LKM selezionato: %s</string>
<string name="settings_restore_stock_image_message">Ripristina l\'immagine di fabbrica del produttore (se il backup è presente), solitamente usato prima di applicare l\'OTA; se devi disinstallare KernelSU, utilizza invece \"Disinstalla Permanentemente\".</string>
</resources>

View File

@@ -109,4 +109,26 @@
<string name="open">開く</string>
<string name="enable_web_debugging">WebView デバッグを有効にする</string>
<string name="enable_web_debugging_summary">WebUI のデバッグに使用できます。必要な場合にのみ有効にしてください。</string>
<string name="select_file_tip">%1$s パーティション イメージが推奨されます</string>
<string name="select_kmi">KMI を選択してください</string>
<string name="install_next">次に</string>
<string name="install_inactive_slot">非アクティブなスロットにインストール (OTA 後)</string>
<string name="install_inactive_slot_warning">再起動後、デバイスは**強制的に**、現在非アクティブなスロットから起動します。
\nこのオプションは、OTA が完了した後にのみ使用してください。
\n続く</string>
<string name="direct_install">直接インストール (推奨)</string>
<string name="select_file">ファイルを選択してください</string>
<string name="shrink_sparse_image">スパースイメージを最小化</string>
<string name="shrink_sparse_image_message">モジュールが配置されているスパースイメージのサイズを実際のサイズに変更します。 モジュールが正常に動作しなくなる可能性がありますので、必要な場合にのみご使用ください</string>
<string name="settings_uninstall_permanent">完全にアンインストールする</string>
<string name="settings_restore_stock_image">ストックイメージを復元</string>
<string name="settings_uninstall_temporary">一時的にアンインストールする</string>
<string name="settings_uninstall">アンインストール</string>
<string name="settings_uninstall_temporary_message">KernelSU を一時的にアンインストールし、次回の再起動後に元の状態に戻します。</string>
<string name="settings_uninstall_permanent_message">KernelSU (ルートおよびすべてのモジュール) を完全かつ永久にアンインストールします。</string>
<string name="settings_restore_stock_image_message">バックアップが存在する場合、工場出荷時のイメージを復元できます (OTA の前に使用してください)。KernelSU をアンインストールする必要がある場合は、「完全にアンインストールする」を使用してください。</string>
<string name="flashing">フラッシュ</string>
<string name="flash_success">フラッシュ成功</string>
<string name="flash_failed">フラッシュ失敗</string>
<string name="selected_lkm">選択された lkm: %s</string>
</resources>

View File

@@ -17,7 +17,7 @@
<string name="home_superuser_count">Superlietotāji: %d</string>
<string name="home_module_count">Moduļi: %d</string>
<string name="home_unsupported">Neatbalstīts</string>
<string name="home_unsupported_reason">KernelSU tagad atbalsta tikai GKI kodolus</string>
<string name="home_unsupported_reason">KernelSU atbalsta tikai GKI kodolus</string>
<string name="home_kernel">Kodols</string>
<string name="home_manager_version">Pārvaldnieka versija</string>
<string name="home_fingerprint">Pirkstu nospiedums</string>
@@ -51,7 +51,7 @@
<string name="home_learn_kernelsu_url">https://kernelsu.org/guide/what-is-kernelsu.html</string>
<string name="home_click_to_learn_kernelsu">Uzzināt, kā instalēt KernelSU un izmantot moduļus</string>
<string name="home_support_title">Atbalsti mūs</string>
<string name="about_source_code">Skatiet avota kodu vietnē %1$s<br/>Pievienojies mūsu %2$s kanālam</string>
<string name="about_source_code">Skatiet avota kodu vietnē %1$s<br/> Pievienojies mūsu %2$s kanālam</string>
<string name="profile_default">Noklusējums</string>
<string name="profile_template">Veidne</string>
<string name="profile_custom">Pielāgots</string>
@@ -101,4 +101,33 @@
<string name="profile_groups">Grupas</string>
<string name="profile_namespace_global">Globāli</string>
<string name="require_kernel_version">Pašreizējā KernelSU versija %d ir pārāk zema, lai pārvaldnieks darbotos pareizi. Lūdzu, atjauniniet uz versiju %d vai jaunāku!</string>
<string name="enable_web_debugging">Iespējot WebView atkļūdošanu</string>
<string name="select_file_tip">Ieteicams %1$s nodalījuma attēls</string>
<string name="install_next">Nākamais</string>
<string name="profile_namespace_inherited">Mantots</string>
<string name="select_file">Izvēlieties failu</string>
<string name="install_inactive_slot">Instalēt neaktīvajā slotā (pēc OTA)</string>
<string name="install_inactive_slot_warning">Pēc restartēšanas jūsu ierīce tiks **PIESPIESTI** palaista pašreizējā neaktīvajā slotā!
\nIzmantojiet šo opciju tikai pēc OTA pabeigšanas
\nTurpināt?</string>
<string name="direct_install">Tiešā instalēšana (Ieteicams)</string>
<string name="settings_uninstall">Atinstalēt</string>
<string name="settings_uninstall_temporary">Pagaidu atinstalēšana</string>
<string name="settings_restore_stock_image">Atjaunot oriģinālo attēlu</string>
<string name="settings_uninstall_temporary_message">Īslaicīgi atinstalēt KernelSU, pēc nākamās restartēšanas atjaunot sākotnējo stāvokli.</string>
<string name="settings_uninstall_permanent_message">KernelSU (saknes un visu moduļu) pilnīga atinstalēšana.</string>
<string name="settings_restore_stock_image_message">Atjaunojot rūpnīcas attēlu (ja ir dublējums), ko parasti izmanto pirms OTA; ja nepieciešams atinstalēt KernelSU, lūdzu, izmantojiet \"Neatgriezeniski atinstalēt\".</string>
<string name="selected_lkm">Izvēlētais lkm: %s</string>
<string name="grant_root_failed">Neizdevās piešķirt sakni!</string>
<string name="open">Atvērt</string>
<string name="settings_check_update">Pārbaudīt atjauninājumus</string>
<string name="settings_check_update_summary">Automātiski pārbaudīt atjauninājumus atverot aplikāciju</string>
<string name="enable_web_debugging_summary">Var izmantot WebUI atkļūdošanai, lūdzu, izmantot tikai tad, kad tas ir nepieciešams.</string>
<string name="select_kmi">Izvēlieties KMI</string>
<string name="settings_uninstall_permanent">Neatgriezeniski atinstalēt</string>
<string name="flashing">Instalē</string>
<string name="flash_success">Instalēts veiksmīgi</string>
<string name="flash_failed">Instalēšana neizdevās</string>
<string name="shrink_sparse_image">Samazināt reto attēlu</string>
<string name="shrink_sparse_image_message">Mainīt retā attēla izmēru, kurā atrodas modulis, līdz tā faktiskajam izmēram. Ņemiet vērā, ka tas var izraisīt moduļa neparastu darbību, tāpēc, lūdzu, izmantojiet tikai nepieciešamības gadījumā (piemēram, dublēšanai)</string>
</resources>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.KernelSU" parent="android:Theme.Material.NoActionBar">
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
</resources>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.KernelSU" parent="android:Theme.Material.NoActionBar" />
<style name="Theme.KernelSU.WebUI" parent="Theme.KernelSU">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">false</item>
</style>
</resources>

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