How to see the boot progress messages (akin to dmesg) when booting LineageOS? After the last OTA update my phone (OnePlus 3) seems to be stuck for about half an hour on the boot animation. 

Since updates usually take ages to install, how do I know that the update process is stuck? 

On my desktop I can always see dmesg message during the boot, and it is relatively easy to troubleshoot problems. Is there a tool that allows me to see the diagnostic messages while the phone is booting?
Finally I've managed to do that without any 3rd party addons. The key is to get boot.img, and modify the file default.prop that is living in the root folder inside the img-ramdisk.gz: 

You have to do three modifications:


persist.sys.usb.config=none -> persist.sys.usb.config=mtp,adb
ro.secure=1 -> ro.secure=0
ro.adb.secure=1 -> ro.adb.secure=0


You can get the boot.img if you extract the flash image with the OS you are currently using, or by extracting it from the device directly. 

After that, the adb logcat will collect the live boot messages when you connect your laptop to the phone when it boots. 

With adb secure on '1', it will give you 'unauthorized' message when you attempt to adb.

ro.secure=0 allows adb to have root privileges (see more here https://android.googlesource.com/platform/system/core/+/master/adb/daemon/main.cpp)



All credits go to the IRC users LuK1337 and razorloves from the LineageOS Discord/IRC channel.