diff --git a/flash/Android.mk b/flash/Android.mk index 9446a8356b7bb4e782a07890c66c0261a44d4a0a..f6e471191cc671cb350d61867d5a188c6dc0b91d 100644 --- a/flash/Android.mk +++ b/flash/Android.mk @@ -5,6 +5,8 @@ IMG_PACKAGE_TARGET_CONFIG := $(LOCAL_PATH)/$(TARGET_DEVICE)/config.mk ifneq (,$(wildcard $(IMG_PACKAGE_TARGET_CONFIG))) IMAGE_PACKAGE_NAME := IMG-e-$(LINEAGE_VERSION) INSTALLED_IMG_PACKAGE_TARGET := $(PRODUCT_OUT)/$(IMAGE_PACKAGE_NAME).zip +MD5 := prebuilts/build-tools/path/$(HOST_PREBUILT_TAG)/md5sum +SHA256 := prebuilts/build-tools/path/$(HOST_PREBUILT_TAG)/sha256sum $(INSTALLED_IMG_PACKAGE_TARGET): intermediates := $(call intermediates-dir-for,PACKAGING,IMG_PACKAGE) $(INSTALLED_IMG_PACKAGE_TARGET): zip_root := $(intermediates)/$(IMAGE_PACKAGE_NAME) @@ -30,6 +32,8 @@ $(INSTALLED_IMG_PACKAGE_TARGET): $(INCLUDE_IN_IMG_PACKAGE) $(INSTALLED_RADIOIMAG cp -r $(t) $(zip_root)/$(notdir $(t));) $(hide) find $(zip_root) | sort > $(zip_root).zip.list $(hide) $(SOONG_ZIP) -d -o $@ -C $(zip_root) -l $(zip_root).zip.list + $(hide) $(MD5) $@ | sed "s|$(PRODUCT_OUT)/||" > $@.md5sum + $(hide) $(SHA256) $@ | sed "s|$(PRODUCT_OUT)/||" > $@.sha256sum bacon: $(INSTALLED_IMG_PACKAGE_TARGET) endif