topjohnwu
7b706bb0cb
Cleanup and fix compress/decompress command
2025-08-23 20:31:15 -07:00
topjohnwu
cd0eca20b0
Migrate connect.cpp to Rust
2025-08-08 21:06:41 -07:00
topjohnwu
7961be5cfa
Migrate prepare_modules to Rust
2025-08-05 11:24:55 -07:00
topjohnwu
37a9724a54
Apply clippy fix
2025-07-02 21:20:14 -07:00
topjohnwu
b36066bbcd
Run clippy fix
2025-06-10 16:34:38 -07:00
Wang Han
0b494ed7df
Avoid throwing error if chmod a symlink
...
It is possible that we want to clone attributes of a regular file to a
symlink. In this case, we don't need to error out if chmod fails. Just
skip it.
2025-06-06 17:08:34 -07:00
topjohnwu
527bbc0368
Migrate module mounting to Rust
2025-05-20 03:24:43 -07:00
vvb2060
86da917174
core: fix mkdirs
2025-05-02 16:39:46 -07:00
topjohnwu
4ad26d3dfb
Better path methods
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
c34c7838bb
Cleanup cstr implementation
2025-04-22 03:21:00 -07:00
topjohnwu
7bd901273c
Provide richer error messages
...
Make sure most syscall/libc calls results are mapped to OsResult
that can produce more detailed error messages.
2025-04-15 00:18:48 -07:00
topjohnwu
d4a0286e13
Migrate magiskinit selinux.cpp to Rust
2025-04-08 02:33:52 -07:00
topjohnwu
c09a792958
Reorganize magiskinit code
2025-03-24 17:26:03 -07:00
topjohnwu
6ff82c4e86
Introduce FsPathFollow
...
Make sure all operations of FsPath do not follow symlinks, and provide
a way to explicitly switch over to a set of operations that DO follow
symlinks by FsPath::follow_link.
2025-03-07 15:51:51 -08:00
topjohnwu
c90e73ccec
Migration to Edition 2024
2025-03-07 02:35:25 -08:00
vvb2060
e8958c6b5c
get_secontext: ignore ENODATA
2025-03-06 20:03:36 -08:00
topjohnwu
b6b34f7612
Fix overlay.d context preservation
2025-02-27 01:57:25 -08:00
topjohnwu
363410e1c0
Introduce cstr_buf helper functions
2025-02-17 11:32:21 -08: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
topjohnwu
584f3820fe
Make all Utf8CStrWrite Utf8CStrBuf
2025-02-15 18:27:45 -08:00
topjohnwu
a48a9c858a
Migrate zygisk handler to Rust
2025-01-31 02:52:27 +08:00
topjohnwu
4dcd733ddd
Minor code cleanup
2025-01-31 02:52:27 +08:00
topjohnwu
a1b2830c06
Address clippy warnings
2025-01-11 00:11:48 +08:00
topjohnwu
ee6810f417
Rewrite magisk logging implementation
2025-01-11 00:11:48 +08:00
topjohnwu
2654382c43
Address clippy warnings
2024-12-09 18:26:39 -08:00
topjohnwu
5ac7dc0b37
Support vendor boot unpack/repack
...
Fix #6460 , close #6620
2024-07-30 04:00:12 -07:00
topjohnwu
7c88484d64
Fix #7988
2024-04-16 19:45:01 -07:00
topjohnwu
b22b6a4204
Refactor cpio
2024-04-10 22:46:21 -07:00
topjohnwu
2a3d34c812
Fix mkdirs
2024-04-10 22:36:47 -07:00
topjohnwu
2e4440b702
Support 32-bit magiskboot
2024-04-09 19:34:14 -07:00
topjohnwu
715284b70d
Reorganize code
2024-02-27 18:14:30 -08:00
topjohnwu
4b8a0388e7
Make SELinux support a feature
2023-10-17 13:29:15 -07:00
topjohnwu
eda8c70a80
Borrow value instead of moving in FsPath::from()
...
When accepting a value of AsRef<Utf8CStr> in FsPath::from(), the
existing code will move a value of Utf8CStrBufArr, creating a reference
that lives longer than the borrowing value, causing undefined behavior.
The issue is only visible on release builds, as more advanced
optimizations will be more aggressive re-using the stack of variables
that no longer lives.
Fix #7408
2023-10-11 23:48:54 -07:00
topjohnwu
6e7a995716
Introduce UtfCString
2023-09-27 15:21:24 -07:00
topjohnwu
a55d570213
Move more I/O operations into Rust
2023-09-27 02:28:43 -07:00
topjohnwu
8e1a91509c
Remove readlink_unsafe
2023-09-19 00:06:21 -07:00
LoveSy
5fbd3e5c65
Fix buf len update of read_link to Utf8CStrBuf
2023-09-18 22:31:12 -07:00
topjohnwu
dda8cc85c9
Use bytemuck
2023-09-14 13:10:09 -07:00
topjohnwu
6a59939d9a
Remove for_all_file
2023-09-13 18:09:16 -07:00
topjohnwu
89aee6ffa7
Add more to the Utf8CStr family
...
Better C strings with path operations
2023-09-12 17:35:01 -07:00
LoveSy
8d81bd0e33
resetprop: replace nanopb with quick-protobuf for persist
2023-09-05 22:20:57 -07:00
topjohnwu
e8e8afa6c2
Properly handle visibility
2023-07-06 11:12:27 -07:00
LoveSy
a470ee6f93
Fix mmap block device
2023-06-30 01:06:51 -07:00
topjohnwu
2359cfc480
Small refactor
2023-06-20 00:21:51 -07:00