Sean Barbeau
Sean Barbeau

Reputation: 11756

How to write an Android bug report to a file via ADB?

When I go to report an issue to the Android Open-source Project (AOSP) issue tracker, it asks me to attach a bug report.

How do I generate this bug report via ADB?

Upvotes: 16

Views: 36865

Answers (2)

Sean Barbeau
Sean Barbeau

Reputation: 11756

With your device attached, from the command-line (where ADB is accessible) run:

adb bugreport

This will generate a text file with the above name in the same directory, which you can then attached to the issue. Be patient, it may take 10 seconds or more to generate.

EDIT August 29, 2017

As @dharmin007 pointed out, the Android Studio documentation now says the following:

With only one device connected to your computer, execute the following:

adb bugreport E:\Reports\MyBugReports

This example specifies an optional path to the bugreport option where the bug report is saved.

With multiple devices connected, you must specify the device. Run the following adb commands to get the device serial number and generate the bug report.

  $ adb devices
  List of devices attached
  emulator-5554      device
  8XV7N15C31003476 device
  $ adb -s 8XV7N15C31003476 bugreport

This example does not specify the optional path, so the bug report is saved to the local directory

These commands will generate a zip file - for more information about the contents of the zip file see Android Studio docs "Inspect the bug report ZIP file".

Upvotes: 21

dharmin007
dharmin007

Reputation: 1612

In case someone is looking for the bugreport for newer devices the command is

adb bugreport bugreport.zip

Upvotes: 13

Related Questions