blob: b3eea29982b2340d9ad4bd88d442c3448272043f [file] [log] [blame]
Martin Stjernholm99392672023-04-19 15:10:06 +01001# Copyright (C) 2023 The Android Open Source Project
Chris Wailese0d677d2021-03-03 12:29:08 -08002#
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
Jiakai Zhangc5ee51b2024-01-31 10:26:02 +080015# A service that handles dexopt. See art/artd/README.md. It's a lazy service
16# that is started and stopped dynamically as needed.
Chris Wailese0d677d2021-03-03 12:29:08 -080017service artd /apex/com.android.art/bin/artd
Jiakai Zhanga312d8a2022-05-27 18:15:42 +010018 interface aidl artd
19 disabled # Prevents the service from automatically starting at boot.
20 oneshot # Prevents the service from automatically restarting each time it is stopped.
Chris Wailese0d677d2021-03-03 12:29:08 -080021 class core
Jiakai Zhanga312d8a2022-05-27 18:15:42 +010022 user artd
Jiakai Zhang58255092022-06-07 15:09:42 +010023 group artd
Jiakai Zhangbc1d0af2022-07-20 16:01:21 +010024 capabilities DAC_OVERRIDE DAC_READ_SEARCH FOWNER CHOWN
Martin Stjernholm99392672023-04-19 15:10:06 +010025
Jiakai Zhangc5ee51b2024-01-31 10:26:02 +080026# Same as above, but for Pre-reboot Dexopt. It runs in a chroot environment that
27# is set up by dexopt_chroot_setup. It's a lazy service that is started and
28# stopped dynamically as needed.
29service artd_pre_reboot /apex/com.android.art/bin/art_exec --chroot=/mnt/pre_reboot_dexopt -- /apex/com.android.art/bin/artd --pre-reboot
30 interface aidl artd_pre_reboot
31 disabled # Prevents the service from automatically starting at boot.
32 oneshot # Prevents the service from automatically restarting each time it is stopped.
33 class core
34 user artd
35 group artd
36 capabilities DAC_OVERRIDE DAC_READ_SEARCH FOWNER CHOWN SYS_CHROOT
37 seclabel u:r:artd:s0
38
39# A service that sets up the chroot environment for Pre-reboot Dexopt. See
40# art/dexopt_chroot_setup/README.md. It's a lazy service that is started and
41# stopped dynamically as needed.
42service dexopt_chroot_setup /apex/com.android.art/bin/dexopt_chroot_setup
43 interface aidl dexopt_chroot_setup
44 disabled # Prevents the service from automatically starting at boot.
45 oneshot # Prevents the service from automatically restarting each time it is stopped.
46 class core
47 user artd
48 group artd
49
Martin Stjernholmd36df662023-05-11 15:27:58 +010050# Run at boot in Android U and later.
Martin Stjernholm99392672023-04-19 15:10:06 +010051service art_boot /apex/com.android.art/bin/art_boot
Martin Stjernholmd36df662023-05-11 15:27:58 +010052 disabled # Started explicitly from system/core/rootdir/init.rc
Martin Stjernholm99392672023-04-19 15:10:06 +010053 oneshot
54 class core
Samuel Holland877358e2023-06-21 18:12:59 -070055 user root