OnePlus Android 12 firmware - relocking no longer works

CalyxOS test builds for the OnePlus 8T, 9 and 9 Pro have been shipping with the Android 11 firmware, since at the time the work to update custom ROMs to be based on that was still work in progress for some models, and for others full kernel source code was not available until recently.

However, now that full kernel source code is available, and a big chunk of the work needed is done, we started integrating those changes into the CalyxOS codebase and made some test builds.

Unfortunately, re-locking the bootloader with a custom ROM installed no longer works with the latest Android 12 firmware from OnePlus. :(

What you need to do

Technical details

With the Android 12 update, OnePlus changed codebases to be more closely based on Oppo software, and the unification is going to continue.

This meant a lot of changes for custom ROMs all around - to the proprietary files, the kernel code, hardware code (such as fingerprint reader), and also the bootloader.

Sadly, based on our testing, it appears that re-locking the bootloader after installing a custom ROM (aka AVB Yellow state) is no longer working with OnePlus’ Android 12 bootloader (and associated proprietary components).

It is possible that we might be missing some change to make it work with OnePlus’ Android 12 bootloader, but we’ve tried a bunch of things without any luck.

We also tried reverting some components (mainly just the bootloader) to Android 11 while keeping the rest of the proprietary bits matching OnePlus Android 12, but that didn’t help either.

Relocking worked fine with the Android 11 bootloader (and associated proprietary components).

Our options

This means that we will not be able to merge the Android 12 changes into our codebase for now, given that an update with that included would lead to a non-functional device for anyone with a locked bootloader, which would have to be recovered with MsmDownloadTool

All of the possible ways have been listed below, while we evaulate them to decide on the future.

Best case scenario

Future (Android 13)

1. Continue with Android 11 bootloader and other proprietary components



2. Update to Android 12 bootloader and other proprietary components



3. Get a combination of Android 11 + 12 components working