Commit Graph

32 Commits

Author SHA1 Message Date
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 b861671391 Cleanup libbase 2025-08-25 01:31: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
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 1460317ebd Cleanup C++ headers 2025-06-16 02:25:38 -07:00
topjohnwu 78d1200608 Migrate all compression code to Rust 2025-05-20 03:26:00 -07: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
topjohnwu 7188de1205 Support unaligned boot image file
Fix #7733
2024-10-06 03:01:08 -07:00
残页 46a34e19bc Check vendor boot ramdisk table size 2024-07-31 16:59:51 -07:00
topjohnwu 5ac7dc0b37 Support vendor boot unpack/repack
Fix #6460, close #6620
2024-07-30 04:00:12 -07:00
osm0sis 991802ab82 Add no decompression flag to magiskboot split 2024-03-06 16:15:30 -08:00
topjohnwu 625a1d6f44 Remove seek support from streams 2024-02-28 11:07:53 -08:00
LoveSy 8d7c7c3dfb Refactor dtb in rust 2023-09-19 00:41:42 -07:00
LoveSy 0243610c09 No trailing zeros if the signed boot img is larger 2023-09-12 18:09:20 -07:00
topjohnwu 41226c12b8 Update to ONDK r25.7 2023-08-15 17:10:20 -07:00
topjohnwu af65d07456 Support AVB1.0 signing and verification in magiskboot 2023-07-17 18:57:50 -07:00
topjohnwu c97ab690b6 Segment memory mapped boot image region 2023-07-13 21:01:49 -07:00
topjohnwu ee943afbc9 Cleanup SHA hash implementation 2023-06-30 15:50:52 -07:00
LoveSy 1f7c3e9f14 Use rust to calculate sha 2023-06-30 14:06:02 -07:00
topjohnwu 305e8b3d14 Improve bootimg const correctness 2023-06-03 05:10:22 -07:00
topjohnwu 2a654e5d7f Improve byte_data const correctness 2023-06-03 03:16:03 -07:00
topjohnwu f5aaff2b1e Cleanup filter_out_stream implementation 2023-05-20 01:28:10 -07:00
topjohnwu 57bd450798 Split input and output streams 2023-05-19 04:19:43 -07:00
LoveSy 7bf2e3875f Support extract boot image from payload.bin 2023-05-04 21:37:08 -07:00
vvb2060 f54daa3469 Force ramdisk format to lz4_legacy for v4 2023-03-23 20:50:27 -07:00
topjohnwu 4417997749 Make sure ro mmap region is not overwritten 2023-03-21 15:50:43 -07:00
LoveSy 2eef542054 Add amonet microloader support 2023-03-21 15:50:43 -07:00
LoveSy d9f0aed571 Fix unpack -n and repack -n of ZIMAGE kernel 2023-03-17 02:00:46 -07:00
残页 ae34659b26 No kernel repack if it isn't patched at all
It turns out that decompressing and recompressing the kernel is enough to break booting on many devices that use MT6763.
Fix #5124, fix #6204, fix #6566 

Co-authored-by: LoveSy <shana@zju.edu.cn>
Co-authored-by: 南宫雪珊 <vvb2060@gmail.com>
2023-02-17 15:00:14 -08:00
topjohnwu b9e89a1a2d Restructure the native module
Consolidate all code into the src folder
2022-07-23 13:51:56 -07:00