From 85c26a361d5a45b11124ca1713dc02ecc3dd5347 Mon Sep 17 00:00:00 2001 From: cfig Date: Wed, 14 Apr 2021 00:01:26 +0800 Subject: [PATCH] Fix #54: support boot.img vbmeta blob flag --- bbootimg/src/main/kotlin/bootimg/Signer.kt | 3 ++- integrationTest.py | 1 + src/integrationTest/resources | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bbootimg/src/main/kotlin/bootimg/Signer.kt b/bbootimg/src/main/kotlin/bootimg/Signer.kt index 353acc4..f3500f9 100644 --- a/bbootimg/src/main/kotlin/bootimg/Signer.kt +++ b/bbootimg/src/main/kotlin/bootimg/Signer.kt @@ -32,8 +32,9 @@ class Signer { newAvbInfo = newAvbInfo) //original signer val cmdPrefix = if (EnvironmentVerifier().isWindows) "python " else "" - CommandLine.parse(cmdPrefix + "$avbtool add_hash_footer").apply { + CommandLine.parse("$cmdPrefix$avbtool add_hash_footer").apply { addArguments("--image ${output}.signed2") + addArguments("--flags ${ai.header!!.flags}") addArguments("--partition_size ${imageSize}") addArguments("--salt ${Helper.toHexString(bootDesc.salt)}") addArguments("--partition_name ${bootDesc.partition_name}") diff --git a/integrationTest.py b/integrationTest.py index 8555566..a92559f 100755 --- a/integrationTest.py +++ b/integrationTest.py @@ -119,6 +119,7 @@ def main(): verifySingleDir(resDir, "boot_img_from_gesangtome") # android 9, no ramdisk verifySingleDir(resDir, "issue_47") verifySingleDir(resDir, "issue_52") + verifySingleDir(resDir, "issue_54") # 5.0 verifySingleDir(resDir, "5.0_fugu_lrx21m") # 6.0 diff --git a/src/integrationTest/resources b/src/integrationTest/resources index 7b6f395..4e33de4 160000 --- a/src/integrationTest/resources +++ b/src/integrationTest/resources @@ -1 +1 @@ -Subproject commit 7b6f3952078e71d02a4d6ba0cf02cfdd1b4d9b7d +Subproject commit 4e33de46af830f1b0296a72187d501b2ab544224