summaryrefslogtreecommitdiffstats
path: root/logcat
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2015-08-14 13:02:51 -0700
committerTom Cherry <tomcherry@google.com>2015-08-21 10:14:43 -0700
commit20391b1de5aaa49657d625fe18a36d4484c6ac31 (patch)
tree681639e2903b0e1aaa239d6b496851fb417bb338 /logcat
parent9a995b2c8fe4ee0567e850f7f63bfd661974f6e7 (diff)
downloadcore-20391b1de5aaa49657d625fe18a36d4484c6ac31.tar.gz
core-20391b1de5aaa49657d625fe18a36d4484c6ac31.tar.bz2
core-20391b1de5aaa49657d625fe18a36d4484c6ac31.zip
bundle init.rc contents with its service
Bug: 23186545 Change-Id: I52616b8ab1165fdef716f9b8f958665f2308c12e
Diffstat (limited to 'logcat')
-rw-r--r--logcat/Android.mk2
-rw-r--r--logcat/logcatd.rc13
2 files changed, 15 insertions, 0 deletions
diff --git a/logcat/Android.mk b/logcat/Android.mk
index 7115f9ba9..844ab8bff 100644
--- a/logcat/Android.mk
+++ b/logcat/Android.mk
@@ -11,6 +11,8 @@ LOCAL_MODULE := logcat
LOCAL_CFLAGS := -Werror
+LOCAL_INIT_RC := logcatd.rc
+
include $(BUILD_EXECUTABLE)
include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/logcat/logcatd.rc b/logcat/logcatd.rc
new file mode 100644
index 000000000..0bc581e91
--- /dev/null
+++ b/logcat/logcatd.rc
@@ -0,0 +1,13 @@
+on property:persist.logd.logpersistd=logcatd
+ # all exec/services are called with umask(077), so no gain beyond 0700
+ mkdir /data/misc/logd 0700 logd log
+ # logd for write to /data/misc/logd, log group for read from pstore (-L)
+ exec - logd log -- /system/bin/logcat -L -b all -v threadtime -v usec -v printable -D -f /data/misc/logd/logcat -r 64 -n 256
+ start logcatd
+
+service logcatd /system/bin/logcat -b all -v threadtime -v usec -v printable -D -f /data/misc/logd/logcat -r 64 -n 256
+ class late_start
+ disabled
+ # logd for write to /data/misc/logd, log group for read from log daemon
+ user logd
+ group log