Open the developer mode on the terminal, connect to the computer with a data cable, and then follow the steps below
1. Turn on the developer options:
Settings->About Device->Version Number (click 5 times in a row)
2. Turn on USB debugging
In the developer options, find USB debugging and turn it on.
3. cmd enters the command line, enters the folder containing adb.exe,
For example on the desktop:
cd C:\Users\Administrator\Desktop\adb debug
Type adb kill-server
4. Check the device
adb kill-server
adb devices
As shown in the figure above, after connecting the device, you can start the following operations.
5. Put the generated log into the file in the specified directory.
adb logcat > c:\test\0815.log
Note: Huawei mobile phones have been unable to display the device
Problem: Huawei mobile phone usb debugging is turned on, adb devices does not display the device
Solution:
- Select RNDIS (USB Ethernet) in the usb configuration
- Enable USB debugging in charge-only mode
Then execute the command above