Guest User

Untitled

a guest
Mar 18th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.00 KB | None | 0 0
  1. # Copyright (c) 2009-2012, 2014-2015, 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.  
  28. import init.qcom.usb.rc
  29. import init.qcom.power.rc
  30. import init.target.rc
  31. import init.board.sensors.rc
  32.  
  33. on early-init
  34. symlink /dev/diag_lge /dev/diag
  35. mount debugfs debugfs /sys/kernel/debug
  36. mkdir /firmware 0771 system system
  37. mkdir /system 0777 root root
  38. symlink /data/tombstones /tombstones
  39.  
  40. on init
  41.  
  42. export LD_SHIM_LIBS /system/lib/libril.so|liblge.so:/system/lib/libril.so|liblge.so:/system/vendor/lib/lib-imsvt.so|libshims_ims.so
  43.  
  44. # Set permissions for persist partition
  45. mkdir /persist 0771 system system
  46.  
  47. mkdir /persist-lg 0771 system system
  48. mkdir /sns 0775 system system
  49. mkdir /mpt 0755 system system
  50.  
  51. symlink /sdcard /storage/sdcard0
  52.  
  53. write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
  54.  
  55. chown system system /sys/class/leds/red/pattern_id
  56. chmod 0664 /sys/class/leds/red/pattern_id
  57. chown system system /sys/class/leds/red/brightness
  58. chmod 0644 /sys/class/leds/red/brightness
  59.  
  60. on fs
  61. mount_all fstab.qcom
  62. mkdir /persist/data 0700 system system
  63. restorecon_recursive /persist
  64. setprop ro.crypto.fuse_sdcard true
  65.  
  66. # msm specific files that need to be created on /data
  67. on post-fs-data
  68. # Create directory for TZ Apps
  69. mkdir /data/misc/qsee 0770 system system
  70.  
  71. # we will remap this as /mnt/sdcard with the sdcard fuse tool
  72. mkdir /data/misc/camera 0770 camera camera
  73.  
  74. mkdir /data/misc/ipa 0700 net_admin net_admin
  75.  
  76. mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
  77.  
  78. # Create the directories used by the Wireless subsystem
  79. mkdir /data/misc/wifi 0770 wifi wifi
  80. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  81. mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
  82. mkdir /data/misc/dhcp 0770 dhcp dhcp
  83. #chown dhcp dhcp /data/misc/dhcp
  84. chown dhcp system /data/misc/dhcp
  85.  
  86. # Create the directories used by CnE subsystem
  87. mkdir /data/connectivity 0771 system system
  88. chown system system /data/connectivity
  89.  
  90. # Create the directories used by DPM subsystem
  91. mkdir /data/dpm 0771 system system
  92. chown system system /data/dpm
  93.  
  94. mkdir /data/dpm/nsrm 0771 system system
  95. chown system system /data/dpm/nsrm
  96.  
  97. # Create directory used by audio subsystem
  98. mkdir /data/misc/audio 0770 audio audio
  99.  
  100. # Create directory used by the DASH client
  101. mkdir /data/misc/dash 0770 media audio
  102.  
  103. # Create directory used by display clients
  104. mkdir /data/misc/display 0770 system graphics
  105. mkdir /persist/display 0770 system graphics
  106.  
  107. # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
  108. # We chown/chmod /persist again so because mount is run as root + defaults
  109. chown system system /persist
  110. chmod 0771 /persist
  111. chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
  112. chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
  113. chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
  114. chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
  115.  
  116. # Chown polling nodes as needed from UI running on system server
  117. chown system system /sys/devices/platform/msm_sdcc.1/polling
  118. chown system system /sys/devices/platform/msm_sdcc.2/polling
  119. chown system system /sys/devices/platform/msm_sdcc.3/polling
  120. chown system system /sys/devices/platform/msm_sdcc.4/polling
  121.  
  122. # Allow Torch app use torch
  123. chown system system /sys/class/leds/led:flash_torch/brightness
  124. chmod 0666 /sys/class/leds/led:flash_torch/brightness
  125.  
  126. #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
  127. mkdir /data/system 0775 system system
  128. #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
  129.  
  130. #Create directories for Location services
  131. mkdir /data/misc/location 0770 gps gps
  132. mkdir /data/misc/location/mq 0770 gps gps
  133. mkdir /data/misc/location/xtwifi 0770 gps gps
  134. mkdir /data/misc/location/gpsone_d 0770 system gps
  135. mkdir /data/misc/location/quipc 0770 gps system
  136. mkdir /data/misc/location/gsiff 0770 gps gps
  137.  
  138. #Create directory from IMS services
  139. mkdir /data/shared 0755
  140. chown system system /data/shared
  141.  
  142. #Create directory for FOTA
  143. mkdir /data/fota 0771
  144. chown system system /data/fota
  145.  
  146. #Create directory for hostapd
  147. mkdir /data/hostapd 0770 system wifi
  148.  
  149. # Create /data/time folder for time-services
  150. mkdir /data/time/ 0700 system system
  151.  
  152. mkdir /data/audio/ 0770 media audio
  153.  
  154. setprop vold.post_fs_data_done 1
  155.  
  156. #Create a folder for SRS to be able to create a usercfg file
  157. mkdir /data/data/media 0770 media media
  158.  
  159. #Create folder for qlogd
  160. mkdir /data/misc/qlogd 0664
  161.  
  162. #Create folder for mm-qcamera-daemon
  163. mkdir /data/camera 0770 media camera
  164.  
  165. #Create PERFD deamon related dirs
  166. mkdir /data/misc/perfd 0755 root system
  167. chmod 2755 /data/misc/perfd
  168. mkdir /data/system/perfd 0770 root system
  169. chmod 2770 /data/system/perfd
  170. mkdir /persist/drm 0770 system system
  171.  
  172. # Sensor
  173. mkdir /persist/sensors 0770 system system
  174.  
  175. #Create FM dir for patchdownloader
  176. mkdir /data/misc/fm 0770 system system
  177. chmod 0770 /data/misc/fm
  178.  
  179. mkdir /data/tombstones 0771 system system
  180. mkdir /tombstones/modem 0771 system system
  181. mkdir /tombstones/lpass 0771 system system
  182. mkdir /tombstones/wcnss 0771 system system
  183. mkdir /tombstones/dsps 0771 system system
  184. mkdir /persist/data/sfs 0700 system system
  185. mkdir /persist/data/tz 0700 system system
  186. mkdir /data/misc/dts 0770 media audio
  187.  
  188. chown system system /mpt
  189. chmod 0775 /mpt
  190.  
  191. # persist-lg
  192. chown system system /persist-lg
  193. chmod 0771 /persist-lg
  194.  
  195. chmod 0755 /sns
  196. chown system system /sns
  197. mkdir /data/misc/sensor 0775 system system
  198. restorecon_recursive /data/misc/sensor
  199.  
  200. # Ugly sensors hack
  201. write /sys/devices/virtual/input/lge_accelerometer/enable 1
  202. write /sys/devices/virtual/input/lge_magnetometer/enable 1
  203. write /sys/devices/virtual/input/lge_proximity/enable 1
  204. write /sys/devices/virtual/input/lge_light/enable 1
  205.  
  206. #Proximity sensor
  207. chown system system /sys/class/input/event0/device/enable
  208. chmod 0660 /sys/class/input/event0/device/enable
  209.  
  210. #FM Radio
  211. mkdir /data/misc/fm 0770 system system
  212. chmod 0770 /data/misc/fm
  213.  
  214. service baseband-sh /system/bin/sh /init.baseband.sh
  215. class late_start
  216. user root
  217. oneshot
  218. disabled
  219.  
  220. write /proc/sys/vm/vfs_cache_pressure 10000
  221.  
  222. # restart qcamerasvr when restarting mediaserver and servicemanager
  223. on property:init.svc.media=restarting
  224. restart qcamerasvr
  225. on property:init.svc.servicemanager=restarting
  226. restart qcamerasvr
  227.  
  228. on early-boot
  229. # set RLIMIT_MEMLOCK to 64MB
  230. setrlimit 8 67108864 67108864
  231. # Allow subsystem (modem etc) debugging
  232. write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
  233. write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
  234. write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
  235. write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
  236. write /sys/kernel/boot_adsp/boot 1
  237. chown root audio /sys/kernel/boot_adsp/boot
  238.  
  239. on boot
  240. chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
  241. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  242. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  243. chown bluetooth bluetooth /proc/bluetooth/sleep/proto
  244. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
  245. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
  246. chown system system /sys/module/sco/parameters/disable_esco
  247. chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
  248. chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
  249. chmod 0660 /sys/module/bluetooth_power/parameters/power
  250. chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
  251. chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
  252. chmod 0660 /sys/class/rfkill/rfkill0/state
  253. chmod 0660 /proc/bluetooth/sleep/proto
  254. chown bluetooth bluetooth /dev/ttyHS0
  255. chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
  256. chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
  257. chmod 0660 /dev/ttyHS0
  258. chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
  259. chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
  260.  
  261. chmod 0644 /proc/cmdline
  262.  
  263. chmod 0660 /dev/ttyHS2
  264. chown bluetooth bluetooth /dev/ttyHS2
  265.  
  266. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/device/extldo
  267. chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
  268.  
  269. #FM Radio
  270. chmod 0644 /dev/radio0
  271. chown fm_radio fm_radio /dev/radio0
  272. setprop ro.fm.module QCT
  273.  
  274. #Create QMUX deamon socket area
  275. mkdir /dev/socket/qmux_radio 0770 radio radio
  276. chmod 2770 /dev/socket/qmux_radio
  277. mkdir /dev/socket/qmux_audio 0770 media audio
  278. chmod 2770 /dev/socket/qmux_audio
  279. mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
  280. chmod 2770 /dev/socket/qmux_bluetooth
  281. mkdir /dev/socket/qmux_gps 0770 gps gps
  282. chmod 2770 /dev/socket/qmux_gps
  283.  
  284. mkdir /persist/drm 0770 system system
  285. mkdir /persist/misc 0770 system system
  286.  
  287. #Create NETMGR daemon socket area
  288. mkdir /dev/socket/netmgr 0750 radio radio
  289.  
  290. setprop wifi.interface wlan0
  291.  
  292. # permissions for NFC
  293. chmod 0600 /dev/bcm2079x
  294. chown nfc nfc /dev/bcm2079x
  295. chmod 0600 /dev/pn547
  296. chown nfc nfc /dev/pn547
  297. setprop debug.nfc.fw_download "true"
  298. setprop debug.nfc.fw_boot_download "false"
  299.  
  300. # HAL looks for pn54x but kernel driver uses pn547
  301. symlink /dev/pn547 /dev/pn54x
  302.  
  303. # Define TCP buffer sizes for various networks
  304. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  305. setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
  306.  
  307. setprop ro.telephony.call_ring.multiple false
  308.  
  309. #Remove SUID bit for iproute2 ip tool
  310. chmod 0755 /system/bin/ip
  311.  
  312. chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
  313.  
  314. #For bridgemgr daemon to inform the USB driver of the correct transport
  315. chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
  316.  
  317. # Define TCP buffer sizes for various networks
  318. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  319. setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
  320. setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
  321. setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
  322. setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
  323. setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
  324. setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
  325. setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
  326. setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
  327. setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
  328. setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
  329.  
  330. # Assign TCP buffer thresholds to be ceiling value of technology maximums
  331. # Increased technology maximums should be reflected here.
  332. write /proc/sys/net/core/rmem_max 8388608
  333. write /proc/sys/net/core/wmem_max 8388608
  334.  
  335. #To allow interfaces to get v6 address when tethering is enabled
  336. write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
  337. write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
  338. write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
  339. write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
  340. write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
  341. write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
  342. write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
  343. write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
  344. write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
  345. write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
  346. write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
  347. write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
  348. write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
  349. write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
  350. write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
  351. write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
  352. write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
  353. write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
  354. write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
  355. write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
  356.  
  357. # To prevent out of order acknowledgements from making
  358. # connection tracking to treat them as not belonging to
  359. # the connection they belong to.
  360. # Otherwise, a weird issue happens in which some long
  361. # connections on high-throughput links get dropped when
  362. # an ack packet comes out of order
  363. write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
  364.  
  365. # Set the console loglevel to < KERN_INFO
  366. # Set the default message loglevel to KERN_INFO
  367. write /proc/sys/kernel/printk "6 6 1 7"
  368.  
  369. # Allow access for CCID command/response timeout configuration
  370. chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
  371.  
  372. # Mark the copy complete flag to not completed
  373. write /data/misc/radio/copy_complete 0
  374. chown radio radio /data/misc/radio/copy_complete
  375. chmod 0660 /data/misc/radio/copy_complete
  376.  
  377. # Set the premission for idle_time
  378. chown system graphics /sys/class/graphics/fb0/idle_time
  379. chmod 0664 /sys/class/graphics/fb0/idle_time
  380.  
  381. write /dev/wcnss_wlan ""
  382.  
  383. # Flashlight
  384. chown system system /sys/class/leds/torch-light/brightness
  385. chmod 0666 /sys/class/leds/torch-light/brightness
  386.  
  387. # START touch_driver
  388. chown system system /sys/devices/virtual/input/lge_touch/incoming_call
  389. chmod 664 /sys/devices/virtual/input/lge_touch/incoming_call
  390. chown system system /sys/devices/virtual/input/lge_touch/ime_status
  391. chown system lgkeyguard /sys/devices/virtual/input/lge_touch/keyguard
  392. chmod 664 /sys/devices/virtual/input/lge_touch/keyguard
  393. chown system system /sys/devices/virtual/input/lge_touch/ts_noise_log_enable
  394. chmod 664 /sys/devices/virtual/input/lge_touch/ts_noise_log_enable
  395. chown system system /sys/devices/virtual/input/lge_touch/ts_noise
  396. chmod 664 /sys/devices/virtual/input/lge_touch/ts_noise
  397. chown system system /sys/devices/virtual/input/lge_touch/sensing_test
  398. chmod 664 /sys/devices/virtual/input/lge_touch/sensing_test
  399. chown system system /sys/devices/virtual/input/lge_touch/hidden_normal_cal_state
  400. chmod 664 /sys/devices/virtual/input/lge_touch/hidden_normal_cal_state
  401. chown system system /sys/devices/virtual/input/lge_touch/hidden_lpwg_cal_state
  402. chmod 664 /sys/devices/virtual/input/lge_touch/hidden_lpwg_cal_state
  403. # END touch_driver
  404.  
  405. # START touch_knock_on
  406. chown system system /sys/devices/virtual/input/lge_touch/lpwg_data
  407. chmod 664 /sys/devices/virtual/input/lge_touch/lpwg_data
  408. chown system radio /sys/devices/virtual/input/lge_touch/lpwg_notify
  409. chmod 664 /sys/devices/virtual/input/lge_touch/lpwg_notify
  410. #write /sys/class/devices/virtual/input/lge_touch/lpwg_notify 1
  411. chown system system /sys/devices/virtual/input/lge_touch/lpwg_test_info
  412. chmod 644 /sys/devices/virtual/input/lge_touch/lpwg_test_info
  413. chown system system /sys/devices/virtual/input/lge_touch/lpwg_test_ctrl
  414. chmod 644 /sys/devices/virtual/input/lge_touch/lpwg_test_ctrl
  415. chown system system /sys/devices/virtual/input/lge_touch/touch_wake_up_test
  416. chmod 664 /sys/devices/virtual/input/lge_touch/touch_wake_up_test
  417. chown system system /sys/devices/virtual/input/lge_touch/quick_cover_status
  418. chmod 664 /sys/devices/virtual/input/lge_touch/quick_cover_status
  419. chown system system /sys/devices/virtual/input/lge_touch/knock_on_type
  420. chmod 664 /sys/devices/virtual/input/lge_touch/knock_on_type
  421. chown system system /sys/devices/virtual/input/lge_touch/tap_to_wake
  422. chmod 664 /sys/devices/virtual/input/lge_touch/tap_to_wake
  423. # END touch_knock_on
  424.  
  425. # Permissions for System Server and daemons.
  426. chown radio system /sys/android_power/state
  427. chown radio system /sys/android_power/request_state
  428. chown radio system /sys/android_power/acquire_full_wake_lock
  429. chown radio system /sys/android_power/acquire_partial_wake_lock
  430. chown radio system /sys/android_power/release_wake_lock
  431. chown system system /sys/power/autosleep
  432. chown system system /sys/power/state
  433. chown system system /sys/power/wakeup_count
  434. chown radio system /sys/power/wake_lock
  435. chown radio system /sys/power/wake_unlock
  436. chmod 0660 /sys/power/state
  437. chmod 0660 /sys/power/wake_lock
  438. chmod 0660 /sys/power/wake_unlock
  439.  
  440. chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
  441. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
  442. chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
  443. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
  444. chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
  445. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
  446. chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
  447. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
  448. chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
  449. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
  450. chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
  451. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
  452. chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
  453. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
  454. chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
  455. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
  456. chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
  457. chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
  458. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
  459. chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
  460. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
  461. chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
  462. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
  463.  
  464. # Assume SMP uses shared cpufreq policy for all CPUs
  465. chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  466. chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  467.  
  468. # vm_bms
  469. chown root system /sys/class/power_supply/bms/current_now
  470. chown root system /sys/class/power_supply/bms/voltage_ocv
  471. chmod 0664 /sys/class/power_supply/bms/current_now
  472. chmod 0664 /sys/class/power_supply/bms/voltage_ocv
  473.  
  474. on property:init.svc.wpa_supplicant=stopped
  475. stop dhcpcd
  476.  
  477. on property:vold.decrypt=trigger_restart_framework
  478. start config_bluetooth
  479.  
  480. service cnd /system/bin/cnd
  481. class late_start
  482. socket cnd stream 660 root inet
  483.  
  484. service dpmd /system/bin/dpmd
  485. class late_start
  486. socket dpmd stream 660 root system
  487.  
  488. service irsc_util /system/bin/irsc_util "/etc/sec_config"
  489. class main
  490. user root
  491. oneshot
  492.  
  493. service rmt_storage /system/bin/rmt_storage
  494. class core
  495. user root
  496.  
  497. service rfs_access /system/bin/rfs_access
  498. class core
  499. user root
  500. group system net_raw
  501.  
  502. service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
  503. class core
  504. user root
  505. oneshot
  506.  
  507. service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
  508. class late_start
  509. user bluetooth
  510. group bluetooth net_bt_admin
  511. disabled
  512. oneshot
  513.  
  514. on property:bluetooth.hciattach=true
  515. start hciattach
  516.  
  517. on property:bluetooth.hciattach=false
  518. setprop bluetooth.status off
  519.  
  520. # QMUX must be in multiple groups to support external process connections
  521. service qmuxd /system/bin/qmuxd
  522. class main
  523. user root
  524. group radio audio bluetooth gps diag qcom_diag
  525.  
  526. service netmgrd /system/bin/netmgrd
  527. class main
  528. user root
  529. group radio
  530.  
  531. on property:ro.use_data_netmgrd=false
  532. # netmgr not supported on specific target
  533. stop netmgrd
  534.  
  535. # Adjust socket buffer to enlarge TCP receive window for high bandwidth
  536. # but only if ro.data.large_tcp_window_size property is set.
  537. on property:ro.data.large_tcp_window_size=true
  538. write /proc/sys/net/ipv4/tcp_adv_win_scale 2
  539.  
  540. service p2p_supplicant /system/bin/wpa_supplicant \
  541. -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
  542. -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
  543. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  544. -I/system/etc/wifi/wpa_supplicant_overlay.conf \
  545. -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 -dd \
  546. -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  547. # we will start as root and wpa_supplicant will switch to user wifi
  548. # after setting up the capabilities required for WEXT
  549. # user wifi
  550. # group wifi inet keystore
  551. class main
  552. socket wpa_wlan0 dgram 660 wifi wifi
  553. disabled
  554. oneshot
  555.  
  556. service wpa_supplicant /system/bin/wpa_supplicant \
  557. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  558. -I/system/etc/wifi/wpa_supplicant_overlay.conf \
  559. -O/data/misc/wifi/sockets -dd \
  560. -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  561. # we will start as root and wpa_supplicant will switch to user wifi
  562. # after setting up the capabilities required for WEXT
  563. # user wifi
  564. # group wifi inet keystore
  565. class main
  566. socket wpa_wlan0 dgram 660 wifi wifi
  567. disabled
  568. oneshot
  569.  
  570. service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
  571. class late_start
  572. disabled
  573. oneshot
  574.  
  575. service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
  576. class late_start
  577. disabled
  578. oneshot
  579.  
  580. service iprenew_wlan0 /system/bin/dhcpcd -n
  581. class late_start
  582. disabled
  583. oneshot
  584.  
  585. service iprenew_p2p /system/bin/dhcpcd -n
  586. class late_start
  587. disabled
  588. oneshot
  589.  
  590. service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
  591. class late_start
  592. disabled
  593. oneshot
  594.  
  595. service iprenew_bt-pan /system/bin/dhcpcd -n
  596. class late_start
  597. disabled
  598. oneshot
  599.  
  600. service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
  601. disabled
  602. oneshot
  603.  
  604. service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
  605. disabled
  606. oneshot
  607.  
  608. service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
  609. disabled
  610. oneshot
  611.  
  612. service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
  613. disabled
  614. oneshot
  615.  
  616. service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
  617. disabled
  618. oneshot
  619.  
  620. service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
  621. class late_start
  622. user root
  623. group root
  624. oneshot
  625. disabled
  626.  
  627. on property:ro.data.large_tcp_window_size=true
  628. # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
  629. write /proc/sys/net/ipv4/tcp_adv_win_scale 2
  630.  
  631. service charger /sbin/healthd -c
  632. class charger
  633. critical
  634. seclabel u:r:healthd:s0
  635.  
  636. service qcamerasvr /system/bin/mm-qcamera-daemon
  637. class late_start
  638. user camera
  639. group camera system inet input graphics
  640.  
  641. service qseecomd /system/bin/qseecomd
  642. class core
  643. user root
  644. group root
  645.  
  646. service perfd /system/vendor/bin/perfd
  647. class main
  648. user root
  649. disabled
  650.  
  651. service thermal-engine /system/vendor/bin/thermal-engine
  652. class main
  653. user root
  654. socket thermal-send-client stream 0666 system system
  655. socket thermal-recv-client stream 0660 system system
  656. socket thermal-recv-passive-client stream 0666 system system
  657. group root
  658.  
  659. service time_daemon /system/bin/time_daemon
  660. class late_start
  661. user root
  662. group root
  663.  
  664. service audiod /system/bin/audiod
  665. class late_start
  666. user system
  667. group system
  668.  
  669. service ppd /system/bin/mm-pp-daemon
  670. class late_start
  671. disabled
  672. user system
  673. socket pps stream 0660 system system
  674. group system graphics
  675.  
  676. on property:init.svc.surfaceflinger=stopped
  677. stop ppd
  678.  
  679. on property:init.svc.surfaceflinger=running
  680. start ppd
  681.  
  682. service wcnss-service /system/bin/wcnss_service
  683. class main
  684. user root
  685. group system wifi
  686. oneshot
  687.  
  688. # Sensor daemon
  689. service sensord /system/bin/sensord
  690. class main
  691. user root
  692. group system misc input root
  693.  
  694. on property:init.svc.zygote=restarting
  695. restart sensord
  696.  
  697. service ril-daemon2 /system/bin/rild -c 2
  698. class main
  699. socket rild2 stream 660 root radio
  700. socket rild-debug2 stream 660 radio system
  701. user root
  702. group radio cache inet misc audio sdcard_r sdcard_rw qcom_diag log net_raw
  703.  
  704. service qcom-c_main-sh /system/bin/sh /init.class_main.sh
  705. class main
  706. user root
  707. oneshot
  708.  
  709. on property:gsm.version.baseband=""
  710. start baseband-sh
  711.  
  712. service vm_bms /system/bin/vm_bms
  713. class main
  714. user root
  715. group root wakelock
  716.  
  717. service ims_rtp_daemon /system/bin/ims_rtp_daemon
  718. class main
  719. user system
  720. socket ims_rtpd stream 0660 system radio
  721. group radio diag diag inet log
  722. disabled
  723.  
  724. on property:sys.ims.DATA_DAEMON_STATUS=1
  725. start ims_rtp_daemon
  726.  
  727. service imscmservice /system/bin/imscmservice
  728. class main
  729. user system
  730. group radio diag diag log
  731. disabled
  732.  
  733. on property:sys.ims.DATA_DAEMON_STATUS=1
  734. start imscmservice
  735.  
  736. service imsdatadaemon /system/bin/imsdatadaemon
  737. class main
  738. user system
  739. socket ims_datad stream 0660 system radio
  740. group system wifi radio inet log diag
  741. disabled
  742.  
  743. on property:sys.ims.QMI_DAEMON_STATUS=1
  744. start imsdatadaemon
  745.  
  746. service imsqmidaemon /system/bin/imsqmidaemon
  747. class main
  748. user system
  749. socket ims_qmid stream 0660 system radio
  750. group radio log diag
  751.  
  752. service fm_dl /system/bin/sh /init.qcom.fm.sh
  753. class late_start
  754. user system
  755. group system
  756. oneshot
  757.  
  758. service hwaddrs /system/bin/hwaddrs
  759. class core
  760. user root
  761. group bluetooth wifi
  762. oneshot
  763.  
  764. # Running hwaddrs under init is enforcing 0600, we need more
  765. on property:init.svc.hwaddrs=stopped
  766. chmod 644 /data/misc/wifi/config
  767. chmod 644 /data/misc/bluetooth/bdaddr
Add Comment
Please, Sign In to add comment