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
|
|
|
|
|
2020-05-01 19:38:53 -04:00
|
|
|
# Change ownership of sysfs power control node
|
|
|
|
chown system graphics /sys/class/drm/card0/device/power/control
|
|
|
|
|
2020-09-22 13:52:36 -04:00
|
|
|
# Disable UFS clock scaling
|
|
|
|
write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0
|
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
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/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
|
|
|
|
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
|
|
|
|
|
2020-11-03 22:29:08 -05:00
|
|
|
# Set the console loglevel to < KERN_WARN
|
2020-04-17 07:47:23 -04:00
|
|
|
# Set the default message loglevel to KERN_INFO
|
2020-11-24 03:57:01 -05:00
|
|
|
write /proc/sys/kernel/printk "4 6 1 7"
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2020-03-31 14:07:20 -04:00
|
|
|
# limit discard size to 128MB in order to avoid long IO latency
|
|
|
|
write /sys/block/sda/queue/discard_max_bytes 134217728
|
|
|
|
|
2017-03-15 20:51:34 -04:00
|
|
|
chown system system /sys/class/backlight/panel0-backlight/brightness
|
|
|
|
chown system system /sys/class/backlight/panel0-backlight/max_brightness
|
|
|
|
|
2020-12-14 06:54:35 -05:00
|
|
|
# Enable qcrild and data services
|
|
|
|
enable vendor.qcrild
|
|
|
|
enable vendor.qcrild2
|
|
|
|
enable vendor.dataqti
|
|
|
|
enable vendor.dataadpl
|
|
|
|
|
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
|
2020-11-18 02:38:48 -05:00
|
|
|
mkdir /dev/socket/location/dgnss 0770 gps gps
|
2020-04-17 07:47:23 -04:00
|
|
|
|
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
|
|
|
|
|
|
|
|
# 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
|
|
|
setprop vold.post_fs_data_done 1
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
on property:sys.boot_completed=1
|
2020-09-22 13:52:36 -04:00
|
|
|
# Enable UFS clock scaling back
|
|
|
|
write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1
|
|
|
|
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
|
|
|
2020-12-09 06:11:11 -05:00
|
|
|
on property:vendor.netflix.bsp_rev=*
|
|
|
|
setprop ro.netflix.bsp_rev ${vendor.netflix.bsp_rev}
|
|
|
|
|
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
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
|
|
|
|
class core
|
|
|
|
user root
|
|
|
|
oneshot
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
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
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
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
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
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
|
2019-07-30 16:29:22 -04:00
|
|
|
user system
|
|
|
|
group system graphics input
|
2019-09-23 19:01:32 -04:00
|
|
|
capabilities SYS_BOOT
|
2020-04-17 07:47:23 -04:00
|
|
|
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
|
2018-03-07 05:38:27 -05:00
|
|
|
writepid /dev/cpuset/system-background/tasks
|
2020-04-17 07:47:23 -04:00
|
|
|
|
|
|
|
service vendor.power_off_alarm /vendor/bin/power_off_alarm
|
|
|
|
class core
|
|
|
|
group system
|
|
|
|
oneshot
|
2021-03-31 12:44:37 -04:00
|
|
|
|
2020-02-03 13:24:09 -05:00
|
|
|
service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
|
2020-09-10 17:20:37 -04:00
|
|
|
override
|
|
|
|
class hal
|
|
|
|
user audioserver
|
|
|
|
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
|
|
|
|
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
|
|
|
|
capabilities BLOCK_SUSPEND
|
|
|
|
ioprio rt 4
|
|
|
|
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
|
|
|
|
socket audio_hw_socket seqpacket 0666 system system
|
2020-02-03 13:24:09 -05:00
|
|
|
onrestart restart audioserver
|