diff options
Diffstat (limited to 'rootdir/etc/init.qcom.rc')
-rw-r--r--[-rwxr-xr-x] | rootdir/etc/init.qcom.rc | 450 |
1 files changed, 175 insertions, 275 deletions
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index d193e33..d1fd36a 100755..100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -1,4 +1,4 @@ -# Copyright (c) 2009-2012, 2014-2015, The Linux Foundation. All rights reserved. +# Copyright (c) 2009-2012, 2014-2017, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -24,6 +24,7 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # + import /vendor/etc/init/hw/init.qcom.power.rc import /vendor/etc/init/hw/init.qcom.usb.rc @@ -33,10 +34,7 @@ on early-init chown root system /dev/kmsg chmod 0620 /dev/kmsg - mkdir /firmware 0771 system system - mkdir /bt_firmware 0771 system system symlink /data/tombstones /tombstones - mkdir /dsp 0771 media media # ZRAM setup write /sys/block/zram0/comp_algorithm lz4 @@ -50,6 +48,15 @@ on init write /sys/module/qpnp_rtc/parameters/poweron_alarm 1 +on fs + wait /dev/block/platform/soc/${ro.boot.bootdevice} + symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice + restorecon_recursive /dev/block/platform/soc/${ro.boot.bootdevice} + mount_all /vendor/etc/fstab.qcom + + # Restorecon + restorecon_recursive /persist + on late-fs # boot time fs tune write /sys/block/sda/queue/iostats 0 @@ -59,6 +66,152 @@ on late-fs write /sys/block/dm-0/queue/read_ahead_kb 2048 write /sys/block/dm-1/queue/read_ahead_kb 2048 +# msm specific files that need to be created on /data +on post-fs-data + mkdir /data/vendor/misc 01771 system system + + mkdir /tombstones/modem 0771 system system + mkdir /tombstones/lpass 0771 system system + mkdir /tombstones/wcnss 0771 system system + mkdir /tombstones/dsps 0771 system system + mkdir /persist/data/sfs 0700 system system + mkdir /persist/data/tz 0700 system system + mkdir /persist/qc_senseid 0700 system system + mkdir /persist/bms 0700 root system + restorecon_recursive /persist + mkdir /data/usf 0700 system system + mkdir /data/misc/qvop 0660 system system + + # Create directory used by display clients + mkdir /data/vendor/display 0770 system graphics + + # Create directories for Fingerprint + mkdir /data/vendor/misc/qti_fp 0770 system system + mkdir /data/vendor/misc/qti_fp/bg_estimation 0770 system system + mkdir /data/vendor/misc/qti_fp/calib_test 0770 system system + mkdir /data/vendor/misc/qti_fp/database 0770 system system + + # Create folder for mm-qcamera-daemon + mkdir /data/misc/camera 0770 camera camera + + mkdir /data/media 0770 media_rw media_rw + chown media_rw media_rw /data/media + + # Create directory for tftp + mkdir /data/vendor/tombstones 0771 system system + mkdir /data/vendor/tombstones/rfs 0771 system system + + mkdir /data/vendor/ramdump 0771 root system + mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth + mkdir /data/vendor/ramdump/bluetooth 0770 bluetooth bluetooth + + # Create the directories used by the Wireless subsystem + mkdir /data/misc/wifi 0770 wifi wifi + mkdir /data/misc/wifi/sockets 0770 wifi wifi + mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi + mkdir /data/misc/dhcp 0770 dhcp dhcp + chown dhcp dhcp /data/misc/dhcp + + # Create port-bridge log dir + mkdir /data/misc/port_bridge 0770 radio radio + chmod 0770 /data/misc/port_bridge + + # Create netmgr log dir + mkdir /data/vendor/netmgr 0770 radio radio + chmod 0770 /data/vendor/netmgr + + # Create ipacm log dir + mkdir /data/vendor/ipa 0770 radio radio + chmod 0770 /data/vendor/ipa + + # Create the directories used by CnE subsystem + mkdir /data/connectivity 0771 system system + chown system system /data/connectivity + + # Create directory used by audio subsystem + mkdir /data/vendor/misc/audio 0770 audio audio + + # Create directory for audio delta files + mkdir /data/vendor/misc/audio/acdbdata 0770 media audio + mkdir /data/vendor/misc/audio/acdbdata/delta 0770 media audio + + # Create directory for radio + mkdir /data/vendor/radio 0770 system radio + + chmod 0664 /sys/devices/platform/msm_sdcc.1/polling + chmod 0664 /sys/devices/platform/msm_sdcc.2/polling + chmod 0664 /sys/devices/platform/msm_sdcc.3/polling + chmod 0664 /sys/devices/platform/msm_sdcc.4/polling + + # Chown polling nodes as needed from UI running on system server + chown system system /sys/devices/platform/msm_sdcc.1/polling + chown system system /sys/devices/platform/msm_sdcc.2/polling + chown system system /sys/devices/platform/msm_sdcc.3/polling + chown system system /sys/devices/platform/msm_sdcc.4/polling + + # Create directories for Location services + mkdir /data/vendor/location 0770 gps gps + mkdir /data/vendor/location/mq 0770 gps gps + mkdir /data/vendor/location/xtwifi 0770 gps gps + + # SSC/SLPI sensors + mkdir /persist/sensors 0775 root system + chown root system /persist/sensors/sensors_settings + chmod 0664 /persist/sensors/sensors_settings + chown root system /persist/sensors/sns.reg + chmod 0664 /persist/sensors/sns.reg + + # /dev/sensors only supports an ioctl to get the current SLPI timestamp; + # allow the sensors daemon to perform this as non-root + chown root system /dev/sensors + chmod 0660 /dev/sensors + + # Create /data/time folder for time-services + mkdir /data/time/ 0700 system system + mkdir /data/audio/ 0770 media audio + + # Create a folder for audio delta files + mkdir /data/audio/acdbdata 0770 media audio + mkdir /data/audio/acdbdata/delta 0770 media audio + setprop vold.post_fs_data_done 1 + + # Create a folder for SRS to be able to create a usercfg file + mkdir /data/data/media 0770 media media + + # Create FM dir for patchdownloader + mkdir /data/misc/fm 0770 system system + chmod 0770 /data/misc/fm + + #Create PERFD deamon related dirs + mkdir /data/vendor/perfd 0770 root system + chmod 2770 /data/vendor/perfd + rm /data/vendor/perfd/default_values + + # NFC local data and nfcee xml storage + mkdir /data/nfc 0770 nfc nfc + mkdir /data/nfc/param 0770 nfc nfc + + #Create IOP deamon related dirs + mkdir /data/vendor/iop 0770 root system + + # Mark the copy complete flag to not completed + write /data/vendor/radio/copy_complete 0 + chown radio radio /data/vendor/radio/copy_complete + chmod 0660 /data/vendor/radio/copy_complete + + # copy prebuilt qcril.db files always + copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db + chown radio radio /data/vendor/radio/qcril_prebuilt.db + chmod 0660 /data/vendor/radio/qcril_prebuilt.db + + # File flags for prebuilt ril db file + write /data/vendor/radio/prebuilt_db_support 1 + chown radio radio /data/vendor/radio/prebuilt_db_support + chmod 0400 /data/vendor/radio/prebuilt_db_support + write /data/vendor/radio/db_check_done 0 + chown radio radio /data/vendor/radio/db_check_done + chmod 0660 /data/vendor/radio/db_check_done + on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 @@ -76,15 +229,6 @@ on early-boot write /sys/bus/msm_subsys/devices/subsys4/restart_level "related" write /sys/bus/msm_subsys/devices/subsys5/restart_level "related" -on fs - wait /dev/block/platform/soc/${ro.boot.bootdevice} - symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice - restorecon_recursive /dev/block/platform/soc/${ro.boot.bootdevice} - mount_all /vendor/etc/fstab.qcom - - # Restorecon - restorecon_recursive /persist - on boot # Secure touch chmod 0660 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable @@ -244,9 +388,9 @@ on boot # an ack packet comes out of order write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 - # Set the console loglevel to < KERN_INFO - # Set the default message loglevel to KERN_INFO - write /proc/sys/kernel/printk "6 6 1 7" + # Set the console loglevel to < KERN_WARNING + # Set the default message loglevel to KERN_WARNING + write /proc/sys/kernel/printk "4 4 1 7" # Allow access for CCID command/response timeout configuration chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout @@ -268,183 +412,13 @@ on boot # Allow access for WLAN firmware chown system system /sys/module/cnss_common/parameters/bdwlan_file -# msm specific files that need to be created on /data -on post-fs-data - mkdir /tombstones/modem 0771 system system - mkdir /tombstones/lpass 0771 system system - mkdir /tombstones/wcnss 0771 system system - mkdir /tombstones/dsps 0771 system system - mkdir /persist/data/sfs 0700 system system - mkdir /persist/data/tz 0700 system system - mkdir /persist/qc_senseid 0700 system system - mkdir /persist/bms 0700 root system - restorecon_recursive /persist - mkdir /data/misc/dts 0770 media audio - mkdir /data/usf 0700 system system - mkdir /data/misc/qvop 0660 system system - mkdir /data/misc/audio_pp 0771 media audio - - # Create directory used by display clients - mkdir /data/vendor/display 0770 system graphics - - # Create directories for Fingerprint - mkdir /data/vendor/misc/qti_fp 0770 system system - mkdir /data/vendor/misc/qti_fp/bg_estimation 0770 system system - mkdir /data/vendor/misc/qti_fp/calib_test 0770 system system - mkdir /data/vendor/misc/qti_fp/database 0770 system system - - # Create directory for TZ Apps - mkdir /data/misc/qsee 0770 system system - - # Create folder for mm-qcamera-daemon - mkdir /data/misc/camera 0770 camera camera - - mkdir /data/media 0770 media_rw media_rw - chown media_rw media_rw /data/media - - # Create directory for tftp - mkdir /data/vendor/tombstones 0771 system system - mkdir /data/vendor/tombstones/rfs 0771 system system - - mkdir /data/misc/bluetooth 0770 bluetooth bluetooth - - # Create the directories used by the Wireless subsystem - mkdir /data/misc/wifi 0770 wifi wifi - mkdir /data/misc/wifi/sockets 0770 wifi wifi - mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi - mkdir /data/misc/dhcp 0770 dhcp dhcp - chown dhcp dhcp /data/misc/dhcp - - # Create port-bridge log dir - mkdir /data/misc/port_bridge 0770 radio radio - chmod 0770 /data/misc/port_bridge - - # Create netmgr log dir - mkdir /data/vendor/netmgr 0770 radio radio - chmod 0770 /data/vendor/netmgr - - # Create ipacm log dir - mkdir /data/vendor/ipa 0770 radio radio - chmod 0770 /data/vendor/ipa - - # Create the directories used by CnE subsystem - mkdir /data/connectivity 0771 system system - chown system system /data/connectivity - - mkdir /data/dpm/nsrm 0771 system system - chown system system /data/dpm/nsrm - - # Create directory used by audio subsystem - mkdir /data/misc/audio 0770 audio audio - - # Create directory for audio delta files - mkdir /data/misc/audio/acdbdata 0770 media audio - mkdir /data/misc/audio/acdbdata/delta 0770 media audio - - # Create directory used by the DASH client - mkdir /data/misc/dash 0770 media audio - - # Create directory for radio - mkdir /data/vendor/radio 0770 system radio - - # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections - # We chown/chmod /persist again so because mount is run as root + defaults - chown system system /persist - chmod 0771 /persist - chmod 0664 /sys/devices/platform/msm_sdcc.1/polling - chmod 0664 /sys/devices/platform/msm_sdcc.2/polling - chmod 0664 /sys/devices/platform/msm_sdcc.3/polling - chmod 0664 /sys/devices/platform/msm_sdcc.4/polling - - # Chown polling nodes as needed from UI running on system server - chown system system /sys/devices/platform/msm_sdcc.1/polling - chown system system /sys/devices/platform/msm_sdcc.2/polling - chown system system /sys/devices/platform/msm_sdcc.3/polling - chown system system /sys/devices/platform/msm_sdcc.4/polling - - # Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant - mkdir /data/system 0775 system system - - #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant - # Create directories for Location services - mkdir /data/vendor/location 0770 gps gps - mkdir /data/vendor/location/mq 0770 gps gps - mkdir /data/vendor/location/xtwifi 0770 gps gps - - # Create directory from IMS services - mkdir /data/shared 0755 - chown system system /data/shared - - # Create directory for FOTA - mkdir /data/fota 0771 - chown system system /data/fota - - # Create /data/time folder for time-services - mkdir /data/time/ 0700 system system - mkdir /data/audio/ 0770 media audio - - # Create a folder for audio delta files - mkdir /data/audio/acdbdata 0770 media audio - mkdir /data/audio/acdbdata/delta 0770 media audio - setprop vold.post_fs_data_done 1 - - # Create a folder for SRS to be able to create a usercfg file - mkdir /data/data/media 0770 media media - - # Create FM dir for patchdownloader - mkdir /data/misc/fm 0770 system system - chmod 0770 /data/misc/fm - - # RIDL data - mkdir /data/misc/SelfHost/ 0710 system shell - mkdir /data/misc/SelfHost/QCLogs/ 2750 system shell - mkdir /data/misc/SelfHost/QCLogs/temp/ 0700 system shell - mkdir /data/misc/SelfHost/storage/ 0700 system shell - mkdir /data/misc/SelfHost/Running/ 2750 system shell - mkdir /data/misc/SelfHost/socket/ 2770 system system - - #Create PERFD deamon related dirs - mkdir /data/vendor/perfd 0770 root system - chmod 2770 /data/vendor/perfd - rm /data/vendor/perfd/default_values - - # NFC local data and nfcee xml storage - mkdir /data/nfc 0770 nfc nfc - mkdir /data/nfc/param 0770 nfc nfc - - #Create IOP deamon related dirs - mkdir /data/vendor/iop 0770 root system - - # Mark the copy complete flag to not completed - write /data/vendor/radio/copy_complete 0 - chown radio radio /data/vendor/radio/copy_complete - chmod 0660 /data/vendor/radio/copy_complete - - # copy prebuilt qcril.db files always - copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db - chown radio radio /data/vendor/radio/qcril_prebuilt.db - chmod 0660 /data/vendor/radio/qcril_prebuilt.db - - # File flags for prebuilt ril db file - write /data/vendor/radio/prebuilt_db_support 1 - chown radio radio /data/vendor/radio/prebuilt_db_support - chmod 0400 /data/vendor/radio/prebuilt_db_support - write /data/vendor/radio/db_check_done 0 - chown radio radio /data/vendor/radio/db_check_done - chmod 0660 /data/vendor/radio/db_check_done - # start camera server as daemon service qcamerasvr /vendor/bin/mm-qcamera-daemon - class main + class late_start user camera group camera system inet input graphics writepid /dev/cpuset/system-background/tasks -service qvop-daemon /system/bin/qvop-daemon - class late_start - user system - group system drmrpc - # start up peripheral manager service per_mgr /vendor/bin/pm-service class late_start @@ -471,17 +445,6 @@ service qseecomd /vendor/bin/qseecomd group root writepid /dev/cpuset/system-background/tasks -service seempd /system/bin/seempd - class late_start - user system - group system - socket seempdw dgram 0666 system system - -service secotad /system/bin/secotad - class late_start - user system - group system - service thermal-engine /vendor/bin/thermal-engine class main user root @@ -502,11 +465,6 @@ service adsprpcd /vendor/bin/adsprpcd user media group media -service audiod /system/bin/audiod - class late_start - user system - group system - service imsqmidaemon /vendor/bin/imsqmidaemon class main user system @@ -552,12 +510,6 @@ on property:vendor.ims.DATA_DAEMON_STATUS=1 start ims_rtp_daemon start vendor.imsrcsservice -service dts_configurator /system/bin/dts_configurator - class late_start - user system - group system media audio - oneshot - service ppd /vendor/bin/mm-pp-dpps class late_start user system @@ -583,12 +535,6 @@ on property:init.svc.zygote=running on property:init.svc.zygote=restarting stop ppd -service tlocd /system/bin/tloc_daemon - class late_start - user system - group drmrpc gps net_raw - seclabel u:r:tlocd:s0 - service readmac /vendor/bin/readmac class main user root @@ -601,16 +547,6 @@ service energy-awareness /vendor/bin/energy-awareness group system oneshot -service mdtpd /vendor/bin/mdtpd - class late_start - user root - group system radio drmrpc - -service qcomsysd /system/bin/qcom-system-daemon - class main - user root - group root diag - on property:sys.boot_completed=1 write /dev/kmsg "Boot completed " @@ -689,6 +625,8 @@ service rmt_storage /vendor/bin/rmt_storage class core user root group root system wakelock + shutdown critical + ioprio rt 0 writepid /dev/cpuset/system-background/tasks service tftp_server /vendor/bin/tftp_server @@ -702,7 +640,7 @@ on property:wc_transport.start_hci=true on property:wc_transport.start_hci=false stop start_hci_filter -service start_hci_filter /system/bin/wcnss_filter +service start_hci_filter /vendor/bin/wcnss_filter class late_start user bluetooth group bluetooth diag system wakelock @@ -715,19 +653,7 @@ on property:wc_transport.start_root=true on property:wc_transport.start_root=false stop hci_filter_root -service hci_filter_root /system/bin/wcnss_filter - class late_start - user bluetooth - group bluetooth diag system - disabled - -on property:wc_transport.start_root=true - start hci_filter_root - -on property:wc_transport.start_root=false - stop hci_filter_root - -service hci_filter_root /system/bin/wcnss_filter +service hci_filter_root /vendor/bin/wcnss_filter class late_start user bluetooth group bluetooth diag system @@ -741,7 +667,7 @@ service ftmd /system/bin/logwrapper /system/bin/ftmdaemon disabled oneshot -service port-bridge /system/bin/port-bridge +service port-bridge /vendor/bin/port-bridge class main user radio system group radio system inet @@ -767,8 +693,11 @@ service qti /vendor/bin/qti service sensors /vendor/bin/sensors.qcom class core - user root - group root wakelock + user system + group system + # Grants the ability for this daemon to bind IPC router ports so it can + # register QMI services + capabilities NET_BIND_SERVICE writepid /dev/cpuset/system-background/tasks on property:ro.use_data_netmgrd=false @@ -785,10 +714,10 @@ on property:sys.sysctl.tcp_adv_win_scale=* service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ - -I/system/vendor/etc/wifi/p2p_supplicant_overlay.conf -N \ + -I/vendor/etc/wifi/p2p_supplicant_overlay.conf -N \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/vendor/etc/wifi/wpa_supplicant_overlay.conf \ - -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 -dd \ + -I/vendor/etc/wifi/wpa_supplicant_overlay.conf \ + -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT @@ -799,12 +728,6 @@ service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ disabled oneshot -service ptt_socket_app /system/bin/ptt_socket_app -d - class main - user root - group root - oneshot - service wifi_fccutild /system/bin/wifi_fccutild user system group system inet net_admin @@ -812,7 +735,7 @@ service wifi_fccutild /system/bin/wifi_fccutild disabled oneshot -service cnss-daemon /system/bin/cnss-daemon -n -l +service cnss-daemon /vendor/bin/cnss-daemon -n -l class late_start user system group system inet net_admin wifi @@ -826,16 +749,6 @@ service loc_launcher /vendor/bin/loc_launcher group gps inet diag wifi writepid /dev/cpuset/system-background/tasks -service sensor-sh /vendor/bin/init.qcom.sensors.sh - class core - user root - oneshot - -service atfwd /system/bin/ATFWD-daemon - class late_start - user system - group system radio - on property:ro.data.large_tcp_window_size=true # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) write /proc/sys/net/ipv4/tcp_adv_win_scale 2 @@ -853,19 +766,6 @@ service msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance. disabled writepid /dev/cpuset/system-background/tasks -service wfdservice /system/bin/wfdservice - class main - user system - group audio camera inet net_bt_stack drmrpc media_rw media input net_admin - # removed these because of limit of 12 groups - #graphics net_bt net_bt_admin bluetooth - -# Seemp health service -service seemp_healthd /vendor/bin/seemp_healthd - class late_start - user system - group system - on charger setprop persist.sys.usb.config charging |