blob: b8c3fb923cc3c3ac8dd7f687c7679cd8a450be0d [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 Zvikarambaa25011a2016-07-21 16:32:35 -040034
35on init
36 # Set permissions for persist partition
37 mkdir /persist 0771 system system
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040038 mkdir /preload 0771 system system
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -040039
40 # See storage config details at http://source.android.com/tech/storage/
41 mkdir /mnt/media_rw/extSdCard 0700 media_rw media_rw
42 mkdir /mnt/media_rw/UsbDriveA 0700 media_rw media_rw
43 mkdir /mnt/media_rw/UsbDriveB 0700 media_rw media_rw
44 mkdir /mnt/media_rw/UsbDriveC 0700 media_rw media_rw
45 mkdir /mnt/media_rw/UsbDriveD 0700 media_rw media_rw
46 mkdir /mnt/media_rw/UsbDriveE 0700 media_rw media_rw
47 mkdir /mnt/media_rw/UsbDriveF 0700 media_rw media_rw
48
49
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040050 # See storage config details at http://source.android.com/tech/storage/
51 mkdir /mnt/shell/emulated 0700 shell shell
52 mkdir /storage/emulated 0555 root root
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040053
54 export EXTERNAL_STORAGE /storage/emulated/legacy
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040055 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
56 export EMULATED_STORAGE_TARGET /storage/emulated
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -040057 export SECONDARY_STORAGE /storage/extSdCard
58 mkdir /storage/extSdCard 0555 root root
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040059
60 # Support legacy paths
61 symlink /storage/emulated/legacy /sdcard
62 symlink /storage/emulated/legacy /mnt/sdcard
63 symlink /storage/emulated/legacy /storage/sdcard0
64 symlink /mnt/shell/emulated/0 /storage/emulated/legacy
65
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -040066 # map "real" external storages paths also in same way. backwards compatibility.
67 symlink /storage/extSdCard /mnt/extSdCard
68 symlink /storage/UsbDriveA /mnt/UsbDriveA
69 symlink /storage/UsbDriveB /mnt/UsbDriveB
70 symlink /storage/UsbDriveC /mnt/UsbDriveC
71 symlink /storage/UsbDriveD /mnt/UsbDriveD
72 symlink /storage/UsbDriveE /mnt/UsbDriveE
73 symlink /storage/UsbDriveF /mnt/UsbDriveF
74
75 mkdir /storage/extSdCard 0700 root root
76 mkdir /storage/UsbDriveA 0700 root root
77 mkdir /storage/UsbDriveB 0700 root root
78 mkdir /storage/UsbDriveC 0700 root root
79 mkdir /storage/UsbDriveD 0700 root root
80 mkdir /storage/UsbDriveE 0700 root root
81 mkdir /storage/UsbDriveF 0700 root root
82
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040083on early-boot
84 # set RLIMIT_MEMLOCK to 64MB
85 setrlimit 8 67108864 67108864
86 # Allow subsystem (modem etc) debugging
87 write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
88 write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
89 write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
90 write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
91 write /sys/kernel/boot_adsp/boot 1
92
93on boot
94 chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
95 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
96 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
97 chown bluetooth bluetooth /proc/bluetooth/sleep/proto
98 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
99 chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
100 chown system system /sys/module/sco/parameters/disable_esco
101 chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
102 chmod 0660 /sys/module/bluetooth_power/parameters/power
103 chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
104 chmod 0660 /sys/class/rfkill/rfkill0/state
105 chmod 0660 /proc/bluetooth/sleep/proto
106 chown bluetooth net_bt_stack /dev/ttyHS0
107 chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
108 chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
109 chmod 0660 /dev/ttyHS0
110 chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
111 chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
112
113 chmod 0660 /dev/ttyHS2
114 chown bluetooth bluetooth /dev/ttyHS2
115
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400116 # for BT MAC address
117 mkdir /efs/bluetooth 0775 radio system
118 # if already exist
119 chown radio system /efs/bluetooth
120 chmod 0775 /efs/bluetooth
121
122 #Create QMUX deamon socket area
123 mkdir /dev/socket/qmux_radio 0770 radio radio
124 chmod 2770 /dev/socket/qmux_radio
125 mkdir /dev/socket/qmux_audio 0770 media audio
126 chmod 2770 /dev/socket/qmux_audio
127 mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
128 chmod 2770 /dev/socket/qmux_bluetooth
129 mkdir /dev/socket/qmux_gps 0770 gps gps
130 chmod 2770 /dev/socket/qmux_gps
131
132 setprop wifi.interface wlan0
133
134 chown system system /proc/sched_orig_load_balance_enable
135 chmod 0660 /proc/sched_orig_load_balance_enable
136
137# Define TCP buffer sizes for various networks
138# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
139 setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
140
141
142 setprop ro.telephony.call_ring.multiple false
143
144 #Remove SUID bit for iproute2 ip tool
145 chmod 0755 /system/bin/ip
146
147
148 chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
149
150 #For bridgemgr daemon to inform the USB driver of the correct transport
151 chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400152
153 # For setting tcp delayed ack
154 chown system system /sys/kernel/ipv4/tcp_delack_seg
155 chown system system /sys/kernel/ipv4/tcp_use_userconfig
156
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400157
158# Define TCP buffer sizes for various networks
159# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
160 setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
161 setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
162 setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
163 setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
164 setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
165 setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
166 setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
167 setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
168 setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
169 setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
170
171# Assign TCP buffer thresholds to be ceiling value of technology maximums
172# Increased technology maximums should be reflected here.
173 write /proc/sys/net/core/rmem_max 8388608
174 write /proc/sys/net/core/wmem_max 8388608
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400175# Define TCP delayed ack settings for WiFi
176 setprop net.tcp.delack.default 1
177 setprop net.tcp.delack.wifi 20
178 setprop net.tcp.usercfg.default 0
179 setprop net.tcp.usercfg.wifi 1
180 setprop persist.tcp.delack.enable true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400181
182 #To allow interfaces to get v6 address when tethering is enabled
183 write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
184 write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
185 write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
186 write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
187 write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
188 write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
189 write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
190 write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
191 write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
192 write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
193 write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
194 write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
195 write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
196 write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
197 write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
198 write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
199 write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
200 write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
201 write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
202 write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
203
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
212 # Set the console loglevel to < KERN_INFO
213 # Set the default message loglevel to KERN_INFO
214 # write /proc/sys/kernel/printk "6 6 1 7"
215
216 # Allow access for CCID command/response timeout configuration
217 chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
218
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400219#
220# start ril-daemon only for targets on which radio is present
221#
222
223on property:ro.baseband=apq
224 setprop ro.radio.noril yes
225 stop ril-daemon
226#
227# start qmuxd and qmiproxy for appropriate targets
228#
229on property:ro.baseband=msm
230 start qmuxd
231
232on property:ro.baseband=mdm
233 start qmuxd
234
235on property:ro.baseband=unknown
236 start qmuxd
237
238#
239# start netmgrd
240#
241on property:ro.use_data_netmgrd=true
242 start netmgrd
243
244#
245# start multiple rilds based on multisim property
246#
247on property:ro.multisim.simslotcount=2
248 stop ril-daemon
249 start ril-daemon
250 start ril-daemon1
251
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400252# msm specific files that need to be created on /data
253on post-fs-data
254 # Create directory for TZ Apps
255 mkdir /data/misc/qsee 0770 system system
256
257 # we will remap this as /mnt/sdcard with the sdcard fuse tool
258 mkdir /data/misc/camera 0770 camera camera
259
260 mkdir /data/media 0770 media_rw media_rw
261 chown media_rw media_rw /data/media
262
263 mkdir /data/misc/ipa 0700 net_admin net_admin
264
265 mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
266
267 # Create the directories used by the Wireless subsystem
268 mkdir /data/misc/wifi 0770 wifi system
269 mkdir /data/misc/wifi/sockets 0770 wifi wifi
270 mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
271 mkdir /data/misc/dhcp 0775 dhcp dhcp
272 chown dhcp dhcp /data/misc/dhcp
273
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400274 # for WIFI TRP/TIS
275 chown system root /data/.psm.info
276 chmod 0664 /data/.psm.info
277
278 # for WIFI Antena Selection
279 chown system root /data/.ant.info
280 chmod 0664 /data/.ant.info
281
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400282 # for WIFI MAC address
283 mkdir /efs/wifi 0775 radio system
284 chown system wifi /efs/wifi/.mac.info
285 chmod 0660 /efs/wifi/.mac.info
286 chmod 0660 /efs/wifi/.mac.cob
287
288 # for WIFI Version
289 write /data/.wifiver.info 0
290 chown system root /data/.wifiver.info
291 chmod 0666 /data/.wifiver.info
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400292
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400293 # Create the directories used by CnE subsystem
294 mkdir /data/connectivity 0771 system system
295 chown system system /data/connectivity
296
297 # Create the directories used by DPM subsystem
298 mkdir /data/dpm 0771 system system
299 chown system system /data/dpm
300
301 mkdir /data/dpm/fdMgr 0771 system system
302 chown system system /data/dpm/fdMgr
303
304 mkdir /data/dpm/nsrm 0771 system system
305 chown system system /data/dpm/nsrm
306
307 # Create directory used by audio subsystem
308 mkdir /data/misc/audio 0770 audio audio
309
310 # Create directory used by the DASH client
311 mkdir /data/misc/dash 0770 media audio
312
313 # Create directory used by display clients
314 mkdir /data/misc/display 0770 system graphics
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400315 mkdir /persist/display 0770 system graphics
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400316
317 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
318 # We chown/chmod /persist again so because mount is run as root + defaults
319 chown system system /persist
320 chmod 0771 /persist
321 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
322 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
323 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
324 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
325
326 # Chown polling nodes as needed from UI running on system server
327 chown system system /sys/devices/platform/msm_sdcc.1/polling
328 chown system system /sys/devices/platform/msm_sdcc.2/polling
329 chown system system /sys/devices/platform/msm_sdcc.3/polling
330 chown system system /sys/devices/platform/msm_sdcc.4/polling
331
332 #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
333 mkdir /data/system 0775 system system
334 #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
335
336 #Create directories for Location services
337 mkdir /data/misc/location 0770 gps gps
338 mkdir /data/misc/location/mq 0770 gps gps
339 mkdir /data/misc/location/xtwifi 0770 gps gps
340 mkdir /data/misc/location/gpsone_d 0770 system gps
341 mkdir /data/misc/location/quipc 0770 gps system
342 mkdir /data/misc/location/gsiff 0770 gps gps
343
344 #Create directory from IMS services
345 mkdir /data/shared 0755
346 chown system system /data/shared
347
348 #Create directory for FOTA
349 mkdir /data/fota 0771
350 chown system system /data/fota
351
352 #Create directory for hostapd
353 mkdir /data/hostapd 0770 system wifi
354
355 # Create /data/time folder for time-services
356 mkdir /data/time/ 0700 system system
357
358 mkdir /data/audio/ 0770 media audio
359
360 setprop vold.post_fs_data_done 1
361
362 #Create a folder for SRS to be able to create a usercfg file
363 mkdir /data/data/media 0770 media media
364
365 #Create folder for mm-qcamera-daemon
366 mkdir /data/camera 0770 media camera
367
368 #Create PERFD deamon related dirs
369 mkdir /data/misc/perfd 0755 root system
370 chmod 2755 /data/misc/perfd
371 mkdir /data/system/perfd 0770 root system
372 chmod 2770 /data/system/perfd
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400373#service qcomsysd /system/bin/qcom-system-daemon
374# class main
375# user root
376# group root qcom_diag
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400377
378 # NFC local data and nfcee xml storage
379 mkdir /data/nfc 0770 nfc nfc
380 mkdir /data/nfc/param 0770 nfc nfc
381
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400382
383service ssr_setup /system/bin/ssr_setup
384 oneshot
385 disabled
386
387service ss_ramdump /system/bin/subsystem_ramdump
388 class main
389 user system
390 group system
391 disabled
392
393on property:persist.sys.ssr.restart_level=*
394 start ssr_setup
395
396on property:persist.sys.ssr.enable_ramdumps=1
397 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
398 start ss_ramdump
399
400on property:persist.sys.ssr.enable_ramdumps=0
401 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
402
403on property:sys.boot_completed=1
404 write /dev/kmsg "Boot completed "
405
406on property:persist.radio.atfwd.start=false
407 stop atfwd
408
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400409service qcom-debug /system/bin/sh /system/etc/init.qcom.debug.sh
410 class core
411 user root
412 oneshot
413
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400414# corefile limit and ETB enabling
415on property:persist.debug.trace=1
416 mkdir /data/core 0777 root root
417 write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
418 write /sys/devices/system/cpu/cpu1/online 1
419 write /sys/devices/system/cpu/cpu2/online 1
420 write /sys/devices/system/cpu/cpu3/online 1
421 write /sys/bus/coresight/devices/coresight-etm0/enable 0
422 write /sys/bus/coresight/devices/coresight-etm1/enable 0
423 write /sys/bus/coresight/devices/coresight-etm2/enable 0
424 write /sys/bus/coresight/devices/coresight-etm3/enable 0
425 write /sys/bus/coresight/devices/coresight-etm0/reset 1
426 write /sys/bus/coresight/devices/coresight-etm1/reset 1
427 write /sys/bus/coresight/devices/coresight-etm2/reset 1
428 write /sys/bus/coresight/devices/coresight-etm3/reset 1
429 write /sys/bus/coresight/devices/coresight-etm0/enable 1
430 write /sys/bus/coresight/devices/coresight-etm1/enable 1
431 write /sys/bus/coresight/devices/coresight-etm2/enable 1
432 write /sys/bus/coresight/devices/coresight-etm3/enable 1
433 write /sys/module/coresight_event/parameters/event_abort_enable 1
434
435on property:init.svc.wpa_supplicant=stopped
436 stop dhcpcd
437
438on property:bluetooth.isEnabled=true
439 start btwlancoex
440 write /sys/class/bluetooth/hci0/idle_timeout 7000
441
442on property:bluetooth.sap.status=running
443 start bt-sap
444
445on property:bluetooth.sap.status=stopped
446 stop bt-sap
447
448on property:bluetooth.dun.status=running
449 start bt-dun
450
451on property:bluetooth.dun.status=stopped
452 stop bt-dun
453
454on property:ro.bluetooth.ftm_enabled=true
455 start ftmd
456
457on property:bluetooth.startbtsnoop=true
458 start btsnoop
459
460on property:bluetooth.startbtsnoop=false
461 stop btsnoop
462
463service qcom-c_core-sh /system/bin/sh /init.qcom.class_core.sh
464 class core
465 user root
466 oneshot
467
468service qcom-c_main-sh /system/bin/sh /init.class_main.sh
469 class main
470 user root
471 oneshot
472
473on property:vold.decrypt=trigger_restart_framework
474 start qcom-c_main-sh
475 start config_bluetooth
476 start wcnss-service
477
478on property:persist.env.fastdorm.enabled=true
479 setprop persist.radio.data_no_toggle 1
480
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400481service cnd /system/bin/cnd
482 class late_start
483 socket cnd stream 660 root inet
484
485service dpmd /system/bin/dpmd
486 class late_start
487 socket dpmd stream 660 root system
488
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400489service irsc_util /system/bin/irsc_util "/etc/sec_config"
490 class main
491 user root
492 oneshot
493
494service rmt_storage /system/bin/rmt_storage
495 class core
496 user root
497 disabled
498
499service rfs_access /system/bin/rfs_access
500 class core
501 user root
502 group system net_raw
503
504on property:wc_transport.start_hci=true
505 start start_hci_filter
506
507on property:wc_transport.start_hci=false
508 stop start_hci_filter
509
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400510service start_hci_filter /system/bin/wcnss_filter
511 class late_start
512 user root
513 group bluetooth qcom_diag
514 disabled
515
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400516service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
517 class core
518 user root
519 oneshot
520
521service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
522 class late_start
523 user bluetooth
524 group bluetooth net_bt_admin net_bt_stack
525 disabled
526 oneshot
527
528on property:bluetooth.hciattach=true
529 start hciattach
530
531on property:bluetooth.hciattach=false
532 setprop bluetooth.status off
533
534service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh
535 class late_start
536 user bluetooth
537 group system bluetooth net_bt_admin misc
538 disabled
539 oneshot
540
541service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
542 class late_start
543 user bluetooth
544 group bluetooth net_bt_admin inet
545 disabled
546 oneshot
547
548service bt-sap /system/bin/sapd 15
549 user bluetooth
550 group bluetooth net_bt_admin
551 class late_start
552 disabled
553 oneshot
554
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400555service btsnoop /system/bin/btsnoop
556 user bluetooth
557 group bluetooth net_bt_admin sdcard_rw sdcard_r
558 class late_start
559 disabled
560 oneshot
561
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400562service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
563 class late_start
564 user root
565 group bluetooth net_bt_admin misc net_bt_stack qcom_diag
566 disabled
567 oneshot
568
569service bridgemgrd /system/bin/bridgemgrd
570 class late_start
571 user radio
572 group radio qcom_diag
573 disabled
574
575service port-bridge /system/bin/port-bridge /dev/mhi_pipe_32 /dev/ttyGS0
576 class main
577 user radio system
578 group radio system inet
579 disabled
580
581service qmiproxy /system/bin/qmiproxy
582 class main
583 user radio
584 group radio qcom_diag
585 disabled
586
587# QMUX must be in multiple groups to support external process connections
588service qmuxd /system/bin/qmuxd
589 class main
590 user root
591 group radio audio bluetooth gps qcom_diag
592 disabled
593
594service netmgrd /system/bin/netmgrd
595 class main
596 disabled
597
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400598service ipacm-diag /system/bin/ipacm-diag
599 class main
600 user system
601 socket ipacm_log_file dgram 660 system net_admin
602 group net_admin qcom_diag
603 disabled
604
605service ipacm /system/bin/ipacm
606 class main
607 user net_admin
608 group net_admin inet
609 disabled
610
611service qti /system/vendor/bin/qti
612 class main
613 disabled
614
615service sensors /system/bin/sensors.qcom
616 class late_start
617 user root
618 group root
619 disabled
620
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400621on property:ro.use_data_netmgrd=false
622 # netmgr not supported on specific target
623 stop netmgrd
624
625# Adjust socket buffer to enlarge TCP receive window for high bandwidth
626# but only if ro.data.large_tcp_window_size property is set.
627on property:ro.data.large_tcp_window_size=true
628 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
629
630service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
631 class late_start
632 user bluetooth
633 group bluetooth net_bt_admin inet net_admin net_raw
634 disabled
635 oneshot
636
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400637service amp_init /system/bin/amploader -i
638 class late_start
639 user root
640 disabled
641 oneshot
642
643service amp_load /system/bin/amploader -l 7000
644 class late_start
645 user root
646 disabled
647 oneshot
648
649service amp_unload /system/bin/amploader -u
650 class late_start
651 user root
652 disabled
653 oneshot
654
655#for WiFi MFG(TestMode)
656service mfgloader /system/bin/mfgloader
657 class main
658 disabled
659 oneshot
660
661service wlandutservice /system/bin/wlandutservice
662 class main
663 user system
664 group wifi net_raw net_admin system inet
665 disabled
666 oneshot
667
668service macloader /system/bin/macloader
669 class main
670 oneshot
671
672on property:init.svc.macloader=stopped
673 chown system root /data/.cid.info
674 chmod 0664 /data/.cid.info
675 chown system root /data/.rev
676 chmod 0664 /data/.rev
677# end of wifi
678
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400679service p2p_supplicant /system/bin/wpa_supplicant \
680 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
681 -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -N \
682 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
683 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
684 -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \
685 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400686# we will start as root and wpa_supplicant will switch to user wifi
687# after setting up the capabilities required for WEXT
688# user wifi
689# group wifi inet keystore
690 class main
691 socket wpa_wlan0 dgram 660 wifi wifi
692 disabled
693 oneshot
694
695service wpa_supplicant /system/bin/wpa_supplicant \
696 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
697 -I/system/etc/wifi/wpa_supplicant_overlay.conf \
698 -O/data/misc/wifi/sockets \
699 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400700 # we will start as root and wpa_supplicant will switch to user wifi
701 # after setting up the capabilities required for WEXT
702 # user wifi
703 # group wifi inet keystore
704 class main
705 socket wpa_wlan0 dgram 660 wifi wifi
706 disabled
707 oneshot
708
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400709service olsrd /system/bin/olsrd -f /etc/wifi/olsrd.conf
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400710 class main
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400711 disabled
712 oneshot
713
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400714service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400715 class late_start
716 disabled
717 oneshot
718
719service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
720 class late_start
721 disabled
722 oneshot
723
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400724service dhcpcd_ibss /system/bin/dhcpcd -BKM
725 class late_start
726 disabled
727 oneshot
728
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400729service iprenew_wlan0 /system/bin/dhcpcd -n
730 class late_start
731 disabled
732 oneshot
733
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400734service ftm_ffbm /system/bin/ftmdaemon
735 user root
736 group root
737 disabled
738 oneshot
739
740service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
741 class late_start
742 disabled
743 oneshot
744
745service iprenew_bt-pan /system/bin/dhcpcd -n
746 class late_start
747 disabled
748 oneshot
749
750service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
751 disabled
752 oneshot
753
754service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
755 disabled
756 oneshot
757
758service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
759 disabled
760 oneshot
761
762service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
763 disabled
764 oneshot
765
766service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
767 disabled
768 oneshot
769
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400770service sec-sh /system/bin/sh /system/etc/init.sec.boot.sh
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400771 class main
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400772 user root
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400773 oneshot
774
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400775service loc_launcher /system/bin/loc_launcher
776 #loc_launcher will start as root and set its uid to gps
777 class late_start
778 group gps inet net_raw qcom_diag net_admin wifi
779
780service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
781 class late_start
782 user root
783 group system
784 disabled
785 oneshot
786
787on property:crypto.driver.load=1
788 insmod /system/lib/modules/qce.ko
789 insmod /system/lib/modules/qcedev.ko
790
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400791service drmdiag /system/bin/drmdiagapp
792 class late_start
793 user root
794 disabled
795 oneshot
796
797on property:drmdiag.load=1
798 start drmdiag
799
800on property:drmdiag.load=0
801 stop drmdiag
802
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400803service qcom-sh /system/bin/sh /init.qcom.sh
804 class late_start
805 user root
806 oneshot
807
808service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
809 class late_start
810 user root
811 disabled
812 oneshot
813
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400814service config-zram /system/bin/sh /system/etc/init.qcom.zram.sh
815 class late_start
816 user root
817 disabled
818 oneshot
819
820on property:sys.boot_completed=1
821 start qcom-post-boot
822 start config-zram
823
824service atfwd /system/bin/ATFWD-daemon
825 class late_start
826 user system
827 group system radio
828
829service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
830 class late_start
831 user root
832 group root
833 oneshot
834 disabled
835
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400836service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D
837 class late_start
838 group radio wifi inet
839 disabled
840 oneshot
841
842on property:persist.data.ds_fmc_app.mode=1
843 start ds_fmc_appd
844
845service ims_regmanager /system/bin/exe-ims-regmanagerprocessnative
846 class late_start
847 group net_bt_admin inet radio wifi
848 disabled
849
850on property:persist.ims.regmanager.mode=1
851 start ims_regmanager
852
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400853on property:ro.data.large_tcp_window_size=true
854 # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
855 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
856
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400857service battery_monitor /system/bin/battery_monitor
858 user system
859 group system
860 disabled
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400861
862#service ril-daemon2 /system/bin/rild -c 2
863# class main
864# socket rild2 stream 660 root radio
865# socket rild-debug2 stream 660 radio system
866# user root
867# disabled
868# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
869
870#service ril-daemon3 /system/bin/rild -c 3
871# class main
872# socket rild3 stream 660 root radio
873# socket rild-debug3 stream 660 radio system
874# user root
875# disabled
876# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
877
878service usb_uicc_enable /system/bin/sh /system/etc/init.qcom.uicc.sh
879 class late_start
880 user root
881 disabled
882 oneshot
883
884service usb_uicc_daemon /system/bin/usb_uicc_client
885 class main
886 user system
887 group system log net_raw
888 oneshot
889
890on property:sys.usb_uicc.enabled=1
891 start usb_uicc_enable
892
893on property:sys.usb_uicc.enabled=0
894 start usb_uicc_enable
895
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400896service profiler_daemon /system/bin/profiler_daemon
897 class late_start
898 user root
899 group root
900 disabled
901
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400902# virtual sdcard daemon running as media_rw (1023)
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400903service sdcard /system/bin/sdcard -u 1023 -g 1023 -l -r /data/media /mnt/shell/emulated
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400904 class late_start
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400905 oneshot
906
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400907
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400908service fuse_extSdCard /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d -f /mnt/media_rw/extSdCard /storage/extSdCard
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400909 class late_start
910 disabled
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400911 oneshot
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400912
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400913service fuse_UsbDriveA /system/bin/sdcard -u 1023 -g 1023 -d -f /mnt/media_rw/UsbDriveA /storage/UsbDriveA
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400914 class late_start
915 disabled
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400916 oneshot
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400917
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400918service fuse_UsbDriveB /system/bin/sdcard -u 1023 -g 1023 -d -f /mnt/media_rw/UsbDriveB /storage/UsbDriveB
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400919 class late_start
920 disabled
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400921 oneshot
922
923service fuse_UsbDriveC /system/bin/sdcard -u 1023 -g 1023 -d -f /mnt/media_rw/UsbDriveC /storage/UsbDriveC
924 class late_start
925 disabled
926 oneshot
927
928service fuse_UsbDriveD /system/bin/sdcard -u 1023 -g 1023 -d -f /mnt/media_rw/UsbDriveD /storage/UsbDriveD
929 class late_start
930 disabled
931 oneshot
932
933service fuse_UsbDriveE /system/bin/sdcard -u 1023 -g 1023 -d -f /mnt/media_rw/UsbDriveE /storage/UsbDriveE
934 class late_start
935 disabled
936 oneshot
937
938service fuse_UsbDriveF /system/bin/sdcard -u 1023 -g 1023 -d -f /mnt/media_rw/UsbDriveF /storage/UsbDriveF
939 class late_start
940 disabled
941 oneshot
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400942
943# Binding fuse mount point to /storage/emulated/legacy
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400944#on property:init.svc.sdcard=running
945# wait /mnt/shell/emulated/0
946# mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400947
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400948service hcidump /system/bin/sh /system/etc/hcidump.sh
949 user bluetooth
950 group bluetooth system net_bt_admin net_admin
951 disabled
952 oneshot
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400953
954service charger /charger
955 class charger
956
957service ssr_diag /system/bin/ssr_diag
958 class late_start
959 user system
960 group system
961 disabled
962
963# Define fastmmi
964service fastmmi /system/bin/mmi
965 user root
966 group root
967 disabled
968
969service fastmmisrv /system/bin/sh /init.qcom.factory.sh
970 user root
971 disabled
972 oneshot
973
974on mmi
975 start fastmmisrv
976
977on ffbm
978 trigger early-fs
979 trigger fs
980 trigger post-fs
981 trigger post-fs-data
982
983 # Load properties from /system/ + /factory after fs mount. Place
984 # this in another action so that the load will be scheduled after the prior
985 # issued fs triggers have completed.
986 trigger load_all_props_action
987
988 trigger early-boot
989 trigger mmi
990
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400991service hvdcp /system/bin/hvdcp
992 class core
993 user root
994 disabled
995
996on property:persist.usb.hvdcp.detect=true
997 start hvdcp
998
999on property:persist.usb.hvdcp.detect=false
1000 stop hvdcp
1001
1002service charger_monitor /system/bin/charger_monitor
1003 user root
1004 group root
1005 disabled
1006
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001007service qbcharger /charger -m 1
1008 disabled
1009 oneshot
1010
1011on property:sys.qbcharger.enable=true
1012 start qbcharger
1013
1014on property:sys.qbcharger.enable=false
1015 stop qbcharger
1016
1017service diag_mdlog_start /system/bin/diag_mdlog
1018 class late_start
1019 user shell
1020 group system qcom_diag sdcard_rw sdcard_r media_rw
1021 disabled
1022 oneshot
1023
1024service diag_mdlog_stop /system/bin/diag_mdlog -k
1025 class late_start
1026 user shell
1027 group system qcom_diag sdcard_rw sdcard_r media_rw
1028 disabled
1029 oneshot
1030
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -04001031service qlogd /system/xbin/qlogd
1032 socket qlogd stream 0662 system system
1033 class main
1034 disabled
1035on property:persist.sys.qlogd=1
1036 start qlogd
1037on property:persist.sys.qlogd=0
1038 stop qlogd
1039
1040service rootagent /system/bin/sh /system/etc/init.qcom.rootagent.sh
1041 disabled
1042 oneshot
1043on property:persist.sys.rootagent=1
1044 start rootagent
1045on property:persist.sys.rootagent=0
1046 stop rootagent
1047
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001048service bms-sh /system/bin/sh /init.qcom.bms.sh
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -04001049 class main
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001050 user root
1051 oneshot
1052
1053service vm_bms /system/bin/vm_bms
1054 user root
1055 group root
1056 disabled
1057
1058service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
1059 class core
1060 user root
1061 group root
1062 disabled
1063
1064# Change IO scheduler to CFQ after boot_complete
1065on property:sys.boot_completed=1
1066 write /sys/block/mmcblk0/queue/scheduler cfq
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -04001067
1068# umount service
1069service umount_service /system/bin/umount /preload
1070 disabled
1071 oneshot
1072
1073# Support Preload install apks
1074on property:persist.sys.storage_preload=1
1075 mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
1076 setprop storage.preload.complete 1
1077
1078on property:persist.sys.storage_preload=0
1079 start umount_service
1080
1081service wfdservice /system/bin/wfdservice
1082 class main
1083 user system
1084 group graphics audio camera inet net_bt net_bt_admin net_bt_stack drmrpc bluetooth media_rw media
1085 disabled
1086 oneshot
1087
1088on property:sys.wfdservice=enable
1089 start wfdservice
1090
1091on property:sys.wfdservice=disable
1092 stop wfdservice