diff --git a/rootdir/avb/Android.mk b/rootdir/avb/Android.mk index f96ffddb3..3978593ec 100644 --- a/rootdir/avb/Android.mk +++ b/rootdir/avb/Android.mk @@ -1,5 +1,11 @@ LOCAL_PATH:= $(call my-dir) +ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) + my_gsi_avb_keys_path := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb +else + my_gsi_avb_keys_path := $(TARGET_RAMDISK_OUT)/avb +endif + ####################################### # q-gsi.avbpubkey include $(CLEAR_VARS) @@ -7,11 +13,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := q-gsi.avbpubkey LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) -ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb -else -LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)/avb -endif +LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) include $(BUILD_PREBUILT) @@ -22,11 +24,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := q-developer-gsi.avbpubkey LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) -ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb -else -LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)/avb -endif +LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) include $(BUILD_PREBUILT) @@ -37,11 +35,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := r-gsi.avbpubkey LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) -ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb -else -LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)/avb -endif +LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) include $(BUILD_PREBUILT) @@ -52,11 +46,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := r-developer-gsi.avbpubkey LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) -ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb -else -LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)/avb -endif +LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) include $(BUILD_PREBUILT) @@ -67,11 +57,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := s-gsi.avbpubkey LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) -ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb -else -LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)/avb -endif +LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) include $(BUILD_PREBUILT) @@ -82,10 +68,8 @@ include $(CLEAR_VARS) LOCAL_MODULE := s-developer-gsi.avbpubkey LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := $(LOCAL_MODULE) -ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true) -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/first_stage_ramdisk/avb -else -LOCAL_MODULE_PATH := $(TARGET_RAMDISK_OUT)/avb -endif +LOCAL_MODULE_PATH := $(my_gsi_avb_keys_path) include $(BUILD_PREBUILT) + +my_gsi_avb_keys_path :=