I am trying to extract and analyse BLE traffic from an Android 12 STB to validate certain operations like key press etc. I came across two methods:
- Download the entire bugreport (adb bugreport <file_name>), unzip the output and extract the btsnoop_hci.log from "FS/data/misc/bluetooth/logs" path. or
- Use the 'adb shell dumpsys bluetooth_manager'
The seconds method gives a base64 encoded BTSNOOP_LOG_SUMMARY. Though I am able to decode the summary, it seems to just contain only a summary and not the complete BLE data exchange. The first method (bugreport) does provide a complete pcap file (btsnoop_hci.log) with all the necessary data, but the bugreport generation and download process is very time consuming.
Is there an easier way to download just the btsnoop_hci.log from Android 12, like instruct bugreport to extract only selective files? Or, is it possible to request "adb shell dumpsys bluetooth_manager" to dump all the BLE traffic instead of just the summary?
Also, on Android 10 I was able to monitor/capture live BLE traffic by remotely hooking the device to the androiddump utility of wireshark. But this feature seems to be not available on Android 12 (developer option and HCI snoop log are already enabled on the device). Any idea if this feature is still accessible on Android 12 (like, did they change the default socket address or something) ?