[Android General] richarshub:
ROOT (ALMOST) EVERY DEVICE WITH MAGISK + FASTBOOT

As an Android user, I understand how frustrating it will be when you desperately look for an exact rooting tutorial for your device but end up finding nothing, all one-click root tools do not work, or no custom recovery made for yours.

So, this tutorial shows you how to root a wide range of Android devices (not all, because there will be exceptions, I guess) with Magisk. First, we should take a look at the pros and cons, so that you can generally acknowledge this method.

---------------------------------------------------------------------------

PROS

- No custom recovery (TWRP, ClockworkMod,etc.) needed

- Easy to find prerequisites

- Successful root attempt CONFIRMED on my 10 devices (including popular devices, rare devices, and devices with OS based on Android)

- Support recent Android versions, including Android 10 (tested on Google Pixel XL).

CONS

- Phone brick might occur

- You might not find your device's firmware in .zip format, which will stop you from using this method.

- Not being able to unlock the bootloader (only on some device) will stop you from using this method, too.

That's about the pros and cons. I hope you guys all understand these points before going to read my tutorial and start your attempt.

---------------------------------------------------------------------------

REQUIREMENTS & STEPS

I. REQUIREMENTS

- Your device's Android version is 5.0 or up. If it's below 5.0, then you can root your device easily with any one-click tool.

- A computer & USB cable.

On your phone

- Download & install Magisk

- Download the exact firmware version (in .zip format) of your device and only extract the boot.img to any directory.

On your computer

- Download & install Fastboot, extract the folder to "Downloads" directory

- Download & install Android USB driver for Windows

(I am not sure if XDA allows inserting links in threads or not, so please search for these prerequisites on the internet, it is easy)

II. STEPS

1. Unlocking your phone's bootloader

- Open Settings > About phone > Tap on Build number about 7 times till you see a notification "You are now a developer"

- Now in the About phone tab, you can see the "Developer option". Tap on it and make sure:

+ the OEM unlocking is turned ON

+ The USB Debugging is turned On

- Plug your phone on your computer (with Fastboot & driver fully installed). Allow the USB Debugging notification on your phone

- Open Command Prompt on your computer. Enter commands below steps by steps:

cd Downloads

cd fastboot

adb reboot bootloader

(press Enter after each line to proceed)

- Your phone will reset to the bootloader menu after these commands. Next, enter this:

fastboot oem unlock

- A message asking you to make sure you want to unlock the bootloader. Use the volume and power button to choose "Yes". Your phone will reset data and reboot right after.

*Note: This method works on many Android devices, but doesn't on many devices. You might have to google a method for your own phone

2. Patching the boot.img file

After you extracted the boot.img from your device, use the Magisk app installed on your device to patch it up.

- Click the "Install" button on the first line

- Click "Select and Patch a file"

- Choose the boot.img file extracted. The patching progress will start right after.

- You will receive a file named "magisk_patched.img" after finished.

3. Flashing the "magisk_patched.img"

- Copy the "magisk_patched.img" into the Fastboot folder

- Reboot your phone to Bootloader mode by powering off and then hold Power + Volume down button simultaneously

- Open Command Prompt again, and type:

cd Downloads

cd fastboot

fastboot flash boot magisk_patched.img

- The flashing progress will begin. Wait until it finishes, and type the last command:

fastboot reboot

- Your phone will restart once again, and of course, with root access gained :D

---------------------------------------------------------------------------

UNROOT DEVICE

- If you want to unroot your device, you just have to flash the original boot.img file, with the same steps with flashing the magisk_patched.img!

---------------------------------------------------------------------------

This instruction is not truly detailed, so maybe you might encounter some difficulties at some point. If any, please feel free to leave your question below.

It is also the first time I create an instruction post, therefore I appreciate all of your comments. Thanks a lot <3