UPDATE: The btsnoop hci log seems to be gradually being removed from user accessible areas on many phones. If you enable hci logging, you may get an error report
adb bugreport anewbugreportfolder
Then unzip the folder. If you're lucky, there is a 'FS' folder that contains the btsnoop_hci.log log several layers down (I don't know why some phones have this and some don't). If you don’t have one, take the text of the error message. file that looks like this
bugreport-2018-08-01-15-08-01.txt
Run btsnooz.py against it. According to Google’s instructions,
To extract snoop logs from the bug report, use the btsnooz script. Get btsnooz.py. Extract the text version of the bug report. Run btsnooz.py on the text version of the bug report: btsnooz.py BUG_REPORT.txt > BTSNOOP.log
As of 01.08.118, the link to btsnooz is located here: https://android.googlesource.com/platform/system/bt/+/master/tools/scripts/btsnooz.py
NO RESPONSIBILITY:
You can see where your phone stores the hci log by reading the bt_stack.conf file. Try
adb shell cat /etc/bluetooth/bt_stack.conf
You will see a line that looks like
Usually, but not always (depending on the phone), the root of the SDCard. There is also a line in this configuration file that can reflect if hci logging is enabled
# EnableBtSnoop logging function
Switching the Enable Bluetooth HCI Bluetooth Tracking Log option in developer options should change it to
# EnableBtSnoop logging function
I say "must" because for some phones this does not update this file. You should:
- Read the bt_stack.conf file. See where the HCI log should be and if bt snoop logging is really enabled
- If the developer’s options indicate that btsnoop_hci logging is turned on and the bt_stack.conf file indicates that it is turned off, try turning the power of the Bluetooth and / or phone on and off.
- If your phone is rutted, manually set
BtSnoopLogOutput=true
If none of the 3 options work, you're out of luck. BT Snoop hci logging is a bit incompatible on different phones. I saw several phones on which I simply could not get it to work, no matter what, but in most cases you should be able to run it. A phone with a root is optional.