boot-hal: add 1.2 HAL to TWRP
Change-Id: I7bf0855f79d195d3e8848ff0a03305f7012aec9a
diff --git a/Android.mk b/Android.mk
index 001d260..8643304 100755
--- a/Android.mk
+++ b/Android.mk
@@ -80,7 +80,7 @@
endif
LOCAL_STATIC_LIBRARIES += libavb libtwrpinstall libminadbd_services libinit libsnapshot_nobinder update_metadata-protos
-LOCAL_SHARED_LIBRARIES += libfs_mgr libhardware android.hardware.boot@1.0 android.hardware.boot@1.1 libprotobuf-cpp-lite liblp libutils libhidlbase
+LOCAL_SHARED_LIBRARIES += libfs_mgr libhardware android.hardware.boot@1.0 android.hardware.boot@1.1 android.hardware.boot@1.2 libprotobuf-cpp-lite liblp libutils libhidlbase
LOCAL_C_INCLUDES += \
system/core/fs_mgr/libfs_avb/include/ \
system/core/fs_mgr/include_fstab/ \
@@ -149,7 +149,8 @@
ifeq ($(AB_OTA_UPDATER),true)
LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
TWRP_REQUIRED_MODULES += libhardware android.hardware.boot@1.0-service android.hardware.boot@1.0-service.rc \
- android.hardware.boot@1.1-service android.hardware.boot@1.1-service.rc android.hardware.boot@1.1.xml
+ android.hardware.boot@1.1-service android.hardware.boot@1.1-service.rc android.hardware.boot@1.1.xml \
+ android.hardware.boot@1.2-service android.hardware.boot@1.2-service.rc android.hardware.boot@1.2.xml
endif
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
diff --git a/etc/Android.mk b/etc/Android.mk
index a1da963..e76527a 100755
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -111,6 +111,22 @@
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/vendor/etc/vintf/manifest
LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
include $(BUILD_PREBUILT)
+
+ include $(CLEAR_VARS)
+ LOCAL_MODULE := android.hardware.boot@1.2-service.rc
+ LOCAL_MODULE_TAGS := optional
+ LOCAL_MODULE_CLASS := 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 := android.hardware.boot@1.2.xml
+ LOCAL_MODULE_TAGS := optional
+ LOCAL_MODULE_CLASS := EXECUTABLES
+ LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/vendor/etc/vintf/manifest
+ LOCAL_SRC_FILES := init/$(LOCAL_MODULE)
+ include $(BUILD_PREBUILT)
endif
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
diff --git a/etc/init/android.hardware.boot@1.2-service.rc b/etc/init/android.hardware.boot@1.2-service.rc
new file mode 100644
index 0000000..17eea68
--- /dev/null
+++ b/etc/init/android.hardware.boot@1.2-service.rc
@@ -0,0 +1,5 @@
+service boot-hal-1-2 /system/bin/android.hardware.boot@1.2-service
+ user root
+ group root
+ disabled
+ seclabel u:r:recovery:s0
diff --git a/etc/init/android.hardware.boot@1.2.xml b/etc/init/android.hardware.boot@1.2.xml
new file mode 100644
index 0000000..ba91e8f
--- /dev/null
+++ b/etc/init/android.hardware.boot@1.2.xml
@@ -0,0 +1,7 @@
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.boot</name>
+ <transport>hwbinder</transport>
+ <fqname>@1.2::IBootControl/default</fqname>
+ </hal>
+</manifest>
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 0f69967..87c8d56 100755
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -83,6 +83,7 @@
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/vold_prepare_subdirs
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/hw/android.hardware.boot@1.0-service
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/hw/android.hardware.boot@1.1-service
+RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/hw/android.hardware.boot@1.2-service
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/vndservicemanager
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/toybox
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/hw/android.hardware.health@2.0-service
@@ -239,6 +240,7 @@
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/update_engine_sideload
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.0.so
RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.1.so
+ RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.2.so
endif
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
ifeq ($(TW_EXCLUDE_LPDUMP),)