blob: 68bb568a2c75c70f35f2a26f1ba167b1352f5f3f [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
36# import cne init file
37#on post-fs
38# export LD_PRELOAD /vendor/lib/libNimsWrap.so
39
40on 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
71
72#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
81 write /proc/sys/vm/swappiness 100
82
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
120 insmod /system/lib/modules/adsprpc.ko
121# access permission for secure touch
122 chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
123 chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
124 chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
125 chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
126 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable
127 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch
128 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable
129 chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch
130
131service wcnss-service /system/bin/wcnss_service
132 class main
133 user system
134 group system wifi radio
135 oneshot
136
137on charger
138 wait /dev/block/bootdevice/by-name/system
139 mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
140 chown root system /sys/class/power_supply/bms/current_now
141 chown root system /sys/class/power_supply/bms/voltage_ocv
142 chmod 0664 /sys/class/power_supply/bms/current_now
143 chmod 0664 /sys/class/power_supply/bms/voltage_ocv
144 start vm_bms
145 load_all_props
146 start qcom-post-boot
147
148service imsqmidaemon /system/bin/imsqmidaemon
149 class main
150 user system
151 socket ims_qmid stream 0660 system radio
152 group radio net_raw log qcom_diag
153
154service imsdatadaemon /system/bin/imsdatadaemon
155 class main
156 user system
157 socket ims_datad stream 0660 system radio
158 group system wifi radio inet net_raw log qcom_diag net_admin
159 disabled
160
161on property:sys.ims.QMI_DAEMON_STATUS=1
162 start imsdatadaemon
163
164service qmi_sfs_server /system/bin/qmi_sfs_server
165 class core
166 user system
167 group system net_raw
168
169service ims_rtp_daemon /system/bin/ims_rtp_daemon
170 class main
171 user system
172 socket ims_rtpd stream 0660 system radio
173 group radio net_raw diag qcom_diag log
174 disabled
175
176on property:sys.ims.DATA_DAEMON_STATUS=1
177 start ims_rtp_daemon