Commit Graph

22 Commits

Author SHA1 Message Date
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
LoveSy 53257b6ea1 Fix find_apk_path 2023-06-15 04:09:45 -07:00
topjohnwu 9d6f6764cb Use Metadata instead of direct stat syscall 2023-06-12 14:58:13 -07:00
topjohnwu cb3ab63815 Replace all CStr usage to Utf8CStr 2023-06-12 13:57:15 -07:00
topjohnwu caae932117 Remove unnecessary lifetime markers 2023-06-12 13:56:20 -07:00
LoveSy e9cf27eb5a Fix map_file 2023-06-12 13:55:58 -07:00
topjohnwu 23c1f0111b Improve Rust implementation
- Move mmap_file implementation into Rust
- Introduce Utf8CStr as the better c-string type to use
2023-06-12 02:40:50 -07:00
topjohnwu d1621845b8 Fix typo 2023-06-10 01:50:18 -07:00
topjohnwu 40f25f4d56 Introduce directory traversal 2023-06-09 02:00:37 -07:00
topjohnwu 9ea9f01933 Resolve clippy errors and warnings 2023-05-31 01:08:33 -07:00
topjohnwu 5b8b48ccc1 Properly support streamable input 2023-05-26 14:07:11 -07:00
topjohnwu 18d0cedbe2 Parse rule files with Rust 2023-05-24 19:11:56 -07:00
topjohnwu 7b5ff99cd1 Reorganize code 2023-05-04 21:37:08 -07:00
topjohnwu b136aba1e2 Implement magiskinit logging in Rust 2023-05-02 16:49:43 -07:00
LoveSy 9e8c68af12 Refactor sepolicy.rules resolve
We resolve available partitions for sepolicy.rules when patching
boot and bind mount the partition by magiskinit.

For older devices, the previous logic won't work because the part name
is never readable.

Co-authored-by: topjohnwu <topjohnwu@gmail.com>
2023-02-12 00:36:38 -08:00
topjohnwu 44643ad7b3 Restrict pointer aliasing
Close #6354, close #6353
2022-10-31 16:35:33 -07:00
topjohnwu 616adc22e1 Support Linux < 3.6 2022-10-31 16:00:42 -07:00
topjohnwu 095d821240 Don't use xopen in readlink 2022-09-25 16:35:28 -07:00
topjohnwu 48f829b76e Minor refactoring 2022-09-21 03:09:46 +02:00
topjohnwu af99c1b843 Don't crash when nullptr paired with len = 0 2022-09-15 16:56:22 -07:00
topjohnwu c6646efe68 Move all xwrap to Rust 2022-09-15 01:17:05 -07:00