Android Logging guide
Content
- Android adb log
- Bug report
- Samsung dumpstate
- Sources / usefull resources
Android adb log
Purpose and content
Android adb logs contain all runtime data about applications and system processes. Log level can be specified and logs can be filtered.
ADB logs look like the following example:
How to gather adb logs
- Download android platform tools on https://developer.android.com/studio/releases/platform-tools
- Plug the device to computer using USB cable
- Turn on developer settings and enable USB debugging
- Use the following command line to ensure that the device is connected (a pop-up should appear on the device requesting user approval, select
Always allow from this computer
)
|
|
- Clear old data
|
|
- Run logcat
|
|
- Reproduce the issue
- Use CTRL + C to stop collecting logs
Logs are now all store in android.log
Usefull logact filters
Purpose | Command |
---|---|
Specific app | adb logcat --pid=$(adb shell pidof "<PACKAGE_NAME>") |
Wi-Fi | adb logcat -s wpa_supplicant |
Auth | adb logcat -s Auth |
Bug report
Purpose and content
A bug report contains device logs, stack traces, and other diagnostic information. The bug report can be generated using adb
or from the device Settings
app.
A bug report look like the following example:
How to generate a bug report using ADB
Important : reproduce the issue before collecting a bug report
Download android platform tools on https://developer.android.com/studio/releases/platform-tools
Plug the device to computer using USB cable
Turn on developer settings and enable USB debugging
Use the following command line to ensure that the device is connected (a pop-up should appear on the device requesting user approval, select Always allow from this computer)
|
|
- Type the following command
|
|
- The bugreport file name should look like
bugreport-YYY-MM-DD-HH-MM-SS.zip
How to generate a bug report from device settings app
- Turn on developer settings
- Tap
Bug report
thenFull report
and finnalyReport
- Tap the notification to share the bugreport file
Samsung dumpstate
Purpose and content
Samsung dumpstate is a specific set of log files that are always requested by Samsung support. The logs include the same data we can find in a bug report with aditional Samsung specific logs and data.
How to generate a dumpstate
- Open the phone app (for tablet open the
Calculator
app and type (+30012012732+
to open the prompt) - Type
*#9900#
- Tap
Debug Level Disabled/LOW
then tapMID
(the device will reboot after this step) - Reproduce the issue
- Open the phone app (for tablet open the Calculator app and type (
+30012012732+
to open the prompt) - Type
*#9900#
- Tap
Run dumpstate/logcat
(the process will takes several seconds) - Tap
Copy to sdcard
- Tap 2 times the
Home
button to exit - Open the application drawer and open the
My Files
app (often under theSamsung
folder) - Go to
Internal storage > log
- The dumpState file name starts with
dumpState
Do not forget to restore the log level
- Open the phone app (for tablet open the Calculator app and type (
+30012012732+
to open the prompt) - Type
*#9900#
- Tap
Debug Level Enabled/MID
then tapLOW
(the device will reboot after this step)