5

I would like to enable Bluetooth HCI Snoop logging, however, when I enable the option in Developer Settings, no file shows up in my internal storage directory. I took a look at the /etc/bluetooth/bt_stack.conf file as well, and there are no lines indicating that BtSnoop is enabled or the location where the Bt Snoop log file will be stored. I also tried manually enabling logging with adb shell settings put secure bluetooth_hci_log 1 but that doesn't fix the issue either. I'm running Android 8.1 on a Pixel 2. Any way to actually get the logging enabled or any workarounds?

1 Answer 1

19

It turns out that Google doesn't simply output the logs to the internal memory on Pixel devices. Instead, these are the steps to obtain the logs:

  1. Enable Bluetooth
  2. Enable Developer options
  3. Enable Bluetooth HCI snoop log in Developer options
  4. Disable & reenable Bluetooth
  5. Reboot
  6. Go back to Developer options and "take bug report"
  7. Wait for the bug report to be created, and once finished, click on the notification, and share the zip file via email or however you want to view the logs
  8. Find the log file in FS/data/misc/bluetooth/logs/btsnoop_hci.log
5
  • 3
    Isn't it the case that somewhere between "Reboot" and "Take bug report" there should be a "do whatever Bluetooth actions you want to log" step?
    – aroth
    Apr 15, 2018 at 12:48
  • FYI: On a Nexus 5 with Android 6.0.1 the btsnoop_hci.log file is created directly in the internal storage (/sdcard/btsnoop_hci.log), even without the need of taking a bug report. So if you're doing some serious BT-debugging, avoid 8.0 (and possibly 7.0?)
    – Daniel F
    Jul 13, 2018 at 15:03
  • I found that just disabling and reenable bluetooth step was enough to solve my issue - then the log file gets generated under /data/misc/bluetooth/logs/ Sep 12, 2018 at 11:08
  • 1
    On Xiaomi Mi 9, even this didn't work to get the Bluetooth HCI snoop.
    – Avamander
    Feb 2, 2020 at 19:53
  • I am trying to do the same on One Plus 10 pro which is Android 13, but not able to get the logs. Can we have a solution for One plus devices? Jun 20 at 8:16

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.