Перейти к содержимому

Btsnoop hci log что за файл

  • автор:

What is Bluetooth HCI Snoop Log? (Host Controller Interface)

This site contains affiliate links to products, and we may receive a commission for purchases made through these links.

If you are an Android owner, you might not realize it but your phone is full of hidden settings and commands. A lot of these settings were put in place to help debug and develop new apps but within this long list of settings and commands, you’ll find something particularly useful—Bluetooth HCI Snoop Log.

The Bluetooth HCI Snoop Log gives developers and security analysts access to Bluetooth host controller interface packets. When enabled, the Bluetooth HCI Snoop Log captures and stores these packets in an accessible file in your device’s storage log. It can later be retrieved and analyzed with specific software.

Let’s take a deeper look at what the Bluetooth HCI Snoop Log does and how you can access it on your Android device. If you’re ready to get into the inner workings of your phone, let’s get started.

What is Bluetooth HCI Snoop Log

What do Bluetooth HCI Snoop Logs Do?

A Bluetooth HCI snoop log is a type of log file that stores all of the transmissions sent through Bluetooth on your Android device. If you can access a Bluetooth HCI snoop log, it means you’ve downloaded an app that logs data on your phone through Bluetooth communication and transmission. This data is automatically logged and backed up into the snoop log.

If this sounds like a possible invasion of privacy, don’t worry. Bluetooth HCI snoop logs do not export your data. All of the logs are simply stored on your phone and be accessed and analyzed at a later date. You just have to know how to access the logs.

Most Android devices are developed with existing HCI logging software but if you’re currently using a device that predates Android 4.4+, you may need to download a third-party app to log and access your Bluetooth HCI snoop logs.

What are HCI Logs?

A host controller interface (HCI) log is a record of all HCI processes performed on your device. The host controller interface acts as an intermediary between the controller and host elements of your device’s Bluetooth protocol stack. It’s implemented in a host_test project through specific protocols, including UART and SPI.

Newer Android devices are developed using modern Bluetooth Low Energy (BLE) protocol stacks, which speed up hops at wider frequencies. This helps limit the amount of external interference and allows your device to quickly identify nearby Bluetooth frequencies while simultaneously filtering out non-necessary signals.

This helps increase device security, preventing data from being lost in the Bluetooth transmission process. The HCI log keeps a record of this data transfer so you can later examine it for potential security risks and performance problems.

How to Create and Access a Bluetooth HCI Snoop Log

Before you can export and access a Bluetooth HCI snoop log, you must first enable your device’s developer settings. These settings are usually hidden out of sight to keep unwittingly phone owners from irreversibly tampering with their phone’s inner workings. However, you can gain access to the developer settings by tapping the builder number seven times in your Android settings.

  • After accessing your device’s developer settings,
  • go into the main menu and
  • locate the “Enable Bluetooth HCI Snoop Log” checkbox.
  • Click the checkbox to start the log, then stop it again before exporting the final file.
  • The final log will be stored as a btsnoop_hci.log file in your device’s USD root or SD storage.

To access the file, you will need specific network protocol analysis software such as Wireshark.

Before opening the files, rename them to *.cap and then process them through the software. You’ll be able to view the host controller interface protocols and analyze them for corruption or security breaches.

You have two options for retrieving and viewing HCI logs:

1. You can export and view Bluetooth HCI snoop logs by connecting your android device to a desktop computer and locating the files stored in your mountable drives. Locate the file at C:/Users/Public/Public Documents/Frontline Test Equipment/My Capture File/ then export it into your third-party protocol analysis software.

2. You can export and view Bluetooth HCI snoop logs by using the Android debugging bridge that comes preloaded on your device. It should be listed under the same developer settings discussed up above. Follow these steps if you want to use this option:

  • Tap the builder number in your settings seven times to access the settings and find the debugging bridge in the main menu.
  • Connect your device to a desktop computer
  • Open a commands terminal and run ‘adb devices’. Your Android device should appear in the list.
  • Copy and paste this command into the terminal – ‘adb pull /sdcard/btsnoop_hci.log’

