Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 1 | # 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 | |
| 30 | on 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 Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 36 | on 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 Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 50 | mkdir /persist/data 0700 system system |
| 51 | restorecon_recursive /persist |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 52 | |
| 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 Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 60 | |
| 61 | on 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 | |
| 70 | on 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 Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 80 | |
| 81 | on 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 Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 89 | mkdir /data/misc/dts 0770 media audio |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 90 | #start camera server as daemon |
| 91 | service qcamerasvr /system/bin/mm-qcamera-daemon |
| 92 | class main |
| 93 | user camera |
| 94 | group camera system inet input graphics |
| 95 | |
| 96 | #enable zram |
| 97 | on property:ro.config.zram=true |
| 98 | swapon_all fstab.qcom |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 99 | # write /proc/sys/vm/swappiness 100 |
| 100 | |
| 101 | #start gpu_snapshotd for gpu hang issue debugging |
| 102 | service 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 Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 106 | |
| 107 | # Allow usb charging to be disabled peristently |
| 108 | on property:persist.usb.chgdisabled=1 |
| 109 | write /sys/class/power_supply/battery/charging_enabled 0 |
| 110 | |
| 111 | on property:persist.usb.chgdisabled=0 |
| 112 | write /sys/class/power_supply/battery/charging_enabled 1 |
| 113 | |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 114 | service qrngp /system/bin/qrngp -f |
| 115 | class main |
| 116 | user root |
| 117 | group root |
| 118 | oneshot |
| 119 | disabled |
| 120 | |
| 121 | on property:sys.boot_completed=1 |
| 122 | start qrngp |
| 123 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 124 | service qseecomd /system/bin/qseecomd |
| 125 | class core |
| 126 | user root |
| 127 | group root |
| 128 | |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 129 | #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 Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 138 | service perfd /system/bin/perfd |
| 139 | class main |
| 140 | user root |
| 141 | disabled |
| 142 | |
| 143 | service 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 | |
| 151 | service time_daemon /system/bin/time_daemon |
| 152 | class late_start |
| 153 | user root |
| 154 | group root |
| 155 | |
| 156 | service audiod /system/bin/audiod |
| 157 | class late_start |
| 158 | user system |
| 159 | group system |
| 160 | |
| 161 | on boot |
| 162 | start rmt_storage |
Zvikomborero VIncent Zvikaramba | 5938ac8 | 2016-07-22 17:01:48 -0400 | [diff] [blame] | 163 | #load modules at boot |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 164 | insmod /system/lib/modules/adsprpc.ko |
Zvikomborero VIncent Zvikaramba | 5938ac8 | 2016-07-22 17:01:48 -0400 | [diff] [blame] | 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 | insmod /system/lib/modules/msm-buspm-dev.ko |
Zvikomborero VIncent Zvikaramba | 5938ac8 | 2016-07-22 17:01:48 -0400 | [diff] [blame] | 170 | insmod /system/lib/modules/spidev.ko |
| 171 | insmod /system/lib/modules/tcp_htcp.ko |
| 172 | insmod /system/lib/modules/tcp_westwood.ko |
Zvikomborero VIncent Zvikaramba | 864e885 | 2016-07-22 18:29:01 -0400 | [diff] [blame] | 173 | insmod /system/lib/modules/radio-iris-transport.ko |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 174 | insmod /system/lib/modules/pronto/pronto_wlan.ko |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 175 | # access permission for secure touch |
| 176 | chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable |
| 177 | chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch |
| 178 | chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable |
| 179 | chmod 0440 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch |
| 180 | chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch_enable |
| 181 | chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0020/secure_touch |
| 182 | chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch_enable |
| 183 | chown system drmrpc /sys/devices/soc.0/78b9000.i2c/i2c-5/5-0070/secure_touch |
| 184 | |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 185 | #service ppd /system/bin/mm-pp-daemon |
| 186 | # class late_start |
| 187 | # disabled |
| 188 | # user system |
| 189 | # socket pps stream 0660 system system |
| 190 | # group system graphics |
| 191 | |
| 192 | #on property:init.svc.surfaceflinger=stopped |
| 193 | # stop ppd |
| 194 | |
| 195 | #on property:init.svc.surfaceflinger=running |
| 196 | # start ppd |
| 197 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 198 | service wcnss-service /system/bin/wcnss_service |
| 199 | class main |
| 200 | user system |
| 201 | group system wifi radio |
| 202 | oneshot |
| 203 | |
| 204 | on charger |
| 205 | wait /dev/block/bootdevice/by-name/system |
| 206 | mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1 |
| 207 | chown root system /sys/class/power_supply/bms/current_now |
| 208 | chown root system /sys/class/power_supply/bms/voltage_ocv |
| 209 | chmod 0664 /sys/class/power_supply/bms/current_now |
| 210 | chmod 0664 /sys/class/power_supply/bms/voltage_ocv |
| 211 | start vm_bms |
| 212 | load_all_props |
| 213 | start qcom-post-boot |
| 214 | |
| 215 | service imsqmidaemon /system/bin/imsqmidaemon |
| 216 | class main |
| 217 | user system |
| 218 | socket ims_qmid stream 0660 system radio |
| 219 | group radio net_raw log qcom_diag |
| 220 | |
| 221 | service imsdatadaemon /system/bin/imsdatadaemon |
| 222 | class main |
| 223 | user system |
| 224 | socket ims_datad stream 0660 system radio |
| 225 | group system wifi radio inet net_raw log qcom_diag net_admin |
| 226 | disabled |
| 227 | |
| 228 | on property:sys.ims.QMI_DAEMON_STATUS=1 |
| 229 | start imsdatadaemon |
| 230 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 231 | service ims_rtp_daemon /system/bin/ims_rtp_daemon |
| 232 | class main |
| 233 | user system |
| 234 | socket ims_rtpd stream 0660 system radio |
| 235 | group radio net_raw diag qcom_diag log |
| 236 | disabled |
| 237 | |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 238 | service imscmservice /system/bin/imscmservice |
| 239 | class main |
| 240 | user system |
| 241 | group radio net_raw diag qcom_diag log |
| 242 | disabled |
| 243 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 244 | on property:sys.ims.DATA_DAEMON_STATUS=1 |
| 245 | start ims_rtp_daemon |
Zvikomborero VIncent Zvikaramba | 9c3ebda | 2016-07-24 00:52:35 -0400 | [diff] [blame] | 246 | start imscmservice |
| 247 | |
| 248 | # SecEDS |
| 249 | service TvoutService_C /system/bin/bintvoutservice |
| 250 | class main |
| 251 | user system |
| 252 | group graphics |
| 253 | on property:ro.SecEDS.enable=false |
| 254 | stop TvoutService_C |
| 255 | |
| 256 | service dts_configurator /system/bin/dts_configurator |
| 257 | class main |
| 258 | user system |
| 259 | group system |
| 260 | oneshot |