blob: 96dad859a618cc4c7108f64f57102b21bf213cbe [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 Zvikaramba1ffaaca2016-07-24 20:33:26 -040036# import cne init file
37#on post-fs
38# export LD_PRELOAD /vendor/lib/libNimsWrap.so
39
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040040on fs
41 mount_all fstab.qcom
42
43 # Keeping following partitions outside fstab file. As user may not have
44 # these partition flashed on the device. Failure to mount any partition in fstab file
45 # results in failure to launch late-start class.
46
47 wait /dev/block/bootdevice/by-name/cache
48 check_fs /dev/block/bootdevice/by-name/cache ext4
49 mount ext4 /dev/block/bootdevice/by-name/cache /cache nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
50
51 wait /dev/block/bootdevice/by-name/persist
52 check_fs /dev/block/bootdevice/by-name/persist ext4
53 mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
54
55 wait /dev/block/bootdevice/by-name/efs
56 check_fs /dev/block/bootdevice/by-name/efs ext4
57 mount ext4 /dev/block/bootdevice/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
58 chown system radio /efs
59 chmod 0771 /efs
60 rm -rf /efs/dmverity
61 restorecon -R /efs
62
63on post-fs-data
64 mkdir /data/tombstones 0771 system system
65 mkdir /tombstones/modem 0771 system system
66 mkdir /tombstones/lpass 0771 system system
67 mkdir /tombstones/wcnss 0771 system system
68 mkdir /tombstones/dsps 0771 system system
69 mkdir /persist/data/sfs 0700 system system
70 mkdir /persist/data/tz 0700 system system
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040071
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040072#start camera server as daemon
73service qcamerasvr /system/bin/mm-qcamera-daemon
74 class main
75 user camera
76 group camera system inet input graphics
77
78#enable zram
79on property:ro.config.zram=true
80 swapon_all fstab.qcom
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -040081 write /proc/sys/vm/swappiness 100
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040082
83# Allow usb charging to be disabled peristently
84on property:persist.usb.chgdisabled=1
85 write /sys/class/power_supply/battery/charging_enabled 0
86
87on property:persist.usb.chgdisabled=0
88 write /sys/class/power_supply/battery/charging_enabled 1
89
90service qseecomd /system/bin/qseecomd
91 class core
92 user root
93 group root
94
95service perfd /system/bin/perfd
96 class main
97 user root
98 disabled
99
100service thermal-engine /system/bin/thermal-engine
101 class main
102 user root
103 socket thermal-send-client stream 0666 system system
104 socket thermal-recv-client stream 0660 system system
105 socket thermal-recv-passive-client stream 0666 system system
106 group root
107
108service time_daemon /system/bin/time_daemon
109 class late_start
110 user root
111 group root
112
113service audiod /system/bin/audiod
114 class late_start
115 user system
116 group system
117
118on boot
119 start rmt_storage
Zvikomborero VIncent Zvikaramba5938ac82016-07-22 17:01:48 -0400120 #load modules at boot
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400121 insmod /system/lib/modules/adsprpc.ko
Zvikomborero VIncent Zvikaramba5938ac82016-07-22 17:01:48 -0400122 insmod /system/lib/modules/ansi_cprng.ko
123 insmod /system/lib/modules/core_ctl.ko
124 insmod /system/lib/modules/evbug.ko
125 insmod /system/lib/modules/gator.ko
126 insmod /system/lib/modules/msm-buspm-dev.ko
Zvikomborero VIncent Zvikaramba5938ac82016-07-22 17:01:48 -0400127 insmod /system/lib/modules/spidev.ko
128 insmod /system/lib/modules/tcp_htcp.ko
129 insmod /system/lib/modules/tcp_westwood.ko
Zvikomborero VIncent Zvikaramba864e8852016-07-22 18:29:01 -0400130 insmod /system/lib/modules/radio-iris-transport.ko
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400131 insmod /system/lib/modules/pronto/pronto_wlan.ko
132# insmod /system/lib/modules/oprofile.ko
133# insmod /system/lib/modules/test-iosched.ko
134# insmod /system/lib/modules/mmc_block_test.ko
135# insmod /system/lib/modules/mmc_test.ko
136# insmod /system/lib/modules/dma_test.ko
137
138
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400139# access permission for secure touch
140 chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
141 chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
142 chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
143 chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
144 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
145 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
146 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
147 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
148
149service wcnss-service /system/bin/wcnss_service
150 class main
151 user system
152 group system wifi radio
153 oneshot
154
155on charger
156 wait /dev/block/bootdevice/by-name/system
157 mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
158 chown root system /sys/class/power_supply/bms/current_now
159 chown root system /sys/class/power_supply/bms/voltage_ocv
160 chmod 0664 /sys/class/power_supply/bms/current_now
161 chmod 0664 /sys/class/power_supply/bms/voltage_ocv
162 start vm_bms
163 load_all_props
164 start qcom-post-boot
165
166service imsqmidaemon /system/bin/imsqmidaemon
167 class main
168 user system
169 socket ims_qmid stream 0660 system radio
170 group radio net_raw log qcom_diag
171
172service imsdatadaemon /system/bin/imsdatadaemon
173 class main
174 user system
175 socket ims_datad stream 0660 system radio
176 group system wifi radio inet net_raw log qcom_diag net_admin
177 disabled
178
179on property:sys.ims.QMI_DAEMON_STATUS=1
180 start imsdatadaemon
181
Zvikomborero VIncent Zvikaramba1ffaaca2016-07-24 20:33:26 -0400182service qmi_sfs_server /system/bin/qmi_sfs_server
183 class core
184 user system
185 group system net_raw
186
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400187service ims_rtp_daemon /system/bin/ims_rtp_daemon
188 class main
189 user system
190 socket ims_rtpd stream 0660 system radio
191 group radio net_raw diag qcom_diag log
192 disabled
193
194on property:sys.ims.DATA_DAEMON_STATUS=1
195 start ims_rtp_daemon