diff --git a/src/tools/interop/idt/capture/ecosystem/play_services/config.py b/src/tools/interop/idt/capture/ecosystem/play_services/config.py index a3e6194953e78f..4247ebcbc286f8 100644 --- a/src/tools/interop/idt/capture/ecosystem/play_services/config.py +++ b/src/tools/interop/idt/capture/ecosystem/play_services/config.py @@ -15,4 +15,4 @@ # limitations under the License. # -enable_foyer_probers = False +enable_foyer_probers = True diff --git a/src/tools/interop/idt/capture/platform/android/capabilities.py b/src/tools/interop/idt/capture/platform/android/capabilities.py index 066a18a3e6c326..82d27f859f8541 100644 --- a/src/tools/interop/idt/capture/platform/android/capabilities.py +++ b/src/tools/interop/idt/capture/platform/android/capabilities.py @@ -6,6 +6,7 @@ from capture.platform.android import Android from capture.utils import log +from . import config logger = log.get_logger(__file__) @@ -26,6 +27,10 @@ def __repr__(self): s += f"{item}: {getattr(self, item)}\n" return s + def check_snoop_log(self) -> bool: + return config.hci_log_level in self.platform.run_adb_command("getprop persist.bluetooth.btsnooplogmode", + capture_output=True).get_captured_output() + def check_capabilities(self): self.logger.info("Checking if device has root") self.c_has_root = self.platform.run_adb_command( @@ -39,10 +44,14 @@ def check_capabilities(self): self.logger.info("Checking device CPU arch") self.c_is_64 = "8" in self.platform.run_adb_command("shell cat /proc/cpuinfo | grep rch", capture_output=True).get_captured_output() - self.logger.info("Attempting to enable HCI snoop logs") - self.platform.run_adb_command("shell setprop persist.bluetooth.btsnooplogmode full").start_command() - self.platform.run_adb_command("shell svc bluetooth disable").start_command() - self.platform.run_adb_command("shell svc bluetooth enable").start_command() - self.c_hci_snoop_enabled = "full" in self.platform.run_adb_command("getprop persist.bluetooth.btsnooplogmode", - capture_output=True).get_captured_output() + self.c_hci_snoop_enabled = self.check_snoop_log() + if not self.c_hci_snoop_enabled: + self.logger.info("HCI not enabled, attempting to enable!") + self.platform.run_adb_command( + f"shell setprop persist.bluetooth.btsnooplogmode {config.hci_log_level}").start_command() + self.platform.run_adb_command("shell svc bluetooth disable").start_command() + self.platform.run_adb_command("shell svc bluetooth enable").start_command() + self.c_hci_snoop_enabled = self.check_snoop_log() + if not self.c_hci_snoop_enabled: + self.logger.error("Failed to enabled HCI snoop log") self.logger.info(self) diff --git a/src/tools/interop/idt/capture/platform/android/config.py b/src/tools/interop/idt/capture/platform/android/config.py index a8c8d38a63d59d..a0b05cd57a68cd 100644 --- a/src/tools/interop/idt/capture/platform/android/config.py +++ b/src/tools/interop/idt/capture/platform/android/config.py @@ -16,4 +16,5 @@ # enable_build_push_tcpdump = True -enable_bug_report = False +enable_bug_report = True +hci_log_level = "full"