Use ro.product.vendor.device to determine if running on Cuttlefish
Bug: 253638551
Test: run MicrodroidHostTestCases -- --abi x86_64 on Cuttlefish running
GSI
Change-Id: I7b6d49d2240d28a377870951ee63cd2538bc4145
diff --git a/libs/nested_virt/src/lib.rs b/libs/nested_virt/src/lib.rs
index ab1f06a..b43fcb7 100644
--- a/libs/nested_virt/src/lib.rs
+++ b/libs/nested_virt/src/lib.rs
@@ -23,9 +23,9 @@
pub fn is_nested_virtualization() -> Result<bool> {
// Currently nested virtualization only occurs when we run KVM inside the cuttlefish VM.
// So we just need to check for vsoc.
- if let Some(value) = system_properties::read("ro.build.product")? {
+ if let Some(value) = system_properties::read("ro.product.vendor.device")? {
// Fuzzy matching to allow for vsoc_x86, vsoc_x86_64, vsoc_x86_64_only, ...
- Ok(value.starts_with("vsoc_x86"))
+ Ok(value.starts_with("vsoc_"))
} else {
Ok(false)
}