-
Notifications
You must be signed in to change notification settings - Fork 2
Grab Logs
For debugging you need to have adb up and running. If you have trouble with that consider using the special Android distro mAid.
-
adb shell
(or just open your favorite terminal app + become root viasu
) -
logcat -c -b all
(this will print nothing - it will just clear the log buffer) - now reproduce the issue. when the issue occurs immediately do this afterwards
logcat -b all -d -D > /sdcard/Download/logcat.txt
- grab the log:
adb pull /sdcard/Download/logcat.txt
- upload the log, see topic Share logs
- always share your model name (e.g. hotdog, pixel 7a, LG G4 H811, ...)
-
adb shell
(or just open your favorite terminal app + become root viasu
) logcat -b all -d -D > /sdcard/Download/logcat.txt
- grab the log:
adb pull /sdcard/Download/logcat.txt
- upload the log, see topic Share logs
- always share your model name (e.g. hotdog, pixel 7a, LG G4 H811, ...)
If the recommended way fails for any reason you can also print the logcat output in the terminal window. It's not very funny but might get the things done.
- open a terminal and type:
-
mode con lines=32766
and ENTER
-
This sets the buffer in your terminal to the max possible which is needed due to the log verbosity.
-
adb shell
(or just open your favorite terminal app + become root viasu
) -
logcat -c -b all
(this will print nothing - it will just clear the log buffer) - now reproduce the issue. when the issue occurres immediately do this:
logcat -b all -d -D
- grab the log by copying the whole console output (yea u might need to scroll a lot up...)
- upload the log, see topic Share logs
- always share your model name (e.g. hotdog, pixel 7a, LG G4 H811, ...)
-
adb shell
(or just open your favorite terminal app + become root viasu
) logcat -b all -d -D
- grab the log by copying the whole console output (yea u might need to scroll a lot up...)
- upload the log, see topic Share logs
- always share your model name (e.g. hotdog, pixel 7a, LG G4 H811, ...)
First of all: not every device shares the same path where the boot logs get stored. This is due to different partitioning and so depends on the device.
Check the value of [DEVICE-BOOT-DEBUG-PATH]
in the "Debugging" topic of the Installation guide for your device.
- boot Android
- ensure you have USB debugging enabled in developer options
- open a terminal on your PC and execute (obviously replace
[DEVICE-BOOT-DEBUG-PATH]
with the real value):
adb shell
su (Magisk prompt should appear which you need to accept)
tar cvfz /sdcard/Download/logs.tgz [DEVICE-BOOT-DEBUG-PATH]/boot_debug
exit
adb pull /sdcard/Download/logs.tgz
- share the file
logs.tgz
you pulled by attaching it to a new issue or to a related XDA post
- if you encounter a bootloop instead: you need to install TWRP first
- once in TWRP ensure that "
[DEVICE-BOOT-DEBUG-PATH]
" is mounted in the "Mount" menu (if not mount it by ticking the box) - open a terminal on your PC and type (obviously replace
[DEVICE-BOOT-DEBUG-PATH]
with the real value):
adb pull [DEVICE-BOOT-DEBUG-PATH]/boot_debug/crash.txt (don't worry if that one fails it might not exists)
adb pull [DEVICE-BOOT-DEBUG-PATH]/boot_debug/full.txt
adb pull [DEVICE-BOOT-DEBUG-PATH]/boot_debug/full.txt.1 (don't worry if that one fails it might not exists)
adb pull [DEVICE-BOOT-DEBUG-PATH]/boot_debug/kernel.txt (don't worry if that one fails it might not exists)
adb pull [DEVICE-BOOT-DEBUG-PATH]/boot_debug/selinux.txt (don't worry if that one fails it might not exists)
- share the log(s) you pulled by a paste service (see Share logs) or create /attach it to an issue
- Boot in TWRP and connect an USB cable to your device
- Re-produce the issue you have
- Menu: Advanced
- Menu: Copy Log
- Click Home button and go to Menu: Mount
- Ensure MTP is enabled (button at the bottom)
- Open the file explorer on your PC and go to Sdcard
- open the file "recovery.log" in a text editor
- share the log (see next topic)
Alternative approach:
- Boot in TWRP and connect an USB cable to your device
- Re-produce the issue you have
- Execute on your PC:
adb pull /tmp/recovery.log
- share the log (see next topic)
- Boot TWRP and connect an USB cable to your device
- Re-produce the issue you have
- Then on your PC (requires ADB installed! Check FAQ #3 of this post!!):
adb shell
dmesg > /tmp/dmesg.txt
logcat -d -b all > /tmp/logcat.txt
cat /proc/last_kmsg > /tmp/kmsg.txt
exit
adb pull /tmp/logcat.txt
adb pull /tmp/kmsg.txt
adb pull /tmp/recovery.log
adb pull /tmp/dmesg.txt
- Open all logs one by one with a text editor like wordpad or similar and paste
- share the log (see next topic)
When sharing logs or longer texts it is recommended a so-called "paste service". This is useful to keep a forum / chat readable for everyone and it dramatically helps a developer to read the log without saving tons of log files on their phones/PC's.
Here are some examples (use your fav search engine to find more):
- https://hastebin.com/
- https://controlc.com/
- https://justpaste.me/
- https://privatebin.net/
- https://pastebin.com/
- https://gist.github.com/ (no size limit!)
- https://gitlab.com/dashboard/snippets (no size limit!)
There you will always have an option how long you want to store that paste:
Please ensure you choose at least several months (better 1 year) because developers have a real life, too and so its uncertain when they might find time to look into it.
Once you pasted your text in there you will get an unique paste URL which you then can simply share in the support channel.