Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb bugreport: Is there a way to reset the log?

Tags:

android

adb

Hey, I'm new to Android/ADB

I've been asked to dump an adb bugreport log by someone. I managed to do this, but the report was 640k and had a ton of crash dumps for various apps that I was playing with. I'm trying to present just the information for the app we're interested in.

Is there a way to reset the log so that I don't have all this other cruft?

thanks!

like image 291
octonion Avatar asked Sep 24 '10 08:09

octonion


People also ask

Where is ADB Bugreport saved?

Capture a bug report using adb 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.

What is ADB Logcat?

Android logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that are written by applications with the "Log" class.


2 Answers

You can clear old logs that are available while starting your application by calling adb logcat -c from shell prompt. It should clear any old logs on the buffer and the logs getting printed thereafter should be from your application(at least a majority of them).

like image 67
DeRagan Avatar answered Sep 25 '22 05:09

DeRagan


I would recommend to clean up old battery collection data before making bug report. Otherwise the output will be bigger.

adb shell dumpsys batterystats --reset
adb shell bugreport > Bugreport_File_Name.txt
like image 24
Ayaz Alifov Avatar answered Sep 22 '22 05:09

Ayaz Alifov