Oneplus 6 recreate Partitions ?

Hello, I was trying to install Windows 10 on my OnePlus 6, I was following a tutorial and I deleted all of the partitions with parted from /dev/block/sda
I can only boot into fastboot, if I try the: fastboot boot twrp.img command, I get an error
How can I recreate the partitions, can I even do something at all to unbrick it?

You should use EDL mode to rescue your device. Besides you should only remove the userdata partition when installing windows.

I accidentally completely deleted the “userdata” partition. How can I partition the phone again in EDL mode?

You can delete the userdata partition, but you can’t delete all the partitions, which will brick your phone. It’s recommended to use MSM Downtool to restore your phone.
For the 128GB model, here’s an example to repartition device.


resizepart 17
# input 61GB here

mkpart esp fat32 61GB 62GB
mkpart win ntfs 62GB 125GB
set 18 esp on