Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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?

like image 713
Sean Barbeau Avatar asked Nov 06 '14 20:11

Sean Barbeau


2 Answers

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

adb bugreport > bugreport.txt

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

like image 112
Sean Barbeau Avatar answered Oct 28 '22 23:10

Sean Barbeau


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

adb bugreport bugreport.zip
like image 11
dharmin007 Avatar answered Oct 28 '22 21:10

dharmin007