When an app misbehaves or the system feels sluggish, the most powerful piece of evidence you can hand to a support forum or a developer is a bug report. Android’s built‑in bug‑report feature collects system logs, stack traces, dumpstate, and a snapshot of the device’s state – all in a single zip file. The trick is that many users never know how to create one, or they dismiss the massive file as “too technical”. This tutorial shows you exactly how to generate a bug report without rooting, where to find the file, and how to read the most relevant sections so you can diagnose crashes, battery drains, or connectivity problems yourself.
A bug report is essentially a forensic dump of the device at the moment you trigger it. It contains:
bugreport.txt – a human‑readable summary with timestamps, system properties, and the raw logcat output.system_server.trace) that can be opened with Android Studio’s systrace tool.Because the report aggregates data from many subsystems, a single line in logcat that says FATAL EXCEPTION can be correlated with the exact process ID, the activity that was in the foreground, and the device’s battery state at that moment.
Backup important data. The bug‑report process does not modify your files, but the generated zip can contain personal information (e.g., Wi‑Fi passwords, account tokens). Store it in a safe location and delete it after you finish analysis if you plan to share it publicly.
adb installed if you want to pull the file via USB. The tutorial covers both on‑device and ADB methods.Enabling Developer options is safe; it merely unlocks advanced toggles. No root access is required.
Settings > About phone > Software information > Build number then back to Settings > Developer options.)When this toggle is on, the power‑menu will show a “Bug report” item that triggers the capture.
There are two ways to start the capture: via the power‑menu shortcut or via ADB. Choose the method that feels most comfortable.
The file is stored in the /sdcard/bugreports/ folder with a name like bugreport_2024-09-15_13-45-22.zip.
adb devices
adb bugreport bugreport.zip
Tip: You can specify any filename; the command streams the zip directly to your PC, bypassing the need for internal storage.
bugreport.zip resides in the current directory.If you get the error “device unauthorized”, check the RSA key prompt on the phone and tap Allow.
The bug report is a standard zip archive. Use any file manager on the phone or a desktop extraction tool.
/sdcard/bugreports/.unzip bugreport.zip -d bugreport_contents
The extracted folder typically contains:
bugreport.txt – the main text log.system_server.trace – trace data for performance analysis.screenshots/ – PNG images of the UI at the time of capture.dumpstate/ – additional binary dumps.Not every part of the bug report is useful for every problem. Below is a quick reference of the most common sections and what they tell you.
| File | Typical Use‑Case | Key Things to Look For |
|---|---|---|
bugreport.txt | General crash, ANR, battery, or connectivity issues. | Search for FATAL EXCEPTION, ANR in, W/PowerManagerService, or Network tags. |
system_server.trace | Performance bottlenecks, UI jank. | Open with Android Studio’s systrace to view thread timelines. |
screenshots/ | Visual context – what the user saw when the error occurred. | Correlate timestamps with log entries. |
dumpstate/ | Low‑level kernel messages, memory maps. | Usually needed only for driver‑level bugs. |
bugreport.txtThis file is the heart of the analysis. Open it with any text editor (e.g., VS Code, Notepad++, or even less on Linux). Below is a practical workflow.
FATAL EXCEPTION. If the app crashed, you’ll see a block similar to:
04-15 13:45:22.123 1234 1234 E AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.app, PID: 1234
java.lang.NullPointerException: Attempt to invoke …
…
at com.example.app.ui.MainActivity.onCreate(MainActivity.java:45)
at ) to identify the offending class and method.System.out or ActivityManager entry that shows the foreground activity. Example:
04-15 13:45:22.110 5678 5678 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.app/.MainActivity}
Battery or PowerManager entries within the previous 30 seconds to see if low‑power mode might have contributed.If the device froze rather than crashed, look for the string ANR in:
04-15 13:46:10.456 1234 1234 I ActivityManager: ANR in com.example.app (com.example.app/.MainActivity)
After the ANR line, the report includes a traces.txt dump that shows which thread was blocked.
Bug reports contain a massive amount of logcat output from system services. To focus on your app, prepend the search with the package name:
grep "com.example.app" bugreport.txt
On Windows, use findstr instead.
system_server.traceIf you suspect UI jank or high CPU usage, the trace file is invaluable.
system_server.trace. The UI shows a timeline of threads; look for long red bars indicating blocked or busy threads.InputDispatcher or Choreographer taking >16 ms repeatedly, the UI is likely dropping frames.Use this insight to decide whether the issue is in your app’s UI thread or a system service.
After you have identified a suspect cause (e.g., a NullPointerException in MainActivity.onCreate), you should verify it by reproducing the steps that led to the crash.
/sdcard/bugreports/. If the device loses power mid‑capture, the zip will be incomplete. Re‑run the capture.adb shell "setprop logd.size 8M"
This gives more room for recent logs.A bug report can contain Wi‑Fi passwords, device identifiers, and even clipboard contents. Before sharing, open bugreport.txt in a text editor and scrub any lines that contain password=, token=, or personal email addresses.
From Android 12 onward, the power‑menu shortcut is replaced by a quick‑settings tile:
The generated file follows the same location and format as described earlier.
Imagine you receive a user report: “My app crashes when I open the Settings screen”. Using the steps above you:
bugreport.txt and search for FATAL EXCEPTION. You find:
04-20 09:12:34.567 2100 2100 E AndroidRuntime: FATAL EXCEPTION: main
Process: com.mycompany.myapp, PID: 2100
java.lang.IllegalStateException: Fragment MySettingsFragment did not create a view.
at androidx.fragment.app.Fragment.requireView(Fragment.java:1234)
at com.mycompany.myapp.ui.SettingsActivity.onCreate(SettingsActivity.java:78)
requireView() being called before the fragment’s view hierarchy is inflated. You now know the exact line to fix.This workflow turns a vague “crash” report into a concrete code location, saving hours of guesswork.
Both tools are complementary; keep adb logcat handy for rapid checks, and fall back to the bug report when the problem is elusive.
Capturing a bug report on Android does not require root, special apps, or a deep knowledge of the OS. By enabling the developer‑options shortcut, triggering the capture, extracting the zip, and focusing on bugreport.txt and optional trace files, you gain a powerful lens into what the system was doing at the moment of failure. The workflow outlined above equips you to:
Next time an app misbehaves, skip the vague “it keeps crashing” screenshots and hand over a concise bug‑report analysis. Your device, the developer, and the community will thank you.









