Add check for Cuttlefish devices in `is_emulator` (#860)
Co-Authored-By: Ang Li <angli@google.com>
diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index 7d5064a..b8d51d4 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -863,10 +863,11 @@
# as emulators in addition to other things, so only return True on
# an exact match.
return True
- elif self.build_info['hardware'] in ['ranchu', 'goldfish']:
+ elif self.build_info['hardware'] in ['ranchu', 'goldfish', 'cutf_cvm']:
# Ranchu and Goldfish are the hardware properties that the AOSP
# emulators report, so if the device says it's an AOSP emulator, it
- # probably is one.
+ # probably is one. Cuttlefish emulators report 'cutf_cvm` as the
+ # hardware property.
return True
else:
return False