How To Guide How to extract image collection from rom releases (and root the boot image and apply root to the phone)

Search This thread

RASTAVIPER

Senior Member
May 2, 2011
3,795
830
I have used this guide for a rom of OP6, but at the end I have some other images except the system image.
Do you know what is missing?
 
It would be great if someone who has the instructions for using the msm tool for pulling boot.img from the phone itself could add those to this thread (for situations where there is no full .zip). I know such a method exists and was posted somewhere in this forum a few months ago, but I can't for the life of me find it.
 

zgfg

Senior Member
Oct 10, 2016
9,639
7,503
Redmi K20 / Xiaomi Mi 9T
Xiaomi Mi 11
It would be great if someone who has the instructions for using the msm tool for pulling boot.img from the phone itself could add those to this thread (for situations where there is no full .zip). I know such a method exists and was posted somewhere in this forum a few months ago, but I can't for the life of me find it.
I don't know for msm but if you have TWRP, backup boot.emmc.win will be actually your boot img

Even if TWRP does not support Data encryption (A12), you could still backup to OTG stick or external SD card (second SIM slot)
 
  • Like
Reactions: terlynn4

EtherealRemnant

Senior Member
Sep 15, 2007
5,147
2,307
38
Denver, CO
OnePlus 9
Samsung Galaxy Watch 4
The tool in the OP didn't work to extract the boot image from ColorOS C.62 but this tool did, for anyone else who finds themselves having that issue in the future.

 

benhidalgo

Senior Member
Dec 13, 2012
298
74
The tool in the OP didn't work to extract the boot image from ColorOS C.62 but this tool did, for anyone else who finds themselves having that issue in the future.

What are we supposed to do with that?
 

kevk60

Senior Member
Dec 21, 2012
305
125
U.S.A
Nice instructions. Just received my 9pro and by following these well laid out and easy steps, I was able to root the phone in no time. Downloaded and extracted the boot img, patched it, booted it thru fastboot, and finally rooted thru the magisk app. Works well and Im rooted. Again thanks for your tutorial.
 

mad20012

Member
Nov 21, 2014
18
1
1. To extract the image collection from your downloaded rom :

  1. Download Payload Dumper from here (It's a zip file but it's not flashable) to your computer
  2. Extract the zip file to a folder, make it a folder you can use regularly because this is the default tool you would use from now on
  3. Download the rom version you want to root
  4. Unzip the rom to a folder, you will find a file within it called payload.bin
  5. Copy and paste that file into the "payload_input" folder within the Payload Dumper folder you created
  6. Execute the payload_dumper.exe file within Payload Dumper folder, you will not have to specify any options as it always extracts from any payload.bin file in payload_input and outputs the image files to payload_output.
  7. Leave the extraction to be completed, the program will automatically close itself once it's completed
  8. Your extracted .img files will be shown within the payload_output folder


2. If you need to root the boot image you extracted :


  1. Copy the boot.img file from the payload_output folder to a folder on your phone storage (Best to name it appropriately if you will be doing this regularly)
  2. Download and Install the latest Magisk apk from the release site (Accept any prompt to allow install from external source)
  3. Launch the app and then choose Install under the top "Magisk" section
  4. Choose Select and Patch a File then browse to where you copied the boot.img on your storage
  5. Magisk will then apply root to the boot image you specified, Your rooted image file will be output to your phone's Download folder : /sdcard/Download
  6. You don't need to keep the default filename of the rooted image file so you can rename it appropriately for the rom version after you copy it to your computer, just ensure to keep the .img file extension
  7. If you rename the rooted boot image, try not to use spaces in the filename, rather use _ or - as spaces make it more difficult to use in a command window although when you start typing the filename you can use TAB to autocomplete it, always ensure the filename shows .img as the extension and at the end of any commandline


3. If you need to use your rooted boot image to apply root to your phone :


  1. Install the drivers from the mounted drive you should get when connecting the phone to your computer
  2. On Windows you should then have a folder in C:\Program Files (x86)\OnePlus USB Drivers\Android with the platform tools (ADB.exe and Fastboot.exe) you will need, you can obviously copy the content from that folder somewhere else if you wish.
  3. Connect your phone to your computer
  4. Copy your rooted boot image to the folder that has adb.exe and fastboot.exe
  5. Open a command window on your computer by right clicking in that folder and choosing Open command window here
  6. In the command window, Type or copy/paste the command ADB devices and press enter
  7. If you see a prompt on your phone to allow the computer connection then accept it, better still, tell it to allow from now on also.
  8. You should see a string of characters shown in the command window, if you don't see that, then try another cable or re-install your drivers and reboot the computer.
  9. Reboot your phone into Fastboot either by using ADB on your computer ( ADB Reboot Fastboot ) or by enabling Advanced reboot in your developer options in settings and then hold down the power button and use the 3 dot menu on the top right and choosing "Bootloader"
  10. In the command window type Fastboot Boot <filename.img> i.e. Fastboot Boot rooted_boot.img and press enter
  11. You should see a couple of lines in the command window telling you it's copying over to the phone, don't worry it's not being flashed or replacing your existing installed boot image
  12. The phone should then restart and boot using the image from your computer, it will be a slightly slower boot than usual, your existing unlock method should still work
  13. Launch the Magisk app, it should already have root access because the boot image you've used is already rooted
  14. Go to Install under the top Magisk section
  15. Choose Direct Install (Recommended)
  16. Magisk will then apply root access to the boot image on the actual phone
  17. You will be prompted to reboot the phone on the bottom right, do this to complete the process
  18. You don't need the phone connected to your computer anymore as the installed boot image on the phone should now have root access
  19. You can check for root either using any app which requires root or by using an app like Root Checker


