topjohnwu
ef4e230258
Use nix for libc functions
2025-09-08 23:59:29 -07:00
topjohnwu
a75c335261
Update cargo dependencies
2025-09-08 02:24:01 -07:00
topjohnwu
bc89c60977
Run cargo fmt
2025-09-02 22:06:08 -07:00
topjohnwu
653730d75e
Make cxx binding generate less code
2025-08-29 01:44:06 -07:00
topjohnwu
484d53ef7e
Update to ONDK r29.2
2025-08-28 16:15:59 -07:00
topjohnwu
2e4fa6864c
Make Utf8CStr a first class citizen in C++ codebase
...
Utf8CStr is in many cases a better string view class than
std::string_view, because it provides "view" access to a string buffer
that is guaranteed to be null terminated. It also has the additional
benefit of being UTF-8 verified and can seemlessly cross FFI boundaries.
We would want to start use more Utf8CStr in our existing C++ codebase.
2025-08-27 22:48:48 -07:00
topjohnwu
3599dcedfb
Make argh directly parse into Utf8CString
2025-08-27 01:26:41 -07:00
topjohnwu
b861671391
Cleanup libbase
2025-08-25 01:31:47 -07:00
LoveSy
78f5cd55c7
Use lzma-rust2 for xz and lzma compression and decompression
2025-08-24 00:23:55 -07:00
topjohnwu
9787a69528
Make all decoders Read instead of Write
...
Most libraries only implement Read for decoders
2025-08-24 00:23:55 -07:00
topjohnwu
87b8fe374d
Fix magiskboot cli parsing
2025-08-23 20:31:15 -07:00
topjohnwu
7b706bb0cb
Cleanup and fix compress/decompress command
2025-08-23 20:31:15 -07:00
LoveSy
5cbaf2ae11
Use super let to simplify code
2025-08-22 12:05:44 -07:00
topjohnwu
8ebc6207b4
Merge headers
2025-08-22 12:03:47 -07:00
topjohnwu
7848ee616b
Cleanup magiskboot main function
2025-08-22 12:03:47 -07:00
topjohnwu
fd193c3cae
Simplify ResultExt implementation
...
Also introduce OptionExt
2025-08-22 12:03:47 -07:00
topjohnwu
36d33c7a85
Make log_err directly return LoggedResult
2025-08-22 12:03:47 -07:00
topjohnwu
2c39d0234d
Fix compression format detection
2025-08-21 12:21:22 -07:00
topjohnwu
c313812129
Simplify magiskboot FFI
2025-08-21 12:21:22 -07:00
topjohnwu
af51880a81
Introduce CmdArgs for argument parsing in Rust
2025-08-21 12:21:22 -07:00
LoveSy
db8d832707
Move magiskboot cli to argh
2025-08-20 21:40:34 -07:00
5ec1cff
a54bdb54e4
Skip avb 1,0 verify if tail contains avb 2.0 header
...
This way, magiskboot will not print "unexpected ASN.1 DER tag: expected SEQUENCE, got APPLICATION [1] (primitive)".
2025-07-21 00:51:14 -07:00
topjohnwu
466e4bd4e1
Update cargo dependencies
2025-07-11 02:04:33 -07:00
topjohnwu
37a9724a54
Apply clippy fix
2025-07-02 21:20:14 -07:00
topjohnwu
1460317ebd
Cleanup C++ headers
2025-06-16 02:25:38 -07:00
topjohnwu
898580bf90
Update dependencies
2025-06-02 19:51:12 -07:00
topjohnwu
78d1200608
Migrate all compression code to Rust
2025-05-20 03:26:00 -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
e02b5f7868
Rename cstr_buf to cstr::buf
2025-04-22 03:21:00 -07:00
topjohnwu
f3fef7bfe4
Make FsPath a trait
2025-04-22 03:21:00 -07:00
topjohnwu
cb08504fe5
Update cargo dependencies
2025-04-11 14:48:16 -07:00
topjohnwu
9c7d359093
Optimize and format imports
...
[skip ci]
2025-04-08 09:57:09 -07:00
topjohnwu
c09a792958
Reorganize magiskinit code
2025-03-24 17:26:03 -07:00
LoveSy
12a0870bc9
Replace bzip2 with bz2-rs
2025-03-08 14:37:17 -08:00
LoveSy
bd0e954fea
Replace zlib with zlib-rs
2025-03-07 11:40:02 -08:00
topjohnwu
c90e73ccec
Migration to Edition 2024
2025-03-07 02:35:25 -08:00
topjohnwu
a43c1267d8
Update Cargo.toml
2025-03-07 02:35:25 -08:00
topjohnwu
c6c1a17ae6
Address several clippy warnings
2025-03-03 02:15:14 -08:00
David K.
0e82df9e10
Support zImage compression types other than gzip.
...
Instead of just searching for the gzip magic, it now incrementally searches the kernel for the first thing that `check_fmt_lg` doesn't report as `UNKNOWN`.
2025-03-02 13:35:13 -08:00
LoveSy
e55c413261
Correctly handle truncated dtb
2025-02-23 20:31:55 -08:00
topjohnwu
363410e1c0
Introduce cstr_buf helper functions
2025-02-17 11:32:21 -08:00
topjohnwu
584f3820fe
Make all Utf8CStrWrite Utf8CStrBuf
2025-02-15 18:27:45 -08:00
LoveSy
3981c9665e
Replace rust inner functions to try blocks
2025-02-02 22:09:55 +08:00
topjohnwu
c05e963f37
Address clippy warnings
2025-01-31 02:52:27 +08:00
topjohnwu
9e26b73813
Update rust dependencies
2024-12-09 18:26:39 -08:00
topjohnwu
805da67c23
Update cxx-rs
2024-12-03 14:16:14 -08:00
topjohnwu
7188de1205
Support unaligned boot image file
...
Fix #7733
2024-10-06 03:01:08 -07:00
topjohnwu
8086b5933c
Update crt0
...
Fix #8424
2024-10-02 16:37:07 -07:00
niels
0d9ee89e7f
magiskboot: cleanup bootconfig and vendor ramdisk dir
2024-09-14 23:08:22 -07:00