diff options
author | nailyk-fr <nailyk_git@nailyk.fr> | 2017-02-12 13:29:05 +0100 |
---|---|---|
committer | nailyk-fr <nailyk_git@nailyk.fr> | 2017-02-21 20:17:56 +0100 |
commit | f901d5da8cd932e7cf2de9b6b9255e2d5910b1d2 (patch) | |
tree | 4f19d4d3f359c349f721181b4e17d80c46623a16 /rootdir | |
parent | 4114e1a7be5935e6d72938e82356cecae1208856 (diff) |
shinano-common: init: Separate camera services
* Use a separated file for camera and camera dependencies
Change-Id: Id8cb2242b1dffacf427dffe2dbe63628a5d2462f
shinano-common: Correct typo in "Split init.qcom.rc"
Change-Id: I4f2ab062af09a49c6091942ff6157838040f65d8
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.camera.rc | 240 | ||||
-rw-r--r-- | rootdir/init.qcom.rc | 180 |
2 files changed, 247 insertions, 173 deletions
diff --git a/rootdir/init.camera.rc b/rootdir/init.camera.rc new file mode 100644 index 0000000..ab875ed --- /dev/null +++ b/rootdir/init.camera.rc @@ -0,0 +1,240 @@ +# +# Copyright (C) 2017 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + + +on init + export LD_SHIM_LIBS /system/vendor/lib/libwvm.so|libshims_wvm.so + + mkdir /idd 0751 idd idd + mkdir /rca 0750 idd idd + + +on early-fs + wait /dev/block/mmcblk0p1 + class_start trimarea + exec u:r:qti_init_shell:s0 -- /sbin/wait4tad_static + + +on fs + # mount apps_log + #wait /dev/block/platform/msm_sdcc.1/by-name/apps_log + #mount ext4 /dev/block/platform/msm_sdcc.1/by-name/apps_log /idd nosuid nodev noatime noexec barrier=0 discard + chown idd idd /idd + chmod 0751 /idd + #exec /system/bin/rm -r /idd/lost+found + symlink /idd /mnt/idd + + + + +on early-boot + #SONY early boot + start ta_qmi_service + start sct_service + start mlog_qmi_service + + +on boot + # Create QMUX deamon socket area + mkdir /dev/socket/qmux_radio 0770 radio radio + chmod 2770 /dev/socket/qmux_radio + mkdir /dev/socket/qmux_audio 0770 media audio + chmod 2770 /dev/socket/qmux_audio + mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth + chmod 2770 /dev/socket/qmux_bluetooth + mkdir /dev/socket/qmux_gps 0770 gps gps + chmod 2770 /dev/socket/qmux_gps + mkdir /dev/socket/qmux_nfc 0770 nfc nfc + chmod 2770 /dev/socket/qmux_nfc + + + # PM8941 flash + chown cameraserver system /sys/class/misc/pm8941-flash/device/current1 + chown cameraserver system /sys/class/misc/pm8941-flash/device/current2 + chown cameraserver system /sys/class/misc/pm8941-flash/device/fault_status + chown cameraserver system /sys/class/misc/pm8941-flash/device/fine_current1 + chown cameraserver system /sys/class/misc/pm8941-flash/device/fine_current2 + chown cameraserver system /sys/class/misc/pm8941-flash/device/flash_timer + chown cameraserver system /sys/class/misc/pm8941-flash/device/mask_clamp_current + chown cameraserver system /sys/class/misc/pm8941-flash/device/mask_enable + chown cameraserver system /sys/class/misc/pm8941-flash/device/max_current + chown cameraserver system /sys/class/misc/pm8941-flash/device/mode + chown cameraserver system /sys/class/misc/pm8941-flash/device/startup_delay + chown cameraserver system /sys/class/misc/pm8941-flash/device/strobe + chown cameraserver system /sys/class/misc/pm8941-flash/device/vph_pwr_droop + + + +on post-fs + # we will remap this as /mnt/sdcard with the sdcard fuse tool + mkdir /data/misc/camera 0770 camera camera + mkdir /data/misc/cameraserver 0700 cameraserver cameraserver + + # create directory for scd + mkdir /dev/socket/scd 0755 system system + mkdir /data/scd 0755 system system + + +on post-fs-data + # SONY: Start early TA-users + mkdir /data/etc 0755 root shell + exec -- /system/bin/taimport + + mkdir /data/media 0770 media_rw media_rw + + mkdir /data/credmgr 0770 system credmgr_client + + # SONY: Create dir for Widevine keybox + mkdir /data/persist/wv 0700 system system + + mkdir /data/misc/systemkeys 0700 system system + mkdir /data/misc/keystore 0700 keystore keystore + mkdir /data/misc/keychain 0771 system system + installkey /data + + mkdir /idd/lost+found 0770 root root + mkdir /idd/output 0755 idd idd + mkdir /idd/socket 0711 idd idd + mkdir /idd/startup-prober 0700 root root + + restorecon_recursive /idd + + # SONY: Camera + mkdir /data/camera 0770 media camera + chown media camera /sys/devices/sony_camera_0/info + chmod 0770 /sys/devices/sony_camera_0/info + chown media camera /sys/devices/sony_camera_1/info + chmod 0770 /sys/devices/sony_camera_1/info + + # SONY: Import MiscTA to System properties + exec -- /system/bin/taimport property + +service taimport /system/bin/taimport + class late_start + user root + group system + oneshot + +service iddd /system/bin/iddd + class main + user idd + group idd log inet + + +# Start Credential manager daemon +service credmgrd /system/bin/credmgrd + user system + group credmgr_client + socket credmgr stream 0660 system credmgr_client + class main + + +#doesn't exist on shinano. Keept for compat purpose +# Start Security Daemon +service secd /system/bin/secd + user system + group system + socket secd_ebl_sock stream 0660 system credmgr_client + socket secd_devsec_sock stream 0660 system credmgr_client + socket secd_credmgr_sock stream 0660 system credmgr_client + class main + +# Secure Config Transfer service +service sct_service /system/bin/sct_service + user root + disabled + +# Trim Area QMI service +service ta_qmi_service /system/bin/ta_qmi_service + user ta_qmi + group ta_qmi trimarea system root net_raw wakelock + disabled + +service scd /system/bin/scd + class late_start + user system + group system + +service scdnotifier_nitz /system/bin/scdnotifier nitz + class main + user system + group system + oneshot + disabled + + # All services that use qseecomd daemon listeners should + # start on sys.listeners.registered property to make sure that + # all of its service listeners are registered before calling them + on property:sys.listeners.registered=true + start wvkbd_installer + +service wvkbd_installer /system/bin/logwrapper /system/bin/wvkbd + user system + group system + oneshot + disabled + +service rmt_storage /system/bin/rmt_storage + class core + user root + + +service qcamerasvr /system/bin/logwrapper /system/bin/mm-qcamera-daemon + class late_start + user camera + group camera system inet input graphics +# group camera system inet input graphics credmgr_client cameraserver + seclabel u:r:mm-qcamerad:s0 + +# SONY: TrimArea Daemon +# Last 2 args: start block(blk size 128k), number of blocks(partitionsize(kb)/128(kb)) +service tad_static /sbin/tad_static /dev/block/bootdevice/by-name/TA 0,16 +#service tad_static /sbin/tad_static /data/credmgr/ta_part.bin 0,16 + class trimarea + user tad + group tad trimarea root + socket tad stream 0660 system trimarea +# tad_static is in rootfs, normal file_context does not work + seclabel u:r:tad:s0 + +service cameraserver /system/bin/logwrapper /system/bin/cameraserver + class main + user cameraserver + group camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct credmgr_client trimarea system audio +# group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct credmgr_client + ioprio rt 4 + seclabel u:r:cameraserver:s0 + writepid /dev/cpuset/foreground/tasks + + + + + + + + + + + + + + + + + + + diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc index 0b82c92..f93ad53 100644 --- a/rootdir/init.qcom.rc +++ b/rootdir/init.qcom.rc @@ -18,6 +18,7 @@ import /init.device.rc import /init.sony.usb.rc import /init.qcom.power.rc +import /init.camera.rc on early-init mount debugfs debugfs /sys/kernel/debug @@ -25,7 +26,6 @@ on early-init echo 8 8 8 8 > /proc/sys/kernel/printk on init - export LD_SHIM_LIBS /system/vendor/lib/libwvm.so|libshims_wvm.so symlink /dev/block/platform/msm_sdcc.1 /dev/block/bootdevice # Enable subsystem restart @@ -47,9 +47,6 @@ on init mkdir /dev/bus 0755 root root mkdir /dev/bus/usb 0755 root root - mkdir /idd 0751 idd idd - mkdir /rca 0750 idd idd - wait /dev/block/mmcblk0p1 chown tad tad /dev/block/mmcblk0p1 chmod 0770 /dev/block/mmcblk0p1 @@ -76,11 +73,6 @@ on init # session is not exercised through RemoteDisplay in the android framework setprop persist.sys.wfd.virtual 0 -on early-fs - wait /dev/block/mmcblk0p1 - class_start trimarea - exec u:r:qti_init_shell:s0 -- /sbin/wait4tad_static - on fs mount_all ./fstab.qcom mkdir /lta-label 0555 system system @@ -89,25 +81,12 @@ on fs chown system system /lta-label chmod 0555 /lta-label - # mount apps_log - #wait /dev/block/platform/msm_sdcc.1/by-name/apps_log - #mount ext4 /dev/block/platform/msm_sdcc.1/by-name/apps_log /idd nosuid nodev noatime noexec barrier=0 discard - chown idd idd /idd - chmod 0751 /idd - #exec /system/bin/rm -r /idd/lost+found - symlink /idd /mnt/idd - on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 write /sys/kernel/boot_adsp/boot 1 - #SONY early boot - start ta_qmi_service - start sct_service - start mlog_qmi_service - # Run pre_hw_config.sh before entering charge only mode. exec /system/bin/sh /system/etc/pre_hw_config.sh @@ -122,18 +101,6 @@ on boot chown bluetooth net_bt_stack /sys/devices/platform/msm_serial_hs.0/clock chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock - # Create QMUX deamon socket area - mkdir /dev/socket/qmux_radio 0770 radio radio - chmod 2770 /dev/socket/qmux_radio - mkdir /dev/socket/qmux_audio 0770 media audio - chmod 2770 /dev/socket/qmux_audio - mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth - chmod 2770 /dev/socket/qmux_bluetooth - mkdir /dev/socket/qmux_gps 0770 gps gps - chmod 2770 /dev/socket/qmux_gps - mkdir /dev/socket/qmux_nfc 0770 nfc nfc - chmod 2770 /dev/socket/qmux_nfc - # Create PERFD deamon related dirs mkdir /data/misc/perfd 0755 root system chmod 2755 /data/misc/perfd @@ -187,21 +154,6 @@ on boot chown system graphics /sys/class/graphics/fb1/hdcp/tp chmod 0664 /sys/devices/virtual/graphics/fb1/hdcp/tp - # PM8941 flash - chown cameraserver system /sys/class/misc/pm8941-flash/device/current1 - chown cameraserver system /sys/class/misc/pm8941-flash/device/current2 - chown cameraserver system /sys/class/misc/pm8941-flash/device/fault_status - chown cameraserver system /sys/class/misc/pm8941-flash/device/fine_current1 - chown cameraserver system /sys/class/misc/pm8941-flash/device/fine_current2 - chown cameraserver system /sys/class/misc/pm8941-flash/device/flash_timer - chown cameraserver system /sys/class/misc/pm8941-flash/device/mask_clamp_current - chown cameraserver system /sys/class/misc/pm8941-flash/device/mask_enable - chown cameraserver system /sys/class/misc/pm8941-flash/device/max_current - chown cameraserver system /sys/class/misc/pm8941-flash/device/mode - chown cameraserver system /sys/class/misc/pm8941-flash/device/startup_delay - chown cameraserver system /sys/class/misc/pm8941-flash/device/strobe - chown cameraserver system /sys/class/misc/pm8941-flash/device/vph_pwr_droop - # create symlink for fb1 as HDMI symlink /dev/graphics/fb1 /dev/graphics/hdmi @@ -297,10 +249,6 @@ on post-fs # the insmod must be done before chargemon. insmod /system/lib/modules/mhl_sii8620_8061_drv.ko - # we will remap this as /mnt/sdcard with the sdcard fuse tool - mkdir /data/misc/camera 0770 camera camera - mkdir /data/misc/cameraserver 0700 cameraserver cameraserver - exec /system/bin/chargemon write /sys/class/power_supply/battery/shutdown_at_low_batt 1 @@ -309,25 +257,15 @@ on post-fs mkdir /dev/socket/suntory 0755 system system mkdir /data/suntory 0755 system system - # create directory for scd - mkdir /dev/socket/scd 0755 system system - mkdir /data/scd 0755 system system - on post-fs-data - # SONY: Start early TA-users - mkdir /data/etc 0755 root shell - exec -- /system/bin/taimport - - mkdir /data/media 0770 media_rw media_rw - - mkdir /data/credmgr 0770 system credmgr_client + # create directory for DRM plug-ins - give drm the read/write access to + # the following directory. + mkdir /data/drm 0770 drm drm - mkdir /idd/lost+found 0770 root root - mkdir /idd/output 0755 idd idd - mkdir /idd/socket 0711 idd idd - mkdir /idd/startup-prober 0700 root root + # create directory for MediaDrm plug-ins - give drm the read/write access to + # the following directory. + mkdir /data/mediadrm 0770 mediadrm mediadrm - restorecon_recursive /idd # Create the directories used by the Wireless subsystem mkdir /data/misc/wifi 0770 wifi wifi @@ -418,13 +356,6 @@ on post-fs-data mkdir /data/pc 0600 radio radio mkdir /cache/pc 0770 radio system - # SONY: Camera - mkdir /data/camera 0770 media camera - chown media camera /sys/devices/sony_camera_0/info - chmod 0770 /sys/devices/sony_camera_0/info - chown media camera /sys/devices/sony_camera_1/info - chmod 0770 /sys/devices/sony_camera_1/info - exec u:r:qti_init_shell:s0 -- /system/bin/rm -r /idd/lost+found mkdir /idd/lost+found 0770 root root mkdir /idd/output 0755 idd idd @@ -433,10 +364,6 @@ on post-fs-data start wvkbd_installer - # SONY: Import MiscTA to System properties - exec -- /system/bin/taimport property - - on property:init.svc.wpa_supplicant=stopped stop dhcpcd @@ -447,12 +374,6 @@ service qmuxd /system/bin/qmuxd user root group radio audio bluetooth gps nfc diag qcom_diag -service taimport /system/bin/taimport - class late_start - user root - group system - oneshot - service netmgrd /system/bin/netmgrd class main @@ -558,11 +479,6 @@ service mpdecision /system/bin/mpdecision --avg_comp group system disabled -service iddd /system/bin/iddd - class main - user idd - group idd log inet - on property:gsm.nitz.time=* start scdnotifier_nitz @@ -573,23 +489,6 @@ service suntrold /system/bin/suntrold oneshot class main -# Start Credential manager daemon -service credmgrd /system/bin/credmgrd - user system - group credmgr_client - socket credmgr stream 0660 system credmgr_client - class main - -#doesn't exist on shinano. Keept for compat purpose -# Start Security Daemon -service secd /system/bin/secd - user system - group system - socket secd_ebl_sock stream 0660 system credmgr_client - socket secd_devsec_sock stream 0660 system credmgr_client - socket secd_credmgr_sock stream 0660 system credmgr_client - class main - # bugreport is triggered by holding down volume down, volume up and power service bugreport /system/bin/dumpstate -d -p -B \ -o /data/data/com.android.shell/files/bugreports/bugreport @@ -598,68 +497,23 @@ service bugreport /system/bin/dumpstate -d -p -B \ oneshot keycodes 114 115 116 -# Secure Config Transfer service -service sct_service /system/bin/sct_service - user root - disabled - -# Trim Area QMI service -service ta_qmi_service /system/bin/ta_qmi_service - user ta_qmi - group ta_qmi trimarea system root net_raw wakelock - disabled - # Modem Log QMI service service mlog_qmi_service /system/bin/mlog_qmi_service user root class main disabled -service scd /system/bin/scd - class late_start - user system - group system - -service scdnotifier_nitz /system/bin/scdnotifier nitz - class main - user system - group system - oneshot - disabled - -# All services that use qseecomd daemon listeners should -# start on sys.listeners.registered property to make sure that -# all of its service listeners are registered before calling them -on property:sys.listeners.registered=true - start wvkbd_installer - -service wvkbd_installer /system/bin/wvkbd - user system - group system - oneshot - disabled - # Thermal Manager service service thermanager /system/bin/thermanager /system/etc/thermanager.xml class main user root group root -service rmt_storage /system/bin/rmt_storage - class core - user root - service irsc_util /system/bin/irsc_util "/etc/sec_config" class main user root oneshot -service qcamerasvr /system/bin/mm-qcamera-daemon - class late_start - user camera - group camera system inet input graphics -# group camera system inet input graphics credmgr_client cameraserver - service sensors /system/bin/sensors.qcom class main user root @@ -686,16 +540,6 @@ service audiod /system/bin/audiod user system group system -# SONY: TrimArea Daemon -# Last 2 args: start block(blk size 128k), number of blocks(partitionsize(kb)/128(kb)) -service tad_static /sbin/tad_static /dev/block/bootdevice/by-name/TA 0,16 - class trimarea - user tad - group tad trimarea root - socket tad stream 0660 system trimarea -# tad_static is in rootfs, normal file_context does not work - seclabel u:r:tad:s0 - # Redefined Service service audioserver /system/bin/audioserver class main @@ -704,16 +548,6 @@ service audioserver /system/bin/audioserver group audio trimarea camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct qcom_diag ioprio rt 4 -service cameraserver /system/bin/cameraserver - class main - user cameraserver - group camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct credmgr_client trimarea system audio -# group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct credmgr_client - ioprio rt 4 -# seclabel u:r:cameraserver:s0 - writepid /dev/cpuset/foreground/tasks - - service drm /system/bin/drmserver class main user drm |