How to install Magisk without TWRP recovery

Magisk is a rooting tool that you can use to root your device. Nowadays, people prefer rooting their device, because it gives them access to various features like uninstalling system apps, flashing custom ROMs, and various such.

However, the most common way to install Magisk is to use TWRP.

If you don’t want to use TWRP to install Magisk, then you are at the right place. In this article, we will be discussing how you can install Magisk without TWRP.

TWRP is a custom recovery ROM that one can install on their device to have more features than the stock recovery ROM that their device comes with.

Using the method we mention in the article, you will be able to install Magisk without TWRP and without using any custom recovery image.

Also Read: How to root Samsung Galaxy S8 and S8+ using Magisk

Files To Download

You will have to download these files before you continue ahead with the process-

You will need a Payload.bin file which you can get from the stock firmware of the device. You can easily get it from the official pages of your OEM.

Download the payload.bin file for your device and extract it on your computer. Also, install Android SDK and Fastboot tools on your PC.

Also Read: How to Unlock Bootloader, Install TWRP and Root Moto G7 using Magisk

Installing Magisk Without TWRP

Install Magisk without TWRP
Install Magisk without TWRP

Before you continue ahead with the process, ensure that your phone is charged up to 80% and that you have the complete backup of your device.

If not, then firstly do that, and then get ahead with the process.

Now that you have all the files downloaded, your phone is charged, and you have the backup of your phone, you can get ahead with the process.  

Also Read: [Solved] How to fix TWRP Error 7 while flashing a Custom ROM

Getting The Stock Boot Image From Stock ROM

  • Firstly install Python on your PC. After you have installed python on your PC, you will have to extract the payload.bin file on your PC. To do that, visit the location where you have extracted python and extract the Payload Dumper tool inside that folder. 
  • Now move the payload.bin file to the folder where Python is extracted. The Python folder should have the payload.bin file and the contents of the Payload Dumper tool. 
  • In the same folder, type CMD in the address bar, and hit enter to open the command prompt terminal. 
  • In the command prompt, type the following command python -m pip install -r requirements.txt and execute it. 
  • After the process is completed, you will find the extracted files in the folder ‘Output’ which will be present inside the Python folder. You will find the boot.img (stock boot image) file in the ‘Output’ folder. 

Patching Stock Boot Image

Now that you have extracted the stock boot image, we can continue ahead with patching the stock boot image. This step can further be divided into two parts- patching using an older version of Magisk and patching using the newer version of Magisk.

Patching Stock Boot Image Using Older Version Of Magisk

  • Install the Magisk Manager app (now known as Magisk) on your Android device. Also, copy the stock boot image to the internal storage of your device. 
  • You will see an install button when you launch the Magisk manager app. Tap on it. 
  • Now you will have to select the stock boot image file to patch it. Tap on the ‘Select and patch a file’ and then select the stock boot image from the location where you have copied it, and patch the file. 
  • You will find the patched file in the Downloads folder in the internal storage.

Patching Stock Boot Image Using Newer Version Of Magisk

  • Launch the Magisk Manager on your device.
  • Now you will see an install button. Tap on it.
  • Next, you will be asked to choose a file to patch. Tap on ‘Select and patch a file’ and then select the stock boot image from where you have copied it, and continue ahead to patch the stock boot image.
  • Head to the internal storage and then to the downloads folder, and you will find the patched file there.

Installing Patched Stock Boot Image

Now the next step is to install the stock boot image that you have patched in the above step. There are two methods to do so, the very first one involves using Fastboot, whereas the second one involves using Magisk Manager.

Installing Patched Stock Boot Image Using Fastboot

  • Connect your phone and PC using a USB cable. Ensure file transfer is on. Now copy the patched boot file to the platform-tools folder. 
  • Now in the same folder, head to the address bar and type CMD, and hit enter to open the command prompt terminal. 
  • In the command prompt terminal type in the command adb-devices to ensure the connection between the phone and computer is established. 
  • Now you will have to boot your phone to fastboot/bootloader mode. To do so, type in the command adb reboot bootloader in the terminal and execute it. Your phone will boot to bootloader mode. 
  • Now type the command fastboot flash boot magisk_patched.img and execute it.
  • Note that magisk_patched.img is the name of the patched boot file, while .img is the extension.
  • You can replace it with the name of the patched boot file.
  • In case your device has an A/B partition, then you will need to type in the following command:
fastboot flash boot_a magisk_patched.img  
fastboot flash boot_b magisk_patched.img
  • Now you will have to reboot the device normally.
  • To do so, type in the command fastboot reboot and execute it.
  • Your phone will be rebooted normally, and you can now close the command prompt terminal. You will have successfully rebooted your device.

Installing Patched Stock Boot Image Using Magisk

  • Firstly open the Magisk Manager on your phone. 
  • Then tap on the install button. Now under the ‘select method,’ select the ‘Direct Install (recommended)’ option.
  • Magisk will now flash the patched boot image on your device. 
  • Once the process is completed, you will be asked to reboot your device. Once done, you will have successfully rebooted your device. 

To Conclude

This was the complete process to install Magisk without TWRP or any other custom recovery.

We know that the process of installing Magisk and Rooting your device without TWRP recovery is not straightforward.

That is why most people prefer to unlock bootloader, install TWRP recovery and then install Magisk for rooting.

However, if you don’t want to install twrp recovery for any reason then here is the guide.

Hope you didn’t find the article too difficult. If you face any problem with the process, do let us know in the comment section.

Anurag Jain

A content writer, tech geek, and fitness enthusiast out there to explore the world.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts