Enable adb and adb root with debug level or debug policy
adb and adb root are enabled when debug level is full (--debug=full)
or debug policy allows so.
Debug policy is handled in init.rc instead of changing bootconfig
behavior. It allows the identity check to detect debug level changes
by bootconfig in the initrd regardless of debug policy.
Bug: 268270904, Bug: 26826551
Test: Manual test with custom debug policy
Change-Id: Ie6b0a6ae61e387d28873db91f1dcf08941b2fe61
diff --git a/virtualizationmanager/src/payload.rs b/virtualizationmanager/src/payload.rs
index 02e8f8e..99aea01 100644
--- a/virtualizationmanager/src/payload.rs
+++ b/virtualizationmanager/src/payload.rs
@@ -14,6 +14,7 @@
//! Payload disk image
+use crate::debug_config::should_include_debug_apexes;
use android_system_virtualizationservice::aidl::android::system::virtualizationservice::{
DiskImage::DiskImage,
Partition::Partition,
@@ -382,7 +383,7 @@
debug_level: DebugLevel,
) -> Vec<&'a ApexInfo> {
let mut additional_apexes: Vec<&str> = MICRODROID_REQUIRED_APEXES.to_vec();
- if debug_level != DebugLevel::NONE {
+ if should_include_debug_apexes(debug_level) {
additional_apexes.extend(MICRODROID_REQUIRED_APEXES_DEBUG.to_vec());
}