Background:
The btsnoop hci log no longer works on newer versions on Android. I have to use a bug report instead to sniff/snoop Bluetooth traffic:
On the device:
- enable developer option USB debugging
- enable developer option HCI logging
- start or restart Bluetooth
- restart the device
On a computer:
- install ADB
- connected to phone via USB
From the terminal:
$adb bugreport bugreport
$unzip bugreport.zip
$cd /FS/data/misc/bluetooth/logs/
- Interpret using
$py3 btsnooz.py btsnoop_hci.log > btsnoop_hci.txt
from Google or wireshark built in functionality
I'm guessing that the bug report is generated using information that is kept in different directories on the device. My problem is that the Bluetooth log is very unpredictable and I can't find any useful documentation on exactly how it works.
The Problem:
Even though I always disable bluetooth HCI snooping 60 seconds after enabling it, 5/10 times the /FS/data/misc/bluetooth/logs/ in the bugreport.zip does not have a /bluetooth folder, or sometimes the log is very short less than 5 seconds logged but other times it is over 1000 seconds or lines long.
Question:
When exactly does bluetooth recording and the bugreport generation start on the device? Is it when bluetooth HCI is enabled in the developer options, is it when bluetooth is turned on or off, or could it be when the device is restarted?