Add no decompression flag to magiskboot split

This commit is contained in:
osm0sis
2024-02-04 23:54:44 -04:00
committed by John Wu
parent 7f6b5305ba
commit 991802ab82
3 changed files with 14 additions and 6 deletions
+11 -3
View File
@@ -84,8 +84,10 @@ Supported actions:
Do dtb related actions to <file>.
See "dtb --help" for supported actions.
split <file>
Split image.*-dtb into kernel + kernel_dtb
split [-n] <file>
Split image.*-dtb into kernel + kernel_dtb.
If '-n' is provided, decompression operations will be skipped;
the kernel will remain untouched, split in its original format.
sha1 <file>
Print the SHA1 checksum for <file>
@@ -150,7 +152,13 @@ int main(int argc, char *argv[]) {
printf("%02x", i);
printf("\n");
} else if (argc > 2 && action == "split") {
return split_image_dtb(argv[2]);
if (argv[2] == "-n"sv) {
if (argc == 3)
usage(argv[0]);
return split_image_dtb(argv[3], true);
} else {
return split_image_dtb(argv[2]);
}
} else if (argc > 2 && action == "unpack") {
int idx = 2;
bool nodecomp = false;