bin/vm run-microdroid supports --network-supported flag.
Bug: 340376951
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid
--network-supported
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid
--network-supported --protected
Change-Id: I1d88fe11d79b8ea46e12b6dfaab318aabdc0a2e0
diff --git a/apex/Android.bp b/apex/Android.bp
index 0eb8b9e..99b2dee 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -192,6 +192,9 @@
androidManifest: "AndroidManifest.xml",
},
release_avf_enable_network: {
+ prebuilts: [
+ "com.android.virt.vmnic.rc",
+ ],
arch: {
arm64: {
binaries: ["vmnic"],
@@ -256,14 +259,21 @@
name: "com.android.virt.init.rc",
src: ":virtualizationservice_rc_combined",
filename: "virtualizationservice.rc",
- installable: false,
+ no_full_install: true,
}
prebuilt_etc {
name: "com.android.virt.vfio_handler.rc",
src: "vfio_handler.rc",
filename: "vfio_handler.rc",
- installable: false,
+ no_full_install: true,
+}
+
+prebuilt_etc {
+ name: "com.android.virt.vmnic.rc",
+ src: "vmnic.rc",
+ filename: "vmnic.rc",
+ no_full_install: true,
}
// Virt apex needs a custom signer for its payload
diff --git a/apex/vmnic.rc b/apex/vmnic.rc
new file mode 100644
index 0000000..486f387
--- /dev/null
+++ b/apex/vmnic.rc
@@ -0,0 +1,20 @@
+# Copyright (C) 2024 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 vmnic /apex/com.android.virt/bin/vmnic
+ user system
+ group system
+ interface aidl android.system.virtualizationservice_internal.IVmnic
+ disabled
+ oneshot