Mobile phone HCI log capture tutorial

Mobile phone HCI log capture tutorial

The following is the HCI log capture tutorial for mainstream Android mobile phone brands and iOS mobile phones (valid for personal testing)

Android

HUAWEI/Honor

  1. Go to Apps—>Settings—>About Phone, click on the version continuously, prompt to open developer mode, and open USB debugging;
  2. Go to "System and Update", click the "Developer Options" menu, and open "Enable Bluetooth HCI information collection log";
  3. Try to reproduce the problem and turn off the Bluetooth of the mobile phone system;
  4. Connect the mobile phone to the PC to ensure that adb can be used normally;
  5. Execute adb pull /data/log/bt <PC local path>;
  6. After the execution of adb pull is completed, the bt folder will be generated in the local target directory of the PC;
  7. Enter the bt directory, sort by time to obtain the corresponding hci files, naming format: btsnoop_hci_xxxxxxxx.log;

OPPO

  1. Enter the settings and turn on the developer mode of the phone;
  2. On the dialing interface *#80 0#, enter the abnormal feedback interface, select the Bluetooth abnormal item;
  3. Click the setting item in the red box to change to developer mode, then return to click to start grabbing, and choose to grab without restarting;
  4. At this time, the problem begins to reappear, (the capture will automatically turn off the Bluetooth of the mobile phone, and it needs to be turned on again manually), and select to end the capture after execution;
  5. Wait for the log file to be generated, connect to the computer, and search for the ".caf" suffix hci file in the following directory;
    \internal shared storage space\oppo_log\
    \internal shared storage space\Android\data\com.coloros.logkit\files\Log\

MIUI

Some models of mobile phones can be caught

  1. Dial key input *# #5959# #* Execution log to start capture, the task bar prompts the execution progress;
  2. Start to reproduce the problem;
  3. Dial key input # #5959# # end log capture;
  4. After the capture is finished, the log is stored in the MIUI/debug_log directory;
  5. Connect to the computer to obtain a log file similar to bugreport-0227-14564.zip;

Samsung

  1. Enter Apps—>Settings—>About Phone—>Software Information, click the version number 7 times to open the developer mode;
  2. Enter the "Developer Options" menu, click "Enable Bluetooth HCI Listener Log" and set "Enable";
  3. Restart the phone or switch the airplane mode to try to reproduce the problem;
  4. After the problem recurs, enter the dialing interface *#9900#, then click the RUN DUMPSTATE/LOGCAT option and wait;
  5. After waiting, press "COPY TO SDCARD(INCLUDE CP RAMDUMP)";
  6. Connect the phone to the PC and find the "log" folder and compress;
    -log\bluetooth\btsnoop_hci_xxxxxxxx.cfa.

Google

  1. Turn on the mobile phone developer mode;
  2. Enable Bluetooth HCI acquisition in developer mode;
  3. reproduce the problem;
  4. Enter adb bugreport in the PC command line, and a directory debuglogger containing HCI logs will be generated in the same directory as the current PC;
  5. Get the HCI log in the generated directory;
    debuglogger/connsyslog/bthci/CsLog_xxxxxxxx.

iOS (How to get it on Windows)

  1. Open the following link in the mobile browser, install the profile file to the mobile phone, and then restart the mobile phone. To install the profile, you need to register an Apple Developer account;
    https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=ios;
    insert image description here
  2. Install the iTunes tool on the computer and log in to the Apple account. If you do not have an account, you need to register;
  3. After the phone restarts, enter "Settings-General-Description File" in turn to confirm whether it is installed;
  4. After reproducing the problem, press and hold the two volume adjustment keys on the left side of the mobile phone + the right key of the mobile phone (try several times when stopping), and then release them at the same time. At this time, the mobile phone vibrates, triggering sysdiagnose to grab logs, and wait for 5-10 The minute log capture is completed;
  5. Connect the mobile phone to the computer via USB, and use iTunes to synchronize files. The log file is in the following path
    C:\Users\Your_User_Name\AppData\Roaming\AppleComputer\Logs\CrashReporter\MobileDevice<Your_Device_Name>\DiagnosticLogs\sysdiagnose;
  6. Copy the above log to the local, after decompression, get the pklg file, /logs/Bluetooth, use Wireshark to open the pklg file.

Guess you like

Origin blog.csdn.net/rainyLYJ/article/details/128631231