How to Extract Boot image file (boot.img.lz4), rename to .tar file and flash via ODIN to root Samsung

We’ll show you how to extract the boot.img.lz4 file and get the boot.img file in this article, which will be used to root your Samsung phone or tablet. Once you’ve rooted your phone, you have the option to access the system partition. In other words, you get administrative-level permissions. This will then allow you to flash MagiskXposed Framework and Substratum Themes. On the other hand, taking these measures requires an unlocked bootloader.

If you keep doing so, your device’s warranty will be cancelled and rendered meaningless. Knox will be tripped, as well, which may cause Samsung Pay, Secure Folder, Google Pay, Pokemon Go and Netflix (WideVine L1 decayed to L3) to stop working normally. Here are the steps to take in order to extract boot.img from a boot.img.lz4 file and then root your Samsung device using this method.

What is Boot Image?

A boot image is a system image (for computers or mobile devices) that includes the operating system framework and structure of various files. It allows the associated hardware to begin the boot procedure when it’s loaded onto a boot device. It includes the OS (operating system), system utilities, diagnostics, boot, and data recovery structures. Stock applications such as preloaded Google apps and services, as well as default apps like phone, messages, and camera, are also included.


Steps to Extract Boot image file from boot.img.lz4 file, rename to .tar file and flash via ODIN to root Samsung devices

The instructions have been divided into separate parts to make them easier to understand. continue with the procedure as outlined.

Extract Boot image file (boot.img.lz4), rename to .tar file and flash via ODIN to root Samsung


1) Extract Boot image file from boot.img.lz4 file and rename to .tar

  • First, download the desired Samsung Firmware (Stock ROM) for your device model.
  • Extract the firmware zip file on your computer within a folder. (The boot image file should be named as AP_xxx)
  • The firmware will contain .lz4 extension. You may see something like boot.img.lz4 file name.
  • Extract the boot.img.lz4 file via 7Zip to .tar extension and now you will see the boot.img.tar file. (Download 7Zip)

2) Unlock the Bootloader of Samsung devices and Enable OEM Unlock

Follow our detailed guide here: How to Unlock Bootloader on Samsung Device [New VaultKeeper Method]

3) Root Samsung Devices by flashing the patched boot image (.img) via Odin 

  1. Download Samsung device’s firmware
  2. On your computer, extract the Samsung device’s Firmware and look for an AP file (file that begins with AP). Copy the file to your phone’s storage.
  3. On your Samsung device, download and install the Magisk app.
  4. On your Android phone, open the Magisk app and select the first Install option.
  5. A pop-up window will appear, asking if you want to select and patch a file.
  6. When the file is finished downloading, double-click it and then wait for the patching procedure to finish. It might take some time to apply the update.
  7. The output file will be saved in the Download folder with the name magisk_patched.tar. Copy the patched tar file to your PC. On your PC, open Odin Flash Tool. In the AP box on the right side, add the magisk_patched file. Add BL, CP, and CSC files from extracted firmware to
  8. Turn on your Samsung device and boot it into Download Mode.
  9. The Odin tool will identify your phone and give the first stack on top of ID: COM a blue color.
  10. After you’ve completed all of these steps, click the Start button. The patched Magisk file will start flashing on your phone.
  11. The procedure will end with a Pass message and your phone will reboot by itself. You’ve just rooted your Samsung device phone.
Dibyashree Sharma
Dibyashree Sharma
Dibyashree Sharma graduated in Computer Science from NIT Rourkela. For the past eight years, she has been blogging about Android, which she is really passionate about. She has built a good reputation as a reliable source. Away from the digital sphere, Dibyashree enjoys playing tennis, a sport she is as passionate about as she is about technology.

Leave a Comment