
On Xiaomi's Dimensity 810 phones, custom recoveries couldn't decrypt user data once a newer custom ROM was installed. Backups and flashing broke exactly when people needed them most.
The Beanpod TEE ties encryption keys to the OS version and security patch. A recovery that looks older than the ROM can't unwrap the metadata key, so it copies the ROM's values — never raising them, so keys are never upgraded by accident.
Without a permissive SELinux boot flag, init can't create the fscrypt keyring. Recovery now goes permissive at early-init; normal Android stays enforcing.
Finding these causes meant reading keymaster and init logs on a device where a hang, a bootloop and a decrypt failure all show the same splash screen.
The AERA port needed the AIDL boot HAL, a fix for a VINTF-related logo hang, and Wi-Fi bring-up.
Decryption now works on ROMs where other recovery trees fail, and the tree builds two recoveries from one source.