# Copyright (c) 2009-2012, 2014-2019, 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: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of The Linux Foundation nor # the names of its contributors may be used to endorse or promote # products derived from this software without specific prior written # permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # 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.usb.rc import /vendor/etc/init/hw/init.target.rc on early-init mount debugfs debugfs /sys/kernel/debug chmod 0755 /sys/kernel/debug chmod 0755 /sys/kernel/debug/tracing # Change ownership of hw_recovery related nodes chown system graphics /sys/kernel/debug/dri/0/debug/dump chown system graphics /sys/kernel/debug/dri/0/debug/recovery_reg chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dbgbus chown system graphics /sys/kernel/debug/dri/0/debug/recovery_vbif_dbgbus on init # Create cgroup mount point for memory mkdir /sys/fs/cgroup/memory/bg 0750 root system write /sys/fs/cgroup/memory/bg/memory.swappiness 140 write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1 chown root system /sys/fs/cgroup/memory/bg/tasks chmod 0660 /sys/fs/cgroup/memory/bg/tasks on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 # Allow subsystem (modem etc) debugging write /sys/kernel/boot_adsp/boot 1 write /sys/kernel/boot_cdsp/boot 1 write /sys/devices/virtual/npu/msm_npu/boot 1 write /sys/kernel/boot_slpi/boot 1 write /sys/devices/virtual/cvp/cvp/boot 1 write /sys/class/drm/card0-DSI-1/status "detect" write /sys/module/drm/parameters/vblankoffdelay -1 chown system graphics /sys/devices/virtual/hdcp/msm_hdcp/min_level_change chmod 0660 /sys/devices/virtual/hdcp/msm_hdcp/min_level_change chown system system /mnt/vendor/persist/sensors chown system system /mnt/vendor/persist/sensors/sns.reg chown system system /mnt/vendor/persist/sensors/sensors_list.txt chown system system /mnt/vendor/persist/sensors/registry chown system system /mnt/vendor/persist/sensors/registry/registry chown system system /mnt/vendor/persist/sensors/registry/registry/sensors_registry chown system system /mnt/vendor/persist/sensors/sensors_settings chown system system /mnt/vendor/persist/sensors/registry/sns_reg_config chown system system /mnt/vendor/persist/sensors/registry/sns_reg_version chown system system /mnt/vendor/persist/sensors/registry/config chmod 0664 /mnt/vendor/persist/sensors/sensors_settings # SSR setup write /sys/bus/msm_subsys/devices/subsys0/restart_level "related" write /sys/bus/msm_subsys/devices/subsys1/restart_level "related" write /sys/bus/msm_subsys/devices/subsys2/restart_level "related" write /sys/bus/msm_subsys/devices/subsys3/restart_level "related" write /sys/bus/msm_subsys/devices/subsys4/restart_level "related" write /sys/bus/msm_subsys/devices/subsys5/restart_level "related" write /sys/bus/msm_subsys/devices/subsys6/restart_level "related" write /sys/bus/msm_subsys/devices/subsys7/restart_level "related" write /sys/bus/msm_subsys/devices/subsys8/restart_level "related" on boot chown bluetooth net_bt /sys/class/rfkill/rfkill0/state chown bluetooth net_bt /sys/class/rfkill/rfkill0/type chmod 0660 /sys/class/rfkill/rfkill0/state chmod 0660 /sys/class/rfkill/rfkill0/type chown bluetooth net_bt /dev/ttyHS0 chmod 0660 /dev/ttyHS0 chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo chmod 0660 /sys/class/rfkill/rfkill0/device/extldo chown system system /sys/kernel/boot_slpi/ssr # This location is used by QCRIL to host UNIX domain # socket files used for internal IPC within QCRIL # modules mkdir /dev/socket/qmux_radio 2770 radio radio # To prevent out of order acknowledgements from making # connection tracking to treat them as not belonging to # the connection they belong to. # Otherwise, a weird issue happens in which some long # connections on high-throughput links get dropped when # 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" # bond0 used by FST Manager chown wifi wifi /sys/class/net/bond0/bonding/queue_id # Create directory used for display mkdir /mnt/vendor/persist/display 0770 system graphics # Create vpp directory mkdir /mnt/vendor/persist/vpp 0770 media media # Create hvdcp_opti directory mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system # Sensors log dir mkdir /data/vendor/sensors 0770 system system # Enable qcrild and data services enable vendor.qcrild enable vendor.qcrild2 enable vendor.dataqti enable vendor.dataadpl on post-fs-data # Create directory used by display clients mkdir /data/vendor/display 0770 system graphics # Change lm related dirs mkdir /data/vendor/lm 0700 root root # Create directory used by media clients mkdir /data/vendor/media 0770 mediacodec media # Create /data/vendor/tzstorage directory for SFS listener mkdir /data/vendor/tzstorage 0770 system system # Create folder of camera mkdir /data/vendor/camera 0770 camera camera # Create directory for tftp mkdir /data/vendor/tombstones 0771 system system mkdir /data/vendor/tombstones/rfs 0771 system system # Create directory for bluetooth mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth # Create the directories used by the Wireless subsystem mkdir /data/vendor/wifi 0770 wifi wifi mkdir /data/vendor/wifi/sockets 0770 wifi wifi mkdir /data/vendor/wifi/hostapd 0770 wifi wifi mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi mkdir /data/vendor/wifi/wpa 0770 wifi wifi mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi mkdir /data/vendor/mac_addr 0770 system wifi # Create the directories used by CnE subsystem mkdir /data/vendor/connectivity 0771 radio radio # Create directory used by audio subsystem mkdir /data/vendor/audio 0770 audio audio mkdir /data/vendor/audio/acdbdata 0770 media audio mkdir /data/vendor/audio/acdbdata/delta 0770 media audio # Create directory for radio mkdir /data/vendor/radio 0770 system radio rm /data/vendor/radio/shmbus # Create directory for modem_config mkdir /data/vendor/modem_config 0570 radio root # 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 mkdir /dev/socket/location 0770 gps gps mkdir /dev/socket/location/mq 0770 gps gps mkdir /dev/socket/location/xtra 0770 gps gps # Create directories for wifihal services mkdir /dev/socket/wifihal 2770 wifi wifi # Create /data/vendor/time folder for time-services mkdir /data/vendor/time 0700 system system # Create FM dir for patchdownloader mkdir /data/vendor/fm 0770 system system chmod 0770 /data/vendor/fm # Create PERFD deamon related dirs mkdir /data/vendor/perfd 2770 root system rm /data/vendor/perfd/default_values # 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 # Create vpp directory mkdir /data/vendor/vpp 0770 media media # Make MTU adjusting write /proc/sys/net/ipv4/tcp_mtu_probing 1 setprop vold.post_fs_data_done 1 on property:sys.boot_completed=1 chown media audio /sys/kernel/wdsp0/boot start vendor.qcom-post-boot service vendor.qrtr-ns /vendor/bin/qrtr-ns -f class core user vendor_qrtr group vendor_qrtr capabilities NET_BIND_SERVICE writepid /dev/cpuset/system-background/tasks service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config" class core user root oneshot writepid /dev/cpuset/system-background/tasks service vendor.rmt_storage /vendor/bin/rmt_storage class core user root shutdown critical ioprio rt 0 writepid /dev/cpuset/system-background/tasks service vendor.tftp_server /vendor/bin/tftp_server class core user root writepid /dev/cpuset/system-background/tasks service vendor.sensors /vendor/bin/sscrpcd sensorspd class early_hal user system group system writepid /dev/cpuset/system-background/tasks service vendor.sensors.qti /vendor/bin/sensors.qti class core user system group system writepid /dev/cpuset/system-background/tasks service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \ -g@android:vendor_wpa_wlan0 # we will start as root and wpa_supplicant will switch to user wifi # after setting up the capabilities required for WEXT # user wifi # group wifi inet keystore interface android.hardware.wifi.supplicant@1.0::ISupplicant default interface android.hardware.wifi.supplicant@1.1::ISupplicant default interface android.hardware.wifi.supplicant@1.2::ISupplicant default class main socket vendor_wpa_wlan0 dgram 660 wifi wifi disabled oneshot service vendor.cnss-daemon /vendor/bin/cnss-daemon -n -l class late_start user system group system inet net_admin wifi capabilities NET_ADMIN writepid /dev/cpuset/system-background/tasks on property:sys.shutdown.requested=* write /sys/kernel/shutdown_wlan/shutdown 1 stop cnss-daemon service vendor.loc_launcher /vendor/bin/loc_launcher class late_start user gps group gps writepid /dev/cpuset/system-background/tasks service vendor.qcom-sh /vendor/bin/init.qcom.sh class late_start user root group root system radio oneshot service vendor.qcom-post-boot /vendor/bin/init.qcom.post_boot.sh class late_start user root group root system wakelock graphics disabled oneshot on property:ro.vendor.ril.mbn_copy_completed=1 write /data/vendor/radio/copy_complete 1 service charger /system/bin/charger class charger group system graphics seclabel u:r:charger:s0 service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf class core user root group root writepid /dev/cpuset/system-background/tasks service vendor.power_off_alarm /vendor/bin/power_off_alarm class core group system oneshot