This command should pull up your device’s Bluetooth HCI snoop log.

What is Wireshark Software?

Wireshark is a downloadable software used to analyze, or “sniff”, network protocols. It captures data packets, such as Bluetooth HCI snoop logs, and stores them in discrete data files that can later be accessed and analyzed.

Wireshark is the most commonly used software for sniffing data packets and, like any protocol analyzer, it:

  • Captures data packets – Wireshark analyzes and collects information from your network connection in real-time, creating a screenshot of your data traffic made up of thousands of packets at once.
  • Filters data – While it collects a stream of data, Wireshark is able to process the information using specific filters. By using these filters, you can single out individual bits of information to narrow down your analysis.
  • Visualizes information – Wireshark simplifies complex streams of information into easily understandable visuals. You can quickly process entire conversations into clean and useable bits of information.

Think of this process as digital spelunking. Wireshark acts as the flashlight, allowing you to dive into your Android’s inner world and pull out hidden gems of data. It is safe and commonly used by university systems, corporations, and several government agencies around the world

Conclusion

Bluetooth HCI snoop logs are a backed-up record of transmissions sent through your Bluetooth host controller interface. The logs are stored in your device but can be exported and viewed using data analysis software such as Wireshark.

Espen is the Director of ProPairing

Espen

Espen is the Director of ProPairing and has written extensively about Bluetooth devices for years. He is a consumer product expert and has personally tested Bluetooth devices for the last decade.

What Is Bluetooth HCI Snoop Log?

A Bluetooth HCI (Host Controller Interface) snoop log is a log file that contains all the Bluetooth transmissions that you have made on your Android gadget. Having this file means that you’ve got an app that allows logging (4.4) or which logs (Android 4.4) of all Bluetooth communications, your Android gadget logs Bluetooth usage automatically or you allow Bluetooth transmission logging.

What Is Bluetooth HCI Snoop Log

This is a storage of data of Bluetooth usage over time and hence should not be anything to be troubled about. It can even be deleted without a problem to clear the Bluetooth usage history on your device but it will be restored and updated with fresher Bluetooth use unless the logging of Bluetooth usage is disabled.

You should not worry about it since it is an ordinary feature from Android 4.4+.

Most Android devices are able to log full Bluetooth transmissions. Before Android 4.4 one required root and app such as Bluetooth HCI log. In all gadgets with Android developer settings, beginning with Android 4.4, the log choice is in existence.

How to create an HCI log

Enable developer settings.

The developer settings are usually invisible. Tapping on the builder number located in Android settings seven times will easily enable them.

Create log

Go to Android settings and open the developer menu. There is a checkbox identified “Enable Bluetooth HCI Snoop Log”. Before powering on the car, start the log and stop it before sending the file. This log file is stored in the SD storage or USB root and is known as btsnoop_hci.log.

Wireshark, a network protocol analyzer, can be used to peek into the file. You just need to retitle the file to *.cap and open it.

If you are a security specialist or a developer, sometimes you may want to analyze and capture the Bluetooth host controller interface packets. You will do this by enabling the Bluetooth HCI snoop log.

This will store these packets in a file on your device storage enabling easy retrieval. After that, you can use a program to analyze them for example Wireshark.

How to recover the HCI log

  • Go to settings on your Android device.
  • Click on developer options
  • Select Enable Bluetooth HCI snoop log.
  • Go back to settings on your device and then choose developer options
  • On the developer options window you then click on enable Bluetooth HCI snoop log.
  • This will enable your log file.
  • Turn off Bluetooth on your Android device.
  • Turn Bluetooth ON.
  • Restart or reboot your Android device.

Once this procedure is complete, your device is able to generate the HCI log file and save it to /sdcard/btsnoop_hci.log.

When retrieving the HCI log from the Android device you have two options.

a) You can connect your Android device to a computer. The file will be located in one of the drives that are mountable. Copy this file from here to C:/Users/Public/Public Documents/Frontline Test Equipment/My Capture File/.

