etc: vndservice and hwservice managers are required by other hals

 * Export vendor paths for boot-hal as some libs are present in vendor
 * hwservicemanager and vndservicemanager are also required by health hal amd boot hal

Change-Id: I9017e0692cdb917db86629588726ba11eafd1e81
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
diff --git a/etc/Android.mk b/etc/Android.mk
index db7b37f..55298fe 100755
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -67,6 +67,26 @@
 LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
 include $(BUILD_PREBUILT)
 
+
+ifeq ($(filter $(AB_OTA_UPDATER) $(PRODUCT_USE_DYNAMIC_PARTITIONS), true), true)
+	include $(CLEAR_VARS)
+	LOCAL_MODULE := hwservicemanager.rc
+	LOCAL_MODULE_TAGS := optional
+	LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+	LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/init
+
+	LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
+	include $(BUILD_PREBUILT)
+
+	include $(CLEAR_VARS)
+	LOCAL_MODULE := vndservicemanager.rc
+	LOCAL_MODULE_TAGS := optional
+	LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+	LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/init
+
+	LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
+	include $(BUILD_PREBUILT)
+endif
 ifeq ($(AB_OTA_UPDATER),true)
 	include $(CLEAR_VARS)
 	LOCAL_MODULE := android.hardware.boot@1.0-service.rc
@@ -90,23 +110,25 @@
 endif
 
 ifneq ($(TW_INCLUDE_CRYPTO),)
-	include $(CLEAR_VARS)
-	LOCAL_MODULE := hwservicemanager.rc
-	LOCAL_MODULE_TAGS := optional
-	LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-	LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/init
+	ifneq ($(AB_OTA_UPDATER), true)
+		include $(CLEAR_VARS)
+		LOCAL_MODULE := hwservicemanager.rc
+		LOCAL_MODULE_TAGS := optional
+		LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+		LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/init
 
-	LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
-	include $(BUILD_PREBUILT)
+		LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
+		include $(BUILD_PREBUILT)
 
-	include $(CLEAR_VARS)
-	LOCAL_MODULE := vndservicemanager.rc
-	LOCAL_MODULE_TAGS := optional
-	LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
-	LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/init
+		include $(CLEAR_VARS)
+		LOCAL_MODULE := vndservicemanager.rc
+		LOCAL_MODULE_TAGS := optional
+		LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+		LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/init
 
-	LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
-	include $(BUILD_PREBUILT)
+		LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
+		include $(BUILD_PREBUILT)
+	endif
 
 	ifneq ($(TW_INCLUDE_CRYPTO_FBE),)
 		include $(CLEAR_VARS)