topjohnwu
b76d674a60
Move daemon utilities from base to core
...
Move utilities that are exclusively used by the daemon (core module)
from base to core:
- fork_dont_care, fork_no_orphan, new_daemon_thread, init_argv0,
set_nice_name, and switch_mnt_ns into utils.cpp
- exec_command* functions and exec_t into scripting.cpp as static
functions, as scripting is their sole consumer
Also remove the unused exec_command_sync overload.
Assisted-by: Gemini 3.8 Flash
2026-10-02 17:17:48 -07:00
topjohnwu
d04635478a
Fix clippy warnings across native codebase
...
Address clippy warnings including collapsible match statements in
bootstages, daemon, su daemon, and db modules, as well as iterator
loops in files.rs.
Assisted-by: Gemini 3.6 Flash
2026-07-31 22:57:41 -07:00
topjohnwu
ff4ca74cfe
Ban all unwrap usage in codebase
2025-12-08 23:31:04 -08:00
topjohnwu
5bcb55b7fc
Format Rust imports with rustfmt
2025-10-19 17:15:30 -07:00
topjohnwu
78e2fc37e5
Add easy knobs to disable security checks
2025-10-02 04:09:46 -07:00
Wang Han
d60806f429
Only reset NB prop when zygisk is enabled
2025-10-02 03:19:32 -07:00
topjohnwu
8b7d1ffcdd
Migrate magisk_main to Rust
2025-09-18 03:22:44 -07:00
topjohnwu
cf483ad4d2
Migrate connect_daemon to Rust
2025-09-15 14:25:18 -07:00
topjohnwu
0acc39cec0
Use bitflags to implement BootState
2025-09-15 14:25:18 -07:00
topjohnwu
8b3a44344f
Move bootstages into its own module
2025-09-15 14:25:18 -07:00
topjohnwu
8b49eda85a
Migrate daemon_entry to Rust
2025-09-15 14:25:18 -07:00
topjohnwu
7057d4c7f1
Migrate setup_magisk_env to Rust
2025-09-15 14:25:18 -07:00
topjohnwu
f10ad93c4e
Move more code of daemon_entry into Rust
2025-09-13 01:21:33 -07:00
topjohnwu
c8caaa98f5
Enable mount for nix
2025-09-09 20:17:09 -07:00
topjohnwu
ef4e230258
Use nix for libc functions
2025-09-08 23:59:29 -07:00
topjohnwu
bd657c354c
Reduce FFI across C++/Rust
2025-09-02 22:06:08 -07:00
topjohnwu
c4e2985677
Migrate resetprop to Rust
2025-08-27 22:48:48 -07:00
topjohnwu
e91fc75d86
Consolidate for_each implementation into Rust
2025-08-25 01:31:47 -07:00
topjohnwu
5caf28d27c
Hide harmless error reporting
2025-08-22 12:03:47 -07:00
topjohnwu
8d10ab89f2
Set zygisk properties in Rust
2025-08-20 11:23:18 -07:00
topjohnwu
589a270b8d
Migrate disable/remove modules to Rust
2025-08-05 11:24:55 -07:00
topjohnwu
7961be5cfa
Migrate prepare_modules to Rust
2025-08-05 11:24:55 -07:00
topjohnwu
55c3ee3a6f
Move Zygisk code out of module.cpp
2025-07-07 13:43:11 -07:00
topjohnwu
37a9724a54
Apply clippy fix
2025-07-02 21:20:14 -07:00
topjohnwu
4f4b1ff885
Add sepolicy.rule patching tests
2025-05-13 14:08:54 -07:00
LoveSy
79c0fafe43
Fix cleanup pre-init mount
2025-05-05 11:00:39 -07:00
topjohnwu
22884e173a
Implement reboot in Rust
2025-04-28 17:22:14 -07:00
topjohnwu
d1829308e9
Move more daemon_start code into Rust
2025-04-28 17:22:14 -07:00
topjohnwu
73840f8721
Migrate selinux.cpp to selinux.rs
2025-04-28 17:22:14 -07:00
topjohnwu
3327fc668e
Remove FsPath and FsPathMnt trait
...
Directly use Utf8CStr
2025-04-28 17:22:14 -07:00
topjohnwu
610945ac54
Remove open_fd macro
2025-04-28 17:22:14 -07:00
topjohnwu
e02b5f7868
Rename cstr_buf to cstr::buf
2025-04-22 03:21:00 -07:00
topjohnwu
ab2e5d1e7e
Make FsPathBuf a trait and rename to FsPathBuilder
2025-04-22 03:21:00 -07:00
topjohnwu
f3fef7bfe4
Make FsPath a trait
2025-04-22 03:21:00 -07:00
topjohnwu
084d89fcce
Create Utf8CStrBuffer type
2025-04-15 10:26:22 -07:00
topjohnwu
9c7d359093
Optimize and format imports
...
[skip ci]
2025-04-08 09:57:09 -07:00
topjohnwu
fc2ef21660
Introduce path! macro for FsPath
2025-02-17 01:46:19 -08:00
topjohnwu
dcf027884d
Update FsPathBuf
2025-02-15 18:27:45 -08:00
LoveSy
9a74e19117
Add log_ok() for log().ok()
2025-02-14 14:24:13 -08:00
topjohnwu
540253a55b
Remove unnecessary FFI
2025-02-14 11:24:46 -08:00
topjohnwu
0469817781
Cleanup code and bindings
2025-02-02 22:08:41 +08:00
topjohnwu
a786801141
Implement su_daemon in Rust
2025-02-02 22:08:41 +08:00
topjohnwu
59622d1688
Use static methods in cxx-rs
2025-02-02 02:46:33 +08:00
topjohnwu
7f7f625864
Code reorganization
2025-01-31 02:52:27 +08:00
topjohnwu
b25aa8295a
Move bootstage into Rust
2025-01-31 02:52:27 +08:00
topjohnwu
15a605765c
Fully implement daemon side of Zygisk in Rust
2025-01-31 02:52:27 +08:00
topjohnwu
b575c95710
Implement fd I/O on Rust side
2025-01-31 02:52:27 +08:00
topjohnwu
a48a9c858a
Migrate zygisk handler to Rust
2025-01-31 02:52:27 +08:00
topjohnwu
0d8d6290a3
Move module list into MagiskD
2025-01-31 02:52:27 +08:00
topjohnwu
4dcd733ddd
Minor code cleanup
2025-01-31 02:52:27 +08:00