bundle init.rc contents with its service

Bug: 23186545
Change-Id: I52616b8ab1165fdef716f9b8f958665f2308c12e
This commit is contained in:
Tom Cherry 2015-08-14 13:02:51 -07:00
parent 9a995b2c8f
commit 20391b1de5
11 changed files with 55 additions and 0 deletions

View File

@ -277,6 +277,8 @@ endif
LOCAL_MODULE := adbd
LOCAL_INIT_RC := adbd.rc
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)

14
adb/adbd.rc Normal file
View File

@ -0,0 +1,14 @@
on post-fs-data
mkdir /data/misc/adb 02750 system shell
mkdir /data/adb 0700 root root
# adbd is controlled via property triggers in init.<platform>.usb.rc
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
class core
socket adbd stream 660 system system
disabled
seclabel u:r:adbd:s0
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd

View File

@ -27,6 +27,9 @@ LOCAL_SRC_FILES_x86_64 := x86_64/machine.cpp
LOCAL_CPPFLAGS := $(common_cppflags)
LOCAL_INIT_RC_32 := debuggerd.rc
LOCAL_INIT_RC_64 := debuggerd64.rc
ifeq ($(TARGET_IS_64_BIT),true)
LOCAL_CPPFLAGS += -DTARGET_IS_64_BIT
endif

2
debuggerd/debuggerd.rc Normal file
View File

@ -0,0 +1,2 @@
service debuggerd /system/bin/debuggerd
class main

2
debuggerd/debuggerd64.rc Normal file
View File

@ -0,0 +1,2 @@
service debuggerd64 /system/bin/debuggerd64
class main

View File

@ -7,4 +7,6 @@ LOCAL_CFLAGS := -Werror
LOCAL_MODULE := lmkd
LOCAL_INIT_RC := lmkd.rc
include $(BUILD_EXECUTABLE)

4
lmkd/lmkd.rc Normal file
View File

@ -0,0 +1,4 @@
service lmkd /system/bin/lmkd
class core
critical
socket lmkd seqpacket 0660 system system

View File

@ -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))

13
logcat/logcatd.rc Normal file
View File

@ -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

View File

@ -4,6 +4,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE:= logd
LOCAL_INIT_RC := logd.rc
LOCAL_SRC_FILES := \
main.cpp \
LogCommand.cpp \

9
logd/logd.rc Normal file
View File

@ -0,0 +1,9 @@
service logd /system/bin/logd
class core
socket logd stream 0666 logd logd
socket logdr seqpacket 0666 logd logd
socket logdw dgram 0222 logd logd
service logd-reinit /system/bin/logd --reinit
oneshot
disabled