Grab Logs
Application / System logs
For debugging you need to have adb up and running. If you have trouble with that consider using the special Android distro mAid.
Windows & Linux: Log to a file (recommended way!)
specific issue (e.g. app crashes etc)
- type:
adb shell
(or just open your favorite terminal app + become root viasu
) - type:
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
- type:
logcat -b all -d -D > /sdcard/Download/logcat.txt
- type:
exit
- type:
- 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, …)
unspecific / general issue
- type:
adb shell
(or just open your favorite terminal app + become root viasu
) - type:
logcat -b all -d -D > /sdcard/Download/logcat.txt
- type:
exit
- grab the log:
- type:
adb pull /sdcard/Download/logcat.txt
- type:
- upload the log, see topic Share logs
- always share your model name (e.g. hotdog, pixel 7a, LG G4 H811, …)
Alternative: Windows & Linux: Log to terminal window
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.
Windows preparation
- 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.
specific issue (e.g. app crashes etc)
- type:
adb shell
(or just open your favorite terminal app + become root viasu
) - type:
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:
- type:
logcat -b all -d -D
- type:
exit
- type:
- 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, …)
unspecific / general issue
- type:
adb shell
(or just open your favorite terminal app + become root viasu
) - type:
logcat -b all -d -D
- type:
exit
- 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, …)
Boot logs
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.
if you can boot
- 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 can not boot
- 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
Recovery logs (TWRP)
minimal (recovery.log)
- 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)
full
- 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)
Share logs
When sharing logs or longer texts it is recommended using a so-called “paste service”. This is useful to keep a forum / chat / issue readable for everyone and it dramatically helps a developer to read the log without saving tons of log files on their phones/PC’s.
Logs can contain sensitive information (like phone numbers, location etc)! Keep that in mind and if you are not sure choose to set a password. In the case of Android logs this is almost always the case so it is recommended not sharing these in public.
If you are unsure, follow the “Sensitive log files” topic.
In general:
- Do not add several logs into 1 paste. Always use a separate paste for each log!
- Do not add any additional filters to the above commands. While you think that these might be useful, it often enough hides the most relevant information or context.
Sensitive log files
While there are several paste services which can encrypt your data the following is the recommended process for AXP.OS:
- Open https://paste.binbash.rocks:8999/ (running on AXP.OS servers)
- Set
Expires
=1 year
(min. 3 months, keep in mind that you need to provide a new log if selecting a too short time period) - Do not(!) select “Burn after reading”
- Set a strong password in the
Password
field (and record it for later) - Paste the log into the
Editor
frame - Click on
Create
at the top right - Click
Copy link
to save your unique link - Share that unique link from the previous step where the log was requested (e.g. in your issue or in the Matrix room)
- Share the password in private only (send the developer a DM via Matrix, do not use the public rooms for this)
Non-sensitive log files
Here are some examples (use your fav search engine to find more):
- https://paste.binbash.rocks:8999/ (running on AXP.OS servers)
- https://privatebin.at/
- https://hastebin.com/
- https://controlc.com/
- https://privatebin.net/
- https://pastebin.com/
- https://gist.github.com/ (no size limit! req. login)
- https://gitlab.com/dashboard/snippets (no size limit! req. login)
Always set Expires
= 1 year
(min. 3 months, keep in mind that you need to provide a new log if selecting a too short time period)
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.