magiskboot: Fix tail offset calculation

This commit is contained in:
Wang Han
2026-01-17 14:38:51 +08:00
committed by GitHub
parent 01cb75eaef
commit 1f1eb01a7d

View File

@@ -913,8 +913,6 @@ void repack(Utf8CStr src_img, Utf8CStr out_img, bool skip_comp) {
file_align();
}
off.tail = lseek(fd, 0, SEEK_CUR);
// Proprietary stuffs
if (boot.flags[SEANDROID_FLAG]) {
xwrite(fd, SEANDROID_MAGIC, 16);
@@ -925,6 +923,7 @@ void repack(Utf8CStr src_img, Utf8CStr out_img, bool skip_comp) {
xwrite(fd, LG_BUMP_MAGIC, 16);
}
off.tail = lseek(fd, 0, SEEK_CUR);
file_align();
// vbmeta