2020-04-17 07:47:23 -04:00
|
|
|
# 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
|
2019-08-19 00:36:19 -04:00
|
|
|
chmod 0755 /sys/kernel/debug/tracing
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Change ownership of hw_recovery related nodes
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
2019-08-19 00:36:19 -04:00
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
# 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
|
2019-08-19 00:36:19 -04:00
|
|
|
|
|
|
|
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
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2019-07-11 09:32:52 -04:00
|
|
|
# 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"
|
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
on boot
|
|
|
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
2019-08-19 00:36:19 -04:00
|
|
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
2020-04-17 07:47:23 -04:00
|
|
|
chmod 0660 /sys/class/rfkill/rfkill0/state
|
2019-08-19 00:36:19 -04:00
|
|
|
chmod 0660 /sys/class/rfkill/rfkill0/type
|
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
chown system system /sys/kernel/boot_slpi/ssr
|
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
# This location is used by QCRIL to host UNIX domain
|
|
|
|
# socket files used for internal IPC within QCRIL
|
|
|
|
# modules
|
2019-08-19 00:36:19 -04:00
|
|
|
mkdir /dev/socket/qmux_radio 2770 radio radio
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Sensors log dir
|
|
|
|
mkdir /data/vendor/sensors 0770 system system
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create folder of camera
|
2020-04-17 07:47:23 -04:00
|
|
|
mkdir /data/vendor/camera 0770 camera camera
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create directory for tftp
|
2020-04-17 07:47:23 -04:00
|
|
|
mkdir /data/vendor/tombstones 0771 system system
|
|
|
|
mkdir /data/vendor/tombstones/rfs 0771 system system
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create directory for bluetooth
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
2019-08-19 00:36:19 -04:00
|
|
|
mkdir /data/vendor/mac_addr 0770 system wifi
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create directories for Location services
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create directories for wifihal services
|
|
|
|
mkdir /dev/socket/wifihal 2770 wifi wifi
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create /data/vendor/time folder for time-services
|
|
|
|
mkdir /data/vendor/time 0700 system system
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create FM dir for patchdownloader
|
2020-04-17 07:47:23 -04:00
|
|
|
mkdir /data/vendor/fm 0770 system system
|
|
|
|
chmod 0770 /data/vendor/fm
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Create PERFD deamon related dirs
|
|
|
|
mkdir /data/vendor/perfd 2770 root system
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Copy prebuilt qcril.db files always
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Make MTU adjusting
|
2020-04-17 07:47:23 -04:00
|
|
|
write /proc/sys/net/ipv4/tcp_mtu_probing 1
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
# Start qcrild
|
|
|
|
start vendor.qcrild
|
|
|
|
start vendor.qcrild2
|
2020-04-17 07:47:23 -04:00
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
setprop vold.post_fs_data_done 1
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
on property:sys.boot_completed=1
|
|
|
|
chown media audio /sys/kernel/wdsp0/boot
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
start vendor.qcom-post-boot
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
|
|
|
|
class core
|
|
|
|
user vendor_qrtr
|
|
|
|
group vendor_qrtr
|
|
|
|
capabilities NET_BIND_SERVICE
|
|
|
|
|
|
|
|
service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
|
|
|
|
class core
|
|
|
|
user root
|
|
|
|
oneshot
|
|
|
|
|
|
|
|
service vendor.rmt_storage /vendor/bin/rmt_storage
|
|
|
|
class core
|
|
|
|
user root
|
|
|
|
shutdown critical
|
|
|
|
ioprio rt 0
|
|
|
|
|
|
|
|
service vendor.tftp_server /vendor/bin/tftp_server
|
2019-08-19 00:36:19 -04:00
|
|
|
class core
|
2020-04-17 07:47:23 -04:00
|
|
|
user root
|
|
|
|
|
|
|
|
service vendor.sensors /vendor/bin/sscrpcd sensorspd
|
|
|
|
class early_hal
|
|
|
|
user system
|
|
|
|
group system
|
|
|
|
|
|
|
|
service vendor.sensors.qti /vendor/bin/sensors.qti
|
|
|
|
class core
|
|
|
|
user system
|
|
|
|
group system
|
|
|
|
|
|
|
|
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
|
2019-03-22 18:39:03 -04:00
|
|
|
interface android.hardware.wifi.supplicant@1.2::ISupplicant default
|
2020-04-17 07:47:23 -04:00
|
|
|
class main
|
|
|
|
socket vendor_wpa_wlan0 dgram 660 wifi wifi
|
|
|
|
disabled
|
|
|
|
oneshot
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
service vendor.cnss-daemon /vendor/bin/cnss-daemon -n -l
|
2020-04-17 07:47:23 -04:00
|
|
|
class late_start
|
|
|
|
user system
|
|
|
|
group system inet net_admin wifi
|
|
|
|
capabilities NET_ADMIN
|
|
|
|
|
|
|
|
on property:sys.shutdown.requested=*
|
|
|
|
write /sys/kernel/shutdown_wlan/shutdown 1
|
|
|
|
stop cnss-daemon
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
service vendor.loc_launcher /vendor/bin/loc_launcher
|
2020-04-17 07:47:23 -04:00
|
|
|
class late_start
|
|
|
|
user gps
|
|
|
|
group gps
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
service vendor.qcom-sh /vendor/bin/init.qcom.sh
|
2020-04-17 07:47:23 -04:00
|
|
|
class late_start
|
|
|
|
user root
|
|
|
|
group root system radio
|
|
|
|
oneshot
|
|
|
|
|
2020-04-13 17:43:49 -04:00
|
|
|
service vendor.qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
|
|
|
|
2019-08-19 00:36:19 -04:00
|
|
|
service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf
|
2020-04-17 07:47:23 -04:00
|
|
|
class core
|
|
|
|
user root
|
|
|
|
group root
|
|
|
|
|
|
|
|
service vendor.power_off_alarm /vendor/bin/power_off_alarm
|
|
|
|
class core
|
|
|
|
group system
|
|
|
|
oneshot
|