dmesg
/proc/last_kmsg
/sys/fs/pstore/*
/system/phh/secure
adb logcat -d all > logs.txt
system
adb shell mount -o rw,remount /system_root
adb pull /system_root/system/build.prop
ro.adb.secure=0
ro.debuggable=1
ro.secure=0
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=adb
GNU sed
sed -i 's/^ro\.adb\.secure=.*/ro.adb.secure=0/' build.prop
sed -i 's/^ro\.debuggable=.*/ro.debuggable=1/' build.prop
sed -i 's/^ro\.secure=.*/ro.secure=0/' build.prop
sed -i 's/^persist\.service\.adb\.enable=.*/persist.service.adb.enable=1/' build.prop
sed -i 's/^persist\.service\.debuggable=.*/persist.service.debuggable=1/' build.prop
sed -i 's/^persist\.sys\.usb\.config=.*/persist.sys.usb.config=adb/' build.prop
build.prop
adb push build.prop /system_root/system/
/data/boot_lc_main.txt
adb pull /data/boot_lc_main.txt
adb push ~/.android/adbkey.pub /data/misc/adb/adb_keys
adb push C:\Users\%PutHereYourUsername%\.android\adbkey.pub /data/misc/adb/adb_keys
/sys/fs/pstore/*
/proc/last_kmsg
adb pull /proc/last_kmsg lastkmsg.txt
CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_RAM=y
CONFIG_PSTORE_LAST_KMSG=y
FBCon enables kernel output to the display. Use this as a second to the last resort if the above mentioned methods don't work.
CONFIG_VT=y
CONFIG_FB_SIMPLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONDIG_DRM_FBDEV_EMULATION=y
androidboot.console=tty0 console=tty0
adb reboot
ORfastboot reboot
depending on which mode you are in. This is the ONLY WAY to grab logs if all of the aforementioned methods do not work.
This assumes your kernel has UART logging enabled, and your DTS has it enabled.
I (the author), or OpenDroid are not responsible for any damage done to your board, whether it be a bad soldering job, scratched pcb, or fried board.
• A gadget that does UART/TTL (for most devices)
• A multimeter
• Probes (or anything that lets you reach the UART points on the board)
• Oscilloscope (if your board has undocumented serial)
If your device has its points documented (usually somewhere in the postmarketOS wiki), then you're in luck.
If your device doesn't have the points, you can hook an oscilloscope to any points of interest and hope that your kernel has UART output enabled by default.
Attach your probes (or solder a wire to said points, NOT RECOMMENDED!!)
Before plugging in your serial gadget, make sure you're using the right voltage AS THIS CAN FRY THE BOARD!
Fire up your serial reading program. The baud rate can be either found by cmdline passed by abl/preloader (or in defconfig.) If you can't find the baud rate then
115200
Now, power up your device. You may see early logs from abl/lk.
If all goes well, you should be able to find the root cause of your hang. If not, you can refer to the postmarketOS wiki as serial debugging is well documented there.