fastboot: allow device to start required healthd and boot-hal services

Change-Id: Iac1d20ce26d49e7a99071c968d8c8e654e5ff1c6
diff --git a/etc/Android.mk b/etc/Android.mk
index 6cda67b..8cef51b 100755
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -109,6 +109,14 @@
 	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.health@2.0-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)
 endif
 
 ifneq ($(TW_INCLUDE_CRYPTO),)
diff --git a/etc/init/android.hardware.boot@1.0-service.rc b/etc/init/android.hardware.boot@1.0-service.rc
index bc23757..395a14d 100644
--- a/etc/init/android.hardware.boot@1.0-service.rc
+++ b/etc/init/android.hardware.boot@1.0-service.rc
@@ -1,6 +1,3 @@
-on post-fs
-    #start boot-hal-1-0
-
 service boot-hal-1-0 /system/bin/android.hardware.boot@1.0-service
     user root
     group root
diff --git a/etc/init/android.hardware.boot@1.1-service.rc b/etc/init/android.hardware.boot@1.1-service.rc
index af3b505..c929d14 100644
--- a/etc/init/android.hardware.boot@1.1-service.rc
+++ b/etc/init/android.hardware.boot@1.1-service.rc
@@ -1,6 +1,3 @@
-on post-fs
-    start boot-hal-1-1
-
 service boot-hal-1-1 /system/bin/android.hardware.boot@1.1-service
     user root
     group root
diff --git a/etc/init/android.hardware.health@2.0-service.rc b/etc/init/android.hardware.health@2.0-service.rc
new file mode 100644
index 0000000..ef17467
--- /dev/null
+++ b/etc/init/android.hardware.health@2.0-service.rc
@@ -0,0 +1,10 @@
+on boot
+    start health-hal-2-0
+
+service health-hal-2-0 /system/bin/android.hardware.health@2.0-service
+    disabled
+    user root
+    group root
+    capabilities WAKE_ALARM
+    file /dev/kmsg w
+    seclabel u:r:recovery:s0