Commit Graph

418 Commits

Author SHA1 Message Date
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
weishu
063d5c8025 ksud: use sha1 library to calc hash 2024-04-24 12:51:11 +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
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
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
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
weishu
6ea2438425 ksud: Fix clippy 2024-04-12 10:36:34 +08:00
weishu
3010ed89c0 ksud: Add boot restore 2024-04-12 00:47:29 +08:00
weishu
eb5b36f138 ksud: Fix debug set manager 2024-03-27 18:13:47 +08:00
weishu
05366ca7d0 ksud: fmt 2024-03-26 17:17:19 +08:00
weishu
c924c655df ksud: fix supported kmi 2024-03-23 13:59:05 +08:00
weishu
ef92c32729 ksud: add boot-info cli 2024-03-23 10:46:16 +08:00
weishu
fd7234bf11 ksud: rename patched boot. close #1511 2024-03-23 10:06:37 +08:00
weishu
8b71d3c9ba ksud: try find KMI from installed modules 2024-03-20 21:33:41 +08:00