Commit Graph

2936 Commits

Author SHA1 Message Date
ShirkNeko
8442ebcb7a kernel: Optimise multi manager scanning logic 2025-11-16 15:35:26 +08:00
Wang Han
25fbc22f66 kernel: Replace kmalloc() usages with kzalloc() (#2939)
This ensures we won't use uninitialized pointers for task work.
2025-11-16 15:24:49 +08:00
ShirkNeko
a4a9df3a25 kernel: fmt 2025-11-16 14:29:10 +08:00
ShirkNeko
19a67fb76c mamager: fix the crash of Superuser in multi-user environments v4.0.0 2025-11-16 14:03:06 +08:00
AlexLiuDev233
3a2d55237d manager: make group shows like upstream & add some animation to SuperUser menu i18n file pick from upstream
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
2025-11-16 13:34:26 +08:00
生于生时 亡于亡刻
98e617f1bd refactor(ksud): refactor ksud's kpm
- remove useless code
- ignore create dir all return
- when kpm file delete failed, return Error
2025-11-16 07:11:16 +08:00
AlexLiuDev233
d84a88f059 manager: disable webuix exitConfirm 2025-11-16 00:58:32 +08:00
ShirkNeko
ae7b4dcbed manager: fix MarkdownContent scrollBehavior
Co-authored-by: AlexLiuDev233 <wzylin11@outlook.com>
2025-11-16 00:02:29 +08:00
ShirkNeko
684a5d1ccd manager: display the same UID as a group
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-11-15 23:44:38 +08:00
Tools-app
35b02e3c73 ci: remove cache for ksud
Because it no truth save

Signed-off-by: Tools-app <localhost.hutao@gmail.com>
2025-11-15 19:57:40 +08:00
5ec1cff
db6a59ec4e kernel: file_wrapper: copy mode of original inode
Bionic uses fstat to determine whether an fd is a tty and set proper
buffering flags, so we also need to set the wrapper file's inode mode to
the original inode mode.

see:
https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/upstream-openbsd/lib/libc/stdio/makebuf.c;l=61-95;drc=9a4b68e20d617b2cb3355071521f16e8c3d538df
2025-11-15 19:54:16 +08:00
ShirkNeko
46846dce91 kernel: Utilise the existing try_umount to avoid repackaging 2025-11-15 19:29:12 +08:00
Tools-app
cd21af6728 ci: fix shared-key not find (ksud)
Signed-off-by: Tools-app <localhost.hutao@gmail.com>
2025-11-15 18:56:19 +08:00
生于生时 亡于亡刻
92a483d222 ksud: Optimise ksud (#576)
* opt: Optimize printing for result isn't successful
- print chain && backtrace to stderr

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* ci(ksud): add CARGO_TERM_COLOR for build

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* fix(ksud): fix uninstall package name is `me.weishu.kernelsu`

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* fix(ksud): Reverted to a private function for get_kernel_version

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* chore: format code for magic_mount.rs

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* fix: fix rustfmt

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* feat: Move the statement to the correct place && remove allow dead_code

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

---------

Signed-off-by: Tools-app <localhost.hutao@gmail.com>
2025-11-15 18:25:17 +08:00
5ec1cff
04ca981e4d kernel: no need to remark process on post-fs-data and boot-completed
- Remark on post-fs-data may unmark zygote unexpectedly, and there is no
necessity to remark on these stages, so simply remove them.
2025-11-15 17:27:48 +08:00
ShirkNeko
83209a5259 ci: Fixed build information 2025-11-15 12:47:11 +08:00
YC酱luyancib
3cfc6d6a31 Manager/CI: Add spoofed manager build (#570)
* manager: add script for randomizing pkg name

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
Co-Authored-By: YC酱luyancib <luyancib@qq.com>

* manager: Update randomizer to avoid bug

Revert "manager: Update randomizer to avoid bug"

This reverts commit af9205e70a11db3e3d43bb34de880bbd6b4185b5.

manager: Update randomizer to avoid bug

* mamager: Update randomizer to fix error
fixed
> Task :app:compileReleaseAidl FAILED
ERROR: /home/runner/work/SukiSU-Ultra/SukiSU-Ultra/manager/app/src/main/aidl/org/knifhr/zako/IKsuInterface.aidl:7.1-10: IKsuInterface should be declared in a file called com/sukisu/zako/IKsuInterface.aidl

* manager:clean randomizer

* ci:add spoofed manager build with matrix

* 更新 build-manager.yml

* 更新 build-manager.yml

* fix

* Revert "更新 build-manager.yml"

This reverts commit da80e3f13a.

* ksubot: make MESSAGE_THREAD_ID optional

---------

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
Co-authored-by: rifsxd <rifat.44.azad.rifs@gmail.com>
Co-authored-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>
2025-11-15 10:58:10 +08:00
Wang Han
01ac06c3fd kernel: Prune allowlist only after boot completed
For unknown reason, packages.list is not reliable during boot for oplus
devices, so we have to disable pruning and re-run pruning after boot.
2025-11-15 10:54:19 +08:00
ShirkNeko
906c4bdb01 manager: bump susfs version to 2.0.0
- Remove versions below susfs 2.0.0 that are no longer supported.
2025-11-14 21:53:17 +08:00
weishu
c17d7b38eb ci: fix android16-6.12 gki build (#2931) 2025-11-14 19:02:48 +08:00
KOWX712
fa57ccccf4 manager: introduce webui package manager api (#2928)
this is a squash of:

* manager: introduce app package info API for webui-next
(KernelSU-Next/KernelSU-Next@58167a4)

* manager: sort a-z order for webui-next list packages api
(KernelSU-Next/KernelSU-Next@4a9733c)

* manager: implement getPackagesIcons and cacheAllPackageIcons api to
webui-next (KernelSU-Next/KernelSU-Next@a361fa3)

* manager/webui: let getPackagesIcons generate icon and store in cache
as well when called (KernelSU-Next/KernelSU-Next@6afa86d)

* POC: load icon app via ksu://icon/[packageName] (KernelSU-Next#674)
(KernelSU-Next/KernelSU-Next@bc9927b)

* manager: refine webui package manager (KOWX712/KernelSU@0400c42)

Co-Authored-By: Rifat Azad <33044977+rifsxd@users.noreply.github.com>
Co-Authored-By: Fahrez256Bit
<167403685+fahrez256@users.noreply.github.com>
Signed-off-by: KOWX712 <leecc0503@gmail.com>

---------

Signed-off-by: KOWX712 <leecc0503@gmail.com>
Co-authored-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com>
Co-authored-by: Fahrez256Bit <167403685+fahrez256@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-14 19:02:21 +08:00
ShirkNeko
7e7713ee4a kernel/sulog: Optimise the sulog log format 2025-11-14 12:55:57 +08:00
ShirkNeko
7afcdb3059 kernel: Optimise sulog to prevent deadlocks caused by global lock contexts. 2025-11-14 12:29:55 +08:00
ShirkNeko
5df821ed41 kernel: Resolved potential deadlock issues arising from operations not being performed within locks. 2025-11-14 11:55:06 +08:00
YuKongA
12fc2e6d5e userspace: remove vendor_boot selection logic
- Only patch it when user actively selects vendor_boot.
2025-11-13 20:36:44 +08:00
5ec1cff
9f869090d2 kernel: refine syscall_hook_manager
- Don't unmark process when setuid if syscall tracepoint is in use
- Remark process when app profile updated
- Ensure zygote is marked on first boot
2025-11-13 20:09:32 +08:00
ShirkNeko
bb8b991110 kernel: restart enable sulog for LKM 2025-11-13 17:46:08 +08:00
ShirkNeko
10548f9243 kernel: fix build 2025-11-13 17:06:27 +08:00
weishu
96d33e62bb kernel: fix zygote mark on first boot (#2924) 2025-11-13 16:31:26 +08:00
ShirkNeko
7be8c15b85 kernel: Remove redundant ksu_handle_inode_permission hooks, calling only for manual_su 2025-11-13 15:02:20 +08:00
ShirkNeko
14bb6afd0b New Crowdin updates (#568)
* New translations strings.xml (Russian)

* New translations strings.xml (Turkish)

* New translations strings.xml (Chinese Simplified)

* New translations strings.xml (Chinese Traditional)

* New translations strings.xml (Indonesian)

* New translations strings.xml (Chinese Traditional, Hong Kong)
2025-11-13 13:23:31 +08:00
ShirkNeko
54dad4ceb2 assets: bump KPM version to 0.12.2 2025-11-12 18:52:22 +08:00
ShirkNeko
a60395ba35 manager: install: do not always recommended to select boot partition if not rooted
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
2025-11-12 18:04:49 +08:00
5ec1cff
095385f814 kernel: fix wrong show_fdinfo impl
Signed-off-by: Wang Han <416810799@qq.com>
2025-11-12 13:25:20 +08:00
ShirkNeko
7e595e1730 kernel: Public ksu_handle_sys_reboot
- clean code
2025-11-11 16:49:09 +08:00
Wang Han
ded31c2043 kernel: Fix task flag marking for root and shell UID
Signed-off-by: Wang Han <416810799@qq.com>
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
2025-11-11 16:26:37 +08:00
ShirkNeko
a7f840d811 manager: fix template status display issue (#2910)
manager: 修复模板状态显示问题 (#2910)

修复当 app 设置过模板后再使用自定义配置,离开页面后再次打开,管理器显示应用使用的是模板而不是自定义配置的问题

- bump AGP version

Co-authored-by: u9521 <63995396+u9521@users.noreply.github.com>
2025-11-11 16:00:54 +08:00
Ylarod
05cca26075 ci: move workflow_dispatch to versioned ci workflow
Signed-off-by: Faris <rissu.ntk@gmail.com>
2025-11-11 15:40:09 +08:00
ShirkNeko
5ce6c210c4 manager: install: add choose partition support
manager: fix KsuCli cmd

userspace: reuse choose_boot_device

- manager: simplify find boot image

Co-authored-by: weishu <twsxtd@gmail.com>
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
2025-11-11 15:16:11 +08:00
ShirkNeko
8f49898155 kernel: Use task work to install fd
There are many fd related functions that can sleep, so we have no choice
but move operations to task work. Also close fd when copy_to_user fails.

Co-authored-by: Wang Han <416810799@qq.com>
2025-11-11 01:10:36 +08:00
ShirkNeko
fd3a22360a kernel: Clean code build 2025-11-09 23:18:48 +08:00
Wang Han
ef36a36e9a kernel: Don't save allowlist on module exit
This is not needed and may trigger UAF as work is async.
2025-11-09 23:14:13 +08:00
ShirkNeko
7a1a08064b manager: After flashing anykernel3, release ksud. 2025-11-09 21:26:08 +08:00
AlexLiuDev233
36862d6175 manager: if manager incompatible with current kernel, don't save ksud (#2895)
I think we should'nt install kernelsu's userspace when manager
incompatible with current kernel
this maybe cause a lot of bug, for example, when user install 2.x
kernelsu manager, but not update
his kernel to 2.x, ksud will return "kernel version 0", because ksud
incompatible with old supercall impl
2025-11-09 21:14:40 +08:00
ShirkNeko
cda7e4c6c0 Clean up kernel code (#2898)
1) Fix memory leak of callback head in allowlist.c
2) Remove duplicated logic and incorrect log in kernel_umount.c
3) Prevent sleep in kprobe context in ksud.c
4) Remove useless is_unsupported_uid, use euid for security enhance,
   add FIXME in setuid_hook.c
5) Remove useless fd argument for execve hook, fix incorrent pointer
   usage in syscall_hook_manager.c and sucompat.c
6) Use correct errno in supercalls.c

---------

Co-authored-by: Ylarod <me@ylarod.cn>
2025-11-09 19:20:30 +08:00
ShirkNeko
0b63cc445c kernel: Expose the ksu_handle_sys_read hook 2025-11-09 18:11:30 +08:00
ShirkNeko
2433ced81a kernel: Rollback disable_seccomp
Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
Co-authored-by: Faris <rissu.ntk@gmail.com>
2025-11-09 17:00:43 +08:00
ShirkNeko
1f04f13e44 kernel: Remove redundant checks 2025-11-09 16:41:54 +08:00
ShirkNeko
184467c691 kernel: Undo some changes 2025-11-09 16:09:59 +08:00
ShirkNeko
05ed1a3714 fix build 2025-11-09 14:17:27 +08:00