Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.40 KB | None | 0 0
  1. # Copyright (c) 2009-2012, 2014, 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.target.rc
  30.  
  31. on early-init
  32. mount debugfs debugfs /sys/kernel/debug
  33. mkdir /firmware 0771 system system
  34. mkdir /system 0777 root root
  35. symlink /data/tombstones /tombstones
  36. write /sys/block/mmcblk0/queue/scheduler noop
  37. write /sys/block/mmcblk0/bdi/read_ahead_kb 512
  38.  
  39. on init
  40. # Set permissions for persist partition
  41. mkdir /persist 0771 system system
  42.  
  43. # See storage config details at http://source.android.com/tech/storage/
  44. mkdir /mnt/shell/emulated 0700 shell shell
  45. mkdir /storage/emulated 0555 root root
  46. mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
  47. mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw
  48. mkdir /mnt/media_rw/uicc0 0700 media_rw media_rw
  49. mkdir /storage/sdcard1 0700 root root
  50. mkdir /storage/uicc0 0700 root root
  51. mkdir /storage/usbdisk 0700 root root
  52.  
  53. export EXTERNAL_STORAGE /storage/emulated/legacy
  54. export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
  55. export EMULATED_STORAGE_TARGET /storage/emulated
  56. export SECONDARY_STORAGE /storage/sdcard1
  57.  
  58. # Support legacy paths
  59. symlink /storage/emulated/legacy /sdcard
  60. symlink /storage/emulated/legacy /mnt/sdcard
  61. symlink /storage/emulated/legacy /storage/sdcard0
  62. symlink /mnt/shell/emulated/0 /storage/emulated/legacy
  63. symlink /storage/usbdisk /usbdisk
  64. symlink /storage/usbdisk /mnt/usbdisk
  65.  
  66. on fs
  67. mount_all fstab.qcom
  68. mkdir /persist/data 0700 system system
  69. restorecon_recursive /persist
  70. setprop ro.crypto.fuse_sdcard true
  71.  
  72. on post-fs
  73. export_rc /system/etc/init.cne.rc
  74.  
  75. # msm specific files that need to be created on /data
  76. on post-fs-data
  77.  
  78. mkdir /data/misc/camera 0770 camera camera
  79.  
  80. #Create PERFD deamon related dirs
  81. mkdir /data/misc/perfd 0770 root system
  82. chmod 2770 /data/misc/perfd
  83. mkdir /data/misc/perfd 0755 root system
  84. chmod 2755 /data/misc/perfd
  85. mkdir /data/system/perfd 0770 root system
  86. chmod 2770 /data/system/perfd
  87.  
  88. # NFC local data and nfcee xml storage
  89. mkdir /data/nfc 0770 nfc nfc
  90. mkdir /data/nfc/param 0770 nfc nfc
  91.  
  92. mkdir /data/media 0770 media_rw media_rw
  93. restorecon_recursive /data/media
  94.  
  95. mkdir /data/tombstones 0771 system system
  96. mkdir /tombstones/modem 0771 system system
  97. mkdir /tombstones/lpass 0771 system system
  98. mkdir /tombstones/wcnss 0771 system system
  99. mkdir /tombstones/dsps 0771 system system
  100.  
  101. mkdir /persist/data/sfs 0700 system system
  102. mkdir /persist/data/tz 0700 system system
  103.  
  104. mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
  105.  
  106. # Create the directories used by the Wireless subsystem
  107. mkdir /data/misc/wifi 0770 wifi wifi
  108. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  109. mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
  110. mkdir /data/misc/dhcp 0770 dhcp dhcp
  111. chown dhcp dhcp /data/misc/dhcp
  112.  
  113. # Create the directories used by CnE subsystem
  114. mkdir /data/connectivity 0771 system system
  115. chown system system /data/connectivity
  116.  
  117. mkdir /data/connectivity/nsrm 0771 system system
  118. chown system system /data/connectivity/nsrm
  119.  
  120. # Create the directories used by DPM subsystem
  121. mkdir /data/dpm 0771 system system
  122. chown system system /data/dpm
  123.  
  124. mkdir /data/dpm/fdMgr 0771 system system
  125. chown system system /data/dpm/fdMgr
  126.  
  127. # Create directory used by audio subsystem
  128. mkdir /data/misc/audio 0770 audio audio
  129. restorecon_recursive /data/misc/audio
  130.  
  131. # Create directory used by the DASH client
  132. mkdir /data/misc/dash 0770 media audio
  133.  
  134. # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
  135. # We chown/chmod /persist again so because mount is run as root + defaults
  136. chown system system /persist
  137. chmod 0771 /persist
  138. chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
  139. chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
  140. chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
  141. chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
  142.  
  143. # Chown polling nodes as needed from UI running on system server
  144. chown system system /sys/devices/platform/msm_sdcc.1/polling
  145. chown system system /sys/devices/platform/msm_sdcc.2/polling
  146. chown system system /sys/devices/platform/msm_sdcc.3/polling
  147. chown system system /sys/devices/platform/msm_sdcc.4/polling
  148.  
  149. #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
  150. mkdir /data/system 0775 system system
  151. #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
  152.  
  153. #Create directories for Location services
  154. mkdir /data/misc/location 0770 gps gps
  155. mkdir /data/misc/location/mq 0770 gps gps
  156. mkdir /data/misc/location/xtwifi 0770 gps gps
  157. mkdir /data/misc/location/gpsone_d 0770 system gps
  158. mkdir /data/misc/location/quipc 0770 gps system
  159. mkdir /data/misc/location/gsiff 0770 gps gps
  160.  
  161. #Create directory from IMS services
  162. mkdir /data/shared 0755
  163. chown system system /data/shared
  164.  
  165. #Create directory for FOTA
  166. mkdir /data/fota 0771
  167. chown system system /data/fota
  168.  
  169. #Create directory for hostapd
  170. mkdir /data/hostapd 0770 system wifi
  171.  
  172. # Create /data/time folder for time-services
  173. mkdir /data/time/ 0700 system system
  174. restorecon_recursive /data/time
  175.  
  176. mkdir /data/audio/ 0770 media audio
  177.  
  178. setprop vold.post_fs_data_done 1
  179.  
  180. #Create a folder for SRS to be able to create a usercfg file
  181. mkdir /data/data/media 0770 media media
  182.  
  183. on early-boot
  184. # set RLIMIT_MEMLOCK to 64MB
  185. setrlimit 8 67108864 67108864
  186. # Allow subsystem (modem etc) debugging
  187. write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
  188. write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
  189. write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
  190. write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
  191. write /sys/kernel/boot_adsp/boot 1
  192.  
  193. on boot
  194. chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
  195. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  196. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  197. chown bluetooth bluetooth /proc/bluetooth/sleep/proto
  198. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
  199. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
  200. chown system system /sys/module/sco/parameters/disable_esco
  201. chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
  202. chmod 0660 /sys/module/bluetooth_power/parameters/power
  203. chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
  204. chmod 0660 /sys/class/rfkill/rfkill0/state
  205. chmod 0660 /proc/bluetooth/sleep/proto
  206. chown bluetooth bluetooth /dev/ttyHS0
  207. chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
  208. chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
  209. chmod 0660 /dev/ttyHS0
  210. chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
  211. chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
  212.  
  213. chmod 0660 /dev/ttyHS2
  214. chown bluetooth bluetooth /dev/ttyHS2
  215.  
  216. #Create QMUX deamon socket area
  217. mkdir /dev/socket/qmux_radio 0770 radio radio
  218. chmod 2770 /dev/socket/qmux_radio
  219. mkdir /dev/socket/qmux_audio 0770 media audio
  220. chmod 2770 /dev/socket/qmux_audio
  221. mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
  222. chmod 2770 /dev/socket/qmux_bluetooth
  223. mkdir /dev/socket/qmux_gps 0770 gps gps
  224. chmod 2770 /dev/socket/qmux_gps
  225.  
  226. setprop wifi.interface wlan0
  227.  
  228. # Define TCP buffer sizes for various networks
  229. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  230. setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
  231.  
  232.  
  233. setprop ro.telephony.call_ring.multiple false
  234.  
  235. #Set SUID bit for usbhub
  236. chmod 4755 /system/bin/usbhub
  237. chmod 755 /system/bin/usbhub_init
  238.  
  239. #Remove SUID bit for iproute2 ip tool
  240. chmod 0755 /system/bin/ip
  241.  
  242.  
  243. chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
  244.  
  245. #For bridgemgr daemon to inform the USB driver of the correct transport
  246. chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
  247.  
  248. # yulong add tw 20140822
  249. # change file owner for factory test
  250. chown system system /sys/devices/virtual/touchscreen/touchscreen_dev/firmware_version
  251. chown system system /sys/devices/virtual/touchscreen/touchscreen_dev/firmware_update
  252. chown system system /sys/devices/virtual/touchscreen/touchscreen_dev/calibrate
  253.  
  254. # Define TCP buffer sizes for various networks
  255. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  256. setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
  257. setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
  258. setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
  259. setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
  260. setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
  261. setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
  262. setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
  263. setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
  264. setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
  265. setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
  266.  
  267. # Assign TCP buffer thresholds to be ceiling value of technology maximums
  268. # Increased technology maximums should be reflected here.
  269. write /proc/sys/net/core/rmem_max 2097152
  270. write /proc/sys/net/core/wmem_max 2097152
  271.  
  272. #To allow interfaces to get v6 address when tethering is enabled
  273. write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
  274. write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
  275. write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
  276. write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
  277. write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
  278. write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
  279. write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
  280. write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
  281. write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
  282. write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
  283. write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
  284. write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
  285. write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
  286. write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
  287. write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
  288. write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
  289. write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
  290. write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
  291. write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
  292. write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
  293.  
  294. # To prevent out of order acknowledgements from making
  295. # connection tracking to treat them as not belonging to
  296. # the connection they belong to.
  297. # Otherwise, a weird issue happens in which some long
  298. # connections on high-throughput links get dropped when
  299. # an ack packet comes out of order
  300. write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
  301.  
  302. # Set the console loglevel to < KERN_INFO
  303. # Set the default message loglevel to KERN_INFO
  304. write /proc/sys/kernel/printk "6 6 1 7"
  305.  
  306. # Allow access for CCID command/response timeout configuration
  307. chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
  308.  
  309. # Torch
  310. chown system camera /sys/class/leds/torch-light/brightness
  311. chmod 0660 /sys/class/leds/torch-light/brightness
  312.  
  313. # Touchscreen
  314. chown root system /sys/devices/virtual/touchscreen/touchscreen_dev/gesture_ctrl
  315. chmod 0660 /sys/devices/virtual/touchscreen/touchscreen_dev/gesture_ctrl
  316.  
  317. # charger
  318. chown system system /sys/bus/i2c/drivers/lc709203/batt_capacity
  319. chmod 0660 /sys/bus/i2c/drivers/lc709203/batt_capacity
  320.  
  321. chown root system /sys/devices/soc.0/78b9000.i2c/i2c-5/5-005d/keypad_enable
  322. chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-005d/keypad_enable
  323.  
  324. # camera sockets
  325. mkdir /data/misc/camera 0770 camera camera
  326.  
  327. # color
  328. chown system system /sys/devices/virtual/graphics/fb0/rgb
  329. chmod 0660 /sys/devices/virtual/graphics/fb0/rgb
  330.  
  331. on property:service.bootanim.exit=1
  332. write /sys/module/lpm_levels/system/performance/cpu0/wfi/idle_enabled Y
  333. write /sys/module/lpm_levels/system/performance/cpu1/wfi/idle_enabled Y
  334. write /sys/module/lpm_levels/system/performance/cpu2/wfi/idle_enabled Y
  335. write /sys/module/lpm_levels/system/performance/cpu3/wfi/idle_enabled Y
  336. write /sys/module/lpm_levels/system/power/cpu4/wfi/idle_enabled Y
  337. write /sys/module/lpm_levels/system/power/cpu5/wfi/idle_enabled Y
  338. write /sys/module/lpm_levels/system/power/cpu6/wfi/idle_enabled Y
  339. write /sys/module/lpm_levels/system/power/cpu7/wfi/idle_enabled Y
  340. write /sys/module/lpm_levels/system/performance/cpu0/standalone_pc/idle_enabled Y
  341. write /sys/module/lpm_levels/system/performance/cpu1/standalone_pc/idle_enabled Y
  342. write /sys/module/lpm_levels/system/performance/cpu2/standalone_pc/idle_enabled Y
  343. write /sys/module/lpm_levels/system/performance/cpu3/standalone_pc/idle_enabled Y
  344. write /sys/module/lpm_levels/system/power/cpu4/standalone_pc/idle_enabled Y
  345. write /sys/module/lpm_levels/system/power/cpu5/standalone_pc/idle_enabled Y
  346. write /sys/module/lpm_levels/system/power/cpu6/standalone_pc/idle_enabled Y
  347. write /sys/module/lpm_levels/system/power/cpu7/standalone_pc/idle_enabled Y
  348. write /sys/module/lpm_levels/system/performance/cpu0/pc/idle_enabled Y
  349. write /sys/module/lpm_levels/system/performance/cpu1/pc/idle_enabled Y
  350. write /sys/module/lpm_levels/system/performance/cpu2/pc/idle_enabled Y
  351. write /sys/module/lpm_levels/system/performance/cpu3/pc/idle_enabled Y
  352. write /sys/module/lpm_levels/system/power/cpu4/pc/idle_enabled Y
  353. write /sys/module/lpm_levels/system/power/cpu5/pc/idle_enabled Y
  354. write /sys/module/lpm_levels/system/power/cpu6/pc/idle_enabled Y
  355. write /sys/module/lpm_levels/system/power/cpu7/pc/idle_enabled Y
  356. write /sys/module/lpm_levels/system/performance/cpu0/pc/suspend_enabled Y
  357. write /sys/module/lpm_levels/system/performance/cpu1/pc/suspend_enabled Y
  358. write /sys/module/lpm_levels/system/performance/cpu2/pc/suspend_enabled Y
  359. write /sys/module/lpm_levels/system/performance/cpu3/pc/suspend_enabled Y
  360. write /sys/module/lpm_levels/system/power/cpu4/pc/suspend_enabled Y
  361. write /sys/module/lpm_levels/system/power/cpu5/pc/suspend_enabled Y
  362. write /sys/module/lpm_levels/system/power/cpu6/pc/suspend_enabled Y
  363. write /sys/module/lpm_levels/system/power/cpu7/pc/suspend_enabled Y
  364. write /sys/module/lpm_levels/system/power/power-l2-pc/idle_enabled Y
  365. write /sys/module/lpm_levels/system/power/power-l2-active/idle_enabled Y
  366. write /sys/module/lpm_levels/system/power/power-l2-pc/idle_enabled Y
  367. write /sys/module/lpm_levels/system/performance/performance-l2-active/idle_enabled Y
  368. write /sys/module/lpm_levels/system/performance/performance-l2-pc/idle_enabled Y
  369. write /sys/module/lpm_levels/system/power/power-l2-pc/suspend_enabled Y
  370. write /sys/module/lpm_levels/system/performance/performance-l2-pc/suspend_enabled Y
  371. write /sys/module/lpm_levels/system/system-cci-active/idle_enabled Y
  372. write /sys/module/lpm_levels/system/system-cci-retention/idle_enabled Y
  373. write /sys/module/lpm_levels/system/system-cci-pc/idle_enabled Y
  374. write /sys/module/lpm_levels/system/system-cci-pc/suspend_enabled Y
  375.  
  376. write /sys/module/lpm_levels/parameters/sleep_disabled 0
  377. write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 10
  378.  
  379. write /sys/class/devfreq/qcom,cpubw.61/governor "bw_hwmon"
  380. write /sys/class/devfreq/qcom,cpubw.61/bw_hwmon/io_percent 20
  381. write /sys/class/devfreq/qcom,gpubw.38/governor "bw_hwmon"
  382. write /sys/class/devfreq/qcom,gpubw.38/bw_hwmon/io_percent 40
  383.  
  384. on property:init.svc.bootanim=stopped
  385. # Apply HMP task packing
  386. write /proc/sys/kernel/sched_small_task 20
  387. write /proc/sys/kernel/sched_mostly_idle_load 30
  388. write /proc/sys/kernel/sched_mostly_idle_nr_run 3
  389.  
  390. write /sys/module/msm_thermal/core_control/enabled 0
  391.  
  392. # enable governor for perf cluster
  393. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
  394. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay "20000 1113600:50000"
  395. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load 85
  396. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate 20000
  397. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq 1113600
  398. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy 0
  399. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads "1 960000:85 1113600:90 1344000:80"
  400. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time 50000
  401. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis 50000
  402. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 960000
  403. write /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load 1
  404.  
  405. # enable governor for power cluster
  406. write /sys/devices/system/cpu/cpu4/online 1
  407. write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor "interactive"
  408. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay "25000 800000:50000"
  409. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load 90
  410. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate 40000
  411. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq 998400
  412. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy 0
  413. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads "1 800000:90"
  414. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time 40000
  415. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis 40000
  416. write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 800000
  417. write /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load 1
  418. write /sys/module/msm_thermal/core_control/enabled 1
  419.  
  420. # bring all CPUs online
  421. write /sys/devices/system/cpu/cpu1/online 1
  422. write /sys/devices/system/cpu/cpu2/online 1
  423. write /sys/devices/system/cpu/cpu3/online 1
  424. write /sys/devices/system/cpu/cpu5/online 1
  425. write /sys/devices/system/cpu/cpu6/online 1
  426. write /sys/devices/system/cpu/cpu7/online 1
  427.  
  428. write /proc/sys/kernel/sched_window_stats_policy 2
  429. write /proc/sys/kernel/sched_upmigrate 75
  430. write /proc/sys/kernel/sched_downmigrate 60
  431. write /proc/sys/kernel/sched_ravg_hist_size 5
  432.  
  433. #write /sys/module/cpu_boost/parameters/boost_ms 20
  434. #write /sys/module/cpu_boost/parameters/sched_boost_on_input 1
  435.  
  436. write /sys/devices/system/cpu/cpu0/sched_mostly_idle_load 30
  437. write /sys/devices/system/cpu/cpu1/sched_mostly_idle_load 30
  438. write /sys/devices/system/cpu/cpu2/sched_mostly_idle_load 30
  439. write /sys/devices/system/cpu/cpu3/sched_mostly_idle_load 30
  440. write /sys/devices/system/cpu/cpu4/sched_mostly_idle_load 30
  441. write /sys/devices/system/cpu/cpu5/sched_mostly_idle_load 30
  442. write /sys/devices/system/cpu/cpu6/sched_mostly_idle_load 30
  443. write /sys/devices/system/cpu/cpu7/sched_mostly_idle_load 30
  444.  
  445. write /sys/block/mmcblk0/queue/scheduler row
  446. start perfd
  447.  
  448. on property:init.svc.wpa_supplicant=stopped
  449. stop dhcpcd
  450.  
  451. on property:bluetooth.isEnabled=true
  452. start btwlancoex
  453. write /sys/class/bluetooth/hci0/idle_timeout 7000
  454.  
  455. on property:vold.decrypt=trigger_restart_framework
  456. start config_bluetooth
  457.  
  458. on property:persist.env.fastdorm.enabled=true
  459. setprop persist.radio.data_no_toggle 1
  460.  
  461. # Turn on adb for factory test mode
  462. on property:ro.boot.ftm=1
  463. trigger property:sys.usb.config=mtp,adb
  464.  
  465. service irsc_util /system/bin/irsc_util "/etc/sec_config"
  466. class main
  467. user root
  468. oneshot
  469.  
  470. service rmt_storage /system/bin/rmt_storage
  471. class core
  472. user root
  473. disabled
  474.  
  475. on property:ro.boot.emmc=true
  476. start rmt_storage
  477.  
  478. service rfs_access /system/bin/rfs_access
  479. class core
  480. user system
  481. group system net_raw
  482.  
  483. on property:ro.boot.emmc=true
  484. start rfs_access
  485.  
  486. service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
  487. class core
  488. user root
  489. seclabel u:r:bluetooth_loader:s0
  490. oneshot
  491.  
  492. service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
  493. class late_start
  494. user bluetooth
  495. group bluetooth net_bt_admin
  496. disabled
  497. seclabel u:r:bluetooth_loader:s0
  498. oneshot
  499.  
  500. on property:bluetooth.hciattach=true
  501. start hciattach
  502.  
  503. on property:bluetooth.hciattach=false
  504. setprop bluetooth.status off
  505.  
  506. # QMUX must be in multiple groups to support external process connections
  507. service qmuxd /system/bin/qmuxd
  508. class main
  509. user root
  510. group radio audio bluetooth gps qcom_diag
  511.  
  512. service netmgrd /system/bin/netmgrd
  513. class main
  514.  
  515. on property:ro.use_data_netmgrd=false
  516. # netmgr not supported on specific target
  517. stop netmgrd
  518.  
  519. # Adjust socket buffer to enlarge TCP receive window for high bandwidth
  520. # but only if ro.data.large_tcp_window_size property is set.
  521. on property:ro.data.large_tcp_window_size=true
  522. write /proc/sys/net/ipv4/tcp_adv_win_scale 2
  523.  
  524. service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
  525. class late_start
  526. user bluetooth
  527. group bluetooth net_bt_admin inet net_admin net_raw
  528. disabled
  529. oneshot
  530.  
  531. service p2p_supplicant /system/bin/wpa_supplicant \
  532. -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
  533. -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
  534. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  535. -I/system/etc/wifi/wpa_supplicant_overlay.conf \
  536. -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
  537. -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  538. # we will start as root and wpa_supplicant will switch to user wifi
  539. # after setting up the capabilities required for WEXT
  540. # user wifi
  541. # group wifi inet keystore
  542. class main
  543. socket wpa_wlan0 dgram 660 wifi wifi
  544. disabled
  545. oneshot
  546.  
  547. service wpa_supplicant /system/bin/wpa_supplicant \
  548. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  549. -I/system/etc/wifi/wpa_supplicant_overlay.conf \
  550. -O/data/misc/wifi/sockets \
  551. -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  552. # we will start as root and wpa_supplicant will switch to user wifi
  553. # after setting up the capabilities required for WEXT
  554. # user wifi
  555. # group wifi inet keystore
  556. class main
  557. socket wpa_wlan0 dgram 660 wifi wifi
  558. disabled
  559. oneshot
  560.  
  561. service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
  562. class late_start
  563. disabled
  564. oneshot
  565.  
  566. service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
  567. class late_start
  568. disabled
  569. oneshot
  570.  
  571. service iprenew_wlan0 /system/bin/dhcpcd -n
  572. class late_start
  573. disabled
  574. oneshot
  575.  
  576. service iprenew_p2p /system/bin/dhcpcd -n
  577. class late_start
  578. disabled
  579. oneshot
  580.  
  581. service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
  582. class late_start
  583. disabled
  584. oneshot
  585.  
  586. service iprenew_bt-pan /system/bin/dhcpcd -n
  587. class late_start
  588. disabled
  589. oneshot
  590.  
  591. service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
  592. disabled
  593. oneshot
  594.  
  595. service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
  596. disabled
  597. oneshot
  598.  
  599. service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
  600. disabled
  601. oneshot
  602.  
  603. service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
  604. disabled
  605. oneshot
  606.  
  607. service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
  608. disabled
  609. oneshot
  610.  
  611. service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
  612. class late_start
  613. disabled
  614. oneshot
  615.  
  616. service iprenew_eth0 /system/bin/dhcpcd -n
  617. class late_start
  618. disabled
  619. oneshot
  620.  
  621. service loc_launcher /system/bin/loc_launcher
  622. #loc_launcher will start as root and set its uid to gps
  623. class late_start
  624. group gps inet net_raw qcom_diag net_admin wifi
  625.  
  626. service wifi-crda /system/bin/sh /system/etc/init.crda.sh
  627. class late_start
  628. user root
  629. disabled
  630. oneshot
  631.  
  632. service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
  633. class late_start
  634. user root
  635. group root
  636. oneshot
  637. disabled
  638.  
  639. on property:ro.data.large_tcp_window_size=true
  640. # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
  641. write /proc/sys/net/ipv4/tcp_adv_win_scale 2
  642.  
  643. on property:ro.product.cpu.abi=arm64-v8a
  644. setprop rild.libpath /system/vendor/lib64/libril-qc-qmi-1.so
  645.  
  646. on property:ro.product.cpu.abi=armeabi-v7a
  647. setprop rild.libpath /system/vendor/lib/libril-qc-qmi-1.so
  648.  
  649. service ril-daemon1 /system/bin/rild -c 2
  650. class main
  651. socket rild2 stream 660 root radio
  652. socket rild-debug2 stream 660 radio system
  653. user root
  654. group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
  655.  
  656. service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
  657. class late_start
  658.  
  659. service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
  660. class late_start
  661. disabled
  662.  
  663. service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk
  664. class late_start
  665. disabled
  666.  
  667. service charger /charger
  668. class charger
  669. group log
  670. seclabel u:r:healthd:s0
  671.  
  672. service ssr_diag /system/bin/ssr_diag
  673. class late_start
  674. user system
  675. group system
  676.  
  677. service hvdcp /system/bin/hvdcp
  678. class core
  679. user root
  680. disabled
  681.  
  682. on property:persist.usb.hvdcp.detect=true
  683. start hvdcp
  684.  
  685. on property:persist.usb.hvdcp.detect=false
  686. stop hvdcp
  687.  
  688. service vm_bms /system/bin/vm_bms
  689. user root
  690. group root
  691. disabled
  692.  
  693. #start camera server as daemon
  694. service qcamerasvr /system/bin/mm-qcamera-daemon
  695. class main
  696. user camera
  697. group camera system inet input graphics
  698.  
  699. # Allow usb charging to be disabled peristently
  700. on property:persist.usb.chgdisabled=1
  701. write /sys/class/power_supply/battery/charging_enabled 0
  702.  
  703. on property:persist.usb.chgdisabled=0
  704. write /sys/class/power_supply/battery/charging_enabled 1
  705.  
  706. service qseecomd /system/bin/qseecomd
  707. class core
  708. user root
  709. group root
  710.  
  711. #service perfd /system/bin/perfd
  712. class main
  713. user root
  714. group root
  715. disabled
  716.  
  717. service thermal-engine /system/bin/thermal-engine
  718. class main
  719. user root
  720. group root
  721.  
  722. service time_daemon /system/bin/time_daemon
  723. class late_start
  724. user root
  725. group root
  726.  
  727. service audiod /system/bin/audiod
  728. class late_start
  729. user system
  730. group system
  731.  
  732. on charger
  733. chown root system /sys/class/power_supply/bms/current_now
  734. chown root system /sys/class/power_supply/bms/voltage_ocv
  735. chmod 0664 /sys/class/power_supply/bms/current_now
  736. chmod 0664 /sys/class/power_supply/bms/voltage_ocv
  737. write /sys/module/lpm_levels/system/performance/cpu0/wfi/idle_enabled Y
  738. write /sys/module/lpm_levels/system/performance/cpu1/wfi/idle_enabled Y
  739. write /sys/module/lpm_levels/system/performance/cpu2/wfi/idle_enabled Y
  740. write /sys/module/lpm_levels/system/performance/cpu3/wfi/idle_enabled Y
  741. write /sys/module/lpm_levels/system/power/cpu4/wfi/idle_enabled Y
  742. write /sys/module/lpm_levels/system/power/cpu5/wfi/idle_enabled Y
  743. write /sys/module/lpm_levels/system/power/cpu6/wfi/idle_enabled Y
  744. write /sys/module/lpm_levels/system/power/cpu7/wfi/idle_enabled Y
  745. write /sys/module/lpm_levels/system/performance/cpu0/standalone_pc/idle_enabled Y
  746. write /sys/module/lpm_levels/system/performance/cpu1/standalone_pc/idle_enabled Y
  747. write /sys/module/lpm_levels/system/performance/cpu2/standalone_pc/idle_enabled Y
  748. write /sys/module/lpm_levels/system/performance/cpu3/standalone_pc/idle_enabled Y
  749. write /sys/module/lpm_levels/system/power/cpu4/standalone_pc/idle_enabled Y
  750. write /sys/module/lpm_levels/system/power/cpu5/standalone_pc/idle_enabled Y
  751. write /sys/module/lpm_levels/system/power/cpu6/standalone_pc/idle_enabled Y
  752. write /sys/module/lpm_levels/system/power/cpu7/standalone_pc/idle_enabled Y
  753. write /sys/module/lpm_levels/system/performance/cpu0/pc/idle_enabled Y
  754. write /sys/module/lpm_levels/system/performance/cpu1/pc/idle_enabled Y
  755. write /sys/module/lpm_levels/system/performance/cpu2/pc/idle_enabled Y
  756. write /sys/module/lpm_levels/system/performance/cpu3/pc/idle_enabled Y
  757. write /sys/module/lpm_levels/system/power/cpu4/pc/idle_enabled Y
  758. write /sys/module/lpm_levels/system/power/cpu5/pc/idle_enabled Y
  759. write /sys/module/lpm_levels/system/power/cpu6/pc/idle_enabled Y
  760. write /sys/module/lpm_levels/system/power/cpu7/pc/idle_enabled Y
  761. write /sys/module/lpm_levels/system/performance/cpu0/pc/suspend_enabled N
  762. write /sys/module/lpm_levels/system/performance/cpu1/pc/suspend_enabled Y
  763. write /sys/module/lpm_levels/system/performance/cpu2/pc/suspend_enabled Y
  764. write /sys/module/lpm_levels/system/performance/cpu3/pc/suspend_enabled Y
  765. write /sys/module/lpm_levels/system/power/cpu4/pc/suspend_enabled Y
  766. write /sys/module/lpm_levels/system/power/cpu5/pc/suspend_enabled Y
  767. write /sys/module/lpm_levels/system/power/cpu6/pc/suspend_enabled Y
  768. write /sys/module/lpm_levels/system/power/cpu7/pc/suspend_enabled Y
  769. write /sys/module/lpm_levels/system/power/power-l2-pc/idle_enabled Y
  770. write /sys/module/lpm_levels/system/power/power-l2-active/idle_enabled Y
  771. write /sys/module/lpm_levels/system/power/power-l2-pc/idle_enabled Y
  772. write /sys/module/lpm_levels/system/performance/performance-l2-active/idle_enabled Y
  773. write /sys/module/lpm_levels/system/performance/performance-l2-pc/idle_enabled Y
  774. write /sys/module/lpm_levels/system/power/power-l2-pc/suspend_enabled Y
  775. write /sys/module/lpm_levels/system/performance/performance-l2-pc/suspend_enabled Y
  776. write /sys/module/lpm_levels/system/system-cci-active/idle_enabled Y
  777. write /sys/module/lpm_levels/system/system-cci-retention/idle_enabled Y
  778. write /sys/module/lpm_levels/system/system-cci-pc/idle_enabled Y
  779. write /sys/module/lpm_levels/system/system-cci-pc/suspend_enabled Y
  780. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
  781. start vm_bms
  782.  
  783. service ppd /system/bin/mm-pp-daemon
  784. class late_start
  785. disabled
  786. user system
  787. socket pps stream 0660 system system
  788. group system graphics
  789.  
  790. on property:init.svc.surfaceflinger=stopped
  791. stop ppd
  792.  
  793. on property:init.svc.surfaceflinger=running
  794. start ppd
  795.  
  796. service wcnss-service /system/bin/wcnss_service
  797. class main
  798. user system
  799. group system wifi radio
  800.  
  801. service msm_irqbalance /system/bin/msm_irqbalance -p 0,0,0,0,1,1,1,1
  802. class core
  803. user root
  804. group root
  805.  
  806. service setup_fs /system/bin/setup_fs /dev/block/platform/7824900.sdhci/by-name/userdata
  807. class core
  808. user root
  809. group root
  810. oneshot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement