WARNING: tested only on my setup (LineageOS 18.1 on instantnoodle), other setups may break and brick the device!
Step-by-step instructions (for reinstalling patched boot.img for Magisk):
- upgrade LineageOS to the latest by the standard way in Android GUI (download + install + reboot)
- if using not the latest Magisk: wipe old (possibly hidden) Magisk app then install the up-to-date one from the official Magisk github repo
install (git clone) payload_dumper from GitHub (in Termux or in an SSH session on the Android device) for the 1st time, or update (git pull) laterthe Android terminal session: wget the same LineageOS nightly image installed in step 1 from https://download.lineageos.org/