Commit Graph

354 Commits

Author SHA1 Message Date
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
Caner Karaca
8f33926aa0 Add Dependabot, Update Dependencies and Workflows (#1440)
Build may fail because of some major dependency updates. Needs changes,
changes/fixes welcomed.

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

---------

Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-20 12:52:34 +08:00
weishu
f41d73f7eb ksud: try parse kmi from gki modules if uname is modified 2024-03-19 10:37:17 +08:00
weishu
9759a779cd embed LKM to ksud (#1472) 2024-03-18 23:12:46 +08:00
weishu
f6d552c797 ksud: ensure post-fs-data.d is created by post ota 2024-03-17 17:25:42 +08:00
weishu
e39be55db8 ksud: Fix magisk detect 2024-03-16 11:13:50 +08:00
weishu
9d5529fb09 ksud: Fix magisk detect 2024-03-16 09:22:37 +08:00
Ylarod
7568d55be1 Build KernelSU as LKM (#1254)
Co-authored-by: weishu <twsxtd@gmail.com>
2024-03-15 18:53:24 +08:00
weishu
d77988c1ac ksud: catch dmesg in bootlog 2024-03-11 14:20:27 +08:00
weishu
fe7ec370d4 ksud: fmt & tidy 2024-03-11 14:01:21 +08:00
weishu
ce5aa990ed ksud: don't patch if it's already patched 2024-03-11 12:48:25 +08:00
weishu
c8fc6a0656 ksud: resize image if it is shrinked 2024-03-04 13:50:00 +08:00
weishu
3829894d4d Use fallback method to mount overlayfs when fsopen one failed
Co-authored-by: natsumerinchan
2024-03-04 12:26:19 +08:00
weishu
dbe43b1540 ksud: remove permission mode for symlink 2024-03-01 23:10:03 +08:00
weishu
8a59fe1969 ksud: Copy directory permission mode 2024-03-01 22:46:53 +08:00