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=32766and 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 special AXP.OS boot logs get and so depends per device.
Check the value of [DEVICE-BOOT-DEBUG-PATH] in the “Debugging” topic of the Installation guide for your device.
if you can boot (requires root!)
- boot Android
- ensure you have USB debugging enabled in developer options
- this requires root, you have the following options:
- AXP.OS Pro: activate Magisk
- AXP.OS Slim: flash Magisk manually - if you can/want, otherwise check the next topic
- any other: check if you can enable
adb rootin Developer options (requires aUSERDEBUGorENGbuild)
- open a terminal on your PC and execute (replace DEVICE-BOOT-DEBUG-PATH with the real value):
- for those having
adb root:
adb root
adb shell- for those having
Magisk:
adb shell
su #(a Magisk prompt should appear in Android which you have to accept)- now do:
rm -rf /sdcard/Download/logs #(don't worry if that one fails it might not exist)
mkdir /sdcard/Download/logs
cp [DEVICE-BOOT-DEBUG-PATH]/boot_debug/* /sdcard/Download/logs/
cat /proc/cmdline > /sdcard/Download/logs/more.txt
cat /proc/bootconfig >> /sdcard/Download/logs/more.txt
mount >> /sdcard/Download/logs/more.txt
dmesg >> /sdcard/Download/logs/more.txt
cd /sdcard/Download/logs/
tar cvzf ../logs.tgz *
exit
adb pull /sdcard/Download/logs.tgz- share the file
logs.tgzyou pulled by attaching it to an issue or to a related XDA post- bonus: extract all files from
logs.tgzand attach / paste them one by one (see topic Share logs) instead of thelogs.tgzitself
- bonus: extract all files from
Early kernel log
Sometimes it is also required to get an early kernel log, this is how:
(ensure you walked through the above steps first because this ensures all is properly set up)
- Power off your device
- start adb on your PC:
- for those having adb root:
adb wait-for-device && adb root && adb shell dmesg - for those having Magisk:
adb wait-for-device && adb shell "su -c dmesg"
- for those having adb root:
- connect an USB cable & power on the device
- share the output, see topic Share logs
if you can not boot / no root (requires TWRP)
- if you cannot boot or if there is no root available, you have the following options:
- boot TWRP (e.g.
fastboot boot twrp.img) - install TWRP (some devices won’t allow / work with
fastboot boot)
- boot TWRP (e.g.
- when 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 (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, IP’s, WiFi data, etc)!
In case of Android logs this is almost always the case so it is generally not recommended sharing these in public (exceptions are e.g. specific issue logs or the early kernel log).
Keep that in mind and 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 an important/useful context.
Sensitive log files
While there are several paste services which can encrypt your data the following is the recommended process for AXP.OS users:
- Open https://paste.axpos.org/ (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
Passwordfield
(and record it for later. Note: it is recommended to use the same password when pasting multiple outputs) - Paste the log into the
Editorframe (remember: 1 paste per log/output) - Click on
Createat the top right - Click
Copy linkto 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 requestor 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.axpos.org/ (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.