1# Copyright (C) 2023 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 15# A service that handles dexopt. See art/artd/README.md. It's a lazy service 16# that is started and stopped dynamically as needed. 17service artd /apex/com.android.art/bin/artd 18 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. 21 class core 22 user artd 23 group artd 24 capabilities DAC_OVERRIDE DAC_READ_SEARCH FOWNER CHOWN 25 26# 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. 29# The path to the artd binary may be overridden by art_exec. 30service artd_pre_reboot /apex/com.android.art/bin/art_exec \ 31 --chroot=/mnt/pre_reboot_dexopt/chroot \ 32 --process-name-suffix="Pre-reboot Dexopt chroot" \ 33 -- \ 34 /apex/com.android.art/bin/artd \ 35 --pre-reboot 36 interface aidl artd_pre_reboot 37 disabled # Prevents the service from automatically starting at boot. 38 oneshot # Prevents the service from automatically restarting each time it is stopped. 39 class core 40 user artd 41 group artd 42 capabilities DAC_OVERRIDE DAC_READ_SEARCH FOWNER CHOWN SYS_CHROOT SYS_ADMIN 43 44# A service that sets up the chroot environment for Pre-reboot Dexopt. See 45# art/dexopt_chroot_setup/README.md. It's a lazy service that is started and 46# stopped dynamically as needed. 47service dexopt_chroot_setup /apex/com.android.art/bin/dexopt_chroot_setup 48 interface aidl dexopt_chroot_setup 49 disabled # Prevents the service from automatically starting at boot. 50 oneshot # Prevents the service from automatically restarting each time it is stopped. 51 class core 52 user artd 53 group artd 54 capabilities DAC_OVERRIDE DAC_READ_SEARCH SYS_CHROOT SYS_ADMIN 55 56# Run at boot in Android U and later. 57service art_boot /apex/com.android.art/bin/art_boot 58 disabled # Started explicitly from system/core/rootdir/init.rc 59 oneshot 60 class core 61 user root 62