diff --git a/apex/Android.bp b/apex/Android.bp index fa3806fa..bb736308 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -35,6 +35,8 @@ apex { "vm", ], filesystems: ["microdroid"], + prebuilts: ["com.android.virt.init.rc"], + file_contexts: ":com.android.virt-file_contexts", } apex_key { @@ -47,3 +49,9 @@ android_app_certificate { name: "com.android.virt.certificate", certificate: "com.android.virt", } + +prebuilt_etc { + name: "com.android.virt.init.rc", + src: "virtmanager.rc", + filename: "init.rc", +} diff --git a/apex/virtmanager.rc b/apex/virtmanager.rc new file mode 100644 index 00000000..4a411542 --- /dev/null +++ b/apex/virtmanager.rc @@ -0,0 +1,19 @@ +# Copyright (C) 2021 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +service virtmanager /apex/com.android.virt/bin/virtmanager + class main + user virtmanager + group virtmanager + disabled