blob: b099e66633fe55fe4f6a7a92c3a094af438e82fe [file] [log] [blame]
Alex Light9b71cad2016-06-21 16:17:48 -07001# 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
Jeff Vander Stoepc1590642019-02-23 06:08:43 -080015service cppreopts /system/bin/cppreopts.sh /postinstall
16 oneshot
17 disabled
18 user root
Wei Wanga1dced22019-04-01 08:51:18 -070019 priority -20
20 ioprio rt 0
Suren Baghdasaryanf7b663b2021-06-17 19:18:40 -070021 task_profiles ProcessCapacityHigh
Jeff Vander Stoepc1590642019-02-23 06:08:43 -080022 capabilities
23
Bowgo Tsai0f961962019-02-27 11:43:39 +080024# 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
Yifan Hong7605f892019-01-02 11:50:34 -080027 mount_all /system/etc/fstab.postinstall
Jeff Vander Stoepc1590642019-02-23 06:08:43 -080028 exec_start cppreopts
Fyodor Kupolov9b8b12f2016-07-25 11:55:15 -070029 # Optional script to copy additional preloaded content to data directory
Fyodor Kupolov17985b22016-07-27 14:50:04 -070030 exec - system system -- /system/bin/preloads_copy.sh /postinstall
Yifan Hong94a8a8c2019-04-09 11:53:00 -070031 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
Alex Light9b71cad2016-06-21 16:17:48 -070040 setprop sys.cppreopt finished