b) You also have another option of using the Android debugging bridge which can is found in the kit of the software developer.

Журнал Bluetooth HCI — что это и зачем нужно?

Что такое Журнал Bluetooth HCI и зачем это нужно в режиме разработчика на смартфоне?

Режим разработчика на смартфоне содержит много функций, многие из которых предназначены для специфических задач. Расскажем, что такое журнал Bluetooth HCI, и зачем его нужно включать в режиме разработчика.

Что такое журнал Bluetooth HCI?

Журнал Bluetooth HCI (Host Controller Interface) — это файл с записями, предоставляющий доступ к информации обо всех передачах, отправленных через Bluetooth на устройстве под управлением Android. Эти данные хранятся во внутренней памяти телефона (чаще всего в виде файла /sdcard/btsnoop_hci. log) и получить к ним доступ можно только напрямую с мобильного устройства — посторонние люди не смогут перехватить эти данные.

Если журнал Bluetooth HCI включен, то все данные о передаче файлов по Bluetooth (например, между смартфоном и умными часами) будут сохраняться в памяти устройства. В дальнейшем владелец сможет проанализировать эту информацию с помощью специализированного программного обеспечения. Чаще всего эта возможность требуется специалистам по безопасности или разработчикам для создания мобильных приложений.

Как включить журнал Bluetooth HCI в режиме разработчика?

Если пользователю понадобилось записать все переданные по Bluetooth пакеты данных в журнал, чтобы затем их проанализировать, то нужную функцию можно включить в режиме разработчика. Для этого в первую очередь понадобится активировать сам режим следующими действиями:

  1. Открыть настройки смартфона.
  2. Перейти в раздел «О телефоне».
  3. Найти строку «Номер сборки».
  4. Нажать на нее 5-8 раз, пока внизу экрана не появится небольшое окно с сообщением о том, что пользователь перешел в режим разработчика.

Далее потребуется найти нужный режим — он находится в разделе «Дополнительные настройки» или «Расширенные настройки». В нем необходимо отыскать функцию «Включить журнал Bluetooth HCI». По умолчанию выбрано действие «Выключено», которое нужно изменить на «Включено» либо на одну из других функций (например, «Включены фильтры», «Включены фильтры заголовков» или «Включены фильтры медиа»).

Журнал Bluetooth HCI

Проанализировать журнал Bluetooth HCI можно с помощью специализированных программ, например, программного обеспечения Wireshark. Чтобы это сделать, понадобится перенести сохраненный файл с информацией о переданных по Bluetooth данных на компьютер, а затем загрузить их в нужную программу.

btsnoop_hci.log — что за файл?

Приветствую. Сегодня поговорим об одном файле, который можете встретить на смартфоне под управлением Андроид.

Описание

btsnoop_hci.log — лог-файл, который создается при прослушивании трафика Блютуз, когда активна функция Журнал Bluetooth HCI.

Разбираемся

  1. При проведении глубокой очистки можно обнаружить btsnoop_hci.log, который может весить прилично, например более 2 гигабайта.
  2. По информации в интернете — это отчет, лог, на работу программ никак не влияет, поэтому можно удалить. Только сперва отключите журнал трансляций операций HCI Bluetooth. Если этого пункта нет, значит функция отключена, просто удалите файл.
  3. Но что вообще за btsnoop_hci.log? Это файл, в который записывают данные о прослушивании трафика Блютуз. Точнее записывается информация о пакетах, обычному пользователю это вряд ли может быть интересно. Но поэтому и размер может быть большой — так как туда постоянно складируются данные, особенно когда Блютуз включен.

Как отключить создание btsnoop_hci.log? На самом деле просто. Сперва откройте настройки устройства:

Далее находим пункт Для разработчиков:

Далее необходимо отключить опцию Включить журнал трансляций операций HCI Bluetooth:

После отключения опции — можно удалить файл btsnoop_hci.log. Он больше появляться не должен.

Пункт также может называться немного иначе, а именно Журнал Bluetooth HCI:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *