LoveSy
a07b9315a5
Add riscv64 support
2024-07-02 14:34:22 -07:00
topjohnwu
23ed275614
Update to ONDK r27.2
2024-06-18 14:34:30 -07:00
LoveSy
c6f0762510
Use pidfd_open for setns
...
which is more efficient on newer kernel
2024-05-20 03:26:55 +08: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
c50ee722a1
Use memmem for finding needle in haystack
2024-04-10 14:57:44 -07:00
topjohnwu
2e4440b702
Support 32-bit magiskboot
2024-04-09 19:34:14 -07:00
topjohnwu
2051836a73
Remove unused code
2024-03-30 21:03:51 -07:00
topjohnwu
a1b6568226
Implement preinit related features in Rust
2024-03-28 14:11:03 -07:00
topjohnwu
1eddbfd72c
Use const_format for const strings
2024-03-26 18:03:40 -07:00
topjohnwu
dd9d43be96
Move sepolicy parsing error message into Rust
2024-03-21 14:07:28 -07:00
topjohnwu
73c3d741a7
Reorganize some code
2024-03-06 18:07:01 -08:00
topjohnwu
a6ff3672af
Update crt0
2024-03-04 16:42:25 -08:00
topjohnwu
24e46a5971
Build magiskboot with crt0
2024-02-29 02:36:05 -08:00
topjohnwu
b1297c4192
Less usage of C stdio
2024-02-28 15:52:03 -08:00
topjohnwu
9ae328fd84
Further reduce code size
2024-02-28 11:19:56 -08:00
topjohnwu
625a1d6f44
Remove seek support from streams
2024-02-28 11:07:53 -08:00
topjohnwu
715284b70d
Reorganize code
2024-02-27 18:14:30 -08:00
topjohnwu
1a70796339
Replace all parse_mount_info usage with Rust
2024-02-27 03:49:17 -08:00
topjohnwu
b7505c3c9c
Remove fopen usage in magiskinit
2024-02-24 00:45:07 -08:00
topjohnwu
6d79de7d71
Initial crt0 implementation
...
Builds but cannot link, missing a lot of symbols
2024-02-22 21:22:27 -08:00
topjohnwu
65207f96c8
Create custom cxx binding to Utf8CStr
2023-12-26 23:10:55 +08:00
LoveSy
90dcc1cd30
Do not always zero initialize for rust resize vec
2023-12-18 16:21:08 +08:00
LoveSy
8b7fae278b
Support compressing during cpio backup
2023-12-18 16:21:08 +08:00
topjohnwu
8d5b9e5329
C++/Rust 2 way binding for MagiskD
2023-11-17 13:35:50 -08:00
topjohnwu
7c2e93d266
Introduce owned_fd
2023-11-16 15:38:38 -08:00
LoveSy
cbc6d40b2c
Clean up codes
2023-11-07 14:25:57 -08:00
topjohnwu
16ae4aedf1
Remove usage of MAGISKTMP
2023-11-02 15:50:36 -07:00
topjohnwu
4b8a0388e7
Make SELinux support a feature
2023-10-17 13:29:15 -07:00
topjohnwu
66788dc58c
Cleanup SELinux support
2023-10-16 17:38:44 -07:00
topjohnwu
36de62873a
Fix error logging on the C++ side
2023-10-13 16:59:54 -07:00
topjohnwu
51e37880c6
Add repr(transparent) to guarantee soundness
2023-10-12 18:59:16 -07:00
topjohnwu
4b83c1e76c
Cleanup messy error messages
2023-10-12 18:54:09 -07:00
topjohnwu
6d1e8d86cb
Cleaner cstr code
2023-10-11 23:53:55 -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
5d07d0b964
Do not support systems without SELinux
2023-09-27 02:28:43 -07:00
topjohnwu
15e13a8d8b
Organize logging code
2023-09-19 03:02:30 -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
0a2a590ab7
Use Utf8CStr for logging
2023-09-12 17:35:20 -07:00
topjohnwu
89aee6ffa7
Add more to the Utf8CStr family
...
Better C strings with path operations
2023-09-12 17:35:01 -07:00
topjohnwu
4fff2aa7d8
Fix proto read and write
2023-09-06 20:45:59 -07:00
topjohnwu
35b3c8ba5c
Cleanup persist props code
2023-09-06 15:52:14 -07:00
LoveSy
8d81bd0e33
resetprop: replace nanopb with quick-protobuf for persist
2023-09-05 22:20:57 -07:00
LoveSy
c072b4254d
Wrap rename and renameat
2023-09-02 04:24:24 -07:00