Remember to empty the contents of payload_input and payload_output once you have finished, leaving them ready for any future rom versions


4. To retain root access after ROM/OTA update :



  1. Install the update either from Oxygen Updater or from Settings > System > System updates
  2. DO NOT REBOOT when prompted
  3. Go to the Magisk app
  4. Go to Install under the top Magisk section
  5. Choose Install to Inactive Slot (After OTA)
  6. Magisk will apply root to the newly installed boot image for the next version
  7. Reboot when prompted by the Magisk app
  8. The phone should reboot into the updated version with root already applied
Sorry for asking but this is the only place i found someone talking about the thing I'm asking about
Can i apply option 4 to apply ota update for miui stock toms?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    1. To extract the image collection from your downloaded rom :

    1. Download Payload Dumper from here (It's a zip file but it's not flashable) to your computer
    2. Extract the zip file to a folder, make it a folder you can use regularly because this is the default tool you would use from now on
    3. Download the rom version you want to root
    4. Unzip the rom to a folder, you will find a file within it called payload.bin
    5. Copy and paste that file into the "payload_input" folder within the Payload Dumper folder you created
    6. Execute the payload_dumper.exe file within Payload Dumper folder, you will not have to specify any options as it always extracts from any payload.bin file in payload_input and outputs the image files to payload_output.
    7. Leave the extraction to be completed, the program will automatically close itself once it's completed
    8. Your extracted .img files will be shown within the payload_output folder


    2. If you need to root the boot image you extracted :


    1. Copy the boot.img file from the payload_output folder to a folder on your phone storage (Best to name it appropriately if you will be doing this regularly)
    2. Download and Install the latest Magisk apk from the release site (Accept any prompt to allow install from external source)
    3. Launch the app and then choose Install under the top "Magisk" section
    4. Choose Select and Patch a File then browse to where you copied the boot.img on your storage
    5. Magisk will then apply root to the boot image you specified, Your rooted image file will be output to your phone's Download folder : /sdcard/Download
    6. You don't need to keep the default filename of the rooted image file so you can rename it appropriately for the rom version after you copy it to your computer, just ensure to keep the .img file extension
    7. If you rename the rooted boot image, try not to use spaces in the filename, rather use _ or - as spaces make it more difficult to use in a command window although when you start typing the filename you can use TAB to autocomplete it, always ensure the filename shows .img as the extension and at the end of any commandline


    3. If you need to use your rooted boot image to apply root to your phone :


    1. Install the drivers from the mounted drive you should get when connecting the phone to your computer
    2. On Windows you should then have a folder in C:\Program Files (x86)\OnePlus USB Drivers\Android with the platform tools (ADB.exe and Fastboot.exe) you will need, you can obviously copy the content from that folder somewhere else if you wish.
    3. Connect your phone to your computer
    4. Copy your rooted boot image to the folder that has adb.exe and fastboot.exe
    5. Open a command window on your computer by right clicking in that folder and choosing Open command window here
    6. In the command window, Type or copy/paste the command ADB devices and press enter
    7. If you see a prompt on your phone to allow the computer connection then accept it, better still, tell it to allow from now on also.
    8. You should see a string of characters shown in the command window, if you don't see that, then try another cable or re-install your drivers and reboot the computer.
    9. Reboot your phone into Fastboot either by using ADB on your computer ( ADB Reboot Fastboot ) or by enabling Advanced reboot in your developer options in settings and then hold down the power button and use the 3 dot menu on the top right and choosing "Bootloader"
    10. In the command window type Fastboot Boot <filename.img> i.e. Fastboot Boot rooted_boot.img and press enter
    11. You should see a couple of lines in the command window telling you it's copying over to the phone, don't worry it's not being flashed or replacing your existing installed boot image
    12. The phone should then restart and boot using the image from your computer, it will be a slightly slower boot than usual, your existing unlock method should still work
    13. Launch the Magisk app, it should already have root access because the boot image you've used is already rooted
    14. Go to Install under the top Magisk section
    15. Choose Direct Install (Recommended)
    16. Magisk will then apply root access to the boot image on the actual phone
    17. You will be prompted to reboot the phone on the bottom right, do this to complete the process
    18. You don't need the phone connected to your computer anymore as the installed boot image on the phone should now have root access
    19. You can check for root either using any app which requires root or by using an app like Root Checker


    Remember to empty the contents of payload_input and payload_output once you have finished, leaving them ready for any future rom versions


    4. To retain root access after ROM/OTA update :



    1. Install the update either from Oxygen Updater or from Settings > System > System updates
    2. DO NOT REBOOT when prompted
    3. Go to the Magisk app
    4. Go to Install under the top Magisk section
    5. Choose Install to Inactive Slot (After OTA)
    6. Magisk will apply root to the newly installed boot image for the next version
    7. Reboot when prompted by the Magisk app
    8. The phone should reboot into the updated version with root already applied
    4
    Quick question as this is my first OnePlus device.
    Will I lose root after a system update and will have to it all over again?
    Just added a new section to my original post for this.
    1
    Very nice write up! Hopefully many will read this and follow instructions. Too many threads being created with issues because they never bother to read.
    1
    I'm asking where to get my ROM file, in order I should be able to extract the boot img?
    A link? Somewhere on my phone?

    It's pinned at the top of the entire forum :


    They're also posted on OnePlus's site (eventually) :


    Make sure the version matches the one you're using
    1
    When I click on the payload_pumper.exe file, the cmd window flashes and nothing else happens.