blob: 812b4ce83689f28027e8b4d4fad9c858b0cbd7e4 [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
19 capabilities
20
Bowgo Tsai0f961962019-02-27 11:43:39 +080021# Post install is above Treble VINTF, because it runs some utilities from
22# /system. Therefore, the fstab can only be in either /system or /product.
23on property:sys.cppreopt=requested && property:ro.postinstall.fstab.prefix=/system
Yifan Hong7605f892019-01-02 11:50:34 -080024 mount_all /system/etc/fstab.postinstall
Bowgo Tsai0f961962019-02-27 11:43:39 +080025 setprop sys.cppreopt mounted
26
27on property:sys.cppreopt=requested && property:ro.postinstall.fstab.prefix=/product
28 mount_all /product/etc/fstab.postinstall
29 setprop sys.cppreopt mounted
30
31on property:sys.cppreopt=mounted
Jeff Vander Stoepc1590642019-02-23 06:08:43 -080032 exec_start cppreopts
Fyodor Kupolov9b8b12f2016-07-25 11:55:15 -070033 # Optional script to copy additional preloaded content to data directory
Fyodor Kupolov17985b22016-07-27 14:50:04 -070034 exec - system system -- /system/bin/preloads_copy.sh /postinstall
Alex Light9b71cad2016-06-21 16:17:48 -070035 umount /postinstall
36 setprop sys.cppreopt finished