diff options
Diffstat (limited to 'rootdir/etc/init.qcom.rc')
-rw-r--r-- | rootdir/etc/init.qcom.rc | 309 |
1 files changed, 99 insertions, 210 deletions
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index c039fa2..426ea48 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -66,9 +66,12 @@ on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 # Allow subsystem (modem etc) debugging + write /sys/kernel/debug/bootkpi/kpi_values "M - Start adsp" 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 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 @@ -93,6 +96,9 @@ on early-boot chown system system /mnt/vendor/persist/sensors/registry/config chmod 0664 /mnt/vendor/persist/sensors/sensors_settings + chown system system /mnt/vendor/persist/data/pfm/licenses + chmod 0775 /mnt/vendor/persist/data/pfm/licenses + on boot chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power chown bluetooth net_bt /sys/class/rfkill/rfkill0/type @@ -107,7 +113,6 @@ 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 @@ -127,15 +132,11 @@ on boot chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo chmod 0660 /sys/class/rfkill/rfkill0/device/extldo - #Create QMUX deamon socket area + # This location is used by QCRIL to host UNIX domain + # socket files used for internal IPC within QCRIL + # modules mkdir /dev/socket/qmux_radio 0770 radio radio chmod 2770 /dev/socket/qmux_radio - mkdir /dev/socket/qmux_audio 0770 media audio - chmod 2770 /dev/socket/qmux_audio - mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth - chmod 2770 /dev/socket/qmux_bluetooth - mkdir /dev/socket/qmux_gps 0770 gps gps - chmod 2770 /dev/socket/qmux_gps mkdir /persist/drm 0770 system system mkdir /mnt/vendor/persist/bluetooth 0770 bluetooth bluetooth @@ -143,24 +144,26 @@ on boot mkdir /mnt/vendor/persist/alarm 0770 system system mkdir /mnt/vendor/persist/time 0770 system system mkdir /mnt/vendor/persist/secnvm 0770 system system + mkdir /mnt/vendor/persist/iar_db 0770 system system + mkdir /mnt/vendor/spunvm 0770 system system - #Create NETMGR daemon socket area - mkdir /dev/socket/netmgr 0750 radio radio + #Create WIGIG socket area + mkdir /dev/socket/wigig 0770 wifi wifi setprop wifi.interface wlan0 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 chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state - # 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 16777216 - write /proc/sys/net/core/wmem_max 8388608 + setprop net.tcp.2g_init_rwnd 10 # To prevent out of order acknowledgements from making # connection tracking to treat them as not belonging to @@ -180,13 +183,20 @@ on boot # bond0 used by FST Manager chown wifi wifi /sys/class/net/bond0/bonding/queue_id + # Allow access to emmc rawdump block partition and dload sysfs node + chown root system /dev/block/bootdevice/by-name/rawdump + chmod 0660 /dev/block/bootdevice/by-name/rawdump chown root system /sys/kernel/dload/emmc_dload chmod 0660 /sys/kernel/dload/emmc_dload + chown root system /dev/block/bootdevice/by-name/ramdump + chmod 0660 /dev/block/bootdevice/by-name/ramdump chown root system /sys/kernel/dload/dload_mode chmod 0660 /sys/kernel/dload/dload_mode chown system system /sys/class/backlight/panel0-backlight/brightness chown system system /sys/class/backlight/panel0-backlight/max_brightness + chown system system /sys/class/backlight/panel1-backlight/brightness + chown system system /sys/class/backlight/panel1-backlight/max_brightness # Allow access to sensors device attributes chown system system /sys/class/sensors/MPU6050-accel/enable @@ -210,6 +220,10 @@ on boot # Create hvdcp_opti directory mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system + #sensors log dir + mkdir /data/vendor/sensors + chown system system /data/vendor/sensors + # msm specific files that need to be created on /data on post-fs-data mkdir /data/vendor/misc 01771 system system @@ -226,12 +240,6 @@ on post-fs-data # Create directory used by media clients mkdir /data/vendor/media 0770 mediacodec media - # create QDMA dropbox - mkdir /data/vendor/qdmastats 0700 system system - mkdir /data/vendor/qdma 0770 system system - 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 @@ -241,8 +249,10 @@ on post-fs-data #Create folder of camera mkdir /data/vendor/camera 0770 camera camera - #Change ownership to system - chown system system /data/vendor/tombstones + + #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 @@ -258,21 +268,8 @@ on post-fs-data mkdir /data/vendor/wifi/wpa 0770 wifi wifi mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi - #create port-bridge log dir - mkdir /data/vendor/port_bridge 0770 radio radio - chmod 0770 /data/vendor/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 QTI dir for logs - mkdir /data/vendor/dataqti 0770 radio radio - chmod 0770 /data/vendor/dataqti + # Create the directories used by WiGig Sensing + mkdir /data/vendor/sensing 0770 system wifi # Create the directories used by CnE subsystem mkdir /data/vendor/connectivity 0771 radio radio @@ -287,6 +284,7 @@ on post-fs-data # 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 @@ -308,6 +306,7 @@ 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 @@ -317,18 +316,17 @@ 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 directories for wifihal services + mkdir /dev/socket/wifihal 0770 wifi wifi + chmod 2770 /dev/socket/wifihal # Create /data/time folder for time-services mkdir /data/vendor/time/ 0700 system system setprop vold.post_fs_data_done 1 - # Create FM dir for patchdownloader + #Create FM dir for patchdownloader mkdir /data/vendor/fm 0770 system system chmod 0770 /data/vendor/fm @@ -380,7 +378,7 @@ on post-fs-data mkdir /data/vendor/vpp 0770 media media #Create dir for TUI - mkdir /data/vendor/tui 0700 system system + mkdir /data/vendor/tui 0700 system drmrpc #Start move time data to /data/vendor once post-fs-data done start vendor.move_time_data @@ -432,17 +430,17 @@ on property:ro.vendor.iocgrp.config=1 write /dev/blkio/blkio.weight 1000 write /dev/blkio/bg/blkio.weight 100 -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.ssr.enable_debug=* + write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} -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.mba_boot_timeout=* + write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_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.modem_auth_timeout=* + write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_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.sys.pil_proxy_timeout=* + write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} on property:persist.vendor.ssr.restart_level=* start vendor.ssr_setup @@ -455,11 +453,18 @@ on property:persist.vendor.ssr.enable_ramdumps=1 on property:persist.vendor.ssr.enable_ramdumps=0 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 +on property:persist.vendor.sys.rawdump_copy=1 + write /sys/kernel/dload/emmc_dload 1 + +on property:persist.vendor.sys.rawdump_copy=0 + write /sys/kernel/dload/emmc_dload 0 + on property:sys.boot_completed=1 write /dev/kmsg "Boot completed " - #Reset read ahead for dm-0 and dm-1 to 512kb + #Reset read ahead for dm-0, dm-1 and dm-2 to 512kb write /sys/block/dm-0/queue/read_ahead_kb 512 write /sys/block/dm-1/queue/read_ahead_kb 512 + write /sys/block/dm-2/queue/read_ahead_kb 512 #WDSP FW boot sysfs node used by STHAL chown media audio /sys/kernel/wdsp0/boot chown media audio /sys/kernel/wcd_cpe0/fw_name @@ -487,18 +492,15 @@ on property:vendor.bluetooth.dun.status=stopped on property:ro.bluetooth.ftm_enabled=true start ftmd -on property:vendor.bluetooth.startbtsnoop=true - start vendor.btsnoop - -on property:vendor.bluetooth.startbtsnoop=false - stop vendor.btsnoop - on property:vendor.bluetooth.startbtlogger=true start vendor.bt_logger on property:vendor.bluetooth.startbtlogger=false stop vendor.bt_logger +on property:vendor.media.target.version=* + setprop vendor.sys.media.target.version ${vendor.media.target.version} + service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh class core user root @@ -507,17 +509,12 @@ service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh service qcom-c_main-sh /vendor/bin/init.class_main.sh class main user root - oneshot - -service qcom-c_late-sh /vendor/bin/init.class_late.sh - class late_start - user root + group root system oneshot on property:vold.decrypt=trigger_restart_framework start qcom-c_main-sh start wcnss-service - start qcom-c_late-sh on property:persist.env.fastdorm.enabled=true setprop persist.radio.data_no_toggle 1 @@ -533,29 +530,6 @@ service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config" 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 - class core - user root - -on property:vendor.wc_transport.start_hci=true - start vendor.start_hci_filter - -on property:vendor.wc_transport.start_hci=false - stop vendor.start_hci_filter - -service vendor.start_hci_filter /system/vendor/bin/wcnss_filter - class late_start - user bluetooth - group bluetooth diag system wakelock - seclabel u:r:bluetooth:s0 - disabled - service vendor.bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0 class late_start user bluetooth @@ -563,13 +537,6 @@ service vendor.bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0 disabled oneshot -service vendor.btsnoop /system/bin/btsnoop - user bluetooth - group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw - class late_start - disabled - oneshot - service vendor.bt_logger /system/bin/bt_logger user bluetooth group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw @@ -584,60 +551,17 @@ service ftmd /system/bin/logwrapper /system/bin/ftmdaemon disabled oneshot -service vendor.port-bridge /system/vendor/bin/port-bridge - class main - user radio - group radio system inet - disabled - oneshot - service qmiproxy /system/bin/qmiproxy class main user radio group radio diag disabled -# QMUX must be in multiple groups to support external process connections -service vendor.qmuxd /system/vendor/bin/qmuxd - class main - user root - group radio audio bluetooth gps nfc diag - disabled - -service vendor.netmgrd /system/vendor/bin/netmgrd - class main - disabled - -service vendor.ipacm-diag /system/vendor/bin/ipacm-diag - class main - user radio - socket ipacm_log_file dgram 660 radio radio - group radio diag oem_2901 - disabled - -service vendor.ipacm /system/vendor/bin/ipacm - class main - user radio - group radio inet - disabled - -service vendor.dataqti /system/vendor/bin/qti - class main - user radio - group radio oem_2901 diag usb net_admin - disabled - -service vendor.dataadpl /system/vendor/bin/adpl - class main - user radio - group radio oem_2901 diag usb net_admin - disabled - -service vendor.sensors /vendor/bin/sscrpcd - class core +service vendor.sensors /vendor/bin/sscrpcd sensorspd + class early_hal user system - group system - disabled + group system wakelock + capabilities BLOCK_SUSPEND service vendor.sensors.qti /vendor/bin/sensors.qti class core @@ -645,10 +569,6 @@ service vendor.sensors.qti /vendor/bin/sensors.qti group system disabled -on property:ro.vendor.use_data_netmgrd=false - # netmgr not supported on specific target - stop vendor.netmgrd - # Adjust socket buffer to enlarge TCP receive window for high bandwidth # but only if ro.data.large_tcp_window_size property is set. on property:ro.data.large_tcp_window_size=true @@ -666,7 +586,6 @@ service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ # 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 @@ -676,14 +595,14 @@ service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \ -iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \ -m/data/vendor/wifi/wigig_p2p_supplicant.conf \ -O/data/vendor/wifi/wigig_sockets -dd \ - -e/data/vendor/wifi/wigig_entropy.bin -g@android:wpa_wigig0 \ + -e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0 \ -S wigigsvc # 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 class main - socket wpa_wigig0 dgram 660 wifi wifi + socket wigig/wpa_wigig0 dgram 660 wifi wifi disabled oneshot @@ -695,41 +614,23 @@ service vendor.move_wifi_data /system/bin/move_wifi_data.sh 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 - group wifi - capabilities NET_ADMIN NET_RAW - class main - disabled - oneshot - -# FST Manager with supplicant - connect to supplicant socket -service fstman_wlan0 /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini \ - -a 0 @android:vendor_wpa_wlan0 - user wifi - group wifi - capabilities NET_ADMIN NET_RAW - class main - disabled - oneshot - -service wigighalsvc /vendor/bin/wigighalsvc - interface vendor.qti.hardware.wigig.supptunnel@1.0::ISuppTunnelProvider default +service wigignpt /vendor/bin/wigignpt + interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default class hal + socket wigig/wigignpt stream 660 system wifi user system group wifi - # needed for on-demand insmod/rmmod of wigig module - capabilities SYS_MODULE + capabilities NET_ADMIN disabled -service wigignpt /vendor/bin/wigignpt - interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default +on property:persist.vendor.wigig.npt.enable=1 + start wigignpt + +service vendor.sensingdaemon /vendor/bin/sensingdaemon class hal - socket wigignpt stream 660 system wifi + socket wigig/sensingdaemon stream 660 system wifi user system group wifi - capabilities NET_ADMIN disabled service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG @@ -795,18 +696,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 -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 - -on property:persist.vendor.data.shs_ko_load=0 - exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_shs - -on property:persist.vendor.data.perf_ko_load=1 - exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_perf - -on property:persist.vendor.data.perf_ko_load=0 - exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_perf - service cnss-daemon /system/vendor/bin/cnss-daemon -n -l class late_start user system @@ -845,11 +734,6 @@ 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 @@ -929,10 +813,8 @@ 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 class main capabilities NET_ADMIN NET_RAW user wifi @@ -985,10 +867,12 @@ service profiler_daemon /system/bin/profiler_daemon group root disabled -service charger /charger +service charger /system/bin/charger class charger - group system graphics - seclabel u:r:healthd:s0 + user system + group system graphics input + capabilities SYS_BOOT + seclabel u:r:charger:s0 service vendor.ssr_diag /system/vendor/bin/ssr_diag class late_start @@ -1107,14 +991,25 @@ service poweroffhandler /system/vendor/bin/poweroffhandler disabled oneshot - on property:vendor.display.lcd_density=* setprop ro.sf.lcd_density ${vendor.display.lcd_density} -service vendor.vppservice /vendor/bin/vppservice +# 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 /vendor/bin/time_daemon class main - user media - group camera + user system + group system + capabilities SYS_TIME # Set vendor-ril lib path based on Meta version on property:vendor.rild.libpath=* @@ -1155,7 +1050,6 @@ service chre /vendor/bin/chre socket chre seqpacket 0660 root system shutdown critical - on property:vendor.chre.enabled=0 stop chre @@ -1173,18 +1067,12 @@ on property:vendor.opengles.version=* 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 + 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 @@ -1192,6 +1080,7 @@ service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service # 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@5.0::IDevicesFactory default interface android.hardware.audio@4.0::IDevicesFactory default interface android.hardware.audio@2.0::IDevicesFactory default |