PageRenderTime 59ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/rootdir/init.qcom.rc

https://gitlab.com/LiquidSmooth-Devices/android_device_sony_rhine-common
Windows Resource File | 744 lines | 621 code | 123 blank | 0 comment | 0 complexity | a92057ca8c6497b900bb53c9d8483c8c MD5 | raw file
  1. #
  2. # Copyright 2012 The Android Open Source Project
  3. # Copyright (C) 2013 The CyanogenMod Project
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. import init.device.rc
  18. import init.sony.usb.rc
  19. on early-init
  20. write /sys/block/mmcblk0/queue/scheduler noop
  21. mount debugfs debugfs /sys/kernel/debug
  22. chown system system /sys/kernel/debug/kgsl/proc
  23. on init
  24. mkdir /mnt/shell/emulated 0700 shell shell
  25. mkdir /storage/emulated 0555 root root
  26. mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
  27. mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw
  28. mkdir /storage/sdcard1 0775 system system
  29. mkdir /storage/usbdisk 0775 system system
  30. export EXTERNAL_STORAGE /storage/emulated/legacy
  31. export SECONDARY_STORAGE /storage/sdcard1
  32. export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
  33. export EMULATED_STORAGE_TARGET /storage/emulated
  34. # for backwards compatibility
  35. symlink /storage/emulated/legacy /sdcard
  36. symlink /storage/emulated/legacy /mnt/sdcard
  37. symlink /storage/emulated/legacy /storage/sdcard0
  38. symlink /mnt/shell/emulated/0 /storage/emulated/legacy
  39. symlink /storage/sdcard1 /ext_card
  40. symlink /storage/sdcard1 /mnt/ext_card
  41. symlink /storage/usbdisk /usbdisk
  42. symlink /storage/usbdisk /mnt/usbdisk
  43. mkdir /tmp
  44. mount tmpfs tmpfs /tmp nosuid mode=0755,uid=0,gid=0
  45. chmod 0664 /proc/rdtag
  46. chown root system /proc/rdtag
  47. mkdir /dev/bus 0755 root root
  48. mkdir /dev/bus/usb 0755 root root
  49. # create directory for scd
  50. mkdir /dev/socket/scd 0755 system system
  51. # Enable ramdumps from subsystems to dump
  52. # Should be initialized during init
  53. write /sys/bus/msm_subsys/devices/subsys0/restart_level "RELATED"
  54. write /sys/bus/msm_subsys/devices/subsys1/restart_level "RELATED"
  55. write /sys/bus/msm_subsys/devices/subsys2/restart_level "RELATED"
  56. write /sys/bus/msm_subsys/devices/subsys3/restart_level "RELATED"
  57. # Enable panic on out of memory
  58. write /proc/sys/vm/panic_on_oom 2
  59. # Create a tmpfs for dynamic network mounting
  60. mkdir /storage/removable/remote 0700 root system
  61. mount tmpfs tmpfs /storage/removable/remote mode=0755,uid=0,gid=0
  62. # Set the property to indicate type of virtual display to 0
  63. # 0 indicates that virtual display is not a Wifi display and that the
  64. # session is not exercised through RemoteDisplay in the android framework
  65. setprop persist.sys.wfd.virtual 0
  66. on fs
  67. mount_all ./fstab.qcom
  68. setprop ro.crypto.fuse_sdcard true
  69. mkdir /lta-label 0555 system system
  70. wait /dev/block/platform/msm_sdcc.1/by-name/LTALabel
  71. mount ext4 /dev/block/platform/msm_sdcc.1/by-name/LTALabel /lta-label nosuid nodev noatime noexec ro barrier=0
  72. chown system system /lta-label
  73. chmod 0555 /lta-label
  74. on early-boot
  75. # set RLIMIT_MEMLOCK to 64MB
  76. setrlimit 8 67108864 67108864
  77. write /sys/kernel/boot_adsp/boot 1
  78. # Run pre_hw_config.sh before entering charge only mode.
  79. exec /system/bin/sh /system/etc/pre_hw_config.sh
  80. exec /system/bin/sh /system/etc/init.qcom.wifi.sh
  81. on boot
  82. # bring CPUs online
  83. write /sys/module/msm_thermal/core_control/enabled 0
  84. write /sys/devices/system/cpu/cpu1/online 1
  85. write /sys/devices/system/cpu/cpu2/online 1
  86. write /sys/devices/system/cpu/cpu3/online 1
  87. write /sys/module/msm_thermal/core_control/enabled 1
  88. write /sys/module/qpnp_power_on/parameters/forcecrash_on 1
  89. exec /system/bin/btnvtool -O
  90. chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
  91. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  92. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  93. chown bluetooth bluetooth /proc/bluetooth/sleep/proto
  94. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
  95. chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
  96. chown system system /sys/module/sco/parameters/disable_esco
  97. chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
  98. chmod 0660 /sys/module/bluetooth_power/parameters/power
  99. chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
  100. chmod 0660 /sys/class/rfkill/rfkill0/state
  101. chmod 0660 /proc/bluetooth/sleep/proto
  102. chown bluetooth bluetooth /dev/ttyHS0
  103. chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
  104. chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
  105. chmod 0660 /dev/ttyHS0
  106. chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
  107. chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
  108. chmod 0660 /dev/ttyHS2
  109. chown bluetooth bluetooth /dev/ttyHS2
  110. # Create QMUX deamon socket area
  111. mkdir /dev/socket/qmux_radio 0770 radio radio
  112. chmod 2770 /dev/socket/qmux_radio
  113. mkdir /dev/socket/qmux_audio 0770 media audio
  114. chmod 2770 /dev/socket/qmux_audio
  115. mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
  116. chmod 2770 /dev/socket/qmux_bluetooth
  117. mkdir /dev/socket/qmux_gps 0770 gps gps
  118. chmod 2770 /dev/socket/qmux_gps
  119. setprop ro.telephony.call_ring.multiple false
  120. # Remove SUID bit for iproute2 ip tool
  121. chmod 0755 /system/bin/ip
  122. # port-bridge
  123. chmod 0660 /dev/smd0
  124. chown system system /dev/smd0
  125. # BT DUN port-bridge
  126. chmod 0660 /dev/smd7
  127. chown bluetooth bluetooth /dev/smd7
  128. chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
  129. # MDP idle notifier
  130. chown system graphics /sys/class/graphics/fb0/idle_time
  131. chmod 0664 /sys/class/graphics/fb0/idle_time
  132. # Remove write permissions to video related nodes
  133. chown system graphics /sys/class/graphics/fb1/hpd
  134. chown system system /sys/class/graphics/fb1/hdcp/tp
  135. chown system graphics /sys/class/graphics/fb1/vendor_name
  136. chown system graphics /sys/class/graphics/fb1/product_description
  137. chmod 0664 /sys/class/graphics/fb1/hpd
  138. chmod 0664 /sys/class/graphics/fb1/hdcp/tp
  139. chmod 0664 /sys/class/graphics/fb1/vendor_name
  140. chmod 0664 /sys/class/graphics/fb1/product_description
  141. chmod 0664 /sys/class/graphics/fb1/video_mode
  142. chmod 0664 /sys/class/graphics/fb1/format_3d
  143. # create symlink for fb1 as HDMI
  144. symlink /dev/graphics/fb1 /dev/graphics/hdmi
  145. # Change owner and group to get adopter/device ids from MHL driver
  146. chown system system /sys/class/mhl/sii8334/adopter_id
  147. chown system system /sys/class/mhl/sii8334/device_id
  148. # Change permissions for fps_level nodes
  149. chown system graphics /sys/class/graphics/fb0/msm_fb_fps_level
  150. chown system graphics /sys/class/graphics/fb1/msm_fb_fps_level
  151. chown system graphics /sys/class/graphics/fb2/msm_fb_fps_level
  152. chmod 644 /sys/class/graphics/fb0/msm_fb_fps_level
  153. chmod 400 /sys/class/graphics/fb1/msm_fb_fps_level
  154. chmod 400 /sys/class/graphics/fb2/msm_fb_fps_level
  155. # Dynamic fps
  156. chmod 644 /sys/devices/virtual/graphics/fb0/dynamic_fps
  157. chown system graphics /sys/devices/virtual/graphics/fb0/dynamic_fps
  158. # For bridgemgr daemon to inform the USB driver of the correct transport
  159. chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
  160. # For setting tcp delayed ack
  161. chown system system /sys/kernel/ipv4/tcp_delack_seg
  162. chown system system /sys/kernel/ipv4/tcp_use_userconfig
  163. # Define TCP delayed ack settings for WiFi & LTE
  164. setprop net.tcp.delack.default 1
  165. setprop net.tcp.delack.wifi 20
  166. setprop net.tcp.delack.lte 8
  167. setprop net.tcp.usercfg.default 0
  168. setprop net.tcp.usercfg.wifi 1
  169. setprop net.tcp.usercfg.lte 1
  170. # Assign TCP buffer thresholds to be ceiling value of technology maximums
  171. # Increased technology maximums should be reflected here.
  172. write /proc/sys/net/core/rmem_max 2097152
  173. write /proc/sys/net/core/wmem_max 2097152
  174. chmod 660 /dev/rtc0
  175. chown system system /dev/rtc0
  176. chown root system /proc/net/ip_conntrack
  177. # Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP
  178. write /sys/module/wakelock/parameters/debug_mask 7
  179. #To allow interfaces to get v6 address when tethering is enabled
  180. write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
  181. write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
  182. write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
  183. write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
  184. write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
  185. write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
  186. write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
  187. write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
  188. write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
  189. write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
  190. write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
  191. write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
  192. write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
  193. write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
  194. write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
  195. write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
  196. write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
  197. write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
  198. write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
  199. write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
  200. write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
  201. write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
  202. write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
  203. write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
  204. # To prevent out of order acknowledgements from making
  205. # connection tracking to treat them as not belonging to
  206. # the connection they belong to.
  207. # Otherwise, a weird issue happens in which some long
  208. # connections on high-throughput links get dropped when
  209. # an ack packet comes out of order
  210. write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
  211. # Set the console loglevel to < KERN_INFO
  212. # Set the default message loglevel to KERN_INFO
  213. write /proc/sys/kernel/printk "6 6 1 7"
  214. chown system /sys/devices/virtual/timed_output/vibrator/vtg_level
  215. # charger
  216. chown root system /sys/module/qpnp_charger/parameters/charger_monitor
  217. chown root system /sys/class/power_supply/battery/input_current_max
  218. chown root system /sys/class/power_supply/battery/input_current_trim
  219. chown root system /sys/class/power_supply/battery/voltage_min
  220. chmod 0644 /sys/module/qpnp_charger/parameters/charger_monitor
  221. chmod 0644 /sys/class/power_supply/battery/input_current_max
  222. chmod 0644 /sys/class/power_supply/battery/input_current_trim
  223. chmod 0644 /sys/class/power_supply/battery/voltage_min
  224. chown system system /sys/devices/virtual/graphics/fb0/rgb
  225. chmod 0660 /sys/devices/virtual/graphics/fb0/rgb
  226. on post-fs
  227. exec /system/bin/chargemon
  228. write /sys/class/power_supply/battery/enable_stop_charging_at_low_battery 1
  229. # Change to socket location on libkeyctrl/suntory for /data encryption
  230. mkdir /dev/socket/suntory 0755 system system
  231. # msm specific files that need to be created on /data
  232. on post-fs-data
  233. mkdir /data/media 0770 media_rw media_rw
  234. # Create the directories used by the Wireless subsystem
  235. mkdir /data/misc/wifi 0770 wifi wifi
  236. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  237. mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
  238. mkdir /data/misc/dhcp 0770 dhcp dhcp
  239. # to observe dnsmasq.leases file for dhcp information of soft ap.
  240. chown dhcp dhcp /data/misc/dhcp
  241. # Update WIFI MAC address
  242. mkdir /data/misc/wifi/prima 0775 wifi wifi
  243. mkdir /data/credmgr 0700 system system
  244. mkdir /data/tombstones 0755 system system
  245. mkdir /data/tombstones/vendor 0755 system system
  246. mkdir /data/pc 0700 radio radio
  247. mkdir /data/persist 0770 system system
  248. # Create directory used by audio subsystem
  249. mkdir /data/misc/audio 0770 audio audio
  250. # IR Blaster
  251. chown system system /dev/ttyHSL2
  252. chmod 0660 /dev/ttyHSL2
  253. chown system system /sys/devices/platform/ir_remote_control/enable
  254. chmod 0220 /sys/devices/platform/ir_remote_control/enable
  255. chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
  256. chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
  257. chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
  258. chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
  259. # NFC local data and nfcee xml storage
  260. mkdir /data/nfc 0770 nfc nfc
  261. mkdir /data/nfc/param 0770 nfc nfc
  262. # QCOM Sensors
  263. mkdir /data/system 0775 system system
  264. mkdir /data/system/sensors 0775 system system
  265. mkdir /data/misc/sensors 0775 system system
  266. write /data/system/sensors/settings 1
  267. chmod 664 /data/system/sensors/settings
  268. chown system /data/system/sensors/settings
  269. # Chown polling nodes as needed from UI running on system server
  270. chown system system /sys/devices/platform/msm_sdcc.1/polling
  271. chown system system /sys/devices/platform/msm_sdcc.2/polling
  272. chown system system /sys/devices/platform/msm_sdcc.3/polling
  273. chown system system /sys/devices/platform/msm_sdcc.4/polling
  274. chown system system /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/policy
  275. # Create directories for gpsone_daemon services
  276. mkdir /data/misc/gpsone_d 0770 system gps
  277. # Create directories for QuIPS
  278. mkdir /data/misc/quipc 0770 gps system
  279. # Create directories for Location services
  280. mkdir /data/misc/location 0770 gps gps
  281. mkdir /data/misc/location/mq 0770 gps gps
  282. mkdir /data/misc/location/xtwifi 0770 gps gps
  283. # Provide the access to hostapd.conf only to root and group
  284. chmod 0660 /data/hostapd/hostapd.conf
  285. mkdir /data/audio 0770 media audio
  286. # Create /data/time folder for time-services
  287. mkdir /data/time 0700 system system
  288. # Enable Power save functionality for modem
  289. setprop persist.radio.add_power_save 1
  290. chown system /dev/block/platform/msm_sdcc.1/by-name
  291. setprop vold.post_fs_data_done 1
  292. rm /data/local/tmp/adreno_config.txt
  293. # communicate with mpdecision and thermald
  294. mkdir /dev/socket/mpdecision 0770 system system
  295. chmod 2770 /dev/socket/mpdecision
  296. # SONY: Camera
  297. mkdir /data/camera 0770 media camera
  298. chown media camera /sys/devices/sony_camera_0/info
  299. chmod 0770 /sys/devices/sony_camera_0/info
  300. chown media camera /sys/devices/sony_camera_1/info
  301. chmod 0770 /sys/devices/sony_camera_1/info
  302. # Used by taimport for MAC addresses
  303. mkdir /data/etc
  304. on charger
  305. # Enable Power modes and set the CPU Freq Sampling rates
  306. write /sys/module/lpm_levels/enable_low_power/l2 4
  307. write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
  308. write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
  309. write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
  310. write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
  311. write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
  312. write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
  313. write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
  314. write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
  315. write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
  316. write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
  317. write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
  318. write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
  319. write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
  320. write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
  321. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave"
  322. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave"
  323. write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave"
  324. write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave"
  325. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
  326. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
  327. write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
  328. write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
  329. write /sys/devices/system/cpu/cpu1/online 0
  330. write /sys/devices/system/cpu/cpu2/online 0
  331. write /sys/devices/system/cpu/cpu3/online 0
  332. start mpdecision
  333. on property:init.svc.bootanim=running
  334. # Clear Sony boot splash
  335. write /sys/class/graphics/fb0/blank 1
  336. write /sys/class/graphics/fb0/blank 0
  337. on property:service.bootanim.exit=1
  338. # Enable Power modes and set the CPU Freq Sampling rates
  339. write /sys/module/lpm_levels/enable_low_power/l2 4
  340. write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
  341. write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
  342. write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
  343. write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
  344. write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 1
  345. write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 1
  346. write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 1
  347. write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 1
  348. write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
  349. write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
  350. write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
  351. write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
  352. write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
  353. write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
  354. write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
  355. write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
  356. write /sys/module/msm_pm/modes/cpu0/retention/idle_enabled 1
  357. write /sys/module/msm_pm/modes/cpu1/retention/idle_enabled 1
  358. write /sys/module/msm_pm/modes/cpu2/retention/idle_enabled 1
  359. write /sys/module/msm_pm/modes/cpu3/retention/idle_enabled 1
  360. # Set the CPU Freq Sampling rates
  361. setprop sys.perf.profile 1
  362. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000
  363. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000
  364. write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000
  365. write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000
  366. chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  367. chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  368. chown root system /sys/devices/system/cpu/mfreq
  369. chmod 220 /sys/devices/system/cpu/mfreq
  370. chown root system /sys/devices/system/cpu/cpu1/online
  371. chown root system /sys/devices/system/cpu/cpu2/online
  372. chown root system /sys/devices/system/cpu/cpu3/online
  373. chmod 664 /sys/devices/system/cpu/cpu1/online
  374. chmod 664 /sys/devices/system/cpu/cpu2/online
  375. chmod 664 /sys/devices/system/cpu/cpu3/online
  376. write /dev/cpuctl/apps/cpu.notify_on_migrate 1
  377. # Switch to ROW after boot for better UX
  378. write /sys/block/mmcblk0/queue/scheduler row
  379. on property:init.svc.wpa_supplicant=stopped
  380. stop dhcpcd
  381. # Update Wi-Fi MAC address
  382. service mac-update /system/bin/mac-update
  383. class late_start
  384. user wifi
  385. oneshot
  386. service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
  387. class late_start
  388. user bluetooth
  389. group qcom_oncrpc bluetooth net_bt_admin system
  390. disabled
  391. oneshot
  392. on property:bluetooth.hciattach=true
  393. start hciattach
  394. on property:bluetooth.hciattach=false
  395. setprop bluetooth.status off
  396. # QMUX must be in multiple groups to support external process connections
  397. service qmuxd /system/bin/qmuxd
  398. class main
  399. user radio
  400. group radio audio bluetooth gps qcom_diag
  401. # SONY: TrimArea Daemon
  402. # Last 2 args: start block(blk size 128k), number of blocks(partitionsize(kb)/128(kb))
  403. service tad_static /system/bin/tad_static /dev/block/mmcblk0 1,16
  404. user root
  405. group root
  406. socket tad stream 0660 system system
  407. class core
  408. service taimport /system/bin/taimport
  409. class main
  410. user root
  411. group system
  412. service netmgrd /system/bin/netmgrd
  413. class main
  414. # start GNS/Sensor interface daemon
  415. service gsiff_daemon /system/bin/gsiff_daemon
  416. class late_start
  417. user gps
  418. group gps net_raw misc
  419. on property:sys.boot_completed=1
  420. write /sys/block/mmcblk0/bdi/read_ahead_kb 512
  421. service qseecomd /system/bin/qseecomd
  422. class core
  423. user root
  424. group root
  425. service hw_config /system/bin/sh /system/etc/hw_config.sh
  426. class main
  427. user root
  428. oneshot
  429. service wpa_supplicant /system/bin/wpa_supplicant \
  430. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  431. -I/system/etc/wifi/wpa_supplicant_overlay.conf \
  432. -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  433. # we will start as root and wpa_supplicant will switch to user wifi
  434. # after setting up the capabilities required for WEXT
  435. # user wifi
  436. # group wifi inet keystore
  437. class main
  438. socket wpa_wlan0 dgram 660 wifi wifi
  439. disabled
  440. oneshot
  441. service p2p_supplicant /system/bin/wpa_supplicant \
  442. -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
  443. -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
  444. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
  445. -I/system/etc/wifi/wpa_supplicant_overlay.conf \
  446. -puse_p2p_group_interface=1 \
  447. -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
  448. # we will start as root and wpa_supplicant will switch to user wifi
  449. # after setting up the capabilities required for WEXT
  450. # user wifi
  451. # group wifi inet keystore
  452. class main
  453. socket wpa_wlan0 dgram 660 wifi wifi
  454. disabled
  455. oneshot
  456. service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
  457. class main
  458. disabled
  459. oneshot
  460. service dhcpcd_p2p /system/bin/dhcpcd -aABKL
  461. class main
  462. disabled
  463. oneshot
  464. service iprenew_wlan0 /system/bin/dhcpcd -n
  465. class main
  466. disabled
  467. oneshot
  468. service iprenew_p2p /system/bin/dhcpcd -n
  469. class main
  470. disabled
  471. oneshot
  472. service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
  473. disabled
  474. oneshot
  475. service iprenew_bt-pan /system/bin/dhcpcd -n
  476. disabled
  477. oneshot
  478. on property:ro.data.large_tcp_window_size=true
  479. # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
  480. write /proc/sys/net/ipv4/tcp_adv_win_scale 2
  481. # virtual sdcard daemon running as media_rw (1023)
  482. service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
  483. class late_start
  484. service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/sdcard1 /storage/sdcard1
  485. class late_start
  486. disabled
  487. service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 /mnt/media_rw/usbdisk /storage/usbdisk
  488. class late_start
  489. disabled
  490. service mpdecision /system/bin/mpdecision --avg_comp
  491. class main
  492. user root
  493. disabled
  494. # Start suntrold
  495. service suntrold /system/bin/suntrold
  496. user system
  497. group system
  498. oneshot
  499. class main
  500. # bugreport is triggered by holding down volume down, volume up and power
  501. service bugreport /system/bin/dumpstate -d -p -B \
  502. -o /data/data/com.android.shell/files/bugreports/bugreport
  503. class main
  504. disabled
  505. oneshot
  506. keycodes 114 115 116
  507. service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
  508. class late_start
  509. user root
  510. group system qcom_oncrpc
  511. disabled
  512. oneshot
  513. service scd /system/bin/scd
  514. class main
  515. user system
  516. group system
  517. # Secure Config Transfer service
  518. service sct_service /system/bin/sct_service
  519. user root
  520. class main
  521. # Trim Area QMI service
  522. service ta_qmi_service /system/bin/ta_qmi_service
  523. user root
  524. class main
  525. # Thermal Manager service
  526. service thermanager /system/bin/thermanager /system/etc/thermanager.xml
  527. class main
  528. user root
  529. group root
  530. service rmt_storage /system/bin/rmt_storage
  531. class core
  532. user root
  533. service irsc_util /system/bin/irsc_util "/etc/sec_config"
  534. class main
  535. user root
  536. oneshot
  537. service qcamerasvr /system/bin/mm-qcamera-daemon
  538. class late_start
  539. user camera
  540. group camera system inet input
  541. service sensors /system/bin/sensors.qcom
  542. class main
  543. user root
  544. group sensors radio system
  545. service wcnss-service /system/bin/wcnss_service
  546. class late_start
  547. user system
  548. group system wifi
  549. disabled
  550. oneshot
  551. service time_daemon /system/bin/time_daemon
  552. class late_start
  553. user root
  554. group root radio qcom_diag
  555. service ptt_socket_app /system/bin/ptt_socket_app
  556. class main
  557. user system
  558. group system
  559. oneshot
  560. # create filesystem if necessary
  561. service setup_fs /system/bin/setup_fs /dev/block/platform/msm_sdcc.1/by-name/userdata
  562. class core
  563. user root
  564. group root
  565. oneshot
  566. service charger /sbin/healthd -c
  567. class charger
  568. seclabel u:r:healthd:s0
  569. # Powersave
  570. on property:sys.perf.profile=0
  571. stop mpdecision
  572. write /sys/module/msm_thermal/core_control/enabled 0
  573. write /sys/devices/system/cpu/cpu0/online 1
  574. write /sys/devices/system/cpu/cpu1/online 1
  575. write /sys/devices/system/cpu/cpu2/online 1
  576. write /sys/devices/system/cpu/cpu3/online 1
  577. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "conservative"
  578. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "conservative"
  579. write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "conservative"
  580. write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "conservative"
  581. write /sys/class/kgsl/kgsl-3d0/devfreq/governor "msm-adreno-tz"
  582. write /sys/module/msm_thermal/core_control/enabled 1
  583. start mpdecision
  584. # Balanced
  585. on property:sys.perf.profile=1
  586. stop mpdecision
  587. write /sys/module/msm_thermal/core_control/enabled 0
  588. write /sys/devices/system/cpu/cpu0/online 1
  589. write /sys/devices/system/cpu/cpu1/online 1
  590. write /sys/devices/system/cpu/cpu2/online 1
  591. write /sys/devices/system/cpu/cpu3/online 1
  592. write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1400000:40000 1700000:20000"
  593. write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90
  594. write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1497600
  595. write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 1
  596. write /sys/devices/system/cpu/cpufreq/interactive/target_loads "85 1500000:90 1800000:70"
  597. write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 40000
  598. write /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor 100000
  599. write /sys/module/cpu_boost/parameters/boost_ms 20
  600. write /sys/module/cpu_boost/parameters/sync_threshold 1728000
  601. write /sys/module/cpu_boost/parameters/input_boost_freq 1497600
  602. write /sys/module/cpu_boost/parameters/input_boost_ms 40
  603. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
  604. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive"
  605. write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "interactive"
  606. write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "interactive"
  607. write /sys/class/kgsl/kgsl-3d0/devfreq/governor "msm-adreno-tz"
  608. write /sys/module/msm_thermal/core_control/enabled 1
  609. start mpdecision
  610. # High performance
  611. on property:sys.perf.profile=2
  612. stop mpdecision
  613. write /sys/devices/system/cpu/cpu0/online 1
  614. write /sys/devices/system/cpu/cpu1/online 1
  615. write /sys/devices/system/cpu/cpu2/online 1
  616. write /sys/devices/system/cpu/cpu3/online 1
  617. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance"
  618. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance"
  619. write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "performance"
  620. write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "performance"
  621. write /sys/class/kgsl/kgsl-3d0/devfreq/governor "performance"