[OnePlus Nord N200 5G] Travisholt92:
I've seen alooot of issues lately of people "bricking" their Nord N200's without a method of unbricking (at the time of writing, only T-Mobile variant has MSMTool)

I've noticed a reoccurring theme. i myself am guilty of doing it and not realizing what went wrong.

It's one of two things:

1. If the device fails to boot "7" times in a row or encounters a hard panic, it will wipe the metadata partition (the decryption key for data/user storage) and may also switch to the alternate slot automatically.

If your device switches slots on it's own, your userdata is gone.. without a decryption key, there is no getting it back (without a very powerful computer and probably years to brute force decrypt)

You will not be able to boot again until you are on the correct slot (dictated by your super partition and other A/B partitions needing to be up to date)

When back on the proper slot, while in fastboot run:

fastboot -w

This will wipe userdata and metadata partitions to allow metadata to be regenerated upon first boot.

Either "fastboot reboot recovery" or use the keys to select reboot recovery. And "wipe everything"

After this you should be bootable. If not...

2. When attempting to prepare the system for flashing GSI, we humans are messing up :eek: surprise surpise.

The issue most specifically stems from the dynamic partition located at /dev/block/by-name/super

this partition actually contains 5 resizable partitions : (i've seen up to 7 on this device including -cow (copy-on-write)

system // system_a/system_b //

system_ext // system_ext_a/system_ext_b //

product // product_a/product_b //

vendor // vendor_a/vendor_b //

odm // odm_a/odm_b //

if on you are running stock and your stock is running on slot b for example, your dynamic partition layout is as follows:

system_b

system_ext_b

product_b

vendor_b

odm_b

the issue lies when we go to flash a GSI and start using the commands:

fastboot delete-logical-parition

fastboot create-logical-parition

i myself have done:

fastboot create-logical-partition system 0

this is wrong. it needs a target slot specified, you will have no issues creating the partition or flashing, but it will most likely fail to boot.

correct usage would be:

fastboot create-logical-partition system_b 0 // or use the size values provided by fastboot getvar all as shown in my example of how to switch slots/unbrick below

Prerequisites:

1. stock firmware package or complete dump of all of these FROM THE SAME SOFTWARE VERSION

I have a T-Mobile variant, but for this proof of concept i used the unbranded NA Software provided here https://www.oneplus.com/support/softwareupgrade/details?code=PM1630638351161

Required Partition Images:

system.img

system_ext.img

product.img

vendor.img

odm.img

boot.img

vendor_boot.img

dtbo.img

uefisecapp.img

imagefv.img

abl.img

core_nhlos.img

qupfw.img

keymaster.img

hyp.img

dsp.img

devcfg.img

bluetooth.img

logo.img

tz.img

xbl.img

xbl_config.img

featenabler.img

modem.img

rpm.img

oplusstanvbk.img

vbmeta.img

vbmeta_system.img

If you're on T-Mobile just use the MSMTool unless you prefer the unbranded software.

2. Fastboot Enhanced from this thread https://xdaforums.com/t/tool-windows-fastboot-enhance-payload-dumper-image-flasher.4310553/

( Or if on Linux, find yourself some knowledge on how to use a payload dumper to extract these images from the stock firmware package )

ALL of the partitions listed above that are NOT the 5 in the dynamic partition have BOTH slots A and B on your phone, you can flash all of these packages to both slots and pick either slot A or slot B when you repartition your super partition.

IT IS THE SUPER PARTITION THAT DECIDES WHICH SLOT GETS TO BOOT

(it is in bold because this is the cause of most "bricks" and vbmeta but more on that in a minute)

How to recreate a usable/bootable super partition:

1: identify which of your slots is capable of booting into stock recovery/fastbootd

If you can't boot stock recovery or fastbootd

flash these stock partitions:

dtbo

boot

vendor_boot

to both slots (_a and _b) on all 3

and these

fastboot --disable-verity --disable-verification flash vbmeta_a vbmeta.img

fastboot --disable-verity --disable-verification flash vbmeta_b vbmeta.img

fastboot --disable-verity --disable-verification flash vbmeta_system_a vbmeta_system.img

fastboot --disable-verity --disable-verification flash vbmeta_system_b vbmeta_system.img

Then try again to see which slot is bootable, if neither you lost too much in your super partition that is needed to run recovery, grab a backup of a super.img from someone on here and fastboot flash super super.img, depending on which slot that super.img is meant for, that will be the slot you will need to be on to proceed with the rest of the fixing

2. Boot into Fastbootd ( fastboot reboot fastboot )

Delete EVERYTHING from the super parition.

even if you don't remember making it, dont skip any of these lines just ignore the errors it spits out

fastboot delete-logical-partition system_a

fastboot delete-logical-partition system_b

fastboot delete-logical-partition system

fastboot delete-logical-partition system_ext_a

fastboot delete-logical-partition system_ext_b

fastboot delete-logical-partition system_ext

fastboot delete-logical-partition product_a

fastboot delete-logical-partition product_b

fastboot delete-logical-partition product

fastboot delete-logical-partition vendor_a

fastboot delete-logical-partition vendor_b

fastboot delete-logical-partition vendor

fastboot delete-logical-partition odm_a

fastboot delete-logical-partition odm_b

fastboot delete-logical-partition odm

Now let's recreated something useable. For Stock version 11.0.5.0 N/A my super image used these sizes (obtained by fastboot getvar all )

For my slot B to Slot A proof of concept i used this for slot A:

fastboot create-logical-partition system_a 0x5AFDC000

fastboot create-logical-partition system_ext_a 0x4B7B3000

fastboot create-logical-partition product_a 0x7338A000

fastboot create-logical-partition vendor_a 0x3EC8D000

fastboot create-logical-partition odm_a 0x37E9000

And for a "bricked" user wanting to stay with slot B they used:

fastboot create-logical-partition system_b 0x5AFDC000

fastboot create-logical-partition system_ext_b 0x4B7B3000

fastboot create-logical-partition product_b 0x7338A000

fastboot create-logical-partition vendor_b 0x3EC8D000

fastboot create-logical-partition odm_b 0x37E9000

Depending on which you choose to create, you can now set your desired slot with

fastboot set_active a

or

fastboot set_active b

then use Fastboot Enhanced to flash either the entire payload bin, or flash each to each _a or _b partition from the long list above one by one.

DO NOT LEAVE FASTBOOTD UNTIL YOU'VE FLASHED ALL OF THESE PARTITIONS (NOT JUST THE 5!) OR YOU MAY BE UNABLE TO GET BACK TO FASTBOOTD!!!

Flashing a payload.bin (.zip) in fastboot enhanced will flash to whatever slot is currently active and it monitors which slot is active.

Last is for vbmeta

If you flash any sort of modified boot image (magisk rooted), gsi, or any sort of image that is not stock, you need to flash the stock vbmeta and vbmeta_system with --disable-verity and --disable-verification or you won't be able to do much if anything at all.

in either fastboot or fastbootd:

fastboot —disable-verity —disable-verification flash vbmeta_a vbmeta.img

fastboot —disable-verity —disable-verification flash vbmeta_b vbmeta.img

fastboot —disable-verity —disable-verification flash vbmeta_system_a vbmeta_system.img

fastboot —disable-verity —disable-verification flash vbmeta_system_b vbmeta_system.img

these are very important if you flash files that are not originally from that specific build version/variant

Happy flashing to you all :) Hopefully this helps some people.