How To: Root Android 11 Using Magisk — The Foolproof Guide

Root Android 11 Using Magisk — The Foolproof Guide

Thanks to Magisk, you don't have to lose root when updating to Android 11. The popular systemless rooting tool already achieved superuser access on Google's latest OS, even before the official release. It's currently in its experimental stages so the process is trickier than usual, but it does work.

Unfortunately, due to changes in Android 10, we'll have to wait a while for an official TWRP custom recovery. This makes flashing Magisk more challenging, and it also means you're more vulnerable if a soft brick (or bootloop) occurs, so be careful.

Requirements

Step 1: Unlock Your Phone's Bootloader

To install Magisk, and thus, root your phone, you'll need to flash a modified image onto an OS-level partition on your phone. That is exactly what unlocking your bootloader allows you to do.

So it's time to unlock your bootloader if you haven't already. But know that doing so will erase your internal storage, meaning all your data that's not backed up to the cloud will be lost.

This step is complex, so we've written a separate guide to walk you through it:

Step 2: Download the Android 11 Factory Images on Your Computer

Now, you'll need the factory images for the version of Android 11 your device is currently running. This is a set of IMG files, usually inside a ZIP archive, that are a perfect copy of your phone's internal storage partitions, minus any user data.

If your phone has an unlockable bootloader, it's highly likely that your phone's manufacturer offers a free download of these factory images. For what it's worth, you don't need all of the factory images, just the boot image. So if your phone's OEM offers a direct download for the boot.img file, that would be faster.

Otherwise, you can use the following links to find the factory images for the two major brands in the US that allow bootloader unlocking. While you're there, go to "About Phone" in Settings and read the "Build Number" at the bottom. Make sure this matches the version you're downloading.

Step 3: Extract the Boot Image

Extract the ZIP file using either your computer's preinstalled ZIP extractor or a third-party option such as 7-Zip. Open the folder, then open the ZIP file that starts with "image-" followed by a name and a series of numbers of letters. Extract the "boot" IMG file that you'll find inside of this ZIP to your desktop.

If you're on a OnePlus phone, it's not as simple as unzipping a file. Instead, you'll need to use a utility to pull the boot image out of the "Payload.bin" file. Use the guide below to get squared away:

Step 4: Move the Boot Image to Your Phone

Now, move the boot IMG file you just extracted to your phone and place it in the Downloads folder. We'd recommend doing this with a physical connection (i.e., a USB data cable), as uploading to a cloud service could corrupt the file.

If you'd like more help with this part, see Google's guide on transferring files from Android to Windows or our guide on transferring from Android to Mac.

Step 5: Install Magisk Manager Canary on Your Phone

On your phone now, you'll need to install the "Canary," or pre-beta build of Magisk Manager. Below, we've linked the official version as provided by topjohnwu, so tap or long-press the link to save the file. Because it is an APK, you will need to enable "Install unknown apps" for your browser and sideload the app to install it.

Step 6: Patch the Boot Image with Magisk Manager

Open Magisk Manager and select "Install" in the top-right corner of the Magisk card. Tap "Allow" when prompted to give Magisk permission to access your files.

On the Install screen now, leave both "Preserve" options enabled and leave "Recovery Mode" disabled, then press "Next." Tap "Select and Patch a File" on the next menu and your system file picker will appear. Use the hamburger menu to find your Downloads folder and select the "boot.img" file you copied over in Step 4.

Now you'll be taken back to the Install screen in Magisk Manager. Tap "Next" here, then hit "Let's go." Finally, just wait until the readout says "All done!"

Step 7: Move the Patched Boot Image to Your Computer

From here, move the magisk_patched.img file from the Downloads folder on your phone over to the desktop on your computer. Again, use a data cable if possible.

Step 8: Download Google's Platform-Tools on Your Computer

You'll need to send Fastboot commands to your phone in order to root it. To do that, you'll need a small piece of free, first-party software created by Google.

You can download these "platform-tools" directly from Google using the link below. Just select the link corresponding to your computer's operating system.

Step 9: Extract the Platform-Tools ZIP

Once downloaded, extract the file using your operating system's built-in tools or by using a third-party program such as 7-Zip. Once extracted, copy and paste (or drag and drop) the platform-tools folder to the desktop for easier access since you will be using it later.

Image by Dallas Thomas/Gadget Hacks

Step 10: Open a Prompt in the Platform-Tools Folder

For macOS and Linux users, open the Terminal app from your Applications folder. If you are using Windows, open Command Prompt from the Start Menu.

Once your command line tool is open, type the following, but don't hit enter yet:

cd

Now, press your spacebar once to add a single space after "cd." Still don't hit enter.

Finally, drag the platform-tools folder from your desktop and drop it right on top of the command line window. This will auto-populate its full file name and folder location, at which point you can go ahead and press enter on your keyboard.

Image by Dallas Thomas/Gadget Hacks

Step 11: Put Your Phone into Bootloader Mode

Now you'll need to boot into bootloader mode so you can send the Fastboot command that will install Magisk.

You could do this by activating Developer Options, enabling USB Debugging, allowing the connection, then entering adb reboot-bootloader into the command prompt on your computer, but there's an easier way: button combinations.

For most phones, power the device completely off, then press and hold the volume down button. While still holding volume down, press and hold the power button until your phone starts to boot up, then let go of both buttons. If this shows a menu like the one below, you're good to go. Otherwise, use the ADB command.

Image by Stephen Perkins/Gadget Hacks

