-
boot to OrangeFox ( command is fastboot boot recovery.img)( or via fastboot mode )
-
Decrypt storage by entering the current screen lock (if asks. Should be ask if you add screen lock).
-
Now for direct flash is assuming u have rom files in otg pendrive , first choose in OFox menu wipe > Advanced > Select Dalvik,Cache,Vendor,System,Data , and swipe to wipe , Then exit the menu and enter flash section from home and select your rom zip and flash , which is why recommended having rom files in a otg pendrive.
-
now after formatting data , (Again go to wipe section and then select format data , now type yes and hit enter.
-
now reboot to system ( magisk.zip and kernel can be flashed after boot to rom ) and enjoy your rom.