Though I am lost for whether it’s possible to flash root into the image. I know for eMMC and SD image, I can unpack the update.img file with Magisk patch and pack it again. How can I do the similar stuff with the NVMe image?
Finally figured myself…
After flashing with NVMe and boot successfully once into Android, I can use a NVMe to USB adapter in Linux with dd command to import and export the image.