Guide: How To Flash Extracted Partition Images
In our last guide, How To Extract Partition Images From Stock EMUI Firmware, we learned how to extract partition images from a stock firmware package. In this guide, we will cover various flashing scenarios using these files.
This guide may also be applied to custom images as well, such as custom kernels. However, please be aware that we DO NOT support custom kernels, etc. If you flash these, you do so at your own risk!
- In order to flash your image files, you will need to have fastboot installed. If you don’t have it installed already, check out our guide to Installing Fastboot and ADB
- We recommend placing your extracted image files in the same folder in which you installed fastboot. The rest of this guide assumes that you have done this.
- Now it’s time to load into fastboot. Power off your device. While your device is powered off, hold down the volume down key of your device, while connecting your device to your PC with a USB cable. If you’ve done this properly, you should see the below screen (or something similar). If you don’t, try again! Note that if you don’t show the “PHONE Unlocked” and “FRP Unlock” like shown below, do not continue. You must have a fully unlocked bootloader in order to continue!
- Once on this screen, keep your device connected to your PC, open a command prompt/terminal in the same directory where you installed fastboot and copied the extracted partition .img files
- In the command window, what you enter will depend on what you want to flash. We’ve included the commands below. Remember, these commands assume that your .img files are in the same folder as your fastboot installation and you haven’t changed the name from the stock EMUI Firmware file. If you’ve changed the name, location, or you are flashing a custom image, you will need to adjust the last parameter accordingly:
- System – fastboot flash system SYSTEM.IMG
- Ramdisk – fastboot flash ramdisk RAMDISK.IMG
- Kernel – fastboot flash kernel KERNEL.IMG
- Recovery – fastboot flash recovery_ramdisk RECOVERY_RAMDIS.IMG
- Once you enter the command, you will see information showing the progress of the flash. If everything is successful, you will see a response similar to the below:
- If you want to flash any other images, you can do them at this time.
- Once you’ve flashed everything you want to flash, reboot your device.
- Congratulations! You’ve flashed stock EMUI partitions back to your device! While we’re sad to see you leave our builds, we hope you continue to enjoy your device!
NOTE: The above options in step #5 are just a few of the partitions you may flash. However, we DO NOT support or recommend flashing any other partitions using this method as you can cause serious damage, including BRICKING YOUR DEVICE! You’ve been warned!
NOTE #2: Now that you know how to flash images, you may wish to refer to our guide on how to install Magisk in order to root your device.