I welcome anyone with developer-level expertise to offer corrections to improve this writeup. My hope is the below information will enable users on this forum to avoid flashing errors and to recover more easily from soft bricks (where OEM unlocking is enabled and the bootloader screen is accessible).
Dumping the payload.bin of a Full-OTA of OxygenOS for a OnePlus 12 device will yield 48 .img files. These can be subdivided into 3 general categories:
- physical (emmc) partitions
- logical partitions
- other ("firmware"? I dunno)
When using a manual flashing method, the partition type will determine the state of the phone necessary to flash, i.e. bootloader mode versus fastbootD mode.
Physical
The first 5 are physical partitions, not certain about the last 4, but all 9 need to be flashed while the phone is in bootloader mode.
boot.img
dtbo.img
init_boot.img
recovery.img
vendor_boot.imgmodem.img
vbmeta.img
vbmeta_system.img
vbmeta_vendor.img
They can be flashed to either just the active slot or to both, for example:
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
Logical
These 15, together with 2 others (my_company, my_preload) are packed together in a particular way to form the super partition. The 2 missing img files never change so they don't need to be reflashed with every update. The phone must be in fastbootD mode when flashing, and the slot number is automatically assigned based on the current active slot. Flashing of logical partitions (LPs) is most likely to succeed when the size of the new LP is very close or identical to the size of the existing LP. In some cases it may help to first delete the temporary "-cow" partitions (Copy On Write) but on a Oneplus12 that doesn't guarantee success. Deleting, recreating and resizing partitions results in changes to the structure of the super.img and I'm not sure if there are consequences to that.
The basic command for just flashing a logical partition would follow this pattern:
fastboot flash odm odm.img
odm.img
product.img
system.img
system_dlkm.img
system_ext.img
vendor.img
vendor_dlkm.imgmy_bigball.img
my_carrier.img
my_engineering.img
my_heytap.img
my_manifest.img
my_product.img
my_region.img
my_stock.img
When a backup copy of a full super.img exists, of the same region, version and slot letter as the other files being flashed, then the full super.img can be flashed from bootloader mode in lieu of flashing the individual LPs in fastbootD mode. Use the following command:
fastboot flash super super.img
Due to its large file size (16 GB), expect 75 seconds or more to complete the flashing of a super.img
Other firmware
The following files must be flashed from fastbootD mode. I have always flashed these to both slots, although I'm not sure that is strictly necessary (others with certain knowledge on the matter are welcome to chime in). The command for manual flashing would follow this example:
fastboot flash --slot=all keymaster keymaster.img
abl.img
aop.img
aop_config.img
bluetooth.img
cpucp.img
cpucp_dtb.img
devcfg.img
dsp.img
engineering_cdt.img
featenabler.img
hyp.img
imagefv.img
keymaster.img
oplus_sec.img
oplusstanvbk.img
qupfw.img
shrm.img
splash.img
tz.img
uefi.img
uefisecapp.img
xbl.img
xbl_config.img
xbl_ramdump.imgxbl_ramdump.img
NOTES:
When you manually flash, verify which slot you are on before you start. You will be flashing to whatever is the current active slot and you'll boot up afterwards on the same slot. Change the active slot, if you wish, before you start flashing.
Downgrading with this method will require that you wipe the data partition before you boot to system.
转载自:https://xdaforums.com/t/summary-of-partitions-from-a-full-ota-payload-bin.4751015/