Nope, you can certainly follow the method of using SP Flash Tool or equivalent to extract the new boot.img, patch it in unrooted Cosmo userland with Magisk Manager, and then flash it back with SP Flash Tool. Again, as long as you've got your bootloader unlocked, your data are fine. (Although obviously when doing any of this stuff, it's a good idea to have backups.)
Thanks for clarifying... I was a bit worried about this warning at
http://support.planetcom.co.uk/index.php/L..._Flashing_Guide about the fact that if I flash the wrong thing (NVRAM), my IMEI codes and stuff like that might end up hosed.
So, would this be the correct procedure in a generic case? I'm really trying to gather complete instructions in the sense that I know my way around Linux, but Android architecture is a completely new beast for me.
Initial rooting:
1. Install ADB and Fastboot
2. Set developer options: Go to "About device", tap it 7 times to get into developer settings. In developer settings:
- Remove automatic updates
- Allow USB debugging
- Allow OEM unlocking
(Anything else?)
3. Turn off Cosmo. Attach to PC via USB. Turn it back on while holding Power and Volume buttons (ESC on keyboard + fingerprint sensor on the cover) for 10 seconds. As an alternative, just issue "adb reboot-bootloader" in ADB.
4. Issue 'fastbood flashing unlock'. This will wipe data and allow installation of custom images. Due to the wiping of data, you need to boot back to android and enable developer settings again.
5. Extract boot.img to memory card. This can be done in adb shell by

? (Can it even be done if you are still unrooted?). Also make a copy with e.g. name boot-orig.img so that you can revert for OTA updates later on.
6. Boot to Android as usual.
7. Install magisk manager from
https://github.com/topjohnwu/Magisk/releases (allow unknown sources).
8. Patch the boot.img on your memory card.
9. Transfer the boot.img and boot-orig.img to PC.
10. Reboot back to fastboot mode as in Step 3.
11. issue "fastboot flash boot boot-patched.img" (where the filename is the image patched by Magisk manager).
12. Reboot to rooted Android.
OTA update is pending:
1. Reboot to fastboot mode as in Step 3 of previous set of instructions.
2. issue "fastboot flash boot boot-orig.img" (where the filename is the original boot image).
3. Reboot to Android. Android is now unrooted and you can apply OTA as normal.
4. Apply OTA update and restart phone.
5. Extract boot.img and a copy boot-orig.img to memory card like in step 5 of the previous set.
6. Boot to Android.
Follow the steps 8-12 in the previous set (flash with your newly-patched boot.img from the OTA-upgraded firmware release).
Only thing that I'm missing that how are you actually supposed to get the extract the boot image (Step 5).
Other than that, is this accurate?
I'm a bit worried about warnings in using SP Flash Tool since there are warnings about the possibility of essentially bricking your device if you wipe the wrong partition (NVRAM) by accident. Then again, if it is required and I only use the readback function, I should be reasonably safe, right?