summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaptain Throwback <captainthrowback@hotmail.com>2016-01-19 23:30:20 +0100
committerDees Troy <dees_troy@teamw.in>2016-02-04 15:09:58 +0100
commit1f12775707350d805a520dc0dc8c68b77ce5d9ef (patch)
tree88fa7341aab6d0192ca1c2ba73c63918a1cea5a5
parentallow flashing sparse images (diff)
downloadandroid_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.tar
android_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.tar.gz
android_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.tar.bz2
android_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.tar.lz
android_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.tar.xz
android_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.tar.zst
android_bootable_recovery-1f12775707350d805a520dc0dc8c68b77ce5d9ef.zip
Diffstat (limited to '')
-rw-r--r--Android.mk6
-rw-r--r--etc/Android.mk21
-rw-r--r--etc/init.rc1
-rw-r--r--etc/init.recovery.logd.rc28
-rw-r--r--prebuilt/Android.mk9
5 files changed, 62 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 0a5692c85..0660a46dc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -425,6 +425,12 @@ endif
ifneq ($(TW_EXCLUDE_DEFAULT_USB_INIT), true)
LOCAL_ADDITIONAL_DEPENDENCIES += init.recovery.usb.rc
endif
+ifeq ($(TARGET_USES_LOGD), true)
+ LOCAL_ADDITIONAL_DEPENDENCIES += logd libsysutils libnl init.recovery.logd.rc
+endif
+ifeq ($(TWRP_INCLUDE_LOGCAT), true)
+ LOCAL_ADDITIONAL_DEPENDENCIES += logcat
+endif
# Allow devices to specify device-specific recovery dependencies
ifneq ($(TARGET_RECOVERY_DEVICE_MODULES),)
LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_RECOVERY_DEVICE_MODULES)
diff --git a/etc/Android.mk b/etc/Android.mk
index 89ea0cc13..ac6f813bb 100644
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-ifneq ($(TW_EXCLUDE_DEFAULT_USB_INIT), true)
-
LOCAL_PATH := $(call my-dir)
+ifneq ($(TW_EXCLUDE_DEFAULT_USB_INIT), true)
+
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.usb.rc
LOCAL_MODULE_TAGS := eng
@@ -30,3 +30,20 @@ LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
endif
+
+ifeq ($(TARGET_USES_LOGD), true)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.recovery.logd.rc
+LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+
+# Cannot send to TARGET_RECOVERY_ROOT_OUT since build system wipes init*.rc
+# during ramdisk creation and only allows init.recovery.*.rc files to be copied
+# from TARGET_ROOT_OUT thereafter
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
+
+endif
diff --git a/etc/init.rc b/etc/init.rc
index e6d8aec74..dc8b6e3f6 100644
--- a/etc/init.rc
+++ b/etc/init.rc
@@ -1,3 +1,4 @@
+import /init.recovery.logd.rc
import /init.recovery.usb.rc
import /init.recovery.${ro.hardware}.rc
diff --git a/etc/init.recovery.logd.rc b/etc/init.recovery.logd.rc
new file mode 100644
index 000000000..4bc21ad0c
--- /dev/null
+++ b/etc/init.recovery.logd.rc
@@ -0,0 +1,28 @@
+on load_all_props_action
+ start logd
+ start logd-reinit
+
+on load_persist_props_action
+ start logd
+ start logd-reinit
+
+on post-fs
+ start logd
+
+on post-fs-data
+ start logd
+
+on property:vold.decrypt=trigger_load_persist_props
+ start logd
+ start logd-reinit
+
+service logd /sbin/logd
+ class core
+ socket logd stream 0666 logd logd
+ socket logdr seqpacket 0666 logd logd
+ socket logdw dgram 0222 logd logd
+ group root system
+
+service logd-reinit /sbin/logd --reinit
+ oneshot
+ disabled
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index a5deb9aba..949e359c7 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -216,7 +216,14 @@ ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sgdisk
endif
endif
-
+ifeq ($(TARGET_USES_LOGD), true)
+ RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/logd
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsysutils.so
+ RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnl.so
+endif
+ifeq ($(TWRP_INCLUDE_LOGCAT), true)
+ RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/logcat
+endif
TWRP_AUTOGEN := $(intermediates)/teamwin
GEN := $(intermediates)/teamwin