You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Support extracting any partition from payload.bin
This commit is contained in:
@@ -718,16 +718,16 @@ void compress(const char *method, const char *infile, const char *outfile) {
|
||||
unlink(infile);
|
||||
}
|
||||
|
||||
bool decompress(const unsigned char *in, uint64_t in_size, int fd) {
|
||||
format_t type = check_fmt(in, in_size);
|
||||
bool decompress(rust::Slice<const uint8_t> buf, int fd) {
|
||||
format_t type = check_fmt(buf.data(), buf.length());
|
||||
|
||||
if (!COMPRESSED(type)) {
|
||||
LOGE("Input file is not a supported compressed type!\n");
|
||||
LOGE("Input file is not a supported compression format!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto strm = get_decoder(type, make_unique<fd_channel>(fd));
|
||||
if (!strm->write(in, in_size)) {
|
||||
if (!strm->write(buf.data(), buf.length())) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user