trashaccount What i dont understand is why the phone gets corrupted on reboot. In BFU data is not accessible either way. Why cant it boot normally without a possible pin to get it?
Android distributions encrypts all data, but some data is encrypted differently than others. Some of this data is encrypted by your device, and the more sensitive data, such as your files, is encrypted by the user's credential (PIN/password). When you are booting into the OS after a restart or power off, all the data that is Credential Encrypted (CE) is inaccessible, because you need to insert the credential to generate the derived key to decrypt such data.
Obviously, if all data was encrypted, the OS couldn't be used, so a tiny part of the operating system is Device Encrypted (DE) and is decrypted by the device when booted, the rest of the CE Owner profile data is decrypted once the user inserts it's credential. This small part is made accessible at boot so you can insert your credential, see the time, still get alarms, etc.
A good example of this difference is apps: Some data is Device Encrypted, such as the APKs of apps that are installed on all the user profiles, HOWEVER, the data of each app instance within user profiles are Credential Encrypted. BFU-only extractions would tell someone they had a notes app installed, but not any of the notes, saved preferences or other data about the app. You can see with how Owner can see other apps installed exclusively in other user profiles from the Settings app that this is the case. This is also how an app updated on one profile updates on all the others.
Some apps may allow data accessible at a BFU state if an app supports a feature called Direct Boot, but this is an opt-in and apps should not use unless necessary (such as alarm clocks or dialers).
If you still dont understand, check out this Cellebrite keynote about Android encryption types.
Duress PIN erases all data including Device Encrypted data, it is booted into recovery because that DE data's keys have also been purged and therefore it cannot boot into the OS at all. The recovery regenerates a new install of the operating system with new device encryption keys. This is to make sure all device encrypted data is lost.