blob: b6f36730835fbd245e2d1b8f9b5efa74618186e7 [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
139
140# Define TCP buffer sizes for various networks
141# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
142 setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
143 setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
144 setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
145 setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
146 setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
147 setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
148 setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
149 setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
150 setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
151 setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
152
153# Assign TCP buffer thresholds to be ceiling value of technology maximums
154# Increased technology maximums should be reflected here.
155 write /proc/sys/net/core/rmem_max 8388608
156 write /proc/sys/net/core/wmem_max 8388608
157
158 #To allow interfaces to get v6 address when tethering is enabled
159 write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
160 write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
161 write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
162 write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
163 write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
164 write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
165 write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
166 write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
167 write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
168 write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
169 write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
170 write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
171 write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
172 write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
173 write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
174 write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
175 write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
176 write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
177 write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
178 write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
179
180 # To prevent out of order acknowledgements from making
181 # connection tracking to treat them as not belonging to
182 # the connection they belong to.
183 # Otherwise, a weird issue happens in which some long
184 # connections on high-throughput links get dropped when
185 # an ack packet comes out of order
186 write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
187
188 # Set the console loglevel to < KERN_INFO
189 # Set the default message loglevel to KERN_INFO
190 # write /proc/sys/kernel/printk "6 6 1 7"
191
192 # Allow access for CCID command/response timeout configuration
193 chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
194
195# msm specific files that need to be created on /data
196on post-fs-data
197 # Create directory for TZ Apps
198 mkdir /data/misc/qsee 0770 system system
199
200 # we will remap this as /mnt/sdcard with the sdcard fuse tool
201 mkdir /data/misc/camera 0770 camera camera
202
203 mkdir /data/media 0770 media_rw media_rw
204 chown media_rw media_rw /data/media
205
206 mkdir /data/misc/ipa 0700 net_admin net_admin
207
208 mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
209
210 # Create the directories used by the Wireless subsystem
211 mkdir /data/misc/wifi 0770 wifi system
212 mkdir /data/misc/wifi/sockets 0770 wifi wifi
213 mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
214 mkdir /data/misc/dhcp 0775 dhcp dhcp
215 chown dhcp dhcp /data/misc/dhcp
216
217 # for WIFI MAC address
218 mkdir /efs/wifi 0775 radio system
219 chown system wifi /efs/wifi/.mac.info
220 chmod 0660 /efs/wifi/.mac.info
221 chmod 0660 /efs/wifi/.mac.cob
222
223 # for WIFI Version
224 write /data/.wifiver.info 0
225 chown system root /data/.wifiver.info
226 chmod 0666 /data/.wifiver.info
227 # Create the directories used by CnE subsystem
228 mkdir /data/connectivity 0771 system system
229 chown system system /data/connectivity
230
231 # Create the directories used by DPM subsystem
232 mkdir /data/dpm 0771 system system
233 chown system system /data/dpm
234
235 mkdir /data/dpm/fdMgr 0771 system system
236 chown system system /data/dpm/fdMgr
237
238 mkdir /data/dpm/nsrm 0771 system system
239 chown system system /data/dpm/nsrm
240
241 # Create directory used by audio subsystem
242 mkdir /data/misc/audio 0770 audio audio
243
244 # Create directory used by the DASH client
245 mkdir /data/misc/dash 0770 media audio
246
247 # Create directory used by display clients
248 mkdir /data/misc/display 0770 system graphics
249
250 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
251 # We chown/chmod /persist again so because mount is run as root + defaults
252 chown system system /persist
253 chmod 0771 /persist
254 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
255 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
256 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
257 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
258
259 # Chown polling nodes as needed from UI running on system server
260 chown system system /sys/devices/platform/msm_sdcc.1/polling
261 chown system system /sys/devices/platform/msm_sdcc.2/polling
262 chown system system /sys/devices/platform/msm_sdcc.3/polling
263 chown system system /sys/devices/platform/msm_sdcc.4/polling
264
265 #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
266 mkdir /data/system 0775 system system
267 #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
268
269 #Create directories for Location services
270 mkdir /data/misc/location 0770 gps gps
271 mkdir /data/misc/location/mq 0770 gps gps
272 mkdir /data/misc/location/xtwifi 0770 gps gps
273 mkdir /data/misc/location/gpsone_d 0770 system gps
274 mkdir /data/misc/location/quipc 0770 gps system
275 mkdir /data/misc/location/gsiff 0770 gps gps
276
277 #Create directory from IMS services
278 mkdir /data/shared 0755
279 chown system system /data/shared
280
281 #Create directory for FOTA
282 mkdir /data/fota 0771
283 chown system system /data/fota
284
285 #Create directory for hostapd
286 mkdir /data/hostapd 0770 system wifi
287
288 # Create /data/time folder for time-services
289 mkdir /data/time/ 0700 system system
290
291 mkdir /data/audio/ 0770 media audio
292
293 setprop vold.post_fs_data_done 1
294
295 #Create a folder for SRS to be able to create a usercfg file
296 mkdir /data/data/media 0770 media media
297
298 #Create folder for mm-qcamera-daemon
299 mkdir /data/camera 0770 media camera
300
301 #Create PERFD deamon related dirs
302 mkdir /data/misc/perfd 0755 root system
303 chmod 2755 /data/misc/perfd
304 mkdir /data/system/perfd 0770 root system
305 chmod 2770 /data/system/perfd
306
307 # NFC local data and nfcee xml storage
308 mkdir /data/nfc 0770 nfc nfc
309 mkdir /data/nfc/param 0770 nfc nfc
310
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400311 # DCT(Display Clock Tunning) - Interface 2.0
312 chown radio system /sys/class/dct/dct_node/data
313 chown radio system /sys/class/dct/dct_node/state
314 chown radio system /sys/class/dct/dct_node/log
315 chown radio system /sys/class/dct/dct_node/enabled
316 chown radio system /sys/class/dct/dct_node/interface
317 chown radio system /sys/class/dct/dct_node/libname
318 chown radio system /sys/class/dct/dct_node/tunned
319
320#service qcomsysd /system/bin/qcom-system-daemon
321# class main
322# user root
323# group root qcom_diag
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400324
325service ssr_setup /system/bin/ssr_setup
326 oneshot
327 disabled
328
329service ss_ramdump /system/bin/subsystem_ramdump
330 class main
331 user system
332 group system
333 disabled
334
335on property:persist.sys.ssr.restart_level=*
336 start ssr_setup
337
338on property:persist.sys.ssr.enable_ramdumps=1
339 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
340 start ss_ramdump
341
342on property:persist.sys.ssr.enable_ramdumps=0
343 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
344
345on property:sys.boot_completed=1
346 write /dev/kmsg "Boot completed "
347
348on property:persist.radio.atfwd.start=false
349 stop atfwd
350
351# corefile limit and ETB enabling
352on property:persist.debug.trace=1
353 mkdir /data/core 0777 root root
354 write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
355 write /sys/devices/system/cpu/cpu1/online 1
356 write /sys/devices/system/cpu/cpu2/online 1
357 write /sys/devices/system/cpu/cpu3/online 1
358 write /sys/bus/coresight/devices/coresight-etm0/enable 0
359 write /sys/bus/coresight/devices/coresight-etm1/enable 0
360 write /sys/bus/coresight/devices/coresight-etm2/enable 0
361 write /sys/bus/coresight/devices/coresight-etm3/enable 0
362 write /sys/bus/coresight/devices/coresight-etm0/reset 1
363 write /sys/bus/coresight/devices/coresight-etm1/reset 1
364 write /sys/bus/coresight/devices/coresight-etm2/reset 1
365 write /sys/bus/coresight/devices/coresight-etm3/reset 1
366 write /sys/bus/coresight/devices/coresight-etm0/enable 1
367 write /sys/bus/coresight/devices/coresight-etm1/enable 1
368 write /sys/bus/coresight/devices/coresight-etm2/enable 1
369 write /sys/bus/coresight/devices/coresight-etm3/enable 1
370 write /sys/module/coresight_event/parameters/event_abort_enable 1
371
372on property:init.svc.wpa_supplicant=stopped
373 stop dhcpcd
374
375on property:bluetooth.isEnabled=true
376 start btwlancoex
377 write /sys/class/bluetooth/hci0/idle_timeout 7000
378
379on property:bluetooth.sap.status=running
380 start bt-sap
381
382on property:bluetooth.sap.status=stopped
383 stop bt-sap
384
385on property:bluetooth.dun.status=running
386 start bt-dun
387
388on property:bluetooth.dun.status=stopped
389 stop bt-dun
390
391on property:ro.bluetooth.ftm_enabled=true
392 start ftmd
393
394on property:bluetooth.startbtsnoop=true
395 start btsnoop
396
397on property:bluetooth.startbtsnoop=false
398 stop btsnoop
399
400service qcom-c_core-sh /system/bin/sh /init.qcom.class_core.sh
401 class core
402 user root
403 oneshot
404
405service qcom-c_main-sh /system/bin/sh /init.class_main.sh
406 class main
407 user root
408 oneshot
409
410on property:vold.decrypt=trigger_restart_framework
411 start qcom-c_main-sh
412 start config_bluetooth
413 start wcnss-service
414
415on property:persist.env.fastdorm.enabled=true
416 setprop persist.radio.data_no_toggle 1
417
418service irsc_util /system/bin/irsc_util "/etc/sec_config"
419 class main
420 user root
421 oneshot
422
423service rmt_storage /system/bin/rmt_storage
424 class core
425 user root
426 disabled
427
428service rfs_access /system/bin/rfs_access
429 class core
430 user root
431 group system net_raw
432
433on property:wc_transport.start_hci=true
434 start start_hci_filter
435
436on property:wc_transport.start_hci=false
437 stop start_hci_filter
438
439service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
440 class core
441 user root
442 oneshot
443
444service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
445 class late_start
446 user bluetooth
447 group bluetooth net_bt_admin net_bt_stack
448 disabled
449 oneshot
450
451on property:bluetooth.hciattach=true
452 start hciattach
453
454on property:bluetooth.hciattach=false
455 setprop bluetooth.status off
456
457service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh
458 class late_start
459 user bluetooth
460 group system bluetooth net_bt_admin misc
461 disabled
462 oneshot
463
464service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
465 class late_start
466 user bluetooth
467 group bluetooth net_bt_admin inet
468 disabled
469 oneshot
470
471service bt-sap /system/bin/sapd 15
472 user bluetooth
473 group bluetooth net_bt_admin
474 class late_start
475 disabled
476 oneshot
477
478service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
479 class late_start
480 user root
481 group bluetooth net_bt_admin misc net_bt_stack qcom_diag
482 disabled
483 oneshot
484
485service bridgemgrd /system/bin/bridgemgrd
486 class late_start
487 user radio
488 group radio qcom_diag
489 disabled
490
491service port-bridge /system/bin/port-bridge /dev/mhi_pipe_32 /dev/ttyGS0
492 class main
493 user radio system
494 group radio system inet
495 disabled
496
497service qmiproxy /system/bin/qmiproxy
498 class main
499 user radio
500 group radio qcom_diag
501 disabled
502
503# QMUX must be in multiple groups to support external process connections
504service qmuxd /system/bin/qmuxd
505 class main
506 user root
507 group radio audio bluetooth gps qcom_diag
508 disabled
509
510service netmgrd /system/bin/netmgrd
511 class main
512 disabled
513
514on property:ro.use_data_netmgrd=false
515 # netmgr not supported on specific target
516 stop netmgrd
517
518# Adjust socket buffer to enlarge TCP receive window for high bandwidth
519# but only if ro.data.large_tcp_window_size property is set.
520on property:ro.data.large_tcp_window_size=true
521 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
522
523service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
524 class late_start
525 user bluetooth
526 group bluetooth net_bt_admin inet net_admin net_raw
527 disabled
528 oneshot
529
530service p2p_supplicant /system/bin/wpa_supplicant \
531 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
532 -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -N \
533 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
534 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
535 -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \
536 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
537 # we will start as root and wpa_supplicant will switch to user wifi
538 # after setting up the capabilities required for WEXT
539 # user wifi
540 # group wifi inet keystore
541 class main
542 socket wpa_wlan0 dgram 660 wifi wifi
543 disabled
544 oneshot
545
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400546service wpa_supplicant /system/bin/wpa_supplicant -g@android:wpa_wlan0 \
547 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
548 # we will start as root and wpa_supplicant will switch to user wifi
549 # after setting up the capabilities required for WEXT
550 # user wifi
551 # group wifi inet keystore
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400552 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400553 socket wpa_wlan0 dgram 660 wifi wifi
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400554 disabled
555 oneshot
556
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400557service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400558 class late_start
559 disabled
560 oneshot
561
562service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
563 class late_start
564 disabled
565 oneshot
566
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400567service iprenew_wlan0 /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400568 class late_start
569 disabled
570 oneshot
571
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400572service iprenew_p2p /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400573 class late_start
574 disabled
575 oneshot
576
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400577service ptt_socket_app /system/bin/ptt_socket_app -d
578 class main
579 user root
580 group root
581 disabled
582 oneshot
583
584service ptt_ffbm /system/bin/ptt_socket_app -f -d
585 user root
586 group root
587 disabled
588 oneshot
589
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400590service ftm_ffbm /system/bin/ftmdaemon
591 user root
592 group root
593 disabled
594 oneshot
595
596service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
597 class late_start
598 disabled
599 oneshot
600
601service iprenew_bt-pan /system/bin/dhcpcd -n
602 class late_start
603 disabled
604 oneshot
605
606service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
607 disabled
608 oneshot
609
610service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
611 disabled
612 oneshot
613
614service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
615 disabled
616 oneshot
617
618service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
619 disabled
620 oneshot
621
622service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
623 disabled
624 oneshot
625
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400626#for WiFi MFG(TestMode)
627service mfgloader /system/bin/mfgloader
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400628 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400629 disabled
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400630 oneshot
631
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400632service wlandutservice /system/bin/wlandutservice
633 class main
634 user system
635 group wifi net_raw net_admin system inet
636 disabled
637 oneshot
638
639service macloader /system/bin/macloader
640 class main
641 oneshot
642
643on property:init.svc.macloader=stopped
644 chown system root /data/.cid.info
645 chmod 0664 /data/.cid.info
646 chown system root /data/.rev
647 chmod 0664 /data/.rev
648# end of wifi
649
650
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400651service loc_launcher /system/bin/loc_launcher
652 #loc_launcher will start as root and set its uid to gps
653 class late_start
654 group gps inet net_raw qcom_diag net_admin wifi
655
656service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
657 class late_start
658 user root
659 group system
660 disabled
661 oneshot
662
663on property:crypto.driver.load=1
664 insmod /system/lib/modules/qce.ko
665 insmod /system/lib/modules/qcedev.ko
666
667service qcom-sh /system/bin/sh /init.qcom.sh
668 class late_start
669 user root
670 oneshot
671
672service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
673 class late_start
674 user root
675 disabled
676 oneshot
677
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400678service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
679 class late_start
680 group wifi inet
681 disabled
682 oneshot
683
684service wifi-crda /system/bin/sh /system/etc/init.crda.sh
685 class late_start
686 user root
687 disabled
688 oneshot
689
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400690service config-zram /system/bin/sh /system/etc/init.qcom.zram.sh
691 class late_start
692 user root
693 disabled
694 oneshot
695
696on property:sys.boot_completed=1
697 start qcom-post-boot
698 start config-zram
699
700service atfwd /system/bin/ATFWD-daemon
701 class late_start
702 user system
703 group system radio
704
705service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
706 class late_start
707 user root
708 group root
709 oneshot
710 disabled
711
712on property:ro.data.large_tcp_window_size=true
713 # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
714 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
715
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400716#
717# start multiple rilds based on multisim property
718#
719on property:ro.multisim.simslotcount=2
720 stop ril-daemon
721 start ril-daemon
722 start ril-daemon1
723
724on property:persist.radio.multisim.config=dsds
725 stop ril-daemon
726 start ril-daemon
727 start ril-daemon1
728
729on property:persist.radio.multisim.config=dsda
730 stop ril-daemon
731 start ril-daemon
732 start ril-daemon1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400733
734#service ril-daemon2 /system/bin/rild -c 2
735# class main
736# socket rild2 stream 660 root radio
737# socket rild-debug2 stream 660 radio system
738# user root
739# disabled
740# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
741
742#service ril-daemon3 /system/bin/rild -c 3
743# class main
744# socket rild3 stream 660 root radio
745# socket rild-debug3 stream 660 radio system
746# user root
747# disabled
748# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
749
750service usb_uicc_enable /system/bin/sh /system/etc/init.qcom.uicc.sh
751 class late_start
752 user root
753 disabled
754 oneshot
755
756service usb_uicc_daemon /system/bin/usb_uicc_client
757 class main
758 user system
759 group system log net_raw
760 oneshot
761
762on property:sys.usb_uicc.enabled=1
763 start usb_uicc_enable
764
765on property:sys.usb_uicc.enabled=0
766 start usb_uicc_enable
767
768# virtual sdcard daemon running as media_rw (1023)
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400769service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400770 class late_start
771
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400772service 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 -0400773 class late_start
774 disabled
775
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400776service fuse_uicc0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc0 /storage/uicc0
777 class late_start
778
779service 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 -0400780 class late_start
781 disabled
782
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400783service 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 -0400784 class late_start
785 disabled
786
787# Binding fuse mount point to /storage/emulated/legacy
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400788on property:init.svc.sdcard=running
789 wait /mnt/shell/emulated/0
790 mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400791
792
793service charger /charger
794 class charger
795
796service ssr_diag /system/bin/ssr_diag
797 class late_start
798 user system
799 group system
800 disabled
801
802# Define fastmmi
803service fastmmi /system/bin/mmi
804 user root
805 group root
806 disabled
807
808service fastmmisrv /system/bin/sh /init.qcom.factory.sh
809 user root
810 disabled
811 oneshot
812
813on mmi
814 start fastmmisrv
815
816on ffbm
817 trigger early-fs
818 trigger fs
819 trigger post-fs
820 trigger post-fs-data
821
822 # Load properties from /system/ + /factory after fs mount. Place
823 # this in another action so that the load will be scheduled after the prior
824 # issued fs triggers have completed.
825 trigger load_all_props_action
826
827 trigger early-boot
828 trigger mmi
829
830service qbcharger /charger -m 1
831 disabled
832 oneshot
833
834on property:sys.qbcharger.enable=true
835 start qbcharger
836
837on property:sys.qbcharger.enable=false
838 stop qbcharger
839
840service diag_mdlog_start /system/bin/diag_mdlog
841 class late_start
842 user shell
843 group system qcom_diag sdcard_rw sdcard_r media_rw
844 disabled
845 oneshot
846
847service diag_mdlog_stop /system/bin/diag_mdlog -k
848 class late_start
849 user shell
850 group system qcom_diag sdcard_rw sdcard_r media_rw
851 disabled
852 oneshot
853
854service bms-sh /system/bin/sh /init.qcom.bms.sh
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400855 class core
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400856 user root
857 oneshot
858
859service vm_bms /system/bin/vm_bms
860 user root
861 group root
862 disabled
863
864service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
865 class core
866 user root
867 group root
868 disabled
869
870# Change IO scheduler to CFQ after boot_complete
871on property:sys.boot_completed=1
872 write /sys/block/mmcblk0/queue/scheduler cfq