Step 12: Connect to Your Computer

Now, plug your phone into your computer with a USB data cable. Ideally, this would be the cable that came in the box with your phone, but if not, at least make sure it's a good quality cable.

Step 13: Flash the Patched Boot Image

Type the following command into the command line tool on your computer, then press enter to verify the Fastboot connection.

fastboot devices

You should see your phone's serial number. If you do, you can proceed. Input the following and press the spacebar once to add a single space, but don't hit enter:

fastboot flash boot

Drag the "patched_magisk" IMG file from your file explorer to the command line tool, then drop it right on that window to auto-populate the file path. From there, press enter to send the full command.

Note: If you're on Mac or Linux and receive an error message after sending the above command, add a period and a slash (./) to the beginning and send it again. Example: ./fastboot flash boot boot.img

After a series of lines, including two that spit out "OKAY," input the following command to reboot back to Android:

fastboot reboot

And again, add "./" to the front if it doesn't work the first time:

./fastboot reboot

Step 14: Verify Root

When you get back up, all that's left to do is to verify root. Open Magisk Manager, and now you should see "Status: Normal" in the Magisk section alongside a build number next to "Installed." Go ahead and download any root app and tap "Grant" when asked for superuser access to see if everything works as intended.

Be aware that due to changes to Android, SafetyNet will no longer pass by default. Therefore, you will lose access to Google Pay, Pokémon GO, and some banking apps which use SafetyNet to check if your device is rooted or modified.

Keep Your Connection Secure Without a Monthly Bill. Get a lifetime subscription to VPN Unlimited for all your devices with a one-time purchase from the new Gadget Hacks Shop, and watch Hulu or Netflix without regional restrictions.

Buy Now (80% off) >

Cover image, screenshots, and GIFs by Dallas Thomas/Gadget Hacks

Level Up Your Android Expertise

Weekly Android hacks — straight to your inbox.

22 Comments

I don't understand how Magisk Manager can still be installed on the phone in step 14, when flashing the boot image in step 13 resets the phone. At least, when I tried, the phone was reset, installed apps were gone and had to be reinstalled, including Magisk Manager. When Magisk Manager was reinstalled, it didn't recognize the state as "Normal". So, back to Step 6.

Since you are flashing the boot image, there is no reason for your phone to factory reset. Are you using the latest version of Magisk Canary and factory image?

Hi, my device in stuck on white loading screen after Step14 for more than 1 hour. Any suggestions?

Restart your device into recovery mode and flash stock factory images to start over. Then try again.

Link to Magisk Canary is old. Not even sure you need Canary anymore.

Update the Canary link. As of now, the stable version of Magisk doesn't work.

Would this work with the Magisk v20.4 instead of canary?

I tried with the stable version and it didn't work.

dang, I'm fairly new to this so I'm stupid but I accidentally updated to android 11 on the stable version. I uninstalled and followed your steps but half the apps wouldn't work. Any suggestions? any help would be greatly appreciated.

Which version are you running now?

Good guide. I ran through the whole exercise... But oddly no love on root. Magisk says its rooted, even passing the ctsProfile SafetyNet test... but alas, no root apps getting the toast. using 11f254e5 (20424)

What does Magisk Manger say? Are there checkmarks next to both Magisk and Magisk Manager?

I have a Motorola E6 phone running Android 9 Pie. I've tried rooting it 10 times using both KingRoot and KingoRoot. No luck at all. I want to root my phone and I don't really care if I lose everything I have saved on the phone. I just want to keep my phone service with my service provider and also have a rooted phone. How do I do it?

Does your phone have an unlockable bootloader?

Pixel 3a XL Android 11

Slight problem. Root is enabled first boot into OS, but does not stay after reboot. Have to fastboot boot magisk_patched.img again to enable root.

I found the issue. Slight syntax error. "fastboot flash boot magisk_patched.img" was missing the "flash" command. So, that's why it would be rooted first boot. Now, when I do it correctly, the error is

"writing 'boot'…
FAILED (remote: Failed to write to partition Not Found)"

Trying redoing it by first flashing the factory images then follow the steps. Also, were you rooted before?

Solved! Long story short, Xubuntu 16.04 LTS fastboot version does not support the commands needed for Android.. I found the version needed at Highonandroid.com. He has a fastboot.zip with Linux, Mac and Windows versions in the file.

Not working. Failed on step 13

fastboot flash boot ./magisk_patched.img
Sending 'boot_b' (31856 KB) OKAY 0.808s
Writing 'boot_b' OKAY 0.256s
Finished. Total time: 1.436s

fastboot reboot
-> The pixel3 got stuck on the bootloader screen with message "no valid slot to boot".

I followed the instructions to the letter. Using Magisk Manager 2eb00187 (299) and using Pixel3 factory image 11.0.0 (RP1A.200720.009, Sep 2020)

My phone was rooted with Magisk 20.4 and was working OK with Android 10. Reflashes stock image with `flash-all.sh` (-w option removed). Redo the operation again. No success.

I am familiar with rooting and using ADB, Fastboot. I think the patching of boot.img is not yet working OK.

Do you have any active modules?

When i hit the install button in magisk , it dont ask for permission to access files , but it go to the files manager , and when i select the boot.img , it dont give me these recovery and preserve options , i select the boot image and it says lets go directly , so is the patched image that i got in the end usable or not ?

Note : im using a pixel 4 Xl and the magisk version is the latest version 8b29267a ( 20426 ) , please help .

Share Your Thoughts

  • Hot
  • Latest