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