Generate Bug Report on Android Devices


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.

  1. Take an Android device and navigate to “Settings > About Phone”.
  1. Tap 7 times on the “Build Number” to enable “Developer Options”.
  1. Go to “Developer Options” and  toggle it on.
  1. Tap on “Bug Report”.
  1. Select any of the following options
    1. 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.
    2. 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.
  1. 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.

  1. Once the bug report is generated, tap to share your bug report.
  2. 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.

  1. Open an Android Emulator and Click on the “More (…)” option.
  1. It will open the “Extended Controls” screen of the emulator.
  1. Click on the “Bug Report” tab. 
  1. 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.

  1. 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. 

  1. 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.

adb devices

Below are the files and  folders structure of the bug report. 

  1. Pingback:
  2. June 27, 2023

    Wow hi Inc ftuhg

    Reply

Leave A Comment

Your email address will not be published. Required fields are marked *