TWRP: OrangeFox: Data partition cannot mount as well as cannot be formatted.

If you have experienced something like:

Failed to mount '/data' (Invalid argument)
Failed to wipe dalvik
Unable to mount storage

This might be due to stock rom encryption which does not play well with dm-verity in TWRP and orangefox. If you want to fix this situation,
1. Connect the phone to PC
2. Boot phone to fastboot
3. Open Terminal/CMD with fastboot binary in path.
4. Type command fastboot erase userdata
5. Reboot to recovery directly.
6. Enjoy :)

  • Wow
Reactions: pr0ph3t