Commit Graph

336 Commits

Author SHA1 Message Date
Wang Han
f02ab90ca9 Fix su --shell argument handling (#2529)
This fixes https://github.com/tiann/KernelSU/issues/2523.
2025-03-26 15:00:40 +08:00
ShirkNeko
7b7fff91a6 Upload source files to complete submission of history changes
Co-authored-by:Shirkneko <Shirkneko@2773800761@qq.com>
2025-03-22 15:20:51 +08:00
Rifat Azad
3121eb0f9a manager: add susfs status and sus_su toggle
userspace: add susfsd
ci: build susfsd
ksud_overlayfs: update aarch64 bin  BusyBox v1.36.1.1 topjohnwu (2024-10-06 01:38:43 PDT)

Co-authored-by: rifsxd <rifat.44.azad.rifs@gmail.com>
2025-03-22 15:20:02 +08:00
ShirkNeko
ba26677cfc Merge some files and rewrite the update history 2025-03-22 14:09:21 +08:00
backslashxx
b28789ac7a ksud: probe for more workdir candidates (#12)
- reuses old ksu functions
- makes sure its an empty dir
- adapted from https://github.com/rsuntk/KernelSU/commit/141f010 71cb86c2e9

Co-authored-by: powellnorma <101364699+powellnorma@users.noreply.github.com>
Co-authored-by: Rissu <90097027+rsuntk@users.noreply.github.com>
2025-03-09 17:00:03 +08:00
5ec1cff
99d923cf8b reformat rust codes 2025-03-09 00:37:50 +08:00
5ec1cff
6bf9501acf ksud: fix stat 2025-03-09 00:05:27 +08:00
5ec1cff
c5ec2ff94b ksud: make tmpfs and magic mount optional
- Create /data/adb/ksu/{.notmpfs,.nomount} to disable them.
2025-03-09 00:05:26 +08:00
5ec1cff
ec383ed661 allow restore uninstalled module 2025-03-09 00:05:23 +08:00
backslashxx
6cdf264402 ksud: add KSU_MAGIC_MOUNT to env (#5) 2025-03-08 23:56:24 +08:00
5ec1cff
ffa571e950 ksud: refine tmpfs 2025-03-08 23:56:23 +08:00
5ec1cff
c6f5b85f49 ksud: fix clone symlink 2025-03-08 23:56:23 +08:00
5ec1cff
e8ac17f261 ksud: fix partition link 2025-03-08 23:56:23 +08:00
5ec1cff
6461c5502b ksud: fix odm not magic-mounted 2025-03-08 23:55:25 +08:00
5ec1cff
d9f28860c7 ksud: fix disable / enable modules 2025-03-08 23:55:25 +08:00
5ec1cff
44f13e4a1f magic_mount: refine 2025-03-08 23:55:25 +08:00
5ec1cff
43563b654a log: make verbose logging optional 2025-03-08 23:55:24 +08:00
5ec1cff
3c4d45dc31 magic_mount: fix 2025-03-08 23:55:24 +08:00
5ec1cff
b9883dfec3 chore: refine code 2025-03-08 23:55:24 +08:00
5ec1cff
ba8d85e356 magic_mount: supports whiteout 2025-03-08 23:55:23 +08:00
5ec1cff
af988ec8ec chore: fmt 2025-03-08 23:55:23 +08:00
5ec1cff
6f3ab6d6d3 magic_mount: use trusted.overlay.opaque 2025-03-08 23:55:23 +08:00
5ec1cff
f10483ffa3 restorecon: set adb_file to system_file for module files 2025-03-08 23:55:23 +08:00
5ec1cff
a5edae9fac implement magic mount 2025-03-08 23:55:20 +08:00
weishu
4fdd3e07e5 ksud: migrate to Rust 2024 edition 2025-02-24 16:53:37 +08:00
weishu
e245e3419d ksud: upgrade nom to 8.0 2025-02-24 16:45:24 +08:00
weishu
38dc2eb4f0 ksud: determine modules's size by checking partion size 2025-02-17 21:05:13 +08:00
weishu
4ede20ef83 ksud: remove journal for ext4 images 2025-02-17 20:22:12 +08:00
Wang Han
ce13d050ca Drop module image if no module remaining (#2447)
This fixes the issue that module image will always exist even if there
is no module to be loaded. Sadly we need to boot twice because we can
only know module status after image is mounted.
2025-02-17 09:15:04 +08:00
weishu
3d3bc5ce3c ksud: make clippy happy 2025-02-05 16:15:10 +08:00
D8G Official
c3926d3982 ksud: Fix warning unused import (#2382) 2025-01-25 20:00:45 +08:00
5ec1cff
a953ae97b7 ksud: fix copy sparse file (#2374) 2025-01-24 18:46:39 +08:00
Wang Han
38027c9793 Don't unshare after entering global namespace (#2373)
Global namespace is usually used to publicly apply mounts so calling
unshare after entering root namespace is not desired bahavior. This also
keeps -M option same as Magisk.
2025-01-24 11:22:24 +08:00
铃柒柒
aefb1aaed2 manager: Add action.sh for user to manually trigger modules' functionality from manager (#2156)
Commits:
- manager: Add `action.sh` for user to manually trigger modules'
functionality from manager
- manager: Optimize ModuleItem
- manager: uninstall button: TextButton -> FilledTonalButton
- Optimize `run_action` function

Commit Author & Thank:
- @lightsummer233
- @lingqiqi5211
- [APatch](https://github.com/bmax121/APatch)

Demo Show:

![image](https://github.com/user-attachments/assets/a5778a86-fa60-485f-ac49-2b581711f60e)

---------

Co-authored-by: Light summer <93428659+lightsummer233@users.noreply.github.com>
2024-10-27 10:07:13 +01:00
LoveSy
fd09ccfc29 Drop some legacy codes (#1981) 2024-08-15 17:04:02 +08:00
LoveSy
bbc31bdbca Use tempfile (#1980) 2024-08-15 16:28:05 +08:00
LoveSy
f722062775 Fix clippy 2024-07-26 13:24:55 +08:00
チセ
a49adaa847 ksud: Replace dependencies regex to regex-lite 2024-07-26 13:12:36 +08:00
チセ
0911af0686 ksud(feat): Parse KMI from boot or kernel 2024-07-26 13:12:36 +08:00
LoveSy
62297a74a6 Upgrade rustix (#1900) 2024-07-22 07:43:59 +08:00
Wang Han
4a1ebe490e Allow skipping commented policy (#1870) 2024-07-10 11:38:12 +08:00
weishu
f381e32434 ksud: remove modules dir when uninstall. close #1736 2024-05-28 11:28:28 +08:00
HDTianRu
0674841b94 ksud: Skip patch init_boot.img on kmi android12-xxx devices (#1744)
有一些设备(如ace2v),带了initboot,但ramdisk却在boot里,导致无法使用ota安装与直接安装,所以添加了个开关
因为本人开发环境有点简陋(mt管理器),而且对项目代码不太熟,合并前最好review一下(
2024-05-25 11:09:06 +08:00
チセ
9c2e48bb3e ksud: turn off auto-detect bootdevice when OS is not android (#1746) 2024-05-21 09:18:28 +08:00
powellnorma
71cb86c2e9 ksud: refine get_tmp_path (#1713)
Fixes #1710

What do you think?

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

---------

Co-authored-by: user <user@localhost>
2024-05-16 10:30:20 +08:00
weishu
a3df721b84 Revert "su: allocate new pty (#1693)"
This reverts commit 935dc18faa.
2024-05-08 21:18:55 +08:00
weishu
fe526cb029 ksud: Fix compiler error 2024-05-08 11:09:27 +08:00
5ec1cff
935dc18faa su: allocate new pty (#1693) 2024-05-07 19:02:59 +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
weishu
c8dd0b070c ksud: Fix compiler error 2024-04-24 21:36:38 +08:00