This guide explains how to obtain a bug report from an Android device.
Please note that you will need a PC in addition to your Android device to obtain the bug report.
Download the SDK Platform-Tools on your PC and extract them to a suitable location.
The SDK Platform-Tools will be used to run the adb commands in the following steps.
On your Android device, enable Developer options by selecting the build number (OS build number) seven times in a row.
The build number can usually be found under About, About tablet, or Software information in Settings, but the exact name and location vary depending on the device.
Then, open Developer options and enable USB debugging.
If your device has a Wireless debugging setting, enable Wireless debugging as well.
Enable debugging on your device
Connect your PC to the same network as your Android device, and open Command Prompt on Windows or Terminal on Mac.
Next, navigate to the directory where you extracted the SDK Platform-Tools in step 1.
cd <directory where platform-tools is located>/platform-tools
The connection method varies depending on the device. First, try connecting directly through port 5555. If the connection fails, follow the wireless debugging pairing procedure described below.
Use the IP address of your Android device to connect.
(For Windows)
adb.exe connect 192.168.X.X:5555
(For Mac)
./adb connect 192.168.X.X:5555
If this is the first time connecting from that PC, a confirmation dialog asking you to allow USB debugging will appear on the Android device; select the option to allow the connection.
If the connection is successful, you will see a message such as "connected to 192.168.X.X:5555."

To find the current IP address of your Android device, usually in the format "192.168.X.X", open Network & Internet in Settings and select the currently connected network.
If you cannot connect through port 5555, use the wireless debugging pairing procedure described below.
On many newer Android devices, you cannot connect directly through port 5555 and must first pair the Android device with your PC.
Connect to a device over Wi-Fi
Open Wireless debugging in Developer options on the Android device, and select "Pair device with pairing code."
The following information will be displayed:
On your PC, run the following command using the IP address and port number displayed on the pairing screen.
(For Windows)
adb.exe pair 192.168.X.X:YYYYY
(For Mac)
./adb pair 192.168.X.X:YYYYY
Replace "192.168.X.X:YYYYY" with the IP address and pairing port displayed on the Android device.
When prompted, enter the pairing code displayed on the Android device.
Enter pairing code: 123456
If pairing is successful, a message such as "Successfully paired" will be displayed.
Next, close the pairing screen and return to the main Wireless debugging screen.
Check the "IP address & port" displayed on that screen, and connect using the following command.
(For Windows)
adb.exe connect 192.168.X.X:ZZZZZ
(For Mac)
./adb connect 192.168.X.X:ZZZZZ
The pairing port "YYYYY" and the connection port "ZZZZZ" may be different. Be sure to use the port number displayed on each corresponding screen.
If the connection is successful, you will see a message such as "connected to 192.168.X.X:ZZZZZ."
You can check the connection status using the following command.
(For Windows)
adb.exe devices
(For Mac)
./adb devices
The debugging connection is complete if the IP address and port number of the Android device are listed with the status "device."
Normally, you only need to pair the PC and Android device once. However, after restarting the device or changing the network, you may need to run adb connect again using the current IP address and port number shown on the Wireless debugging screen.
Use the following adb command to obtain and save the bug report.
(For Windows)
adb.exe bugreport MyBugReport
(For Mac)
./adb bugreport MyBugReport

After running the command, the bug report "MyBugReport.zip" will be saved in the same directory within a few minutes.
