A bug or issue in software can cause the system to fail or behave in an unintended way. It is very important for an app developer to identify and fix these bugs early in the software development life cycle.
In order to troubleshoot the bug, the app developer needs a bug report from the Android device which contains dumpsys (diagnostic output for system services), dumpstate (error logs), and logcat (system message logs). Logcat messages include the stacktraces and the messages written from all apps with the “Log” class. The bug report also contains a systrace.txt file, which captures and displays the execution time of your application processes and other system processes in order to analyze the performance of the app under test.
There are many ways of collecting bug reports from Android devices such as collecting from Android Studio, by execution of the “adb logcat” command via shell.
Below are the 3 methods of capturing bug reports
1. Capturing a bug report from a device.
- Take an Android device and navigate to “Settings > About Phone”.
- Tap 7 times on the “Build Number” to enable “Developer Options”.
- Go to “Developer Options” and toggle it on.
- Tap on “Bug Report”.
- Select any of the following options
- Interactive Report – This is preferred in most cases as it generally ignores the less used sections which take more time to report. This has more details about the problem and it takes screenshots as well.
- Full Report – These are useful when you need a comprehensive report covering all sections. This does not allow you to enter more details and takes additional screenshots.
- Tap on “Report”.
This creates a notification and starts generating the bug report. The progress of the status will be shown in the notification. It might take a few minutes to complete this activity.
- Once the bug report is generated, tap to share your bug report.
- You can choose the “Drive” or “Gmail” to share your report with the app developer.
Note: The device must be signed into a Google account in order to share the report.
2. Capturing the bug report from an Android Emulator.
- Open an Android Emulator and Click on the “More (…)” option.
- It will open the “Extended Controls” screen of the emulator.
- Click on the “Bug Report” tab.
- Wait until the bug report collection is complete. Then click on the “Save Report” button and save the bug report.
3. Capturing the bug report through ADB command.
Prerequisite: To generate the bug report through the ADB command requires you to install ADB on a connected computer.
- Connect the device under test to the computer and execute the following ADB command from cmd (in Windows) or terminal (in mac).
adb bugreport Desktop/
Desktop/ – This is the path where the Bug report is saved.
- The bug report will be saved in Desktop/
Note: If there are multiple devices connected to the computer, then execute the following ADB command
adb -s “serial_number” bugreport Desktop/
Note: “serial_number” should be the serial number of the connected device. The serial number can be found by executing the following ADB command.
Below are the files and folders structure of the bug report.