Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AnierinBliss/dfae19e6c21fde039f8edceeda4bc576 to your computer and use it in GitHub Desktop.
Save AnierinBliss/dfae19e6c21fde039f8edceeda4bc576 to your computer and use it in GitHub Desktop.

Prerequisites

  • Ensure you're running OOS 11.1.2.2 firmware on your current slot.
    If you do not have that firmware installed, grab it for you device from the following links:
    enchilada (OnePlus 6)
    fajita (OnePlus 6T)

Required Files

  • Download the latest platform-tools.
    The filename will be in the following format: platform-tools-latest-*.zip
    Download Link

  • Download the needed files for you device from here:
    enchilada (OnePlus 6)
    fajita (OnePlus 6T)

    The following list has all the files you need to get:

    • boot.img
    • copy_partitions.zip
    • super_empty.img
    • vbmeta.img
    • the latest OTA zip for you device (evolution_{enchilada,fajita}-ota-xxxxxxxxxxx.zip)

    You may NOT substitute any of these files with files that you've downloaded elsewhere.

Installation/Migration steps

Notice that each command is prefixed with a ./. This is important. Please keep that prefix when you run each command.

  1. Unzip the platform-tools-latest-*.zip file you got earlier to any folder that you want.

  2. Move the following files into the same folder where you extracted platform-tools:

    • boot.img
    • copy_partitions.zip
    • super_empty.img
    • vbmeta.img
    • the latest OTA zip for you device (evolution_{enchilada,fajita}-ota-xxxxxxxxxxx.zip)
  3. Open your terminal and navigate to the extracted platform-tools folder. Use cd to navigate to the folder.

    • If you are on Windows, use PowerShell. Do NOT use Command Prompt.
    • If you are on macOS or Linux, then use your preferred terminal and shell.
  4. Reboot your phone to the bootloader.
    Do this by unplugging your phone, powering it off, then holding Vol Up + Vol Down + Power until you see a screen with giant text at the top of the screen.

  5. Run the following to flash the new retrofit dynamic partitions boot/recovery image and the empty vbmeta:

    ./fastboot flash vbmeta_a vbmeta.img
    ./fastboot flash vbmeta_b vbmeta.img
    ./fastboot flash boot_a boot.img
    ./fastboot flash boot_b boot.img
    
  6. Erase the old android partitions with the following:

    ./fastboot erase system_a
    ./fastboot erase system_b
    ./fastboot erase odm_a
    ./fastboot erase odm_b
    ./fastboot erase vendor_a
    ./fastboot erase vendor_b
    
  7. Boot to recovery

  8. In recovery, choose Advanced -> Enter fastboot to enter fastbootd

  9. Initialize the retrofit super partitions for each slot:

    ./fastboot wipe-super super_empty.img
    ./fastboot set_active other
    ./fastboot wipe-super super_empty.img
    ./fastboot set_active other
    

    If fastboot returns some error message about not recognizing wipe-super or prints a long help message instead , then that means you are running a very old version of fastboot. Please go back and download the latest version of platform-tools, as mentioned in the Required Files section.

  10. Choose Enter recovery to return to recovery

  11. While in recovery, navigate to Apply update -> Apply from ADB

  12. Run the following to sideload copy_partitions.zip to copy your firmware partitions to the other slot:

    ./adb sideload copy_partitions.zip
    

    You may receive an error from recovery, which will state the following:

    Signature verification failed
    Install anyway?

    Choose the "Yes" option to continue, since this zip doesn't have a signature in the first place.

  13. Run the following to sideload Evolution X:

    ./adb sideload [Evolution X OTA zip name]
    

    If you encounter installation errors when sideloading, run adb pull /tmp/recovery.log to get logs to share while asking for help.

  14. If this is a new install, format data. If you're migrating from non-retrofit Evolution X, skip this step.

  15. Reboot to system & #KeepEvolving

@zingrx
Copy link

zingrx commented Feb 11, 2023

Would the same instructions work with any a/b device? I have Xiaomi 13 (fuxi). Would at least the copy_partitions.zip work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment