init.qcom.rc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. # Copyright (c) 2009-2012, 2014-2021, The Linux Foundation. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are met:
  5. # * Redistributions of source code must retain the above copyright
  6. # notice, this list of conditions and the following disclaimer.
  7. # * Redistributions in binary form must reproduce the above copyright
  8. # notice, this list of conditions and the following disclaimer in the
  9. # documentation and/or other materials provided with the distribution.
  10. # * Neither the name of The Linux Foundation nor
  11. # the names of its contributors may be used to endorse or promote
  12. # products derived from this software without specific prior written
  13. # permission.
  14. #
  15. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  19. # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. #
  27. import /vendor/etc/init/hw/init.qti.ufs.rc
  28. import /vendor/etc/init/hw/init.qcom.usb.rc
  29. import /vendor/etc/init/hw/init.target.rc
  30. on early-init
  31. mount tracefs tracefs /sys/kernel/tracing
  32. chmod 0755 /sys/kernel/tracing
  33. # create symlink for vendor mount points
  34. symlink /vendor/firmware_mnt /firmware
  35. symlink /vendor/bt_firmware /bt_firmware
  36. symlink /vendor/dsp /dsp
  37. # Change ownership of sysfs power control node
  38. chown system graphics /sys/class/drm/card0/device/power/control
  39. #Disable UFS clock scaling
  40. write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0
  41. #Disable UFS auto_hibern8
  42. write /sys/bus/platform/devices/1d84000.ufshc/auto_hibern8 0
  43. #Disable UFS clock gating
  44. write /sys/bus/platform/devices/1d84000.ufshc/clkgate_enable 0
  45. chown root system /dev/kmsg
  46. chmod 0620 /dev/kmsg
  47. # Load WIGIG platform driver
  48. exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
  49. on init
  50. # Support legacy paths
  51. symlink /sdcard /mnt/sdcard
  52. symlink /sdcard /storage/sdcard0
  53. # Create cgroup mount point for memory
  54. mkdir /sys/fs/cgroup/memory/bg 0750 root system
  55. write /sys/fs/cgroup/memory/bg/memory.swappiness 140
  56. write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
  57. chown root system /sys/fs/cgroup/memory/bg/tasks
  58. chmod 0660 /sys/fs/cgroup/memory/bg/tasks
  59. on post-fs
  60. on early-boot
  61. # set RLIMIT_MEMLOCK to 64MB
  62. setrlimit 8 67108864 67108864
  63. exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
  64. setprop ro.sf.lcd_density ${vendor.display.lcd_density}
  65. chown system system /mnt/vendor/persist/data/pfm/licenses
  66. chmod 0775 /mnt/vendor/persist/data/pfm/licenses
  67. chown system system /mnt/vendor/persist/data/pfm/licenses/store_0
  68. chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_0
  69. chown system system /mnt/vendor/persist/data/pfm/licenses/store_1
  70. chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_1
  71. chown system system /mnt/vendor/persist/data/pfm/licenses/store_2
  72. chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_2
  73. chown system system /mnt/vendor/persist/data/pfm/licenses/store_3
  74. chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_3
  75. chown system system /mnt/vendor/persist/data/pfm/licenses/store_4
  76. chmod 0664 /mnt/vendor/persist/data/pfm/licenses/store_4
  77. on boot
  78. chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
  79. chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
  80. chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
  81. chown bluetooth bluetooth /proc/bluetooth/sleep/proto
  82. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
  83. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
  84. chown system system /sys/module/sco/parameters/disable_esco
  85. chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
  86. chown system system /sys/module/msm_core/parameters/polling_interval
  87. chown system system /sys/module/msm_core/parameters/disabled
  88. chown system system /sys/kernel/boot_slpi/ssr
  89. chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
  90. chmod 0660 /sys/module/bluetooth_power/parameters/power
  91. chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
  92. chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
  93. chmod 0660 /sys/class/rfkill/rfkill0/state
  94. chmod 0660 /proc/bluetooth/sleep/proto
  95. chown bluetooth net_bt /dev/ttyHS0
  96. chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
  97. chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
  98. chmod 0660 /dev/ttyHS0
  99. chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
  100. chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
  101. chmod 0660 /dev/ttyHS2
  102. chown bluetooth bluetooth /dev/ttyHS2
  103. chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
  104. chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
  105. chown media audio /sys/kernel/snd_card/card_state
  106. # This location is used by QCRIL to host UNIX domain
  107. # socket files used for internal IPC within QCRIL
  108. # modules
  109. mkdir /dev/socket/qmux_radio 0770 radio radio
  110. chmod 2770 /dev/socket/qmux_radio
  111. mkdir /persist/drm 0770 system system
  112. mkdir /persist/bluetooth 0770 bluetooth bluetooth
  113. mkdir /persist/misc 0770 system system
  114. mkdir /persist/alarm 0770 system system
  115. mkdir /mnt/vendor/persist/time 0770 system system
  116. mkdir /mnt/vendor/persist/secnvm 0770 system system
  117. mkdir /mnt/vendor/persist/iar_db 0770 system system
  118. mkdir /mnt/vendor/spunvm 0770 system system
  119. #Create WIGIG socket area
  120. mkdir /dev/socket/wigig 0770 wifi wifi
  121. setprop wifi.interface wlan0
  122. setprop ro.telephony.call_ring.multiple false
  123. #Remove SUID bit for iproute2 ip tool
  124. chmod 0755 /system/bin/ip
  125. chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
  126. setprop net.tcp.2g_init_rwnd 10
  127. # To prevent out of order acknowledgements from making
  128. # connection tracking to treat them as not belonging to
  129. # the connection they belong to.
  130. # Otherwise, a weird issue happens in which some long
  131. # connections on high-throughput links get dropped when
  132. # an ack packet comes out of order
  133. write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
  134. # Allow access for CCID command/response timeout configuration
  135. chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
  136. # bond0 used by FST Manager
  137. chown wifi wifi /sys/class/net/bond0/bonding/queue_id
  138. # Allow access to dload sysfs node
  139. chown root system /sys/kernel/dload/emmc_dload
  140. chmod 0660 /sys/kernel/dload/emmc_dload
  141. chown root system /dev/block/bootdevice/by-name/ramdump
  142. chmod 0660 /dev/block/bootdevice/by-name/ramdump
  143. chown root system /sys/kernel/dload/dload_mode
  144. chmod 0660 /sys/kernel/dload/dload_mode
  145. chown root graphics /sys/module/msm_drm/parameters/dsi_display0
  146. chmod 0640 /sys/module/msm_drm/parameters/dsi_display0
  147. chown root graphics /sys/module/msm_drm/parameters/dsi_display1
  148. chmod 0640 /sys/module/msm_drm/parameters/dsi_display1
  149. chown system system /sys/class/backlight/panel0-backlight/brightness
  150. chown system system /sys/class/backlight/panel0-backlight/max_brightness
  151. chown system system /sys/class/backlight/panel1-backlight/brightness
  152. chown system system /sys/class/backlight/panel1-backlight/max_brightness
  153. # Allow access to sensors device attributes
  154. chown system system /sys/class/sensors/MPU6050-accel/enable
  155. chown system system /sys/class/sensors/MPU6050-accel/poll_delay
  156. chown system system /sys/class/sensors/MPU6050-gyro/enable
  157. chown system system /sys/class/sensors/MPU6050-gyro/poll_delay
  158. chown system system /sys/class/sensors/apds9930-light/enable
  159. chown system system /sys/class/sensors/apds9930-light/poll_delay
  160. chown system system /sys/class/sensors/apds9930-proximity/enable
  161. chown system system /sys/class/sensors/apds9930-proximity/poll_delay
  162. # Create directory used for display
  163. # for backward compatibility
  164. mkdir /persist/display 0770 system graphics
  165. mkdir /mnt/vendor/persist/display 0770 system graphics
  166. # Create vpp directory
  167. mkdir /mnt/vendor/persist/vpp 0770 media media
  168. # Create hvdcp_opti directory
  169. mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
  170. # limit discard size to 128MB in order to avoid long IO latency
  171. write /sys/block/sda/queue/discard_max_bytes 134217728
  172. # msm specific files that need to be created on /data
  173. on post-fs-data
  174. mkdir /data/vendor/misc 01771 system system
  175. # Create directory used for dump collection
  176. mkdir /data/vendor/ssrdump 0770 root system
  177. # Create directory used by display clients
  178. mkdir /data/vendor/display 0770 system graphics
  179. # Change lm related dirs
  180. mkdir /data/vendor/lm 0700 root root
  181. # Create directory used by powermodule
  182. mkdir /data/vendor/pwr 0700 root root
  183. # Create directory used by media clients
  184. mkdir /data/vendor/media 0770 mediacodec media
  185. # Create /data/vendor/tzstorage directory for SFS listener
  186. mkdir /data/vendor/tzstorage 0770 system system
  187. # Create directory for apps access via QTEEConnector
  188. mkdir /data/vendor/qtee 0770 system system
  189. #Create folder of camera
  190. mkdir /data/vendor/camera 0770 camera camera
  191. #Create directory for tftp
  192. mkdir /data/vendor/tombstones 0771 system system
  193. mkdir /data/vendor/tombstones/rfs 0771 system system
  194. mkdir /data/vendor/ramdump 0771 root system
  195. mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
  196. mkdir /data/vendor/ramdump/bluetooth 0770 bluetooth bluetooth
  197. # Create the directories used by the Wireless subsystem
  198. mkdir /data/vendor/wifi 0770 wifi wifi
  199. mkdir /data/vendor/wifi/sockets 0770 wifi wifi
  200. mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
  201. mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi
  202. mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi
  203. mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi
  204. mkdir /data/vendor/wifi/wpa 0770 wifi wifi
  205. mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
  206. # Create the directories used by WiGig Sensing
  207. mkdir /data/vendor/sensing 0770 system wifi
  208. # Create the directories used by CnE subsystem
  209. mkdir /data/vendor/connectivity 0771 radio radio
  210. chown radio radio /data/vendor/connectivity
  211. # Create directory used by audio subsystem
  212. mkdir /data/vendor/audio 0770 audio audio
  213. # Create directory for audio delta files
  214. mkdir /data/vendor/audio/acdbdata 0770 media audio
  215. mkdir /data/vendor/audio/acdbdata/delta 0770 media audio
  216. # Create directory for radio
  217. mkdir /data/vendor/radio 0770 system radio
  218. rm /data/vendor/radio/shmbus
  219. # Create directory for modem_config
  220. mkdir /data/vendor/modem_config 0570 radio root
  221. # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
  222. # We chown/chmod /persist again so because mount is run as root + defaults
  223. chown root system /persist
  224. chmod 0771 /persist
  225. chown system system /persist/WCNSS_qcom_wlan_nv.bin
  226. chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
  227. chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
  228. chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
  229. chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
  230. # Chown polling nodes as needed from UI running on system server
  231. chown system system /sys/devices/platform/msm_sdcc.1/polling
  232. chown system system /sys/devices/platform/msm_sdcc.2/polling
  233. chown system system /sys/devices/platform/msm_sdcc.3/polling
  234. chown system system /sys/devices/platform/msm_sdcc.4/polling
  235. #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
  236. #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
  237. #Create directories for wifihal services
  238. mkdir /dev/socket/wifihal 0770 wifi wifi
  239. chmod 2770 /dev/socket/wifihal
  240. # Create /data/time folder for time-services
  241. mkdir /data/vendor/time/ 0700 system system
  242. setprop vold.post_fs_data_done 1
  243. #Create a folder for SRS to be able to create a usercfg file
  244. #mkdir /data/data/media 0770 media media
  245. #Create FM dir for patchdownloader
  246. mkdir /data/vendor/fm 0770 system system
  247. chmod 0770 /data/vendor/fm
  248. #Create PERFD deamon related dirs
  249. mkdir /data/vendor/perfd 0770 root system
  250. chmod 2770 /data/vendor/perfd
  251. rm /data/vendor/perfd/default_values
  252. mkdir /data/vendor/secure_element 0777 system system
  253. mkdir /data/vendor/nfc 0770 nfc nfc
  254. #Create IOP deamon related dirs
  255. mkdir /data/vendor/iop 0700 root system
  256. # Mark the copy complete flag to not completed
  257. write /data/vendor/radio/copy_complete 0
  258. chown radio radio /data/vendor/radio/copy_complete
  259. chmod 0660 /data/vendor/radio/copy_complete
  260. # copy prebuilt qcril.db files always
  261. copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db
  262. chown radio radio /data/vendor/radio/qcril_prebuilt.db
  263. chmod 0660 /data/vendor/radio/qcril_prebuilt.db
  264. copy /vendor/radio/qcril_database/qcrilNr.db /data/vendor/radio/qcrilNr_prebuilt.db
  265. copy /vendor/etc/qcril_database/qcrilNr.db /data/vendor/radio/qcrilNr_prebuilt.db
  266. chown radio radio /data/vendor/radio/qcrilNr_prebuilt.db
  267. chmod 0660 /data/vendor/radio/qcrilNr_prebuilt.db
  268. # File flags for prebuilt ril db file
  269. write /data/vendor/radio/prebuilt_db_support 1
  270. chown radio radio /data/vendor/radio/prebuilt_db_support
  271. chmod 0400 /data/vendor/radio/prebuilt_db_support
  272. write /data/vendor/radio/db_check_done 0
  273. chown radio radio /data/vendor/radio/db_check_done
  274. chmod 0660 /data/vendor/radio/db_check_done
  275. # qti-logkit data
  276. mkdir /data/vendor/qti-logkit/ 0771 system system
  277. mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
  278. mkdir /data/vendor/qti-logkit/shared-public/ 2770 system diag
  279. mkdir /data/vendor/qti-logkit/socket-privileged/ 2770 system system
  280. mkdir /data/vendor/qti-logkit/socket-public/ 2750 system diag
  281. mkdir /data/vendor/qti-logkit/logdata/ 2750 system shell
  282. #Create SWAP related dirs
  283. mkdir /data/vendor/swap 0770 root system
  284. chmod 2770 /data/vendor/swap
  285. # set aggressive read ahead for dm-0 and dm-1 during boot up
  286. write /sys/block/dm-0/queue/read_ahead_kb 2048
  287. write /sys/block/dm-1/queue/read_ahead_kb 2048
  288. write /sys/block/dm-2/queue/read_ahead_kb 2048
  289. # Create vpp directory
  290. mkdir /data/vendor/vpp 0770 media media
  291. #Create dir for TUI
  292. mkdir /data/vendor/tui 0700 system drmrpc
  293. service nqnfcinfo /system/vendor/bin/nqnfcinfo
  294. class late_start
  295. group nfc
  296. user system
  297. oneshot
  298. service iop /system/vendor/bin/iop
  299. class main
  300. user root
  301. group root
  302. disabled
  303. socket iop seqpacket 0666 root system
  304. service qcomsysd /system/vendor/bin/qcom-system-daemon
  305. class main
  306. user root
  307. group root diag oem_2901
  308. disabled
  309. on property:persist.vendor.qcomsysd.enabled=1
  310. enable qcomsysd
  311. on property:persist.vendor.qcomsysd.enabled=0
  312. stop qcomsysd
  313. service vendor.ssr_setup /system/vendor/bin/ssr_setup
  314. oneshot
  315. disabled
  316. service vendor.ss_ramdump /system/vendor/bin/subsystem_ramdump
  317. class main
  318. user system
  319. group system
  320. ioprio rt 4
  321. disabled
  322. on property:ro.vendor.iocgrp.config=1
  323. mkdir /dev/blkio
  324. mount cgroup none /dev/blkio blkio
  325. chown system system /dev/blkio
  326. chown system system /dev/blkio/tasks
  327. chmod 0664 /dev/blkio/tasks
  328. mkdir /dev/blkio/bg 0755 system system
  329. chown system system /dev/blkio/bg/tasks
  330. chmod 0664 /dev/blkio/bg/tasks
  331. write /dev/blkio/blkio.weight 1000
  332. write /dev/blkio/bg/blkio.weight 100
  333. on property:persist.sys.ssr.enable_debug=*
  334. write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
  335. on property:persist.sys.mba_boot_timeout=*
  336. write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
  337. on property:persist.sys.modem_auth_timeout=*
  338. write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
  339. on property:persist.sys.pil_proxy_timeout=*
  340. write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
  341. on property:persist.vendor.ssr.restart_level=*
  342. start vendor.ssr_setup
  343. on property:persist.vendor.ssr.enable_ramdumps=1
  344. write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
  345. write /sys/module/qcom_ramdump/parameters/enable_dump_collection 1
  346. mkdir /data/vendor/ramdump_ssr 770 system system
  347. start vendor.ss_ramdump
  348. on property:persist.vendor.ssr.enable_ramdumps=0
  349. write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
  350. write /sys/module/qcom_ramdump/parameters/enable_dump_collection 0
  351. on property:persist.vendor.sys.rawdump_copy=1
  352. write /sys/kernel/dload/emmc_dload 1
  353. on property:persist.vendor.sys.rawdump_copy=0
  354. write /sys/kernel/dload/emmc_dload 0
  355. on property:sys.boot_completed=1
  356. write /dev/kmsg "Boot completed "
  357. #Enable UFS clock scaling back
  358. write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1
  359. #Enable UFS auto_hibern8 back
  360. write /sys/bus/platform/devices/1d84000.ufshc/auto_hibern8 5000
  361. #Enable UFS clock gating back
  362. write /sys/bus/platform/devices/1d84000.ufshc/clkgate_enable 1
  363. #Reset read ahead for dm-0 and dm-1 to 512kb
  364. write /sys/block/dm-0/queue/read_ahead_kb 512
  365. write /sys/block/dm-1/queue/read_ahead_kb 512
  366. #WDSP FW boot sysfs node used by STHAL
  367. chown media audio /sys/kernel/wdsp0/boot
  368. chown media audio /sys/kernel/wcd_cpe0/fw_name
  369. #Reinit lmkd to reconfigure lmkd properties
  370. setprop lmkd.reinit 1
  371. chown media audio /sys/kernel/aud_dev/state
  372. write /sys/devices/virtual/cvp/cvp/boot 1
  373. on property:persist.vendor.radio.atfwd.start=false
  374. stop vendor.atfwd
  375. on property:vendor.radio.atfwd.start=false
  376. stop vendor.atfwd
  377. # corefile limit
  378. on property:persist.debug.trace=1
  379. mkdir /data/core 0777 root root
  380. write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
  381. on property:vendor.media.target.version=*
  382. setprop vendor.sys.media.target.version ${vendor.media.target.version}
  383. on property:vendor.media.target_variant=*
  384. setprop ro.media.xml_variant.codecs ${vendor.media.target_variant}
  385. setprop ro.media.xml_variant.codecs_performance ${vendor.media.target_variant}
  386. service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
  387. class core
  388. user root
  389. oneshot
  390. service qcom-c_main-sh /vendor/bin/init.class_main.sh
  391. class main
  392. user root
  393. group root system
  394. oneshot
  395. on property:vold.decrypt=trigger_restart_framework
  396. start qcom-c_main-sh
  397. start wcnss-service
  398. service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
  399. class core
  400. user vendor_qrtr
  401. group vendor_qrtr
  402. capabilities NET_BIND_SERVICE
  403. service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
  404. class core
  405. user root
  406. oneshot
  407. service qmiproxy /system/bin/qmiproxy
  408. class main
  409. user radio
  410. group radio diag
  411. disabled
  412. service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
  413. -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
  414. -g@android:vendor_wpa_wlan0
  415. # we will start as root and wpa_supplicant will switch to user wifi
  416. # after setting up the capabilities required for WEXT
  417. # user wifi
  418. # group wifi inet keystore
  419. interface aidl android.hardware.wifi.supplicant.ISupplicant/default
  420. interface [email protected]::ISupplicant default
  421. interface [email protected]::ISupplicant default
  422. class main
  423. socket vendor_wpa_wlan0 dgram 660 wifi wifi
  424. disabled
  425. oneshot
  426. service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
  427. -iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
  428. -m/data/vendor/wifi/wigig_p2p_supplicant.conf \
  429. -O/data/vendor/wifi/wigig_sockets -dd \
  430. -e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0
  431. # we will start as root and wpa_supplicant will switch to user wifi
  432. # after setting up the capabilities required for WEXT
  433. # user wifi
  434. # group wifi inet keystore
  435. class main
  436. socket wigig/wpa_wigig0 dgram 660 wifi wifi
  437. disabled
  438. oneshot
  439. # Data Migration
  440. service vendor.move_wifi_data /system/bin/move_wifi_data.sh
  441. class main
  442. user wifi
  443. group wifi
  444. disabled
  445. oneshot
  446. service wigignpt /vendor/bin/wigignpt
  447. interface [email protected]::INetPerfTuner default
  448. class hal
  449. socket wigig/wigignpt stream 660 system wifi
  450. user system
  451. group wifi
  452. capabilities NET_ADMIN
  453. disabled
  454. on property:persist.vendor.wigig.npt.enable=1
  455. start wigignpt
  456. service vendor.sensingdaemon /vendor/bin/sensingdaemon
  457. class hal
  458. socket wigig/sensingdaemon stream 660 system wifi
  459. user system
  460. group wifi
  461. disabled
  462. service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
  463. class late_start
  464. disabled
  465. oneshot
  466. service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG
  467. class late_start
  468. disabled
  469. oneshot
  470. service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
  471. class late_start
  472. disabled
  473. oneshot
  474. service dhcpcd_wigig0 /system/bin/dhcpcd -ABKLG
  475. class late_start
  476. disabled
  477. oneshot
  478. service iprenew_wlan0 /system/bin/dhcpcd -n
  479. class late_start
  480. disabled
  481. oneshot
  482. service iprenew_bond0 /system/bin/dhcpcd -n
  483. class late_start
  484. disabled
  485. oneshot
  486. service iprenew_p2p /system/bin/dhcpcd -n
  487. class late_start
  488. disabled
  489. oneshot
  490. service iprenew_wigig0 /system/bin/dhcpcd -n
  491. class late_start
  492. disabled
  493. oneshot
  494. service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
  495. class main
  496. user wifi
  497. group wifi system inet net_admin
  498. capabilities NET_ADMIN
  499. oneshot
  500. service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
  501. user root
  502. group root
  503. disabled
  504. oneshot
  505. service wifi_ftmd /system/vendor/bin/wifi_ftmd
  506. user system
  507. group system inet net_admin
  508. socket wififtmd_server dgram 0660 system system
  509. disabled
  510. oneshot
  511. on property:vendor.wifi.ftmd.load=true
  512. insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
  513. service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
  514. class late_start
  515. user system
  516. group system inet net_admin wifi
  517. capabilities NET_ADMIN
  518. on property:sys.shutdown.requested=*
  519. write /sys/kernel/shutdown_wlan/shutdown 1
  520. stop cnss-daemon
  521. service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
  522. class late_start
  523. disabled
  524. oneshot
  525. service iprenew_bt-pan /system/bin/dhcpcd -n
  526. class late_start
  527. disabled
  528. oneshot
  529. service ssgqmigd /vendor/bin/ssgqmigd
  530. class late_start
  531. user radio
  532. group radio gps system
  533. socket ssgqmig seqpacket 0660 radio inet
  534. service mlid /vendor/bin/mlid
  535. class late_start
  536. user gps
  537. group gps
  538. socket mlid stream 0666 gps gps
  539. service qcom-sh /vendor/bin/init.qcom.sh
  540. class late_start
  541. user root
  542. group root system radio
  543. oneshot
  544. # Remove since is deprecated but throws AVC denial.
  545. # service crashdata-sh /vendor/bin/init.qcom.crashdata.sh
  546. # class late_start
  547. # user root
  548. # oneshot
  549. service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
  550. class late_start
  551. user root
  552. group root system wakelock graphics
  553. disabled
  554. oneshot
  555. service qti-testscripts /system/bin/sh /product/etc/init.qcom.testscripts.sh
  556. class late_start
  557. user root
  558. disabled
  559. oneshot
  560. seclabel u:r:qti-testscripts:s0
  561. on property:sys.boot_completed=1
  562. start qcom-post-boot
  563. start qti-testscripts
  564. on property:ro.vendor.ril.mbn_copy_completed=1
  565. write /data/vendor/radio/copy_complete 1
  566. service qvop-daemon /vendor/bin/qvop-daemon
  567. class late_start
  568. user system
  569. group system drmrpc
  570. service vendor.atfwd /vendor/bin/ATFWD-daemon
  571. class late_start
  572. user system
  573. group system radio
  574. service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
  575. class main
  576. capabilities NET_ADMIN NET_RAW
  577. user wifi
  578. group wifi
  579. disabled
  580. oneshot
  581. service battery_monitor /system/bin/battery_monitor
  582. user system
  583. group system
  584. disabled
  585. service vendor.ril-daemon2 /vendor/bin/hw/rild -c 2
  586. class main
  587. user radio
  588. disabled
  589. group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
  590. capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
  591. service vendor.ril-daemon3 /vendor/bin/hw/rild -c 3
  592. class main
  593. user radio
  594. disabled
  595. group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log
  596. capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
  597. service profiler_daemon /system/bin/profiler_daemon
  598. class late_start
  599. user root
  600. group root
  601. disabled
  602. service charger /system/bin/charger
  603. class charger
  604. user system
  605. group system graphics input
  606. capabilities SYS_BOOT
  607. seclabel u:r:charger:s0
  608. service vendor.ssr_diag /system/vendor/bin/ssr_diag
  609. class late_start
  610. user system
  611. group system
  612. disabled
  613. service diag_mdlog_start /system/vendor/bin/diag_mdlog
  614. class late_start
  615. user shell
  616. group system oem_2901 sdcard_rw sdcard_r media_rw
  617. disabled
  618. oneshot
  619. service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
  620. class late_start
  621. user shell
  622. group system oem_2901 sdcard_rw sdcard_r media_rw
  623. disabled
  624. oneshot
  625. service qlogd /system/xbin/qlogd
  626. socket qlogd stream 0662 system system
  627. class main
  628. disabled
  629. on property:persist.sys.qlogd=1
  630. start qlogd
  631. on property:persist.sys.qlogd=0
  632. stop qlogd
  633. service vm_bms /vendor/bin/vm_bms
  634. user root
  635. group root
  636. disabled
  637. service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
  638. class core
  639. user root
  640. group root
  641. disabled
  642. service vendor.msm_irqbal_lb /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_little_big.conf
  643. class core
  644. user root
  645. group root
  646. disabled
  647. service vendor.msm_irqbl_sdm630 /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_sdm630.conf
  648. class core
  649. user root
  650. group root
  651. disabled
  652. # service for USERDEBUG
  653. service vendor.LKCore-dbg /vendor/bin/LKCore
  654. class late_start
  655. oneshot
  656. disabled
  657. user root
  658. group root system log diag net_raw
  659. # service for USER
  660. service vendor.LKCore-rel /vendor/bin/LKCore
  661. class late_start
  662. oneshot
  663. disabled
  664. user system
  665. group system log diag
  666. service qseeproxydaemon /system/vendor/bin/qseeproxydaemon
  667. class late_start
  668. user system
  669. group system
  670. service esepmdaemon /system/vendor/bin/esepmdaemon
  671. class core
  672. user system
  673. group nfc
  674. on charger
  675. setprop persist.sys.usb.config mass_storage
  676. start qcom-post-boot
  677. #add poweroffhandler
  678. service poweroffhandler /system/vendor/bin/poweroffhandler
  679. class core
  680. user media
  681. group graphics audio
  682. disabled
  683. oneshot
  684. service time_daemon /vendor/bin/time_daemon
  685. class main
  686. user system
  687. group system
  688. capabilities SYS_TIME
  689. # Set vendor-ril lib path based on Meta version
  690. on property:vendor.rild.libpath=*
  691. setprop rild.libpath ${vendor.rild.libpath}
  692. on property:ro.vendor.radio.noril=*
  693. setprop ro.radio.noril ${ro.vendor.radio.noril}
  694. service vendor.power_off_alarm /vendor/bin/power_off_alarm
  695. class core
  696. group system
  697. disabled
  698. oneshot
  699. service vendor.hbtp /vendor/bin/hbtp_daemon
  700. class main
  701. user system
  702. group system
  703. capabilities SYS_NICE
  704. disabled
  705. service chre /vendor/bin/chre
  706. class late_start
  707. user system
  708. group system
  709. socket chre seqpacket 0660 root system
  710. shutdown critical
  711. on property:vendor.chre.enabled=0
  712. stop chre
  713. service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
  714. class main
  715. disabled
  716. oneshot
  717. keycodes 114 115 116
  718. #Set GPU Opengles version
  719. on property:vendor.opengles.version=*
  720. setprop ro.opengles.version ${vendor.opengles.version}
  721. #Set gpu available frequencies property
  722. on property:vendor.gpu.available_frequencies=*
  723. setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}