From b21e856754e6bbda108649da2549a721d0268dd4 Mon Sep 17 00:00:00 2001 From: cfig Date: Mon, 18 May 2020 14:34:57 +0800 Subject: [PATCH] eliminate meaningless non-zero values of ramdisk_offset - Fix: issue #38 - sync change of https://android-review.googlesource.com/c/platform/system/tools/mkbootimg/+/1087679 - also change integrationTest --- bbootimg/src/main/kotlin/bootimg/BootImgHeader.kt | 1 + integrationTest.py | 7 +++---- src/integrationTest/resources | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bbootimg/src/main/kotlin/bootimg/BootImgHeader.kt b/bbootimg/src/main/kotlin/bootimg/BootImgHeader.kt index 8eb82de8..1dc8ee3f 100644 --- a/bbootimg/src/main/kotlin/bootimg/BootImgHeader.kt +++ b/bbootimg/src/main/kotlin/bootimg/BootImgHeader.kt @@ -196,6 +196,7 @@ open class BootImgHeader( //refresh ramdisk size if (0U == this.ramdiskLength) { param.ramdisk = null + this.ramdiskOffset = 0U } else { this.ramdiskLength = File(param.ramdisk!!).length().toUInt() } diff --git a/integrationTest.py b/integrationTest.py index 3be0b267..84ecf248 100755 --- a/integrationTest.py +++ b/integrationTest.py @@ -86,6 +86,9 @@ def decompressXZ(inFile, outFile): f2.write(file_content) def main(): + # from volunteers + verifySingleDir(resDir, "recovery_image_from_s-trace") + verifySingleDir(resDir, "boot_img_from_gesangtome") # android 9, no ramdisk # 5.0 verifySingleDir(resDir, "5.0_fugu_lrx21m") # 6.0 @@ -104,10 +107,6 @@ def main(): verifySingleDir(resDir, "9.0.0_blueline_pq1a.181105.017.a1") # Q preview verifySingleDir(resDir, "Q_preview_blueline_qpp2.190228.023") - - # from volunteers - verifySingleDir(resDir, "recovery_image_from_s-trace") - # 10 verifySingleDir(resDir, "10.0.0_coral-qq1d.200205.002") diff --git a/src/integrationTest/resources b/src/integrationTest/resources index b38a8c9e..d8168a22 160000 --- a/src/integrationTest/resources +++ b/src/integrationTest/resources @@ -1 +1 @@ -Subproject commit b38a8c9e9763aefa1584e80b866efb0173cae04b +Subproject commit d8168a226d055f8372e55e3c0096d6dca70b8611