blob: d45496c1d55cef0c3b4e8e473bc6da383e52bb43 [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
Zvikomborero VIncent Zvikarambae0105392016-08-19 01:21:26 -0400305 mkdir /data/snd 0770 media audio
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400306
307 # Create directory used by the DASH client
308 mkdir /data/misc/dash 0770 media audio
309
310 # Create directory used by display clients
311 mkdir /data/misc/display 0770 system graphics
312
313 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
314 # We chown/chmod /persist again so because mount is run as root + defaults
315 chown system system /persist
316 chmod 0771 /persist
317 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
318 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
319 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
320 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
321
322 # Chown polling nodes as needed from UI running on system server
323 chown system system /sys/devices/platform/msm_sdcc.1/polling
324 chown system system /sys/devices/platform/msm_sdcc.2/polling
325 chown system system /sys/devices/platform/msm_sdcc.3/polling
326 chown system system /sys/devices/platform/msm_sdcc.4/polling
327
328 #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
329 mkdir /data/system 0775 system system
330 #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
331
332 #Create directories for Location services
333 mkdir /data/misc/location 0770 gps gps
334 mkdir /data/misc/location/mq 0770 gps gps
335 mkdir /data/misc/location/xtwifi 0770 gps gps
336 mkdir /data/misc/location/gpsone_d 0770 system gps
337 mkdir /data/misc/location/quipc 0770 gps system
338 mkdir /data/misc/location/gsiff 0770 gps gps
339
340 #Create directory from IMS services
341 mkdir /data/shared 0755
342 chown system system /data/shared
343
344 #Create directory for FOTA
345 mkdir /data/fota 0771
346 chown system system /data/fota
347
348 #Create directory for hostapd
349 mkdir /data/hostapd 0770 system wifi
350
351 # Create /data/time folder for time-services
352 mkdir /data/time/ 0700 system system
353
354 mkdir /data/audio/ 0770 media audio
355
356 setprop vold.post_fs_data_done 1
357
358 #Create a folder for SRS to be able to create a usercfg file
359 mkdir /data/data/media 0770 media media
360
361 #Create folder for mm-qcamera-daemon
362 mkdir /data/camera 0770 media camera
363
364 #Create PERFD deamon related dirs
365 mkdir /data/misc/perfd 0755 root system
366 chmod 2755 /data/misc/perfd
367 mkdir /data/system/perfd 0770 root system
368 chmod 2770 /data/system/perfd
369
370 # NFC local data and nfcee xml storage
371 mkdir /data/nfc 0770 nfc nfc
372 mkdir /data/nfc/param 0770 nfc nfc
373
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400374 # DCT(Display Clock Tunning) - Interface 2.0
375 chown radio system /sys/class/dct/dct_node/data
376 chown radio system /sys/class/dct/dct_node/state
377 chown radio system /sys/class/dct/dct_node/log
378 chown radio system /sys/class/dct/dct_node/enabled
379 chown radio system /sys/class/dct/dct_node/interface
380 chown radio system /sys/class/dct/dct_node/libname
381 chown radio system /sys/class/dct/dct_node/tunned
382
383#service qcomsysd /system/bin/qcom-system-daemon
384# class main
385# user root
386# group root qcom_diag
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400387
388service ssr_setup /system/bin/ssr_setup
389 oneshot
390 disabled
391
392service ss_ramdump /system/bin/subsystem_ramdump
393 class main
394 user system
395 group system
396 disabled
397
398on property:persist.sys.ssr.restart_level=*
399 start ssr_setup
400
401on property:persist.sys.ssr.enable_ramdumps=1
402 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
403 start ss_ramdump
404
405on property:persist.sys.ssr.enable_ramdumps=0
406 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
407
408on property:sys.boot_completed=1
409 write /dev/kmsg "Boot completed "
410
411on property:persist.radio.atfwd.start=false
412 stop atfwd
413
414# 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 Zvikaramba30640f82016-07-26 03:16:26 -0400481service irsc_util /system/bin/irsc_util "/etc/sec_config"
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400482 class main
483 user root
484 oneshot
485
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400486service rmt_storage /system/bin/rmt_storage
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400487 class core
488 user root
489 disabled
490
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400491service rfs_access /system/bin/rfs_access
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400492 class core
493 user root
494 group system net_raw
495
496on property:wc_transport.start_hci=true
497 start start_hci_filter
498
499on property:wc_transport.start_hci=false
500 stop start_hci_filter
501
502service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
503 class core
504 user root
505 oneshot
506
507service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
508 class late_start
509 user bluetooth
510 group bluetooth net_bt_admin net_bt_stack
511 disabled
512 oneshot
513
514on property:bluetooth.hciattach=true
515 start hciattach
516
517on property:bluetooth.hciattach=false
518 setprop bluetooth.status off
519
520service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh
521 class late_start
522 user bluetooth
523 group system bluetooth net_bt_admin misc
524 disabled
525 oneshot
526
527service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
528 class late_start
529 user bluetooth
530 group bluetooth net_bt_admin inet
531 disabled
532 oneshot
533
534service bt-sap /system/bin/sapd 15
535 user bluetooth
536 group bluetooth net_bt_admin
537 class late_start
538 disabled
539 oneshot
540
541service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
542 class late_start
543 user root
544 group bluetooth net_bt_admin misc net_bt_stack qcom_diag
545 disabled
546 oneshot
547
548service bridgemgrd /system/bin/bridgemgrd
549 class late_start
550 user radio
551 group radio qcom_diag
552 disabled
553
554service port-bridge /system/bin/port-bridge /dev/mhi_pipe_32 /dev/ttyGS0
555 class main
556 user radio system
557 group radio system inet
558 disabled
559
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400560service qmiproxy /system/bin/qmiproxy
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400561 class main
562 user radio
563 group radio qcom_diag
564 disabled
565
566# QMUX must be in multiple groups to support external process connections
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400567service qmuxd /system/bin/qmuxd
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400568 class main
569 user root
570 group radio audio bluetooth gps qcom_diag
571 disabled
572
573service netmgrd /system/bin/netmgrd
574 class main
575 disabled
576
577on property:ro.use_data_netmgrd=false
578 # netmgr not supported on specific target
579 stop netmgrd
580
581# Adjust socket buffer to enlarge TCP receive window for high bandwidth
582# but only if ro.data.large_tcp_window_size property is set.
583on property:ro.data.large_tcp_window_size=true
584 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
585
586service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
587 class late_start
588 user bluetooth
589 group bluetooth net_bt_admin inet net_admin net_raw
590 disabled
591 oneshot
592
593service p2p_supplicant /system/bin/wpa_supplicant \
594 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
595 -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -N \
596 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
597 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
598 -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \
599 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
600 # we will start as root and wpa_supplicant will switch to user wifi
601 # after setting up the capabilities required for WEXT
602 # user wifi
603 # group wifi inet keystore
604 class main
605 socket wpa_wlan0 dgram 660 wifi wifi
606 disabled
607 oneshot
608
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400609service wpa_supplicant /system/bin/wpa_supplicant -g@android:wpa_wlan0 \
610 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
611 # we will start as root and wpa_supplicant will switch to user wifi
612 # after setting up the capabilities required for WEXT
613 # user wifi
614 # group wifi inet keystore
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400615 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400616 socket wpa_wlan0 dgram 660 wifi wifi
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400617 disabled
618 oneshot
619
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400620service olsrd /system/bin/olsrd -f /etc/wifi/olsrd.conf
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400621 class main
622 disabled
623 oneshot
624
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400625service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400626 class late_start
627 disabled
628 oneshot
629
630service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
631 class late_start
632 disabled
633 oneshot
634
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400635service iprenew_wlan0 /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400636 class late_start
637 disabled
638 oneshot
639
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400640service iprenew_p2p /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400641 class late_start
642 disabled
643 oneshot
644
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400645service ptt_socket_app /system/bin/ptt_socket_app -d
646 class main
647 user root
648 group root
649 disabled
650 oneshot
651
652service ptt_ffbm /system/bin/ptt_socket_app -f -d
653 user root
654 group root
655 disabled
656 oneshot
657
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400658service ftm_ffbm /system/bin/ftmdaemon
659 user root
660 group root
661 disabled
662 oneshot
663
664service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
665 class late_start
666 disabled
667 oneshot
668
669service iprenew_bt-pan /system/bin/dhcpcd -n
670 class late_start
671 disabled
672 oneshot
673
674service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
675 disabled
676 oneshot
677
678service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
679 disabled
680 oneshot
681
682service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
683 disabled
684 oneshot
685
686service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
687 disabled
688 oneshot
689
690service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
691 disabled
692 oneshot
693
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400694#for WiFi MFG(TestMode)
695service mfgloader /system/bin/mfgloader
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400696 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400697 disabled
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400698 oneshot
699
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400700service wlandutservice /system/bin/wlandutservice
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400701 class main
702 user system
703 group wifi net_raw net_admin system inet
704 disabled
705 oneshot
706
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400707service macloader /system/bin/macloader
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400708 class main
709 oneshot
710
711on property:init.svc.macloader=stopped
712 chown system root /data/.cid.info
713 chmod 0664 /data/.cid.info
714 chown system root /data/.rev
715 chmod 0664 /data/.rev
716# end of wifi
717
718
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400719service loc_launcher /system/bin/loc_launcher
720 #loc_launcher will start as root and set its uid to gps
721 class late_start
722 group gps inet net_raw qcom_diag net_admin wifi
723
724service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
725 class late_start
726 user root
727 group system
728 disabled
729 oneshot
730
731on property:crypto.driver.load=1
732 insmod /system/lib/modules/qce.ko
733 insmod /system/lib/modules/qcedev.ko
734
735service qcom-sh /system/bin/sh /init.qcom.sh
736 class late_start
737 user root
738 oneshot
739
740service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
741 class late_start
742 user root
743 disabled
744 oneshot
745
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400746service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
747 class late_start
748 group wifi inet
749 disabled
750 oneshot
751
752service wifi-crda /system/bin/sh /system/etc/init.crda.sh
753 class late_start
754 user root
755 disabled
756 oneshot
757
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400758service config-zram /system/bin/sh /system/etc/init.qcom.zram.sh
759 class late_start
760 user root
761 disabled
762 oneshot
763
764on property:sys.boot_completed=1
765 start qcom-post-boot
766 start config-zram
767
768service atfwd /system/bin/ATFWD-daemon
769 class late_start
770 user system
771 group system radio
772
773service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
774 class late_start
775 user root
776 group root
777 oneshot
778 disabled
779
780on property:ro.data.large_tcp_window_size=true
781 # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
782 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
783
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400784#
785# start multiple rilds based on multisim property
786#
787on property:ro.multisim.simslotcount=2
788 stop ril-daemon
789 start ril-daemon
790 start ril-daemon1
791
792on property:persist.radio.multisim.config=dsds
793 stop ril-daemon
794 start ril-daemon
795 start ril-daemon1
796
797on property:persist.radio.multisim.config=dsda
798 stop ril-daemon
799 start ril-daemon
800 start ril-daemon1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400801
802#service ril-daemon2 /system/bin/rild -c 2
803# class main
804# socket rild2 stream 660 root radio
805# socket rild-debug2 stream 660 radio system
806# user root
807# disabled
808# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
809
810#service ril-daemon3 /system/bin/rild -c 3
811# class main
812# socket rild3 stream 660 root radio
813# socket rild-debug3 stream 660 radio system
814# user root
815# disabled
816# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
817
818service usb_uicc_enable /system/bin/sh /system/etc/init.qcom.uicc.sh
819 class late_start
820 user root
821 disabled
822 oneshot
823
824service usb_uicc_daemon /system/bin/usb_uicc_client
825 class main
826 user system
827 group system log net_raw
828 oneshot
829
830on property:sys.usb_uicc.enabled=1
831 start usb_uicc_enable
832
833on property:sys.usb_uicc.enabled=0
834 start usb_uicc_enable
835
836# virtual sdcard daemon running as media_rw (1023)
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400837service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400838 class late_start
839
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400840service 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 -0400841 class late_start
842 disabled
843
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400844service fuse_uicc0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc0 /storage/uicc0
845 class late_start
846
847service 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 -0400848 class late_start
849 disabled
850
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400851service 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 -0400852 class late_start
853 disabled
854
855# Binding fuse mount point to /storage/emulated/legacy
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400856on property:init.svc.sdcard=running
857 wait /mnt/shell/emulated/0
858 mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400859
860
861service charger /charger
862 class charger
863
864service ssr_diag /system/bin/ssr_diag
865 class late_start
866 user system
867 group system
868 disabled
869
870# Define fastmmi
871service fastmmi /system/bin/mmi
872 user root
873 group root
874 disabled
875
876service fastmmisrv /system/bin/sh /init.qcom.factory.sh
877 user root
878 disabled
879 oneshot
880
881on mmi
882 start fastmmisrv
883
884on ffbm
885 trigger early-fs
886 trigger fs
887 trigger post-fs
888 trigger post-fs-data
889
890 # Load properties from /system/ + /factory after fs mount. Place
891 # this in another action so that the load will be scheduled after the prior
892 # issued fs triggers have completed.
893 trigger load_all_props_action
894
895 trigger early-boot
896 trigger mmi
897
898service qbcharger /charger -m 1
899 disabled
900 oneshot
901
902on property:sys.qbcharger.enable=true
903 start qbcharger
904
905on property:sys.qbcharger.enable=false
906 stop qbcharger
907
908service diag_mdlog_start /system/bin/diag_mdlog
909 class late_start
910 user shell
911 group system qcom_diag sdcard_rw sdcard_r media_rw
912 disabled
913 oneshot
914
915service diag_mdlog_stop /system/bin/diag_mdlog -k
916 class late_start
917 user shell
918 group system qcom_diag sdcard_rw sdcard_r media_rw
919 disabled
920 oneshot
921
922service bms-sh /system/bin/sh /init.qcom.bms.sh
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400923 class core
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400924 user root
925 oneshot
926
927service vm_bms /system/bin/vm_bms
928 user root
929 group root
930 disabled
931
932service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
933 class core
934 user root
935 group root
936 disabled
937
938# Change IO scheduler to CFQ after boot_complete
939on property:sys.boot_completed=1
940 write /sys/block/mmcblk0/queue/scheduler cfq
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400941
942
943# umount service
944service umount_service /system/bin/umount /preload
945 disabled
946 oneshot
947
948# Support Preload install apks
949on property:persist.sys.storage_preload=1
950 mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
951 setprop storage.preload.complete 1
952
953on property:persist.sys.storage_preload=0
954 start umount_service
955