1

I am using an app that I uploaded to my Google Developer panel in a closed alpha. I managed to replicate a crash on my phone, but I don't know how to send this information back so I can see what happened.

The 29th Saltshaker
  • 671
  • 1
  • 6
  • 16

2 Answers2

1

Apologies, I am way too late to the party but I hope this might help somebody else. As per the Android Developer official website:

Capture and read bug reports A bug report contains device logs, stack traces, and other diagnostic information to help you find and fix bugs in your app. You can capture a bug report from your device by using either the Take bug report developer option on the device, the Android Emulator menu, or the adb bugreport command on your development machine.

Figure 1. Developer options

To take a bug report, you must have Developer options enabled on your device so you can access the Take bug report option.

Capture a bug report from a device

Figure 2. The bug report is ready

To get a bug report directly from your device, do the following:

Be sure you have Developer Options enabled. In Developer options, tap Take bug report. Select the type of bug report you want and tap Report. After a moment you get a notification that the bug report is ready (see figure 2).

To share the bug report, tap the notification. Capture a bug report from the Android Emulator From the Android Emulator, you can use the File a bug feature in the extended controls:

Click More in the emulator panel. In the Extended controls window, select Bug report on the left.

This opens a screen where you can see the bug report details such as the screenshot, the AVD configuration info, and the bug report log. You can also type a message with reproduction steps to save with the report.

Wait for the bug report to finish collecting, and then click Save Report.

Capture a bug report using adb If you have just one device connected, you can get a bugreport using adb as follows:

$ adb bugreport E:\Reports\MyBugReports

If you do not specify a path for the bugreport, it is saved to the local directory.

If you have multiple devices connected, you must specify the device with the -s option. 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

Inspect the bug report ZIP file By default the ZIP file is called bugreport-BUILD_ID-DATE.zip and it it may contain multiple files, but the most important file is bugreport-BUILD_ID-DATE.txt. This is the bug report and it contains diagnostic output for system services (dumpsys), error logs (dumpstate), and system message logs (logcat). The system messages include stack traces when the device throws an error, and messages written from all apps with the Log class.

The ZIP file contains a version.txt metadata file that contains the Android release letter, and when systrace is enabled, the ZIP file also contains a systrace.txt file. The Systrace tool helps analyze the performance of your application by capturing and displaying execution times of your application processes and other Android system processes.

The dumpstate tool copies files from the device’s filesystem into the ZIP file under the FS folder so you can reference them. For example, a /dirA/dirB/fileC file in the device would generate an FS/dirA/dirB/fileC entry in the ZIP file.

Figure 3. Bug report file structure

For more information, see Reading bug reports.

Get reports from your users Capturing bug reports as described above is helpful as you're using the app yourself, but your end-users can't easily share these types of bug reports with you. To get crash reports with stack traces from real-world users, you should take advantage of Google Play's and Firebase's crash reporting features.

Google Play Console You can get reports from the Google Play Console to view data for crashes and application not responding (ANR) errors from users who installed your app from Google Play. Data is available for the previous six months.

For more information, see View crashes & application not responding (ANR) errors in Play Console help.

Firebase crash reporting Firebase Crashlytics reporting creates detailed reports of the errors in your app. Errors are grouped into issues based on having similar stack traces, and triaged by the severity of impact on your users. In addition to automatic reports, you can log custom events to help capture the steps leading to a crash.

You'll start receiving crash reports from any user by simply adding the Firebase dependencies to your build.gradle file. For more information, see Firebase Crashlytics.

Source: https://developer.android.com/studio/debug/bug-report

Knight Forked
  • 1,529
  • 12
  • 14
  • 1
    Link only answers, while often useful are susceptible to becoming out of date quickly if the URL changes. I realise that this is the official doc and that this scenario is unlikely, but you should try to add more detail to your answers and bring some of the relevant content from that page here. It'll make for a much better answer and you can still include the link as a source. – HBG Apr 17 '20 at 05:35
0

ACRA

ACRA is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form. It is targeted to android applications developers to help them get data from their applications when they crash or behave erroneously.

Application Crash Reports for Android ACRA

Naveen Tamrakar
  • 3,349
  • 1
  • 19
  • 28
  • 3
    But in the Google Developer Console there is a section dedicated to crash reports. Is this not some built-in automatic thing? I assumed that if I downloaded the alpha version from the secret link, it would automatically send a crash report back to the developer account? – The 29th Saltshaker May 06 '16 at 14:42