blob: e3fcedc04cdaa8443d8efcecfadfeb8ce73cbd2b [file] [log] [blame]
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001# Copyright (c) 2013-2014, 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
5# met:
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of The Linux Foundation nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28#
29
30on early-init
31 mkdir /firmware 0771 system system
32 mkdir /firmware-modem 0771 system system
33 mkdir /system 0777 root root
34 symlink /data/tombstones /tombstones
35
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040036on fs
37 mount_all fstab.qcom
38
39 # Keeping following partitions outside fstab file. As user may not have
40 # these partition flashed on the device. Failure to mount any partition in fstab file
41 # results in failure to launch late-start class.
42
43 wait /dev/block/bootdevice/by-name/cache
44 check_fs /dev/block/bootdevice/by-name/cache ext4
45 mount ext4 /dev/block/bootdevice/by-name/cache /cache nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
46
47 wait /dev/block/bootdevice/by-name/persist
48 check_fs /dev/block/bootdevice/by-name/persist ext4
49 mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -040050 mkdir /persist/data 0700 system system
51 restorecon_recursive /persist
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040052
53 wait /dev/block/bootdevice/by-name/efs
54 check_fs /dev/block/bootdevice/by-name/efs ext4
55 mount ext4 /dev/block/bootdevice/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
56 chown system radio /efs
57 chmod 0771 /efs
58 rm -rf /efs/dmverity
59 restorecon -R /efs
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -040060
61on fs_sec_selinux
62
63 wait /dev/block/bootdevice/by-name/apnhlos
64 mount vfat /dev/block/bootdevice/by-name/apnhlos /firmware ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware:s0
65
66 wait /dev/block/bootdevice/by-name/modem
67 mount vfat /dev/block/bootdevice/by-name/modem /firmware-modem ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware:s0
68
69
70on fs_selinux
71
72 wait /dev/block/bootdevice/by-name/apnhlos
73 mount vfat /dev/block/bootdevice/by-name/apnhlos /firmware ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337
74
75 wait /dev/block/bootdevice/by-name/modem
76 mount vfat /dev/block/bootdevice/by-name/modem /firmware-modem ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337
77
78
79 #write /sys/kernel/boot_adsp/boot 1
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040080
81on post-fs-data
82 mkdir /data/tombstones 0771 system system
83 mkdir /tombstones/modem 0771 system system
84 mkdir /tombstones/lpass 0771 system system
85 mkdir /tombstones/wcnss 0771 system system
86 mkdir /tombstones/dsps 0771 system system
87 mkdir /persist/data/sfs 0700 system system
88 mkdir /persist/data/tz 0700 system system
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -040089 mkdir /data/misc/dts 0770 media audio
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040090#start camera server as daemon
91service qcamerasvr /system/bin/mm-qcamera-daemon
92 class main
93 user camera
94 group camera system inet input graphics
95
96#enable zram
97on property:ro.config.zram=true
98 swapon_all fstab.qcom
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -040099# write /proc/sys/vm/swappiness 100
100
101#start gpu_snapshotd for gpu hang issue debugging
102service gpu_snapshotd /system/bin/gpu_snapshotd -s /sys/class/kgsl/kgsl-3d0/snapshot -d /data/log/ -m 0700
103 class late_start
104 user system
105 group system
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400106
107# Allow usb charging to be disabled peristently
108on property:persist.usb.chgdisabled=1
109 write /sys/class/power_supply/battery/charging_enabled 0
110
111on property:persist.usb.chgdisabled=0
112 write /sys/class/power_supply/battery/charging_enabled 1
113
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -0400114service qrngp /system/bin/qrngp -f
115 class main
116 user root
117 group root
118 oneshot
119 disabled
120
121on property:sys.boot_completed=1
122 start qrngp
123
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400124service qseecomd /system/bin/qseecomd
125 class core
126 user root
127 group root
128
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -0400129#service aostlmd /system/bin/aostlmd
130# class late_start
131# user system
132# group system net_raw
133
134#service mpdecision /system/bin/mpdecision --avg_comp
135# user root
136# disabled
137
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400138service perfd /system/bin/perfd
139 class main
140 user root
141 disabled
142
143service thermal-engine /system/bin/thermal-engine
144 class main
145 user root
146 socket thermal-send-client stream 0666 system system
147 socket thermal-recv-client stream 0660 system system
148 socket thermal-recv-passive-client stream 0666 system system
149 group root
150
151service time_daemon /system/bin/time_daemon
152 class late_start
153 user root
154 group root
155
156service audiod /system/bin/audiod
157 class late_start
158 user system
159 group system
160
161on boot
162 start rmt_storage
Zvikomborero VIncent Zvikarambab2235ef2016-08-19 02:08:47 -0400163 #load modules at boot
164 insmod /system/lib/modules/adsprpc.ko
165 insmod /system/lib/modules/ansi_cprng.ko
166 insmod /system/lib/modules/core_ctl.ko
167 insmod /system/lib/modules/evbug.ko
168 insmod /system/lib/modules/gator.ko
169
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400170# access permission for secure touch
171 chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
172 chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
173 chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
174 chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
175 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
176 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
177 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
178 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
179
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -0400180#service ppd /system/bin/mm-pp-daemon
181# class late_start
182# disabled
183# user system
184# socket pps stream 0660 system system
185# group system graphics
186
187#on property:init.svc.surfaceflinger=stopped
188# stop ppd
189
190#on property:init.svc.surfaceflinger=running
191# start ppd
192
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400193service wcnss-service /system/bin/wcnss_service
194 class main
195 user system
196 group system wifi radio
197 oneshot
198
199on charger
200 wait /dev/block/bootdevice/by-name/system
201 mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
202 chown root system /sys/class/power_supply/bms/current_now
203 chown root system /sys/class/power_supply/bms/voltage_ocv
204 chmod 0664 /sys/class/power_supply/bms/current_now
205 chmod 0664 /sys/class/power_supply/bms/voltage_ocv
206 start vm_bms
207 load_all_props
208 start qcom-post-boot
209
210service imsqmidaemon /system/bin/imsqmidaemon
211 class main
212 user system
213 socket ims_qmid stream 0660 system radio
214 group radio net_raw log qcom_diag
215
216service imsdatadaemon /system/bin/imsdatadaemon
217 class main
218 user system
219 socket ims_datad stream 0660 system radio
220 group system wifi radio inet net_raw log qcom_diag net_admin
221 disabled
222
223on property:sys.ims.QMI_DAEMON_STATUS=1
224 start imsdatadaemon
225
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400226service ims_rtp_daemon /system/bin/ims_rtp_daemon
227 class main
228 user system
229 socket ims_rtpd stream 0660 system radio
230 group radio net_raw diag qcom_diag log
231 disabled
232
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -0400233service imscmservice /system/bin/imscmservice
234 class main
235 user system
236 group radio net_raw diag qcom_diag log
237 disabled
238
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400239on property:sys.ims.DATA_DAEMON_STATUS=1
240 start ims_rtp_daemon
Zvikomborero VIncent Zvikaramba49d9fbd2016-07-25 01:22:26 -0400241 start imscmservice
242
243# SecEDS
244service TvoutService_C /system/bin/bintvoutservice
245 class main
246 user system
247 group graphics
248on property:ro.SecEDS.enable=false
249 stop TvoutService_C
250