summaryrefslogtreecommitdiff
path: root/rootdir/etc/init.qcom.rc
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir/etc/init.qcom.rc')
-rw-r--r--[-rwxr-xr-x]rootdir/etc/init.qcom.rc311
1 files changed, 123 insertions, 188 deletions
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 1683bb5..c99111e 100755..100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -1,4 +1,4 @@
-# Copyright (c) 2009-2012, 2014-2018, The Linux Foundation. All rights reserved.
+# 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:
@@ -28,33 +28,29 @@
import /vendor/etc/init/hw/init.qcom.usb.rc
import /vendor/etc/init/hw/init.msm.usb.configfs.rc
import /vendor/etc/init/hw/init.target.rc
+import /vendor/etc/init/hw/init.qcom.factory.rc
+import /vendor/etc/init/hw/init.qcom.test.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
chmod 0755 /sys/kernel/debug
- # create symlink for vendor mount points
- symlink /vendor/firmware_mnt /firmware
- symlink /vendor/bt_firmware /bt_firmware
- symlink /vendor/dsp /dsp
-
# 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
+ # Change ownership of sw_sync node
+ chown system graphics /sys/kernel/debug/sync/sw_sync
+ chmod 0666 /sys/kernel/debug/sync/sw_sync
+
chown root system /dev/kmsg
chmod 0620 /dev/kmsg
# Load WIGIG platform driver
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
on init
-
- # Support legacy paths
- symlink /sdcard /mnt/sdcard
- symlink /sdcard /storage/sdcard0
-
# Create cgroup mount point for memory
mkdir /sys/fs/cgroup/memory/bg 0750 root system
write /sys/fs/cgroup/memory/bg/memory.swappiness 140
@@ -64,6 +60,7 @@ on init
on post-fs
chmod 0755 /sys/kernel/debug/tracing
+
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
@@ -71,7 +68,8 @@ on early-boot
write /sys/kernel/boot_adsp/boot 1
write /sys/kernel/boot_cdsp/boot 1
write /sys/kernel/boot_slpi/boot 1
- setprop ro.alarm_boot false
+ exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
+ exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh
# for backward compatibility
chown system system /persist/sensors
@@ -84,11 +82,13 @@ on early-boot
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
@@ -106,6 +106,7 @@ on boot
chown system system /sys/kernel/debug/msm_core/enable
chown system system /sys/kernel/debug/msm_core/ptable
chown system system /sys/kernel/boot_slpi/ssr
+ chown system system /sys/kernel/boot_adsp/ssr
chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
@@ -135,41 +136,11 @@ on boot
mkdir /dev/socket/qmux_gps 0770 gps gps
chmod 2770 /dev/socket/qmux_gps
-
- #define back flash and front flash
- chmod 0660 /sys/android_camera/sensor
- chmod 0660 /sys/class/leds/led:flash_0/brightness
- chmod 0660 /sys/class/leds/led:flash_1/brightness
- chmod 0660 /sys/class/leds/led:flash_2/brightness
- chmod 0660 /sys/class/leds/led:torch_0/brightness
- chmod 0660 /sys/class/leds/led:torch_1/brightness
- chmod 0660 /sys/class/leds/led:torch_2/brightness
- chmod 0660 /sys/class/leds/led:switch_0/brightness
- chmod 0660 /sys/class/leds/led:switch_1/brightness
- chmod 0660 /sys/class/leds/flashlight/brightness
- chown system system /sys/android_camera/sensor
- chown system system /sys/class/leds/led:flash_0/brightness
- chown system system /sys/class/leds/led:flash_1/brightness
- chown system system /sys/class/leds/led:flash_2/brightness
- chown system system /sys/class/leds/led:torch_0/brightness
- chown system system /sys/class/leds/led:torch_1/brightness
- chown system system /sys/class/leds/led:torch_2/brightness
- chown system system /sys/class/leds/led:switch_0/brightness
- chown system system /sys/class/leds/led:switch_1/brightness
- chown system system /sys/class/leds/flashlight/brightness
- chmod 0660 /sys/class/power_supply/battery/input_suspend
- chmod 0660 /sys/class/power_supply/battery/charging_enabled
- chown system system /sys/class/power_supply/battery/input_suspend
- chown system system /sys/class/power_supply/battery/charging_enabled
-
- chmod 0770 /sys/class/power_supply/battery/device/thermalcall
- chown system system /sys/class/power_supply/battery/device/thermalcall
-
mkdir /persist/drm 0770 system system
- mkdir /persist/bluetooth 0770 bluetooth bluetooth
+ mkdir /mnt/vendor/persist/bluetooth 0770 bluetooth bluetooth
mkdir /persist/misc 0770 system system
mkdir /mnt/vendor/persist/alarm 0770 system system
- mkdir /persist/time 0770 system system
+ mkdir /mnt/vendor/persist/time 0770 system system
mkdir /mnt/vendor/persist/secnvm 0770 system system
#Create NETMGR daemon socket area
@@ -184,8 +155,6 @@ on boot
setprop ro.telephony.call_ring.multiple false
- #enable camera read sensors data
- setprop persist.camera.gyro.disable 0
#Remove SUID bit for iproute2 ip tool
chmod 0755 /system/bin/ip
@@ -210,7 +179,7 @@ on boot
# Assign TCP buffer thresholds to be ceiling value of technology maximums
# Increased technology maximums should be reflected here.
- write /proc/sys/net/core/rmem_max 8388608
+ write /proc/sys/net/core/rmem_max 16777216
write /proc/sys/net/core/wmem_max 8388608
# To prevent out of order acknowledgements from making
@@ -221,9 +190,6 @@ on boot
# an ack packet comes out of order
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
- #Make MTU adjusting for sometimes cannot access to internet
- write /proc/sys/net/ipv4/tcp_mtu_probing 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"
@@ -258,17 +224,17 @@ on boot
chown system system /sys/class/sensors/apds9930-proximity/poll_delay
# Create directory used for display
+ # for backward compatibility
mkdir /persist/display 0770 system graphics
+ 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
- # Create pa-cal driver directory lct-20180914
- mkdir /mnt/vendor/persist/audio 0770 root root
-
# msm specific files that need to be created on /data
on post-fs-data
mkdir /data/vendor/misc 01771 system system
@@ -288,8 +254,8 @@ on post-fs-data
# create QDMA dropbox
mkdir /data/vendor/qdmastats 0700 system system
mkdir /data/vendor/qdma 0770 system system
- mkdir /dev/socket/qdma 0770 system system
- chmod 2770 /dev/socket/qdma
+ mkdir /dev/socket/qdma 0777 system system
+ chmod 2777 /dev/socket/qdma
# Create /data/vendor/tzstorage directory for SFS listener
mkdir /data/vendor/tzstorage 0770 system system
@@ -300,11 +266,8 @@ on post-fs-data
#Create folder of camera
mkdir /data/vendor/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
+ #Change ownership to system
+ chown system system /data/vendor/tombstones
mkdir /data/vendor/ramdump 0771 root system
mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
@@ -370,7 +333,6 @@ on post-fs-data
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
@@ -380,6 +342,11 @@ on post-fs-data
mkdir /dev/socket/location 0770 gps gps
mkdir /dev/socket/location/mq 0770 gps gps
mkdir /dev/socket/location/xtra 0770 gps gps
+ mkdir /data/vendor/location-partner 0770 gps gps
+ mkdir /data/vendor/location-partner/dre 0770 gps gps
+ mkdir /data/vendor/location-partner/ppe 0770 gps gps
+ mkdir /dev/socket/location 0770 gps gps
+ mkdir /dev/socket/location/ehub 0770 gps gps
#Create directory from IMS services
mkdir /data/shared 0755
@@ -389,15 +356,9 @@ on post-fs-data
mkdir /data/fota 0771
chown system system /data/fota
- #Create directory for hostapd
- mkdir /data/hostapd 0770 system wifi
-
# Create /data/time folder for time-services
mkdir /data/vendor/time/ 0700 system system
- # Create /data/vendor/diag_logs folder for on-device-logging
- #mkdir /data/vendor/diag_logs 0770 system system
-
setprop vold.post_fs_data_done 1
#Create a folder for SRS to be able to create a usercfg file
@@ -412,6 +373,8 @@ on post-fs-data
chmod 2770 /data/vendor/perfd
rm /data/vendor/perfd/default_values
+ mkdir /data/vendor/secure_element 0777 system system
+
#Create IOP deamon related dirs
mkdir /data/vendor/iop 0700 root system
@@ -432,8 +395,6 @@ on post-fs-data
chown radio radio /data/vendor/radio/db_check_done
chmod 0660 /data/vendor/radio/db_check_done
- copy /vendor/etc/ad_calib.cfg /data/vendor/display/ad_calib.cfg
- chmod 0644 /data/vendor/display/ad_calib.cfg
# qti-logkit data
mkdir /data/vendor/qti-logkit/ 0771 system system
mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
@@ -449,15 +410,13 @@ on post-fs-data
# set aggressive read ahead for dm-0 and dm-1 during boot up
write /sys/block/dm-0/queue/read_ahead_kb 2048
write /sys/block/dm-1/queue/read_ahead_kb 2048
+ write /sys/block/dm-2/queue/read_ahead_kb 2048
# Create vpp directory
mkdir /data/vendor/vpp 0770 media media
- #Create FTM_AP dir for factory test
- mkdir /data/FTM_AP 0775 system system
-
#Create dir for TUI
- mkdir /data/vendor/tui 0600 system drmrpc
+ mkdir /data/vendor/tui 0700 system system
#Start move time data to /data/vendor once post-fs-data done
start vendor.move_time_data
@@ -509,17 +468,17 @@ on property:ro.vendor.iocgrp.config=1
write /dev/blkio/blkio.weight 1000
write /dev/blkio/bg/blkio.weight 100
-on property:persist.sys.ssr.enable_debug=*
- write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
+on property:persist.vendor.sys.ssr.enable_debug=*
+ write /sys/module/subsystem_restart/parameters/enable_debug ${persist.vendor.sys.ssr.enable_debug}
-on property:persist.sys.mba_boot_timeout=*
- write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
+on property:persist.vendor.sys.mba_boot_timeout=*
+ write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.vendor.sys.mba_boot_timeout}
-on property:persist.sys.modem_auth_timeout=*
- write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
+on property:persist.vendor.sys.modem_auth_timeout=*
+ write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.vendor.sys.modem_auth_timeout}
-on property:persist.sys.pil_proxy_timeout=*
- write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
+on property:persist.vendor.sys.pil_proxy_timeout=*
+ write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.vendor.sys.pil_proxy_timeout}
on property:persist.vendor.ssr.restart_level=*
start vendor.ssr_setup
@@ -586,10 +545,15 @@ service qcom-c_main-sh /vendor/bin/init.class_main.sh
user root
oneshot
+service qcom-c_late-sh /vendor/bin/init.class_late.sh
+ class late_start
+ user root
+ oneshot
+
on property:vold.decrypt=trigger_restart_framework
start qcom-c_main-sh
- start config_bt_addr
start wcnss-service
+ start qcom-c_late-sh
on property:persist.env.fastdorm.enabled=true
setprop persist.radio.data_no_toggle 1
@@ -604,11 +568,11 @@ service dpmQmiMgr /system/vendor/bin/dpmQmiMgr
user system
group system
-service vendor.qrtr-ns /vendor/bin/qrtr-ns -f -i 1
+service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
class core
- user system
- group system net_admin
- capabilities NET_BIND_SERVICE NET_ADMIN
+ user vendor_qrtr
+ group vendor_qrtr
+ capabilities NET_BIND_SERVICE
service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
class core
@@ -768,6 +732,14 @@ service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
disabled
oneshot
+# Data Migration
+service vendor.move_wifi_data /system/bin/move_wifi_data.sh
+ class main
+ user wifi
+ group wifi
+ disabled
+ oneshot
+
# FST Manager with hostapd (softap) - all settings inside ini file
service fstman /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini -a 1
user wifi
@@ -847,9 +819,9 @@ service iprenew_wigig0 /system/bin/dhcpcd -n
service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
class main
- user root
- group root
- disabled
+ user wifi
+ group wifi system inet net_admin
+ capabilities NET_ADMIN
oneshot
service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
@@ -868,45 +840,6 @@ service wifi_ftmd /system/vendor/bin/wifi_ftmd
on property:vendor.wifi.ftmd.load=true
insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
-service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f
- class late_start
- user system
- group system wifi inet net_admin sdcard_rw media_rw diag
- disabled
- oneshot
-
-service vendor.tcpdump /vendor/bin/tcpdump -i any -W 2 -C 2 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
- class main
- user root
- group root wifi
- disabled
- oneshot
-
-service sniffer /vendor/bin/tcpdump -i wlan0 -w /sdcard/wlan_logs/sniffer.pcap
- class main
- user root
- group root
- disabled
- oneshot
-
-on property:sys.user.0.ce_available=true
- start vendor.cnss_diag
- start vendor.tcpdump
-
-service startpktlog /system/bin/iwpriv wlan0 pktlog 1
- class main
- user root
- group root
- disabled
- oneshot
-
-service stoppktlog /system/bin/iwpriv wlan0 pktlog 0
- class main
- user root
- group root
- disabled
- oneshot
-
on property:persist.vendor.data.shs_ko_load=1
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_shs
@@ -926,6 +859,7 @@ service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
capabilities NET_ADMIN
on property:sys.shutdown.requested=*
+ write /sys/kernel/shutdown_wlan/shutdown 1
stop cnss-daemon
service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
@@ -956,6 +890,11 @@ service mlid /vendor/bin/mlid
group gps
socket mlid stream 0666 gps gps
+service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
+ class late_start
+ user system
+ group readproc system net_bw_stats radio vendor_rfs_shared
+
service loc_launcher /system/vendor/bin/loc_launcher
class late_start
user gps
@@ -1035,6 +974,7 @@ service vendor.atfwd /vendor/bin/ATFWD-daemon
class late_start
user system
group system radio
+ disabled
service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
interface android.hardware.wifi.hostapd@1.0::IHostapd default
@@ -1127,19 +1067,27 @@ on property:sys.qbcharger.enable=true
on property:sys.qbcharger.enable=false
stop qbcharger
+service diag_mdlog_start /system/vendor/bin/diag_mdlog
+ class late_start
+ user shell
+ group system oem_2901 sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
-on property:persist.vendor.mdlog.enable=true
- start diag_mdlog_start
-on property:persist.vendor.mdlog.enable=false
- start diag_mdlog_stop
+service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
+ class late_start
+ user shell
+ group system oem_2901 sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
service qlogd /system/xbin/qlogd
socket qlogd stream 0662 system system
class main
disabled
-on property:persist.vendor.qlogd=1
+on property:persist.sys.qlogd=1
start qlogd
-on property:persist.vendor.qlogd=0
+on property:persist.sys.qlogd=0
stop qlogd
service vm_bms /vendor/bin/vm_bms
@@ -1172,23 +1120,6 @@ service vendor.LKCore-dbg /vendor/bin/LKCore
disabled
user root
group root system log diag net_raw
-service sdlog /system/bin/sdlog
- class late_start
- user root
- disabled
- oneshot
-
-on property:sys.logd_t2.enable=1
- start sdlog
-
-on property:sys.logd.enable=1
- start sdlog
-
-on property:persist.vendor.logd.enable=1
- start sdlog
-on property:persist.vendor.logd.enable=0
- setprop vendor.sdlog.run 0
- stop sdlog
# service for USER
service vendor.LKCore-rel /vendor/bin/LKCore
@@ -1221,34 +1152,10 @@ service poweroffhandler /system/vendor/bin/poweroffhandler
disabled
oneshot
-on property:init.svc.surfaceflinger=restarting
- stop vendor.hwcomposer-2-1
- start vendor.hwcomposer-2-1
on property:vendor.display.lcd_density=*
setprop ro.sf.lcd_density ${vendor.display.lcd_density}
-# Logcat dump daemon, dumps logs to logdump partition
-service logdumpd /system/bin/logcat -b all -v threadtime -D -w /dev/block/bootdevice/by-name/logdump
- class core
- writepid /dev/cpuset/system-background/tasks
- seclabel u:r:logdumpd:s0
- disabled
-
-# Logdumpd is enabled only for userdebug non-perf build
-on property:ro.logdumpd.enabled=1
- start logdumpd
-
-service time_daemon /system/vendor/bin/time_daemon
- class main
- user root
- group root
-
-service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
- class late_start
- user system
- group readproc system net_bw_stats radio vendor_rfs_shared
-
service vendor.vppservice /vendor/bin/vppservice
class main
user media
@@ -1266,11 +1173,7 @@ service seemp_healthd /vendor/bin/seemp_healthd
user system
group system
-#ant check change permission
- chown system system /sys/class/ant_class/ant_state
- chmod 0644 /sys/class/ant_class/ant_state
-
-service power_off_alarm /vendor/bin/power_off_alarm
+service vendor.power_off_alarm /vendor/bin/power_off_alarm
class core
group system
disabled
@@ -1297,11 +1200,9 @@ service chre /vendor/bin/chre
socket chre seqpacket 0660 root system
shutdown critical
-service config_bt_addr /vendor/bin/btnvtool -O
- class core
- user bluetooth
- group bluetooth radio
- oneshot
+
+on property:vendor.chre.enabled=0
+ stop chre
service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
class main
@@ -1309,6 +1210,40 @@ service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.andro
oneshot
keycodes 114 115 116
-#workaround for camera HAL can not read sys property
-on property:sys.camera.face.unlock=*
- setprop vendor.camera.face.unlock ${sys.camera.face.unlock}
+#Set GPU Opengles version
+on property:vendor.opengles.version=*
+ setprop ro.opengles.version ${vendor.opengles.version}
+
+#Set gpu available frequencies property
+on property:vendor.gpu.available_frequencies=*
+ setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}
+
+service vendor.wifilearner /system/vendor/bin/wifilearner
+ class main
+ user wifi
+ group wifi
+ oneshot
+
+service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
+ 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 system
+ capabilities BLOCK_SUSPEND
+ ioprio rt 4
+ writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
+ # audioflinger restarts itself when it loses connection with the hal
+ # and its .rc file has an "onrestart restart audio-hal" rule, thus
+ # an additional auto-restart from the init process isn't needed.
+ oneshot
+ interface android.hardware.audio@4.0::IDevicesFactory default
+ interface android.hardware.audio@2.0::IDevicesFactory default
+
+service vendor.contexthub-hal-1-0 /vendor/bin/hw/android.hardware.contexthub@1.0-service
+ override
+ class hal
+ interface android.hardware.contexthub@1.0::IContexthub default
+ user system
+ group system
+ disabled