blob: 1cf155955360135f19dbfff27748f66f4d309771 [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
Zvikomborero VIncent Zvikarambac3a952c2016-08-30 19:47:29 -0400253 mkdir /data/tee 0770 system system
254
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400255 # we will remap this as /mnt/sdcard with the sdcard fuse tool
256 mkdir /data/misc/camera 0770 camera camera
257
258 mkdir /data/media 0770 media_rw media_rw
259 chown media_rw media_rw /data/media
Zvikomborero VIncent Zvikarambac3a952c2016-08-30 19:47:29 -0400260
261 mkdir /data/system/inputmethod 0770 system system
262
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400263 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
274 # for WIFI MAC address
275 mkdir /efs/wifi 0775 radio system
276 chown system wifi /efs/wifi/.mac.info
277 chmod 0660 /efs/wifi/.mac.info
278 chmod 0660 /efs/wifi/.mac.cob
279
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400280 # for WIFI TRP/TIS
281 chown system root /data/.psm.info
282 chmod 0664 /data/.psm.info
283
284 # for WIFI Antena Selection
285 chown system root /data/.ant.info
286 chmod 0664 /data/.ant.info
287
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400288 # for WIFI Version
289 write /data/.wifiver.info 0
290 chown system root /data/.wifiver.info
291 chmod 0666 /data/.wifiver.info
292 # Create the directories used by CnE subsystem
293 mkdir /data/connectivity 0771 system system
294 chown system system /data/connectivity
295
296 # Create the directories used by DPM subsystem
297 mkdir /data/dpm 0771 system system
298 chown system system /data/dpm
299
300 mkdir /data/dpm/fdMgr 0771 system system
301 chown system system /data/dpm/fdMgr
302
303 mkdir /data/dpm/nsrm 0771 system system
304 chown system system /data/dpm/nsrm
305
306 # Create directory used by audio subsystem
307 mkdir /data/misc/audio 0770 audio audio
Zvikomborero VIncent Zvikarambae0105392016-08-19 01:21:26 -0400308 mkdir /data/snd 0770 media audio
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400309
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
315
316 # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
317 # We chown/chmod /persist again so because mount is run as root + defaults
318 chown system system /persist
319 chmod 0771 /persist
320 chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
321 chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
322 chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
323 chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
324
325 # Chown polling nodes as needed from UI running on system server
326 chown system system /sys/devices/platform/msm_sdcc.1/polling
327 chown system system /sys/devices/platform/msm_sdcc.2/polling
328 chown system system /sys/devices/platform/msm_sdcc.3/polling
329 chown system system /sys/devices/platform/msm_sdcc.4/polling
330
331 #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
332 mkdir /data/system 0775 system system
333 #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
334
335 #Create directories for Location services
336 mkdir /data/misc/location 0770 gps gps
337 mkdir /data/misc/location/mq 0770 gps gps
338 mkdir /data/misc/location/xtwifi 0770 gps gps
339 mkdir /data/misc/location/gpsone_d 0770 system gps
340 mkdir /data/misc/location/quipc 0770 gps system
341 mkdir /data/misc/location/gsiff 0770 gps gps
342
343 #Create directory from IMS services
344 mkdir /data/shared 0755
345 chown system system /data/shared
346
347 #Create directory for FOTA
348 mkdir /data/fota 0771
349 chown system system /data/fota
350
351 #Create directory for hostapd
352 mkdir /data/hostapd 0770 system wifi
353
354 # Create /data/time folder for time-services
355 mkdir /data/time/ 0700 system system
356
357 mkdir /data/audio/ 0770 media audio
358
359 setprop vold.post_fs_data_done 1
360
361 #Create a folder for SRS to be able to create a usercfg file
362 mkdir /data/data/media 0770 media media
363
364 #Create folder for mm-qcamera-daemon
365 mkdir /data/camera 0770 media camera
366
367 #Create PERFD deamon related dirs
368 mkdir /data/misc/perfd 0755 root system
369 chmod 2755 /data/misc/perfd
370 mkdir /data/system/perfd 0770 root system
371 chmod 2770 /data/system/perfd
372
373 # NFC local data and nfcee xml storage
374 mkdir /data/nfc 0770 nfc nfc
375 mkdir /data/nfc/param 0770 nfc nfc
376
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400377 # DCT(Display Clock Tunning) - Interface 2.0
378 chown radio system /sys/class/dct/dct_node/data
379 chown radio system /sys/class/dct/dct_node/state
380 chown radio system /sys/class/dct/dct_node/log
381 chown radio system /sys/class/dct/dct_node/enabled
382 chown radio system /sys/class/dct/dct_node/interface
383 chown radio system /sys/class/dct/dct_node/libname
384 chown radio system /sys/class/dct/dct_node/tunned
385
386#service qcomsysd /system/bin/qcom-system-daemon
387# class main
388# user root
389# group root qcom_diag
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400390
391service ssr_setup /system/bin/ssr_setup
392 oneshot
393 disabled
394
395service ss_ramdump /system/bin/subsystem_ramdump
396 class main
397 user system
398 group system
399 disabled
400
401on property:persist.sys.ssr.restart_level=*
402 start ssr_setup
403
404on property:persist.sys.ssr.enable_ramdumps=1
405 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
406 start ss_ramdump
407
408on property:persist.sys.ssr.enable_ramdumps=0
409 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
410
411on property:sys.boot_completed=1
412 write /dev/kmsg "Boot completed "
413
414on property:persist.radio.atfwd.start=false
415 stop atfwd
416
417# corefile limit and ETB enabling
418on property:persist.debug.trace=1
419 mkdir /data/core 0777 root root
420 write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e"
421 write /sys/devices/system/cpu/cpu1/online 1
422 write /sys/devices/system/cpu/cpu2/online 1
423 write /sys/devices/system/cpu/cpu3/online 1
424 write /sys/bus/coresight/devices/coresight-etm0/enable 0
425 write /sys/bus/coresight/devices/coresight-etm1/enable 0
426 write /sys/bus/coresight/devices/coresight-etm2/enable 0
427 write /sys/bus/coresight/devices/coresight-etm3/enable 0
428 write /sys/bus/coresight/devices/coresight-etm0/reset 1
429 write /sys/bus/coresight/devices/coresight-etm1/reset 1
430 write /sys/bus/coresight/devices/coresight-etm2/reset 1
431 write /sys/bus/coresight/devices/coresight-etm3/reset 1
432 write /sys/bus/coresight/devices/coresight-etm0/enable 1
433 write /sys/bus/coresight/devices/coresight-etm1/enable 1
434 write /sys/bus/coresight/devices/coresight-etm2/enable 1
435 write /sys/bus/coresight/devices/coresight-etm3/enable 1
436 write /sys/module/coresight_event/parameters/event_abort_enable 1
437
438on property:init.svc.wpa_supplicant=stopped
439 stop dhcpcd
440
441on property:bluetooth.isEnabled=true
442 start btwlancoex
443 write /sys/class/bluetooth/hci0/idle_timeout 7000
444
445on property:bluetooth.sap.status=running
446 start bt-sap
447
448on property:bluetooth.sap.status=stopped
449 stop bt-sap
450
451on property:bluetooth.dun.status=running
452 start bt-dun
453
454on property:bluetooth.dun.status=stopped
455 stop bt-dun
456
457on property:ro.bluetooth.ftm_enabled=true
458 start ftmd
459
460on property:bluetooth.startbtsnoop=true
461 start btsnoop
462
463on property:bluetooth.startbtsnoop=false
464 stop btsnoop
465
466service qcom-c_core-sh /system/bin/sh /init.qcom.class_core.sh
467 class core
468 user root
469 oneshot
470
471service qcom-c_main-sh /system/bin/sh /init.class_main.sh
472 class main
473 user root
474 oneshot
475
476on property:vold.decrypt=trigger_restart_framework
477 start qcom-c_main-sh
478 start config_bluetooth
479 start wcnss-service
480
481on property:persist.env.fastdorm.enabled=true
482 setprop persist.radio.data_no_toggle 1
483
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400484service irsc_util /system/bin/irsc_util "/etc/sec_config"
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400485 class main
486 user root
487 oneshot
488
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400489service rmt_storage /system/bin/rmt_storage
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400490 class core
491 user root
492 disabled
493
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400494service rfs_access /system/bin/rfs_access
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400495 class core
496 user root
497 group system net_raw
498
499on property:wc_transport.start_hci=true
500 start start_hci_filter
501
502on property:wc_transport.start_hci=false
503 stop start_hci_filter
504
505service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
506 class core
507 user root
508 oneshot
509
510service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
511 class late_start
512 user bluetooth
513 group bluetooth net_bt_admin net_bt_stack
514 disabled
515 oneshot
516
517on property:bluetooth.hciattach=true
518 start hciattach
519
520on property:bluetooth.hciattach=false
521 setprop bluetooth.status off
522
523service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh
524 class late_start
525 user bluetooth
526 group system bluetooth net_bt_admin misc
527 disabled
528 oneshot
529
530service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
531 class late_start
532 user bluetooth
533 group bluetooth net_bt_admin inet
534 disabled
535 oneshot
536
537service bt-sap /system/bin/sapd 15
538 user bluetooth
539 group bluetooth net_bt_admin
540 class late_start
541 disabled
542 oneshot
543
544service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
545 class late_start
546 user root
547 group bluetooth net_bt_admin misc net_bt_stack qcom_diag
548 disabled
549 oneshot
550
551service bridgemgrd /system/bin/bridgemgrd
552 class late_start
553 user radio
554 group radio qcom_diag
555 disabled
556
557service port-bridge /system/bin/port-bridge /dev/mhi_pipe_32 /dev/ttyGS0
558 class main
559 user radio system
560 group radio system inet
561 disabled
562
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400563service qmiproxy /system/bin/qmiproxy
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400564 class main
565 user radio
Zvikomborero VIncent Zvikarambac3a952c2016-08-30 19:47:29 -0400566 group radio audio bluetooth gps qcom_diag
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400567 disabled
568
569# QMUX must be in multiple groups to support external process connections
Zvikomborero VIncent Zvikarambac3a952c2016-08-30 19:47:29 -0400570#service qmuxd /system/bin/qmuxd
571# class main
572# user root
573# group radio audio bluetooth gps qcom_diag
574# disabled
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400575
576service netmgrd /system/bin/netmgrd
577 class main
578 disabled
579
580on property:ro.use_data_netmgrd=false
581 # netmgr not supported on specific target
582 stop netmgrd
583
584# Adjust socket buffer to enlarge TCP receive window for high bandwidth
585# but only if ro.data.large_tcp_window_size property is set.
586on property:ro.data.large_tcp_window_size=true
587 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
588
589service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
590 class late_start
591 user bluetooth
592 group bluetooth net_bt_admin inet net_admin net_raw
593 disabled
594 oneshot
595
596service p2p_supplicant /system/bin/wpa_supplicant \
597 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
598 -I/system/etc/wifi/wpa_supplicant_overlay.conf -O/data/misc/wifi/sockets -N \
599 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
600 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
601 -puse_p2p_group_interface=1 -puse_multi_chan_concurrent=1 \
602 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
603 # we will start as root and wpa_supplicant will switch to user wifi
604 # after setting up the capabilities required for WEXT
605 # user wifi
606 # group wifi inet keystore
607 class main
608 socket wpa_wlan0 dgram 660 wifi wifi
609 disabled
610 oneshot
611
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400612service wpa_supplicant /system/bin/wpa_supplicant -g@android:wpa_wlan0 \
613 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
614 # we will start as root and wpa_supplicant will switch to user wifi
615 # after setting up the capabilities required for WEXT
616 # user wifi
617 # group wifi inet keystore
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400618 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400619 socket wpa_wlan0 dgram 660 wifi wifi
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400620 disabled
621 oneshot
622
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400623service olsrd /system/bin/olsrd -f /etc/wifi/olsrd.conf
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400624 class main
625 disabled
626 oneshot
627
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400628service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400629 class late_start
630 disabled
631 oneshot
632
633service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
634 class late_start
635 disabled
636 oneshot
637
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400638service iprenew_wlan0 /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikaramba9c3ebda2016-07-24 00:52:35 -0400639 class late_start
640 disabled
641 oneshot
642
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400643service iprenew_p2p /system/bin/dhcpcd -n
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400644 class late_start
645 disabled
646 oneshot
647
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400648service ptt_socket_app /system/bin/ptt_socket_app -d
649 class main
650 user root
651 group root
652 disabled
653 oneshot
654
655service ptt_ffbm /system/bin/ptt_socket_app -f -d
656 user root
657 group root
658 disabled
659 oneshot
660
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400661service ftm_ffbm /system/bin/ftmdaemon
662 user root
663 group root
664 disabled
665 oneshot
666
667service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
668 class late_start
669 disabled
670 oneshot
671
672service iprenew_bt-pan /system/bin/dhcpcd -n
673 class late_start
674 disabled
675 oneshot
676
677service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
678 disabled
679 oneshot
680
681service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
682 disabled
683 oneshot
684
685service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
686 disabled
687 oneshot
688
689service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
690 disabled
691 oneshot
692
693service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
694 disabled
695 oneshot
696
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400697#for WiFi MFG(TestMode)
698service mfgloader /system/bin/mfgloader
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400699 class main
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400700 disabled
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400701 oneshot
702
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400703service wlandutservice /system/bin/wlandutservice
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400704 class main
705 user system
706 group wifi net_raw net_admin system inet
707 disabled
708 oneshot
709
Zvikomborero VIncent Zvikaramba30640f82016-07-26 03:16:26 -0400710service macloader /system/bin/macloader
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400711 class main
712 oneshot
713
714on property:init.svc.macloader=stopped
715 chown system root /data/.cid.info
716 chmod 0664 /data/.cid.info
717 chown system root /data/.rev
718 chmod 0664 /data/.rev
719# end of wifi
720
721
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400722service loc_launcher /system/bin/loc_launcher
723 #loc_launcher will start as root and set its uid to gps
724 class late_start
725 group gps inet net_raw qcom_diag net_admin wifi
726
727service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
728 class late_start
729 user root
730 group system
731 disabled
732 oneshot
733
734on property:crypto.driver.load=1
735 insmod /system/lib/modules/qce.ko
736 insmod /system/lib/modules/qcedev.ko
737
738service qcom-sh /system/bin/sh /init.qcom.sh
739 class late_start
740 user root
741 oneshot
742
743service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
744 class late_start
745 user root
746 disabled
747 oneshot
748
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400749service wifi-sdio-on /system/bin/sh /system/etc/init.qcom.sdio.sh
750 class late_start
751 group wifi inet
752 disabled
753 oneshot
754
755service wifi-crda /system/bin/sh /system/etc/init.crda.sh
756 class late_start
757 user root
758 disabled
759 oneshot
760
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400761service config-zram /system/bin/sh /system/etc/init.qcom.zram.sh
762 class late_start
763 user root
764 disabled
765 oneshot
766
767on property:sys.boot_completed=1
768 start qcom-post-boot
769 start config-zram
770
771service atfwd /system/bin/ATFWD-daemon
772 class late_start
773 user system
774 group system radio
775
776service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf
777 class late_start
778 user root
779 group root
780 oneshot
781 disabled
782
783on property:ro.data.large_tcp_window_size=true
784 # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
785 write /proc/sys/net/ipv4/tcp_adv_win_scale 2
786
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400787#
788# start multiple rilds based on multisim property
789#
790on property:ro.multisim.simslotcount=2
791 stop ril-daemon
792 start ril-daemon
793 start ril-daemon1
794
795on property:persist.radio.multisim.config=dsds
796 stop ril-daemon
797 start ril-daemon
798 start ril-daemon1
799
800on property:persist.radio.multisim.config=dsda
801 stop ril-daemon
802 start ril-daemon
803 start ril-daemon1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400804
805#service ril-daemon2 /system/bin/rild -c 2
806# class main
807# socket rild2 stream 660 root radio
808# socket rild-debug2 stream 660 radio system
809# user root
810# disabled
811# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
812
813#service ril-daemon3 /system/bin/rild -c 3
814# class main
815# socket rild3 stream 660 root radio
816# socket rild-debug3 stream 660 radio system
817# user root
818# disabled
819# group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log
820
821service usb_uicc_enable /system/bin/sh /system/etc/init.qcom.uicc.sh
822 class late_start
823 user root
824 disabled
825 oneshot
826
827service usb_uicc_daemon /system/bin/usb_uicc_client
828 class main
829 user system
830 group system log net_raw
831 oneshot
832
833on property:sys.usb_uicc.enabled=1
834 start usb_uicc_enable
835
836on property:sys.usb_uicc.enabled=0
837 start usb_uicc_enable
838
839# virtual sdcard daemon running as media_rw (1023)
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400840service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400841 class late_start
842
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400843service 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 -0400844 class late_start
845 disabled
846
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400847service fuse_uicc0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/uicc0 /storage/uicc0
848 class late_start
849
850service 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 -0400851 class late_start
852 disabled
853
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400854service 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 -0400855 class late_start
856 disabled
857
858# Binding fuse mount point to /storage/emulated/legacy
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400859on property:init.svc.sdcard=running
860 wait /mnt/shell/emulated/0
861 mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400862
863
864service charger /charger
865 class charger
866
867service ssr_diag /system/bin/ssr_diag
868 class late_start
869 user system
870 group system
871 disabled
872
873# Define fastmmi
874service fastmmi /system/bin/mmi
875 user root
876 group root
877 disabled
878
879service fastmmisrv /system/bin/sh /init.qcom.factory.sh
880 user root
881 disabled
882 oneshot
883
884on mmi
885 start fastmmisrv
886
887on ffbm
888 trigger early-fs
889 trigger fs
890 trigger post-fs
891 trigger post-fs-data
892
893 # Load properties from /system/ + /factory after fs mount. Place
894 # this in another action so that the load will be scheduled after the prior
895 # issued fs triggers have completed.
896 trigger load_all_props_action
897
898 trigger early-boot
899 trigger mmi
900
901service qbcharger /charger -m 1
902 disabled
903 oneshot
904
905on property:sys.qbcharger.enable=true
906 start qbcharger
907
908on property:sys.qbcharger.enable=false
909 stop qbcharger
910
911service diag_mdlog_start /system/bin/diag_mdlog
912 class late_start
913 user shell
914 group system qcom_diag sdcard_rw sdcard_r media_rw
915 disabled
916 oneshot
917
918service diag_mdlog_stop /system/bin/diag_mdlog -k
919 class late_start
920 user shell
921 group system qcom_diag sdcard_rw sdcard_r media_rw
922 disabled
923 oneshot
924
925service bms-sh /system/bin/sh /init.qcom.bms.sh
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400926 class core
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400927 user root
928 oneshot
929
930service vm_bms /system/bin/vm_bms
931 user root
932 group root
933 disabled
934
935service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf
936 class core
937 user root
938 group root
939 disabled
940
941# Change IO scheduler to CFQ after boot_complete
942on property:sys.boot_completed=1
943 write /sys/block/mmcblk0/queue/scheduler cfq
Zvikomborero VIncent Zvikaramba31976352016-07-25 01:15:58 -0400944
945
946# umount service
947service umount_service /system/bin/umount /preload
948 disabled
949 oneshot
950
951# Support Preload install apks
952on property:persist.sys.storage_preload=1
953 mount ext4 /dev/block/bootdevice/by-name/hidden /preload nosuid nodev ro barrier=1
954 setprop storage.preload.complete 1
955
956on property:persist.sys.storage_preload=0
957 start umount_service
958