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