4

I own a Oneplus 7T, which runs Android 10 and therefore has no working TWRP to flash ROMs with. It's bootloader is unlocked and is rooted.

When installing a new ROM, whether it is a custom ROM or an update to the current ROM, I install them by extracting the ROM zip, extracting payload.bin, and flashing certain .img files in fastboot, following the instructions found here under the 'Manual Flash' section.

However, I'd like to understand more about this process. The instructions flash less .img files than were extracted. For example, in the recent Oneplus 7T OOS 10.0.11 update, the the number of .img files extracted (31) is less than what was flashed according to the instructions (19). Furthermore, the instructions passed the arguments --disable-verity when flashing two of the .imgs, but not the others.

Therefore, I'm wondering:

  1. What does each .img file do?
  2. Which files must be flashed and in what order?
  3. Why are certain files flashed with certain arguments?
  • 1
    1. A brief description of commonly found partitions (but not all) can be found here: forum.xda-developers.com/android/general/… // 2. Since fastboot stock ROMs are usually meant to fix bricked devices, they include all partitions, even those not getting frequent updates from OEM. Under normal circumstances you don't need to flash critical partitions like those related to SoC, modem, bootloaders, TEE etc. which may render your device unbootable if flashing goes wrong. // 3. --disable-verity disables dm-verity (Android's Verified Boot). – Irfan Latif May 30 '20 at 16:21
3

I own a OnePlus 7 and the same developer has answered a similar question in One Plus 7 device forums

Question

I just noticed, the script in bat file only flashes 25 .img files, but when I extracted payload.bin in OB2 I saw 32 .img files. Does this mean that the other .img files in payload are not needed? Or can I add the command in bat file to flash other images?

Answer

They can't be flashed using fastboot, that are the criticals partitions, they are needed and it's for that these fastboot roms can't be used to update or downgrade the software you have on your device, because the fastboot roms can't flash all partitions. This fastboot roms should be used if your system cannot be used and if you don't have access to TWRP

  • They need to be flashed in the order specified. All of them (see next point)

  • .img files replace the file on the device with the one in fastboot ROM, except for critical partitions (I am not sure what these are for your device but could be boot loader, OTA, TEE, SoC etc) . This accounts for the difference in number (31 extracted but 19 only flashed). See Irfan's comment

  • --disable-verity is only applicable for vbmeta header files. For more details, see How to disable dm-verity on Android with "user" build type ROM? where the concept is well explained, in detail.

0

If your rom developer does it you can just

fastboot update rom.zip

Where rom.zip contains android-info.txt and at least boot, system, product, vendor, vbmeta, and dtbo img files.

If necessary unzip and rezip creating an empty android-info.txt.

Img files contain an exact replica of the partition which is copied exactly onto the device

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.