Capturing Bug Reports from Android Devices

R. Mayur Varshan
|
Try Esper for Free
MDM Solutions for Android and iOS

When creating software, bugs sometimes slip through the cracks and you need tools to identify the root cause of the issue. To diagnose these in testing environments and the field you can generate a bug report from an Android device, which provides essential diagnostic outputs, including:

  • Dumpsys: Diagnostic information for system services.
  • Dumpstate: Logs of system errors.
  • Logcat: System messages, including stack traces and log messages from all applications using the “Log” class.
  • Systrace.txt: Tracks the execution time of app and system processes to evaluate performance.

There are several methods you can use to capture bug reports from your Android devices, including Android Studio, direct ADB connection with the "adb logcat" command, or the Esper console for enrolled devices.

1. Capturing a Bug Report Directly from an Android Device

1. Go to Settings > About Phone on the device.

About phone

2. Navigate to Software information.

Software information

3. Tap the Build Number seven times to enable Developer Options.

Build number

4. Open Developer Options and toggle it on.

Developer options

5. Tap on Bug Report.

Bug report

6. Choose from the following options:

  • Interactive Report: Preferred for most cases, as it focuses on relevant sections and includes screenshots which make generation faster.
  • Full Report: Offers a more comprehensive report across all sections but may take longer but there’s no option to include personalized insights or remarks from the admin or end user.
Full report

7. Tap Report to generate the bug report. It may take a few moments for a notification to appear.

Bug report is being generated

8. Once complete, tap the notification to share the report via Drive or Gmail.

Share

Note: The device must be signed into a Google account to share the report.

2. Capturing a Bug Report from an Android Emulator

One emulator option is available via Android Studio.

1. Open an Android Emulator and select the More (…) option.

Android Emulator More buttons

2. An Extended Controls screen will appear.

Extended Controls

3. Click the Bug Report tab.

Bug Report

4. Wait while the bug report generates and then click Save Report.

Save Report

3. Capturing a Bug Report via ADB Command

Prerequisite: Install ADB on a computer and connect the device to your computer with a data enabled cable for your device's USB port type.

Open a terminal (Windows Command Prompt or Mac Terminal) and enter:

  • Run the command “adb devices” to start the daemon and validate the device is connected to your computer. If successful you will see the following
    • Note: “serial_number” should be the serial number of the connected device.
adb devices

Run the command “adb bugreport Desktop”

adb bugreport Desktop

This command saves the bug report to the specified Desktop/ location.

For multiple devices connected to the computer, use:

adb -s “serial_number” bugreport Desktop/

adb serial number

Structure of Bug Report Files and Folders

The generated bug report typically includes a structured set of files and folders that contain system diagnostics, logs, and performance metrics to help developers analyze and resolve application issues effectively.

Bug report folders

How to generate the Bug report via Esper:

Capturing bug reports using Esper eliminates the hassle of physically connecting the device to a system or running complex ADB commands. It streamlines the entire process for administrators and ensures a seamless experience for end users. Here’s how Esper makes it easier:

  1. No Physical Connection Required
    Traditional methods of generating bug reports often require the admin to have the device physically connected to a computer to execute ADB commands. With Esper, this is no longer necessary, as the entire process is managed remotely via the Esper console.
  2. Simplified Workflow
    Instead of asking end users to follow complicated steps to capture bug reports, the Esper console provides a one-click solution. Admins can request a bug report with a single click, minimizing the need for technical guidance.
  3. End User Approval
    For security and privacy, the end user receives a notification and must approve the request before the bug report is generated. This ensures transparency while respecting user consent.
  4. Centralized Access to Reports
    Once the bug report is captured, it is automatically available in the Esper console. Admins can easily access, review, and share the bug report for troubleshooting and issue resolution.

By leveraging Esper's intuitive interface, administrators save time and effort while ensuring that technical issues are documented efficiently. This approach not only accelerates troubleshooting but also enhances collaboration between teams, making device management smoother than ever.

Requesting for a Bug report:

Step 1: To request a bug report, go to Devices & Groups and locate the device. Then go to the Capture Logs tab.

Capture logs

Step 2: Click on Request Bug Report. A bug report request will be sent as a notification on the device.

Request bug report

Step 3: On the device, pull down to access the notification bar.

Taking bug report

Step 4: Once the report is ready, the Share and Decline report options will be available in the notification bar.

Share bug report

Step 5: Click the notification to open up the following pop-up to share the report. Pressing Decline will end the process.

Share bug report pop up

Step 6: Select Share to send the report to the console.

Sharing bug report

Step 7: Once the report is uploaded to the console, click Download to download and view the report.

Bug report file

Cancelling Bug Reports

Did you select the wrong device for a bug report? You can cancel a bug report from the device's Event Feed. Only bug reports that have a queued status may be canceled.

Go the the Event Feed and click on Cancel.

Cancel bug report

Summary

Bug reports are the backbone of creating reliable software and diagnosing issues as they arise.. They bridge the gap between users and developers, offering valuable insights into real-world scenarios that might be missed during development. A well-structured bug report not only saves time but also ensures quicker resolutions, leading to enhanced product quality and customer satisfaction.

FAQ

No items found.
No items found.
R. Mayur Varshan
R. Mayur Varshan
Mayur is a seasoned Technical Support Engineer II at Esper, with a specialized focus on mobile device management. His expertise in troubleshooting complex issues and delivering effective solutions is integral to ensuring seamless enterprise device performance. Certified in Android Enterprise, Mayur continually enhances his skills and knowledge to stay ahead in the ever-evolving field of mobile technology.
R. Mayur Varshan
Learn about Esper mobile device management software for Android and iOS
Featured resource
Read more
Featured resource

Esper is Modern Device Management

For tablets, smartphones, kiosks, point of sale, IoT, and other Android and iOS edge devices.
MDM Solutions