root Android


Android enthusiasts who love to modify their Android smartphone are always looking forward to choosing a successful and effective rooting solution. Magisk is such an effective and successful which most Android enthusiasts wanna try. It offers more features than other available rooting solutions and functionality is more advanced than any other rooting solution. Basically, users can gain root access through flashing the Magisk Zip file in TWRP custom recovery. In case your device is not compatible with Custom recovery or any other issue, you have to use the method named "Boot Image Patching".

Why Is Boot Image Patching Method Important


  • Useful when custom recovery image not compatible with your device or when you do not have a custom recovery on your device
  • You  can use this method if your device is A/B partition and  do not want to mix recovery and boot images 
  • when your device is using system-as-root without A/B partitions

Requirments


  • Get a complete backup of your device
  • Get a copy of the stock boot/recovery image
  • Latest Magisk Manager APK
  • A computer (Windows or MacOS)
  • Compatible USB cable
  • Download and Install USB drivers
  • ADB and Fastboot Tools

How To Patch The Boot Image and Root Your Android Using Magisk


  • Download the accurate stock boot/recovery image for your device on your computer
  • (You can obtain  stock boot/recovery image by extracting OEM provided factory images or extracting from OTA update zips)
  • Copy it to your Android device
  • Download and Install Magisk Manager APK on your Android smartphone
  • Go to Advanced Settings on Magisk Manager and check “Recovery Mode” if you are going to recovery image
  • Next, tap on Install (Located in front of  Magisk not Installed section) > Install > Select and Patch a File > select the stock boot/recovery image file
  • Then, the Magisk Manager will patch the stock boot/recovery image file and it will be stored in [Internal Storage]/Download/magisk_patched.img
  • Now, copy the magisk_patched.img to your computer from your Android device
  • Usually, you can find the file via MTP mode
  • In case you cannot find the file in MTP mode, use this ADB command adb pull /sdcard/Download/magisk_patched.img
  • Next, flash magisk_patched.img on your Andorid device using, 


fastboot flash boot /path/to/magisk_patched.img  (If you are patching boot image)
or 
fastboot flash recovery /path/to/magisk_patched.img (If you are patching recovery image)

  • Reboot your Android smartphone to finalize the process 
  • Finally, connect the device to  the Internet and launch the Magisk Manager APK and follow the app instructions 


Final Word


Make sure to download the exact boot or recovery image for your smartphone for the patching purpose. A wrong image file may brick your device and it may make your effort useless.