A bug report consists of device logs, stack traces, and other diagnostic information to help you find and solve any bugs in your apps. You can capture a bug report from your device by using any of the following options: Take bug report developer option on the device; the Android Emulator menu; or the adb bug report command which can be found on your development machine.
In order to successfully take a bug report, you must have Developer options enabled on your device so that you can easily access the Take bug report option.
Capturing a bug report from your device
To receive a bug report directly from your device, follow the steps below:
- Make sure that you have Developer options enabled on your device.
- In Developer options, tap on the option that reads Take bug report.
- Choose the type of bug report that you want and tap on Report. After a few seconds, you should be able to see a notification that the bug report is ready.
- To share the bug report, tap on the said notification.
Capturing a bug report from the Android emulator
In the Android Emulator, you will be able to use the File a bug feature in the extended controls.
- Click on the three-dot menu in the emulator panel.
- In the Extended controls window, choose Bug report, which can be found on the left. This will open a screen where you can see the bug report details, which includes the screenshot, the AVD configuration informantion, and the bug report log. You can also type in a message with reproduction steps that you can save with the report.
- Wait for the bug report to finish the collection process, and click on Save Report.
Capturing a bug report using adb
If you have only one device connected, you can get a bug report using adb as explained below:
$ adb bugreport E:ReportsMyBugReports
If you do not specify a path for the bug report, it is automatically saved to the local directory.
If you have many devices connected, you have to specify the device with the -s option. Run the adb commands given below to obtain the device serial number and generate the bug report.
$ adb devices List of devices attached emulator-5554 device 8XV7N15C31003476 device $ adb -s 8XV7N15C31003476 bugreport