From d5ab10eed4d6ac3d02a8ce44dbf5b11b7f895090 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 2 May 2019 18:17:18 -0700 Subject: [PATCH] Update the references to verity tools. Test: `m -j dist` with aosp_marlin-userdebug Test: `atest releasetools_test` Test: Run signing with otatools. Test: TreeHugger Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7 --- CleanSpec.mk | 5 +++++ core/Makefile | 4 ++-- core/config.mk | 2 +- tools/releasetools/verity_utils.py | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CleanSpec.mk b/CleanSpec.mk index a82a0bd2c1..a93e79eca5 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -627,6 +627,11 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/target/common/obj/framework.aidl) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/adb_debug.prop) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib*/libjavacrypto.so) + +# Clean up old verity tools. +$(call add-clean-step, rm -rf $(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar) +$(call add-clean-step, rm -rf $(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar) +$(call add-clean-step, rm -rf $(HOST_OUT_EXECUTABLES)/build_verity_metadata.py) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST # ************************************************ diff --git a/core/Makefile b/core/Makefile index dd2a8e06b7..9fd9b447c4 100644 --- a/core/Makefile +++ b/core/Makefile @@ -3565,8 +3565,8 @@ OTATOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \ $(HOST_OUT_EXECUTABLES)/bsdiff \ $(HOST_OUT_EXECUTABLES)/imgdiff \ $(HOST_OUT_JAVA_LIBRARIES)/signapk.jar \ - $(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar \ - $(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar \ + $(HOST_OUT_JAVA_LIBRARIES)/boot_signer.jar \ + $(HOST_OUT_JAVA_LIBRARIES)/verity_signer.jar \ $(HOST_OUT_EXECUTABLES)/mke2fs \ $(HOST_OUT_EXECUTABLES)/mkuserimg_mke2fs \ $(HOST_OUT_EXECUTABLES)/e2fsdroid \ diff --git a/core/config.mk b/core/config.mk index 94928a24ae..bf59fb1caa 100644 --- a/core/config.mk +++ b/core/config.mk @@ -604,7 +604,7 @@ MERGETAGS := build/make/tools/merge-event-log-tags.py BUILD_IMAGE_SRCS := $(wildcard build/make/tools/releasetools/*.py) APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer -BUILD_VERITY_METADATA := $(HOST_OUT_EXECUTABLES)/build_verity_metadata.py +BUILD_VERITY_METADATA := $(HOST_OUT_EXECUTABLES)/build_verity_metadata BUILD_VERITY_TREE := $(HOST_OUT_EXECUTABLES)/build_verity_tree BOOT_SIGNER := $(HOST_OUT_EXECUTABLES)/boot_signer FUTILITY := $(HOST_OUT_EXECUTABLES)/futility-host diff --git a/tools/releasetools/verity_utils.py b/tools/releasetools/verity_utils.py index 3a58755e47..3063800e98 100644 --- a/tools/releasetools/verity_utils.py +++ b/tools/releasetools/verity_utils.py @@ -52,7 +52,7 @@ def GetVerityTreeSize(image_size): def GetVerityMetadataSize(image_size): - cmd = ["build_verity_metadata.py", "size", str(image_size)] + cmd = ["build_verity_metadata", "size", str(image_size)] output = common.RunAndCheckOutput(cmd, verbose=False) return int(output) @@ -97,7 +97,7 @@ def BuildVerityTree(sparse_image_path, verity_image_path): def BuildVerityMetadata(image_size, verity_metadata_path, root_hash, salt, block_device, signer_path, key, signer_args, verity_disable): - cmd = ["build_verity_metadata.py", "build", str(image_size), + cmd = ["build_verity_metadata", "build", str(image_size), verity_metadata_path, root_hash, salt, block_device, signer_path, key] if signer_args: cmd.append("--signer_args=\"%s\"" % (' '.join(signer_args),))