blob: 5a207e8bee8afae5ad621ea02b60c7679395d2d6 [file] [log] [blame]
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001# 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
28import init.qcom.usb.rc
29import init.target.rc
30
31on early-init
32 mount debugfs debugfs /sys/kernel/debug
33 write /sys/block/mmcblk0/queue/scheduler noop
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040034# additionaly for init.trace.rc
35# Allow shell group to enable tgid prints
36 chown root shell /sys/kernel/debug/tracing/options/print-tgid
37 chmod 0664 /sys/kernel/debug/tracing/options/print-tgid
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040038
39on init
40 # Set permissions for persist partition
41 mkdir /persist 0771 system system
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040042
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040043 mkdir /preload 0771 system system
44 # See storage config details at http://source.android.com/tech/storage/
45 mkdir /mnt/shell/emulated 0700 shell shell
46 mkdir /storage/emulated 0555 root root
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040047 mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
48 mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
49 mkdir /mnt/media_rw/uicc0 0700 media_rw media_rw
50 mkdir /mnt/media_rw/uicc1 0700 media_rw media_rw
51 mkdir /storage/sdcard1 0700 root root
52 mkdir /storage/uicc0 0700 root root
53 mkdir /storage/uicc1 0700 root root
54 mkdir /storage/usbotg 0700 root root
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040055
56 export EXTERNAL_STORAGE /storage/emulated/legacy
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040057 export SECONDARY_STORAGE /storage/sdcard1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040058 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
59 export EMULATED_STORAGE_TARGET /storage/emulated
60
61 # Support legacy paths
62 symlink /storage/emulated/legacy /sdcard
63 symlink /storage/emulated/legacy /mnt/sdcard
64 symlink /storage/emulated/legacy /storage/sdcard0
65 symlink /mnt/shell/emulated/0 /storage/emulated/legacy
66
67on early-boot
68 # set RLIMIT_MEMLOCK to 64MB
69 setrlimit 8 67108864 67108864
70 # Allow subsystem (modem etc) debugging
71 write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
72 write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
73 write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
74 write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
75 write /sys/kernel/boot_adsp/boot 1
76
77on boot
78 chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
79 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
80 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
81 chown bluetooth bluetooth /proc/bluetooth/sleep/proto
82 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
83 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
84 chown system system /sys/module/sco/parameters/disable_esco
85 chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
86 chmod 0660 /sys/module/bluetooth_power/parameters/power
87 chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
88 chmod 0660 /sys/class/rfkill/rfkill0/state
89 chmod 0660 /proc/bluetooth/sleep/proto
90 chown bluetooth net_bt_stack /dev/ttyHS0
91 chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
92 chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
93 chmod 0660 /dev/ttyHS0
94 chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
95 chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
96
97 chmod 0660 /dev/ttyHS2
98 chown bluetooth bluetooth /dev/ttyHS2
99
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400100 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/device/extldo
101 chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
102
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400103 # for BT MAC address
104 mkdir /efs/bluetooth 0775 radio system
105 # if already exist
106 chown radio system /efs/bluetooth
107 chmod 0775 /efs/bluetooth
108
109 #Create QMUX deamon socket area
110 mkdir /dev/socket/qmux_radio 0770 radio radio
111 chmod 2770 /dev/socket/qmux_radio
112 mkdir /dev/socket/qmux_audio 0770 media audio
113 chmod 2770 /dev/socket/qmux_audio
114 mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
115 chmod 2770 /dev/socket/qmux_bluetooth
116 mkdir /dev/socket/qmux_gps 0770 gps gps
117 chmod 2770 /dev/socket/qmux_gps
118
119 setprop wifi.interface wlan0
120
121 chown system system /proc/sched_orig_load_balance_enable
122 chmod 0660 /proc/sched_orig_load_balance_enable
123
124# Define TCP buffer sizes for various networks
125# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
126 setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
127
128
129 setprop ro.telephony.call_ring.multiple false
130
131 #Remove SUID bit for iproute2 ip tool
132 chmod 0755 /system/bin/ip
133
134
135 chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
136
137 #For bridgemgr daemon to inform the USB driver of the correct transport
138 chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400139
140 # For setting tcp delayed ack
141 chown system system /sys/kernel/ipv4/tcp_delack_seg
142 chown system system /sys/kernel/ipv4/tcp_use_userconfig
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400143
144# Define TCP buffer sizes for various networks
145# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
146 setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
147 setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
148 setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
149 setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
150 setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
151 setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
152 setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
153 setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
154 setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
155 setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
156
157# Assign TCP buffer thresholds to be ceiling value of technology maximums
158# Increased technology maximums should be reflected here.
159 write /proc/sys/net/core/rmem_max 8388608
160 write /proc/sys/net/core/wmem_max 8388608
161
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400162# Define TCP delayed ack settings for WiFi
163 setprop net.tcp.delack.default 1
164 setprop net.tcp.delack.wifi 20
165 setprop net.tcp.usercfg.default 0
166 setprop net.tcp.usercfg.wifi 1
167 setprop persist.tcp.delack.enable true
168
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400169 #To allow interfaces to get v6 address when tethering is enabled
170 write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
171 write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
172 write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
173 write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
174 write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
175 write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
176 write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
177 write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
178 write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
179 write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
180 write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
181 write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
182 write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
183 write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
184 write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
185 write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
186 write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
187 write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
188 write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
189 write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
190
191 # To prevent out of order acknowledgements from making
192 # connection tracking to treat them as not belonging to
193 # the connection they belong to.
194 # Otherwise, a weird issue happens in which some long
195 # connections on high-throughput links get dropped when
196 # an ack packet comes out of order
197 write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
198
199 # Set the console loglevel to < KERN_INFO
200 # Set the default message loglevel to KERN_INFO
201 # write /proc/sys/kernel/printk "6 6 1 7"
202
203 # Allow access for CCID command/response timeout configuration
204 chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400205#
206# start qmuxd and qmiproxy for appropriate targets
207#
208on property:ro.baseband=msm
209 start qmuxd
210
211on property:ro.baseband=mdm
212 start qmuxd
213
214on property:ro.baseband=unknown
215 start qmuxd
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400216
217# msm specific files that need to be created on /data
218on post-fs-data
219 # Create directory for TZ Apps
220 mkdir /data/misc/qsee 0770 system system
221
222 # we will remap this as /mnt/sdcard with the sdcard fuse tool
223 mkdir /data/misc/camera 0770 camera camera
224
225 mkdir /data/media 0770 media_rw media_rw
226 chown media_rw media_rw /data/media
227
228 mkdir /data/misc/ipa 0700 net_admin net_admin
229
230 mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
231
232 # Create the directories used by the Wireless subsystem
233 mkdir /data/misc/wifi 0770 wifi system
234 mkdir /data/misc/wifi/sockets 0770 wifi wifi
235 mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
236 mkdir /data/misc/dhcp 0775 dhcp dhcp
237 chown dhcp dhcp /data/misc/dhcp
238
239 # for WIFI MAC address
240 mkdir /efs/wifi 0775 radio system
241 chown system wifi /efs/wifi/.mac.info
242 chmod 0660 /efs/wifi/.mac.info
243 chmod 0660 /efs/wifi/.mac.cob
244
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400245 # for WIFI TRP/TIS
246 chown system root /data/.psm.info
247 chmod 0664 /data/.psm.info
248
249 # for WIFI Antena Selection
250 chown system root /data/.ant.info
251 chmod 0664 /data/.ant.info
252
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400253 # for WIFI Version
254 write /data/.wifiver.info 0
255 chown system root /data/.wifiver.info
256 chmod 0666 /data/.wifiver.info
257 # Create the directories used by CnE subsystem
258 mkdir /data/connectivity 0771 system system
259 chown system system /data/connectivity
260
261 # Create the directories used by DPM subsystem
262 mkdir /data/dpm 0771 system system
263 chown system system /data/dpm
264
265 mkdir /data/dpm/fdMgr 0771 system system
266 chown system system /data/dpm/fdMgr
267
268 mkdir /data/dpm/nsrm 0771 system system
269 chown system system /data/dpm/nsrm
270
271 # Create directory used by audio subsystem
272 mkdir /data/misc/audio 0770 audio audio
273
274 # Create directory used by the DASH client
275 mkdir /data/misc/dash 0770 media audio
276
277 # Create directory used by display clients
278 mkdir /data/misc/display 0770 system graphics
279
280 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
281 # We chown/chmod /persist again so because mount is run as root + defaults
282 chown system system /persist
283 chmod 0771 /persist
284 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
285 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
286 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
287 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
288
289 # Chown polling nodes as needed from UI running on system server
290 chown system system /sys/devices/platform/msm_sdcc.1/polling
291 chown system system /sys/devices/platform/msm_sdcc.2/polling
292 chown system system /sys/devices/platform/msm_sdcc.3/polling
293 chown system system /sys/devices/platform/msm_sdcc.4/polling
294
295 #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
296 mkdir /data/system 0775 system system
297 #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
298
299 #Create directories for Location services
300 mkdir /data/misc/location 0770 gps gps
301 mkdir /data/misc/location/mq 0770 gps gps
302 mkdir /data/misc/location/xtwifi 0770 gps gps
303 mkdir /data/misc/location/gpsone_d 0770 system gps
304 mkdir /data/misc/location/quipc 0770 gps system
305 mkdir /data/misc/location/gsiff 0770 gps gps
306
307 #Create directory from IMS services
308 mkdir /data/shared 0755
309 chown system system /data/shared
310
311 #Create directory for FOTA
312 mkdir /data/fota 0771
313 chown system system /data/fota
314
315 #Create directory for hostapd
316 mkdir /data/hostapd 0770 system wifi
317
318 # Create /data/time folder for time-services
319 mkdir /data/time/ 0700 system system
320
321 mkdir /data/audio/ 0770 media audio
322
323 setprop vold.post_fs_data_done 1
324
325 #Create a folder for SRS to be able to create a usercfg file
326 mkdir /data/data/media 0770 media media
327
328 #Create folder for mm-qcamera-daemon
329 mkdir /data/camera 0770 media camera
330
331 #Create PERFD deamon related dirs
332 mkdir /data/misc/perfd 0755 root system
333 chmod 2755 /data/misc/perfd
334 mkdir /data/system/perfd 0770 root system
335 chmod 2770 /data/system/perfd
336
337 # NFC local data and nfcee xml storage
338 mkdir /data/nfc 0770 nfc nfc
339 mkdir /data/nfc/param 0770 nfc nfc
340
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400341 # DCT(Display Clock Tunning) - Interface 2.0
342 chown radio system /sys/class/dct/dct_node/data
343 chown radio system /sys/class/dct/dct_node/state
344 chown radio system /sys/class/dct/dct_node/log
345 chown radio system /sys/class/dct/dct_node/enabled
346 chown radio system /sys/class/dct/dct_node/interface
347 chown radio system /sys/class/dct/dct_node/libname
348 chown radio system /sys/class/dct/dct_node/tunned
349
350#service qcomsysd /system/bin/qcom-system-daemon
351# class main
352# user root
353# group root qcom_diag
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400354
355service ssr_setup /system/bin/ssr_setup
356 oneshot
357 disabled
358
359service ss_ramdump /system/bin/subsystem_ramdump
360 class main
361 user system
362 group system
363 disabled
364
365on property:persist.sys.ssr.restart_level=*
366 start ssr_setup
367
368on property:persist.sys.ssr.enable_ramdumps=1
369 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
370 start ss_ramdump
371
372on property:persist.sys.ssr.enable_ramdumps=0
373 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
374
375on property:sys.boot_completed=1
376 write /dev/kmsg "Boot completed "
377
378on property:persist.radio.atfwd.start=false
379 stop atfwd
380
381# corefile limit and ETB enabling
382on property:persist.debug.trace=1
383 mkdir /data/core 0777 root root
384 write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
385 write /sys/devices/system/cpu/cpu1/online 1
386 write /sys/devices/system/cpu/cpu2/online 1
387 write /sys/devices/system/cpu/cpu3/online 1
388 write /sys/bus/coresight/devices/coresight-etm0/enable 0
389 write /sys/bus/coresight/devices/coresight-etm1/enable 0
390 write /sys/bus/coresight/devices/coresight-etm2/enable 0
391 write /sys/bus/coresight/devices/coresight-etm3/enable 0
392 write /sys/bus/coresight/devices/coresight-etm0/reset 1
393 write /sys/bus/coresight/devices/coresight-etm1/reset 1
394 write /sys/bus/coresight/devices/coresight-etm2/reset 1
395 write /sys/bus/coresight/devices/coresight-etm3/reset 1
396 write /sys/bus/coresight/devices/coresight-etm0/enable 1
397 write /sys/bus/coresight/devices/coresight-etm1/enable 1
398 write /sys/bus/coresight/devices/coresight-etm2/enable 1
399 write /sys/bus/coresight/devices/coresight-etm3/enable 1
400 write /sys/module/coresight_event/parameters/event_abort_enable 1
401
402on property:init.svc.wpa_supplicant=stopped
403 stop dhcpcd
404
405on property:bluetooth.isEnabled=true
406 start btwlancoex
407 write /sys/class/bluetooth/hci0/idle_timeout 7000
408
409on property:bluetooth.sap.status=running
410 start bt-sap
411
412on property:bluetooth.sap.status=stopped
413 stop bt-sap
414
415on property:bluetooth.dun.status=running
416 start bt-dun
417
418on property:bluetooth.dun.status=stopped
419 stop bt-dun
420
421on property:ro.bluetooth.ftm_enabled=true
422 start ftmd
423
424on property:bluetooth.startbtsnoop=true
425 start btsnoop
426
427on property:bluetooth.startbtsnoop=false
428 stop btsnoop
429
430service qcom-c_core-sh /system/bin/sh /init.qcom.class_core.sh
431 class core
432 user root
433 oneshot
434
435service qcom-c_main-sh /system/bin/sh /init.class_main.sh
436 class main
437 user root
438 oneshot
439
440on property:vold.decrypt=trigger_restart_framework
441 start qcom-c_main-sh
442 start config_bluetooth
443 start wcnss-service
444
445on property:persist.env.fastdorm.enabled=true
446 setprop persist.radio.data_no_toggle 1
447
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400448service irsc_util /system/bin/irsc_util "/etc/sec_config"
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400449 class main
450 user root
451 oneshot
452
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400453service rmt_storage /system/bin/rmt_storage
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400454 class core
455 user root
456 disabled
457
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400458service rfs_access /system/bin/rfs_access
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400459 class core
460 user root
461 group system net_raw
462
463on property:wc_transport.start_hci=true
464 start start_hci_filter
465
466on property:wc_transport.start_hci=false
467 stop start_hci_filter
468
469service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
470 class core
471 user root
472 oneshot
473
474service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
475 class late_start
476 user bluetooth
477 group bluetooth net_bt_admin net_bt_stack
478 disabled
479 oneshot
480
481on property:bluetooth.hciattach=true
482 start hciattach
483
484on property:bluetooth.hciattach=false
485 setprop bluetooth.status off
486
487service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh
488 class late_start
489 user bluetooth
490 group system bluetooth net_bt_admin misc
491 disabled
492 oneshot
493
494service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
495 class late_start
496 user bluetooth
497 group bluetooth net_bt_admin inet
498 disabled
499 oneshot
500
501service bt-sap /system/bin/sapd 15
502 user bluetooth
503 group bluetooth net_bt_admin
504 class late_start
505 disabled
506 oneshot
507
508service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
509 class late_start
510 user root
511 group bluetooth net_bt_admin misc net_bt_stack qcom_diag
512 disabled
513 oneshot
514
515service bridgemgrd /system/bin/bridgemgrd
516 class late_start
517 user radio
518 group radio qcom_diag
519 disabled
520
521service port-bridge /system/bin/port-bridge /dev/mhi_pipe_32 /dev/ttyGS0
522 class main
523 user radio system
524 group radio system inet
525 disabled
526
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400527service qmiproxy /system/bin/qmiproxy
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400528 class main
529 user radio
530 group radio qcom_diag
531 disabled
532
533# QMUX must be in multiple groups to support external process connections
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400534service qmuxd /system/bin/qmuxd
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400535 class main
536 user root
537 group radio audio bluetooth gps qcom_diag
538 disabled
539
540service netmgrd /system/bin/netmgrd
541 class main
542 disabled
543
544on property:ro.use_data_netmgrd=false
545 # netmgr not supported on specific target
546 stop netmgrd
547
548# Adjust socket buffer to enlarge TCP receive window for high bandwidth
549# but only if ro.data.large_tcp_window_size property is set.
550on property:ro.data.large_tcp_window_size=true
551 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
552
553service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
554 class late_start
555 user bluetooth
556 group bluetooth net_bt_admin inet net_admin net_raw
557 disabled
558 oneshot
559
560service p2p_supplicant /system/bin/wpa_supplicant \
561 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
562 -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -N \
563 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
564 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
565 -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \
566 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
567 # we will start as root and wpa_supplicant will switch to user wifi
568 # after setting up the capabilities required for WEXT
569 # user wifi
570 # group wifi inet keystore
571 class main
572 socket wpa_wlan0 dgram 660 wifi wifi
573 disabled
574 oneshot
575
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400576service wpa_supplicant /system/bin/wpa_supplicant -g@android:wpa_wlan0 \
577 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
578 # we will start as root and wpa_supplicant will switch to user wifi
579 # after setting up the capabilities required for WEXT
580 # user wifi
581 # group wifi inet keystore
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400582 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400583 socket wpa_wlan0 dgram 660 wifi wifi
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400584 disabled
585 oneshot
586
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400587service olsrd /system/bin/olsrd -f /etc/wifi/olsrd.conf
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400588 class main
589 disabled
590 oneshot
591
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400592service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400593 class late_start
594 disabled
595 oneshot
596
597service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
598 class late_start
599 disabled
600 oneshot
601
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400602service iprenew_wlan0 /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400603 class late_start
604 disabled
605 oneshot
606
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400607service iprenew_p2p /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400608 class late_start
609 disabled
610 oneshot
611
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400612service ptt_socket_app /system/bin/ptt_socket_app -d
613 class main
614 user root
615 group root
616 disabled
617 oneshot
618
619service ptt_ffbm /system/bin/ptt_socket_app -f -d
620 user root
621 group root
622 disabled
623 oneshot
624
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400625service ftm_ffbm /system/bin/ftmdaemon
626 user root
627 group root
628 disabled
629 oneshot
630
631service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
632 class late_start
633 disabled
634 oneshot
635
636service iprenew_bt-pan /system/bin/dhcpcd -n
637 class late_start
638 disabled
639 oneshot
640
641service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
642 disabled
643 oneshot
644
645service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
646 disabled
647 oneshot
648
649service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
650 disabled
651 oneshot
652
653service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
654 disabled
655 oneshot
656
657service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
658 disabled
659 oneshot
660
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400661#for WiFi MFG(TestMode)
662service mfgloader /system/bin/mfgloader
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400663 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400664 disabled
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400665 oneshot
666
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400667service wlandutservice /system/bin/wlandutservice
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400668 class main
669 user system
670 group wifi net_raw net_admin system inet
671 disabled
672 oneshot
673
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400674service macloader /system/bin/macloader
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400675 class main
676 oneshot
677
678on property:init.svc.macloader=stopped
679 chown system root /data/.cid.info
680 chmod 0664 /data/.cid.info
681 chown system root /data/.rev
682 chmod 0664 /data/.rev
683# end of wifi
684
685
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400686service loc_launcher /system/bin/loc_launcher
687 #loc_launcher will start as root and set its uid to gps
688 class late_start
689 group gps inet net_raw qcom_diag net_admin wifi
690
691service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
692 class late_start
693 user root
694 group system
695 disabled
696 oneshot
697
698on property:crypto.driver.load=1
699 insmod /system/lib/modules/qce.ko
700 insmod /system/lib/modules/qcedev.ko
701
702service qcom-sh /system/bin/sh /init.qcom.sh
703 class late_start
704 user root
705 oneshot
706
707service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
708 class late_start
709 user root
710 disabled
711 oneshot
712
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400713service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
714 class late_start
715 group wifi inet
716 disabled
717 oneshot
718
719service wifi-crda /system/bin/sh /system/etc/init.crda.sh
720 class late_start
721 user root
722 disabled
723 oneshot
724
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400725service config-zram /system/bin/sh /system/etc/init.qcom.zram.sh
726 class late_start
727 user root
728 disabled
729 oneshot
730
731on property:sys.boot_completed=1
732 start qcom-post-boot
733 start config-zram
734
735service atfwd /system/bin/ATFWD-daemon
736 class late_start
737 user system
738 group system radio
739
740service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
741 class late_start
742 user root
743 group root
744 oneshot
745 disabled
746
747on property:ro.data.large_tcp_window_size=true
748 # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
749 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
750
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400751#
752# start multiple rilds based on multisim property
753#
754on property:ro.multisim.simslotcount=2
755 stop ril-daemon
756 start ril-daemon
757 start ril-daemon1
758
759on property:persist.radio.multisim.config=dsds
760 stop ril-daemon
761 start ril-daemon
762 start ril-daemon1
763
764on property:persist.radio.multisim.config=dsda
765 stop ril-daemon
766 start ril-daemon
767 start ril-daemon1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400768
769#service ril-daemon2 /system/bin/rild -c 2
770# class main
771# socket rild2 stream 660 root radio
772# socket rild-debug2 stream 660 radio system
773# user root
774# disabled
775# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
776
777#service ril-daemon3 /system/bin/rild -c 3
778# class main
779# socket rild3 stream 660 root radio
780# socket rild-debug3 stream 660 radio system
781# user root
782# disabled
783# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
784
785service usb_uicc_enable /system/bin/sh /system/etc/init.qcom.uicc.sh
786 class late_start
787 user root
788 disabled
789 oneshot
790
791service usb_uicc_daemon /system/bin/usb_uicc_client
792 class main
793 user system
794 group system log net_raw
795 oneshot
796
797on property:sys.usb_uicc.enabled=1
798 start usb_uicc_enable
799
800on property:sys.usb_uicc.enabled=0
801 start usb_uicc_enable
802
803# virtual sdcard daemon running as media_rw (1023)
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400804service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400805 class late_start
806
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400807service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400808 class late_start
809 disabled
810
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400811service fuse_uicc0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc0 /storage/uicc0
812 class late_start
813
814service fuse_uicc1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc1 /storage/uicc1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400815 class late_start
816 disabled
817
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400818service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400819 class late_start
820 disabled
821
822# Binding fuse mount point to /storage/emulated/legacy
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400823on property:init.svc.sdcard=running
824 wait /mnt/shell/emulated/0
825 mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400826
827
828service charger /charger
829 class charger
830
831service ssr_diag /system/bin/ssr_diag
832 class late_start
833 user system
834 group system
835 disabled
836
837# Define fastmmi
838service fastmmi /system/bin/mmi
839 user root
840 group root
841 disabled
842
843service fastmmisrv /system/bin/sh /init.qcom.factory.sh
844 user root
845 disabled
846 oneshot
847
848on mmi
849 start fastmmisrv
850
851on ffbm
852 trigger early-fs
853 trigger fs
854 trigger post-fs
855 trigger post-fs-data
856
857 # Load properties from /system/ + /factory after fs mount. Place
858 # this in another action so that the load will be scheduled after the prior
859 # issued fs triggers have completed.
860 trigger load_all_props_action
861
862 trigger early-boot
863 trigger mmi
864
865service qbcharger /charger -m 1
866 disabled
867 oneshot
868
869on property:sys.qbcharger.enable=true
870 start qbcharger
871
872on property:sys.qbcharger.enable=false
873 stop qbcharger
874
875service diag_mdlog_start /system/bin/diag_mdlog
876 class late_start
877 user shell
878 group system qcom_diag sdcard_rw sdcard_r media_rw
879 disabled
880 oneshot
881
882service diag_mdlog_stop /system/bin/diag_mdlog -k
883 class late_start
884 user shell
885 group system qcom_diag sdcard_rw sdcard_r media_rw
886 disabled
887 oneshot
888
889service bms-sh /system/bin/sh /init.qcom.bms.sh
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400890 class core
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400891 user root
892 oneshot
893
894service vm_bms /system/bin/vm_bms
895 user root
896 group root
897 disabled
898
899service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
900 class core
901 user root
902 group root
903 disabled
904
905# Change IO scheduler to CFQ after boot_complete
906on property:sys.boot_completed=1
907 write /sys/block/mmcblk0/queue/scheduler cfq
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400908
909
910# umount service
911service umount_service /system/bin/umount /preload
912 disabled
913 oneshot
914
915# Support Preload install apks
916on property:persist.sys.storage_preload=1
917 mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
918 setprop storage.preload.complete 1
919
920on property:persist.sys.storage_preload=0
921 start umount_service
922