1# Copyright 2016 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15service cppreopts /system/bin/cppreopts.sh /postinstall 16 oneshot 17 disabled 18 user root 19 priority -20 20 ioprio rt 0 21 writepid /dev/cpuset/foreground/tasks 22 capabilities 23 24# Post install is above Treble VINTF, because it runs some utilities from 25# /system. Therefore, the fstab can only be in either /system or /product. 26on property:sys.cppreopt=requested && property:ro.postinstall.fstab.prefix=/system 27 mount_all /system/etc/fstab.postinstall 28 exec_start cppreopts 29 # Optional script to copy additional preloaded content to data directory 30 exec - system system -- /system/bin/preloads_copy.sh /postinstall 31 umount_all /system/etc/fstab.postinstall 32 setprop sys.cppreopt finished 33 34on property:sys.cppreopt=requested && property:ro.postinstall.fstab.prefix=/product 35 mount_all /product/etc/fstab.postinstall 36 exec_start cppreopts 37 # Optional script to copy additional preloaded content to data directory 38 exec - system system -- /system/bin/preloads_copy.sh /postinstall 39 umount_all /product/etc/fstab.postinstall 40 setprop sys.cppreopt finished 41