How to Install Magisk and Root Android Devices with it [2 Methods]

How to Install Magisk on Android

In this comprehensive guide, we will show you how to install Magisk Universal Systemless Interface to root Android devices. There are two different methods to install it – First, by flashing the latest Magisk installer zip using TWRP recovery, or two, by flashing the Magisk Patched Boot Image. The instructions for both the methods have been listed below in a step-by-step manner. For your convenience, we have also listed the steps to completely remove/uninstall Magisk to unroot, should you feel the need to do it.


The Android developer community is filled with a surfeit of modifications tools (Commonly known as ‘mods’) that allow you to customize the software on your Android devices. Many of these have gained immense popularity for their ability to efficiently and easily modify the phone’s software. These mods can help you draw various features on your Android phone, that the OEM doesn’t normally allow you to. Today, we will be taking one such mod/tweak in consideration that is being widely used for the past few years.

We’re here for “Magisk“, the ultimate interface to modify the software on Android devices systemless-ly. So if you’re looking ahead to root your phone or add third-party features to it, you should consider using it. The detailed instructions in this guide will allow you to install Magisk on almost any device running Android 4.2, to Android 10. If you’re new to the Android customization scene, take some time to read more about what it is and the features it offers.

Table of Contents

What is Magisk?

How to Install Magisk on Android

Magisk is a very powerful tool that not only allows users to root their Android device easily but also apply modifications to the software systemless-ly. It is developed by XDA Recognized Developer topjohnwu and is also considered as a true successor to SuperSU, offering even more features and ways to efficiently root devices running the latest Android version.

In 2016, Magisk emerged as a tool to modify the software on Android devices using “Modules” just like the Xposed Framework, but in a more efficient manner. Well, unlike Xposed, Magisk allows users to customize the software without actually altering the /system partition. This means users could still pass Google’s SafetyNet tests and use apps that might rely on it

Progressing further, it gained several new features like “MagiskSU“, a part of the tool itself for effectively rooting Android devices. At the moment, you can install Magisk to root any Android device running Android 10, Pie, Oreo, Nougat, Marshmallow, and Lollipop.

Magisk Hide” is another notable feature that allows users to hide root from apps that might not work if Root is detected, like Google Pay, Pokemon Go, banking apps, etc.

Below is a list of the major features that Magisk offers:

  • Modify or alter the software without tampering the system (vendor) partitions
  • Root any Android device with the open-source root solution
  • Manage root permissions and use biometrics like fingerprint or Face Unlock to grant superuser permissions
  • Pass Google’s SafetyNet tests even when the phone is rooted
  • Use banking and security applications on rooted devices
  • Remove kernel features like DM-Verity and ForceEncrypt
  • Add third-party features using Magisk Modules
  • Easily install OTA updates on your rooted Android device

So, if you’re at all interested in modifying the software of your Android device, then you must give a try to Magisk.



  • As always, we strongly suggest that you take a complete backup of all your personal data on the phone. You can follow our guide on how to backup Android devices.
  • Your Android device’s bootloader must be unlocked. You can check for the instructions either on the official OEM portals or search for your device-specific tutorial from our archive.
  • Download and install the latest USB drivers for your OEM Android device on the PC.
  • For Method 1, you must have the latest TWRP recovery installed on your Android device.
  • For Method 2:
    • You must download the latest Android SDK platform-tools package and install it on your PC.
    • When asked to launch the command-line window on the PC, do the following:
      • On Windows: Go to the folder where the platform-tools have been installed (e.g. C:\platform-tools). Then hold the SHIFT key on the keyboard and right-click on any empty space inside this folder. Select the ‘Open PowerShell window here’ option.
      • On macOS/Linux: Open the Terminal and change its directory (using ‘cd’ command) to the folder where the Android SDK platform-tools are installed (e.g. Documents/platform-tools).
        cd Documents/platform-tools
  • Also, for method 2, you must have the stock boot image from the stock firmware, matching the current firmware installed on your phone. There are a couple of ways to get it. You can either find it on (database by SuperSU creator ‘Chainfire’) or visit your device-specific section on the XDA-Developers forum. You can also download the full OTA package of the installed software, and extract the Payload.bin file in it to get the stock boot image.

How to Install Magisk on Android

Now, as we mentioned in the beginning, there are two different ways/methods to install Magisk on Android. The first method is by flashing the latest Magisk installer ZIP file using TWRP, which is the easiest.

But if TWRP recovery is not yet available for your device or if you just want to root, then you can use the second method. It involves patching the stock boot image (kernel) using Magisk and then flashing the Magisk patched boot image to your Android phone via fastboot. This is also the recommended method since it will allow you to easily install OTA updates on your rooted Android phone.

We have covered instructions for both the methods below in a step-by-step manner.

Method 1: By Flashing Magisk Installer Zip using TWRP Recovery

  1. Download the latest Magisk installer zip: Download link
  2. Connect your phone to the PC using the USB cable and enable MTP/File Transfer mode.
  3. Copy the downloaded Magisk zip file (e.g. to the device’s internal storage or SD card.
  4. Now, boot your Android device into TWRP recovery using the relevant key combination.
  5. Alternatively, you can also use the following ADB command while your device is connected with USB debugging enabled:
    adb reboot recovery
  6. Tap on ‘Install’ in the TWRP main screen.
  7. Navigate to the phone’s internal/external storage and select the Magisk installer zip file (e.g.
    Install Magisk Installer Zip using TWRP Recovery
  8. The file will be added to the TWRP flashing queue.
  9. Finally, swipe the button on the bottom of the screen to flash the file and install Magisk on your Android device.
  10. When the flashing process is complete, hit the “Reboot System” button.

Alongside rooting, Magisk also simultaneously patches/disables any kernel-level security features (like DM-verity) that may prevent your phone from booting if the software is modified.

After your Android phone boots, you will see the latest Magisk Manager app present in the app drawer. Simply run it to verify that Magisk has been installed.

Method 2: By Flashing Magisk Patched Boot Image using Fastboot

If your device doesn’t support TWRP recovery or you don’t want to install it for some reason, then follow the steps below to install Magisk by flashing the Magisk Patched Boot image. This method also allows you to easily take OTA updates on your rooted Android device.

  1. First, get the stock boot image for the current firmware installed on your Android device.
  2. Transfer the boot image file to the phone’s internal or external storage.
  3. Download the latest Magisk Manager APK file from here and install it on your device.
  4. Now go to the app drawer and launch the ‘Magisk Manager’ app.
  5. Tap on the ‘Install’ button and choose ‘Install’ again.
    Select and Patch a File in Magisk Manager
  6. Select the ‘Select and Patch a File’ option.
  7. Navigate to the storage and select the stock boot image file (e.g. boot.img) that you transferred earlier.
    Patch Stock Boot Image using Magisk Manager
  8. Magisk Manager will now patch the stock boot image with the latest version of Magisk.
  9. Once patched, the patched boot image (magisk_patched.img) file will be stored in the ‘Download’ folder of your phone’s internal storage.
  10. Transfer the resultant file from the phone’s storage to the folder on the PC where the Android platform-tools are installed.
    Copy Patched Boot Image to Android Platform-tools folder on PC
  11. Boot your Android device into Bootloader/Fastboot mode and connect it to the PC using the USB cable.
    Boot Android Device into Fastboot Mode to Flash Magisk Patched Boot Image
  12. Now, launch the command-line window (PowerShell in Windows or Terminal in macOS/Linux) on your PC.
  13. Enter the following command in the PowerShell window to ensure that your Android device is being detected properly by fastboot:
    fastboot devices
  14. Finally, enter the following command to flash the patched boot image and install Magisk on your Android device:
    fastboot flash boot magisk_patched.img
  15. Note: The Magisk Patched Boot image will be flashed to your phone’s current active slot.
    Flash Magisk Patched Boot Image to root Android
  16. Once done, reboot your phone using:
    fastboot reboot

When your phone boots, open the Magisk Manager to verify the installation. You may further download various modules from the official repository or from here. The official documentation is a good way to start with the basics and also to know what Magisk is capable of.

How to Completely Uninstall Magisk and Unroot your Android Device?

Now, if you wish to uninstall Magisk for any reason, the steps below will assist you in doing so. The most direct way to do this is via the Magisk Manager app itself. Before you uninstall Magisk, make sure to disable and remove all the modules first. Once you have done that, follow the instructions below.

  1. Launch the ‘Magisk Manager’ app on your Android device.
  2. Tap on the ‘Uninstall’ option in the app’s main screen.
  3. The Uninstall prompt should show up on the phone’s screen.
    How to Uninstall Magisk Completely and Unroot your Android Device
  4. Finally, select ‘COMPLETE UNINSTALL’ to uninstall Magisk and restore the stock boot image.
  5. When the process finishes, reboot your phone.

Once the phone boots, you can safely uninstall/remove the Magisk Manager app as well.

An alternative to the above method is to flash the Magisk Uninstaller zip using TWRP Recovery or by simply restoring the stock boot image if you used Method 2.

Magisk gives you the ability to perform various tasks in order to customize the software. For starters, you can use any root-enabled app on your phone. “Magisk Hide” allows you to hide root from apps like Pokemon Go, and so on. You can also install modules to add third-party features to the software. The possibilities are endless, so don’t stop exploring.

So this was our guide on how to install Magisk on Android and root it. If you have any questions, kindly leave them in the comments.



  1. ooh sorry,,
    my phone is oneplus X E1003 with stock rom android 6.0.1 and mobo msm8974,

    but thanx for your respon my problem has been solved

    best regards

  2. Hi Dhananjay
    i found my stock ROM image file in with format oneplus_oneplus_oneplus_mmb29m_boot.img, should i rename the format as boot.img only before patched using magisk manager or flash with fastboot mode?

    thanx for your help

    1. Hi, could you please share the name of the device you’re using? And are you certain that the boot image you pulled from is of the same firmware that’s currently installed on your device?

      It’s imperative to always use the boot image for the firmware that’s installed on your device.

  3. Hello,

    I want to root my Android box in order to change Mac address. Will this be possible and what is the most easy way?

    1. Mike, which Android Box is it? Please share the name and model.

  4. Thank you for your effort. I have a situation where I was burned alone.
    When I type fastboot devices, the device is not seen. How can I do it? I am waiting for your answer.

    1. Which device is it? Are you sure that the device is in Bootloader/Fastboot mode?

      If you’re operating on a Windows computer, go to Control Panel > Device Manager and check if there are any driver issues with the device.

    1. Are you using a Magisk Module to change the fonts? Which phone is it?

    1. Could you please elaborate? I am not able to understand your question.

  5. Hi Dhananjay,

    When trying to flash the magisk image on my pixel 4a i get the below mentioned error can you guide where i am getting it wrong and root my pixel 4a.

    target reported max download size of 268435456 bytes
    sending ‘boot’ (65536 KB)…
    OKAY [ 1.542s]
    writing ‘boot’…
    FAILED (remote: Failed to write to partition Not Found)
    finished. total time: 2.546s

    1. Kamal, are you sure that you’re using the latest version of the Android SDK platform-tools provided by Google on this page?

      Since the command was sent to the “boot” partition, I wouldn’t expect there to be any syntax/filename errors.

    2. Hi Dhananjay,

      I am using the latest file from the link you shared and i have downloaded the boot file also from the google site only i have downloaded the full file than copied only the boot.img to phone and patched it with magisk as mentioned. than i copied the file back to platform tools folder and run the command prompt still getting the same error kindly guide.

    3. That’s odd. Could you please share the exact command you’re inputting?

      And have you tried switching between the USB ports of your computer? Certain new-gen USB 3.x ports could sometimes cause connection issues.

      And just to confirm, your phone’s bootloader is unlocked, am I right?

    4. Hi,

      I am using “fastboot flash boot magisk_patched_QoTvQ.img”

      yes i have tried using different USB ports

      my bootloader is unlocked.

      can it be because i used img file from google site ?

      let me know how to resolve the issue.


    5. Then everything is in order. And no, not because of that. That’s the actual source of getting the untouched/stock boot images.

      How did you set up SDK platform-tools exactly? Did you add the platform-tools folder to the Windows path or are you launching the PowerShell window inside the platform-tools folder by right-clicking?

      I tried researching and I could only find the issue is related to the tool setup.

    6. HI Dhananjay,

      earlier i was using SDK tools using command mode than i installed android studio.

      I was still getting the same error while using the command – “fastboot flash boot magisk_patched_QoTvQ.img”

      than i tried with the command – “fastboot boot magisk_patched_QoTvQ.img”

      somehow it worked and not my phone is rooted. but when i restart it my root access goes away.

      Is that regular if you switch off your phone magisk loose the root access. I am new to android eco system.

      Earlier was using jailbreaked iphone still using one. i know in iphone if phone got switch off you loose the jailbreak is this same in android case too kindly confirm.

      and thank you for your prompt reply always.

    7. Hi again, Kamal. The tools you used are the same ones that are bundled with the Android Studio. So, that shouldn’t be the culprit.

      The literal difference between the two commands is that the first one actually flashes the boot image, while the other one just boots it temporarily. Thus, you lost root access after the reboot.

      Once you successfully flash the patched boot image, the root stays persistent across reboots, factory resets, etc. It can only be undone by either restoring the stock boot image alone or the complete stock firmware (by flashing the factory image).

      I did a bit more digging since the last reply and a few users reported that re-flashing the factory image fixed the issue for them. So, I would ask you to do exactly the same.

      Do you know how to flash the factory image?

    8. Hi

      So as per you the root access I got is temporary?

      But even after installing the Android studio the flash command is not working don’t know why

      Flashing factory image I guess you saying to flash through Google site if I am not wrong if yes than let me know will do that.

      Do I need to redo the whole process again of rooting or the root will stay if I flash factory image.

      I want to check one more thing I have enabled adaptive audio as mentioned in your other topic but I don’t know why some times I see that in settings and some time it’s not visible is this fine or there is some problem


    9. Hi again, Kamal.

      Yes, the root access would be temporary if your use the fastboot boot command instead of the fastboot flash boot command.

      Yes, you first need to download the latest factory image for your Pixel 4a through the official database. The instructions could be found on the very same page at the top. Or, you could follow my step-by-step instructions in this tutorial (follow Method #3).

      Note: Installing the factory image will erase all the data including that on the internal storage. The tutorial I linked above includes a nifty little trick of modifying the factory image flash script to prevent the data from being wiped.

      You will need to reform the patching process after installing the factory image. You can simply extract the stock boot.img from the downloaded factory image itself.

      As for the Adaptive Audio feature, it’s more of a workaround. If you do not see it in the Settings, just force-close the settings menu and try accessing again. Once you have rooted, you can use the module instead, which works better than the temporary ADB workaround IMO.

    10. Hi Dhananjay,

      Today when i checked and restarted my phone twice i was surprised to see that even after restarting or switching it off and turning it on I am not loosing my root.

      I have not done any thing just two package install adaptive audio setting enabler and one systemless hosts.

      I have not downloaded systemless hosts i hope thats a pre installed in magisk kindly guide

      let me know if its all fine to install more packages.

      thank you for all your support so that i can start a smooth android journey with rooting as its pretty new to me.

    11. Wow, that’s really surprising. Logically, this can’t happen if the patched boot image wasn’t flashed. If Root stays persistent, I think the image was flashed correctly when you attempted the first time but showed an error because of a possible glitch in the fastboot tool.

      Anyways, good to know that it worked.

      Yes, when you press the “Systemless Hosts” option in the Magisk Manager settings menu, it automatically adds the Systemless Hosts modules to your device. After which, you just have to reboot your phone for the module to take effect. Once that is done, you should be able to use Ad blockers that require systemless hosts.

      You can go ahead and play with it, install modules, use root apps, etc. In addition, also enable “Magisk Hide” from the MM settings to make sure that apps that detect root (like banking and security apps) work without issues.

      Also, perform the SafetyNet check from the Magisk Manager app to make sure that your phone passes it.

      I am very happy to help. If you need to learn more, you can always drop a comment and I will try my best to explain/answer.

    12. Hi Dhananjay,

      Thanks for advicing, when i am doing safety net, it says attestation failed – it tick basiscintigrity but ctsprofile i think its not working evaltype is written hardwar.

      can you guide what is this.

      Pls. let me know where i can find good modules for instagram, facebook, youtube and other popular apps like you have in cydia.

      also i am unable to use my jio and hdfc app even after magisk hide can you guide how i can use those in jailbreak we use to have so many tweaks to hide jailbreak can we have similar stuff on magisk too.

      I will be very thank full to you if you can guide and help.

    13. Okay, that’s because of the new hardware-backed SafetyNet attestation. Go through the linked article and you will learn more about it.

      Then, use the Universal SafetyNet Fix module to try and fix the issue.

      For modules, the best place is to get them through the official Magisk repository. You can access it by going to Magisk Manager and then pressing the icon on the extreme right of the bottom navbar.

      There are a tons of other modules available in this section of XDA-Developers, some of which have not been merged into the official repo.

      As for getting JIO and HDFC apps to work, it depends. Depends on what? How the app checks the integrity of the phone. Some apps just try and detect root, while others use more extreme measures like SafetyNet attestation (basic, ctsProfile, or both).

      The first thing to try is to hide root access from these apps. To do this, go to Magisk Manager, press the shield-like icon, and select “Magisk Hide”. Then browse through the list of apps and check the boxes corresponding to the Jio and HDFC apps. Then restart the phone and verify if the apps work.

  6. When it says “Copy the downloaded Magisk zip file the device’s internal storage or SD card.”

    Where am I supposed to copy it to? When copy it from windows using the USB connection, the places I see to copy it, I can never find in twrp.

    1. Hi Joe, you can copy it anywhere on the internal storage.

      Once you go to the ‘Install’ menu in TWRP, you will see the root directory of your phone, including folders like system, vendor, data, etc.

      Scroll through those folders and find the one that says ‘sdcard’. The internal storage on Android devices is mounted as /sdcard, so do not confuse it with an actual SD card (external storage).

    1. Thanks a lot for sharing. Earlier, bootloops were mostly caused by DM-verity. Which is something Magisk automatically deals with now. Then comes VBMeta, which in some cases should be disabled. From my own observations, VBMeta issues are mostly related to devices with A-only partitions. I am not fully sure if that’s actually true, but just what I have observed till now.

      Thanks again, I will dig deeper, do a few tests on different devices and cover an article.

  7. Hi. I’m sure I used the boot image for the firmware / build version that is currently installed on your CUBOT P40
    Then I used a flashboot to flash the boot image but the system can’t boot. It constantly restarts in the white field. I’ve tried everything possible, but I don’t know where the problem is. I’m using the latest version of Magisk, I’ve tried other versions but everything ends the same way. I can’t help myself. I do not know where is the problem.

    1. Okay. This could be something related to Android Verified Boot (AVB). Anyhow, before we get to that, I first want you to re-flash the stock boot image via fastboot and try booting the device.

    2. When I re-flash the stock boot image via fastboot my cell phone starts normally. Boots normally. Everything works just not root.

  8. Hi, I have a CUBOT P40, I do everything according to the procedure of method 2, but after the flash magisk_patched.img my cell phone does not start. Can’t advise how to root Cubot P40? Well thank you.

    1. Hello. First off, are you sure that you used the boot image for the firmware version/build number currently installed on your CUBOT P40?

      If yes, then please flash the stock boot image via fastboot and ensure that you could boot the device again.

  9. Hello, my device is Mi8 already Unlock bootloader, MIUI 11 android 10, can i use this guide to root my phone without erase all my data??

    1. Hi Doni. Yes, of course, you can. May I know if you also wish to install TWRP on your Mi 8 or do you just want to root?

      Also, please let me know the exact build number of the MIUI 11 software installed on your phone.

    2. first i wish to install TWRP on my phone, but i cant install twrp via fastboot,
      can you help me what going on?
      this is the problem when i try to install twrp via fastboot

      PS C:\platform-tools> .\fastboot devices
      b783f3e0 fastboot
      PS C:\platform-tools> .\fastboot flash recovery twrp-3.3.1-2-dipper-mauronofrio.img
      Sending ‘recovery’ (42044 KB) FAILED (Write to device failed (Invalid argument))
      fastboot: error: Command failed
      PS C:\platform-tools>

      my device using MIUI 11 build number

    3. Hi again, Doni. Have you unlocked the bootloader on your Mi 8 using the Mi Unlock Tool first?

  10. This was my first time enabling root. After a few failed attempts and many Google searches I came across this post. It was the easiest and most comprehensive guide I found. Finally got root enabled. Thanks for the help!!

    1. Hi Richard. Thank you so much for the confirmation. I am glad it worked.

      May I know which device is it?

  11. I have a moto z3 play everything worked fine until I actually booted my phone. Now it’s stuck on the powered by android screen, please help.

  12. Hi. I tried this on my samsung galaxy a50 (A505W) using Odin and the patched AP file. I used the second method. The problem is that when I boot the phone and install the magisk manager and open it nothing happens. Any suggestions?

    1. Hi Damian. When you launch Magisk Manager after booting into the OS, what does it show? Magisk is installed or not?

  13. Hello, I’m from china.I flashed the Mokee 9.0 (based on AOSP 9.0) rom on my honor view 10 and just wanna root it.Everything went well till the actual flashing process.

    PS C:\Users\Geralt\Desktop\adb> fastboot flash ramdisk patched_boot.img
    target reported max download size of 471859200 bytes
    sending ‘ramdisk’ (14678 KB)…
    OKAY [ 0.325s]
    writing ‘ramdisk’…
    FAILED (remote: partition length get error)
    finished. total time: 0.339s

    PS C:\Users\Geralt\Desktop\adb> fastboot flash boot patched_boot.img
    target reported max download size of 471859200 bytes
    sending ‘boot’ (14678 KB)…
    OKAY [ 0.321s]
    writing ‘boot’…
    FAILED (remote: partition length get error)
    finished. total time: 0.333s

    could you give me some advice?
    thanx a lot!

    1. Hi. First of all, did you patch the stock boot image extracted from Mokee OS?

      Second, the command should be “fastboot flash recovery_ramdisk patched_boot.img“.

    2. Well, sort of.
      I just want to root my phone with magisk and I did it.
      Anyway, truly appreciated!

  14. My model is LG K500 X screen (model: LGK500N.AITABK) with Android 6.0 Marshmallow (Italy).
    I did not find it TWRP recovery and not even know where to find stock boot image.
    Do you have suggestions, please?

    1. Hi Stefano. The stock boot method will not work on the phone. I also tried searching for a working TWRP build and an alternate method to root, however, I couldn’t find anything. I am afraid that there’s no way to root the LG X Screen.

  15. Hi Dhananjay, Im not sure if TWRP has support for a Samsung galaxy SM-A505F. If you familiar with this device please advise how to root this device. Would the adb method be the best option? And lastly, would the A50 not be stuck in bootloop flashing a patched boot image via adb, how does adb know where to flash a boot image to a certain partition without affecting other system partitions and/or without factory resetting involved? Please advise, thanks in advance bud 😉

    1. Hi Leon. The second method can be done, however, not by patching the boot.img, but the AP file extracted from the firmware version installed on your phone.

      On the other hand, TWRP is available for the Galaxy A50 and rooting via that seems easier to me. If you want, I can start writing a full guide for it, from unlocking the bootloader, to installing TWRP, and rooting.

      One more thing, both the method will require you to unlock the bootloader, which means that the phone will be completely formatted, apps, contacts, photos, videos, music, everything on the internal storage, etc.

  16. xiaomi rn4 miui11.0.2 global stable. unlocked bootloader with mi unlock (not enabled oem unock) and flashed twrp and no-verity-opt-encrypt. should i do method 1 or 2? what exactly are the ota update advantages of 2?

    1. Hi Romper. Before I begin, I would recommend keeping the OEM unlocking toggle on when modifying the phone.

      Method 2 is a great option when it comes to A/B devices. But since the Redmi Note 4 doesn’t support seamless updates (AB partitions), it really doesn’t matter in that scenario.

      Since you have TWRP installed, I think flashing Magisk zip (Method 1) should be the easiest.

    2. Thanks for replying Jay. my plan was to backup boot, root with magisk(patching boot img), then backup with Migrate. save all backups to PC, restore boot, wipe system, install LineageOS for microG. format userdata and reboot. for rooting install I want to pass safetynet for bank, payment, netflix,etc. any suggestions?

    3. Okay, I get it. However, please note that passing SafetyNet may not be possible now as Google has recently implemented hardware-based attestation for CTS profile.

      Plus restoring backups from Migrate will require you to have TWRP, wouldn’t it?

      Since you’re going to install custom ROM, I would suggest going for the easier route, this is, to install TWRP first on your Redmi Note 4. I think we already have a guide for this on the blog, however, it may be outdated.

      If you want, I can rewrite the complete guide and then you may follow it.

    4. updated plan: backup boot, flash magisk_patched.img, backup w migrate, save to PC. wipe system, flash los microG. format userdata. install Magisk Manager apk. boot twrp, flash migrate backup. suggestions, condsidering everything else discussed?

      have twrp already. so no need to write the blog for me, maybe for others. thanks very kind of you to offer.

    5. due to timezone i’m asking all Qs at once.
      1) how do i update ota los for microG if i flash magisk zip? i should follow this article but what do i do for ‘install to inactive slot’?
      2) is it a good idea to root w magisk now that hardware based safetynet recently? can magisk-hide pass saftynt by renaming itself? how will addonsu help with this?
      3) if i don’t root will sftynt test fail as bootloader unlocked and twrp installed?
      4) should i adb sideload los for microG zip, if i choose not to root? will microg trip sn?
      I understand if you can’t reply all, but please please reply to as many as you can. thanks a lot.

    6. Hi Romper. I will try and answer all your questions, no problem.

      1) No, you won’t be able to use that guide for updating the ROM. It has to be done via TWRP. Many custom ROMs like LineageOS have in-built updaters that will update to the latest version with/without root. You will have to check with your specific build if the developer has added support for LineageOS OTA updates.

      2) Rooting with Magisk is the best! No root solution can bypass the hardware-based attestation universally. And renaming Magisk or hiding root will no longer be helpful. Magisk Hide’s scope is now limited to hiding root from apps, like it has always done. And as for Addon SU by LOS, it’s just a rooting package like Magisk. You can’t have both of them installed at once.

      3) Yes, SafetyNet will still fail.

      4) As far as I know, SafetyNet should be tripped right after you install TWRP, root, or a custom ROM like LOS.

      My advice: Don’t bother about SafetyNet anymore as nothing could be done in that matter now.

    7. 1)sorry didn’t understand. los for microG has ota updates but root doesn’t persist right? hence i’m for method 2. step 4 was for those who used method 1. so if i do method 1 then can i use that guide? ik of> ota update los mG, lose root, flash magisk again from twrp, but want a quicker method (hence 2; hectic setup but easy ota).

      3)i meant on miui+twrp not los. bank, pay, broker, netflix, prime video still working…

      4)well it hasn’t tripped for twrp, hopefully not for los either. root passing SN is a lost cause then?

      thank you so so much for taking the time to answer all my questions.

    8. 1) In case of A partition devices, re-flashing Magisk is the quickest way and wouldn’t require you to patch the boot image every time you want to root. Since your phone is A-only, you will need to patch the stock boot every time.
      2 & 3) Don’t get confused between SafetyNet not passing and MagiskHide. If the apps rely only on checking root (not safetynet), you can just use MagiskHide to hide root from them and use them. But if an app relies on SafetyNet attestation, it wouldn’t run because no matter you have MIUI installed or LOS.
      4) Yes, SafetyNet is finally lost. Unless Google decides to revert its decision, which is highly unlikely.

      You’re welcome Romper. I am happy to help any way I can.

    9. i was told w method 2 you know for sure it won’t modify /vendor and you know how to undo (restoring another benefit it even works in case TWRP has problems with decryption, and you have better control about Advanced settings (encryption, AVB)

    10. Magisk installs the same way with both the methods, no difference at all.

      Encryption and AVB are something that is also automatically dealt with in both cases.

    11. Hi Vijay. I am not very certain, as I haven’t used Oppo devices much. Do you know whether the phone’s bootloader can be unlocked? If it can be, then I think you’d have a chance to root the Reno2 Z.

  17. I’ve used method 2 for my Nokia 7 Plus. Bootloader has been unlocked and now it’s not passing Nokia logo after “fastboot flash boot magisk_patched.img”. How can I fix my phone?

    1. Hi Yordan. May I know which stock software version was your Nokia 7 Plus running before you tried this? Also, where did you get the stock boot image?

  18. Hello, thanks for your detailed guide. However, i am facing an issue whereby i have did an advanced wipe with twrp and then install magisk zip but after rebooting i will be stuck at samsung logo screen. What could be the problem?

    1. Hi Lee. Thanks for reaching out.

      Could you please let me know the name of the Samsung device you’re using along with the model number? Also, which partitions under the ‘Advanced Wipe’ menu in TWRP did you erase/format?

    2. I strongly believe that you wiped out the “system” which is the WHOLE phone operating system, including all apps and menu..that’s why phone cannot pass the Samsung has NO system,no menu, nothing.. you need to first flash it using stock rom (official System from manufacturer, download at in Odin flash tool.. (or flash a custom room using TWRP)..
      Then reinstall TWRP and don’t wipe “system” again.
      Make sure your download stock rom according to your EXACT region, Samsung Rom is region specific.

    3. Hi Charles. Thank you so much for dropping by and helping others. It means a lot to me.

      And Lee, follow his advice. It’s really exactly what I would have said.

    4. Hi Arkhan. May I know which device are you using? Also, please let me know the method you have used to install Magisk.

  19. my life becomes a hell i tried my best to find a way to root my vivo y12 model with adb and sp flash tool methode but i always so unlucky and angry a lot on my vivo phone but i cant do anything just using it as normal in its default condition , now what i want is
    a live support please contact me.
    i literally want root access and thats why I buy smart phones

    // The comment was moderated to remove the contact info for privacy concerns.

    1. Hi Amit. If you would like to talk about rooting your Vivo Y12, please contact us via our social channels or drop us an email.

  20. hi sir,

    for flash magisk patch boot file ,is bootloader locked or unlocked?

    with locked bootloader can i flash magisk patch boot.img file successfully?

    1. Hi Rajmal. You’ll need an unlocked bootloader to flash the patched boot image.

  21. Hi thank you for the tutorial!

    I would like to ask, I tried method 2 and Im done with all the steps however my device (mi a2 lite) didnt boot correctly its like 2 hrs already and its still booting, is that normal? I also tried to redo the steps its the same everything seems to be ok until I reboot it.

    1. Hi Huenic. Which software build number was your Mi A2 Lite running before you followed the instructions? Also, which stock boot image file did you download, and from where?

      Please answer these questions so that I can help you in a much quick and efficient manner.

    2. Yes, you’re correct. I am waiting for his answers so that we can figure out what caused it in the first place.

      And thanks for taking the time to help others.

  22. error: cannot open ‘magisk_patched.img’
    why is this happening to my device mi a 2
    ihas an unlocked boot loader by the command oem unlock critical

    1. Hi Siddharth. At exactly what step does this happen? Please elaborate more so that I can try and provide you with a proper solution.

    2. Hi man and I need some help. I managed to install twrp on my phone (xiaomi redmi 6a Android version 9.0) but after I flash the latest magisk zip file (v20.300) when I open up the phone I go to root checker basic to see if I became rooted and it says I’m not. Do you know what could be causing this? Any help is appreciated brother. Thanks in advance✌️

    3. Hi. Please don’t rely on root verification tools for this. Simply open Magisk Manager on your phone and see if it shows that Magisk is installed. If it is, then your phone is rooted.

  23. Does Fastboot command genuinely does not work on Ryzen cpu? I can use adb and everything else is working fine. I am no amateur either so I know what I should be doing but nothing I do works. I am on Windows 10 Pro with Android Pie ASUS Max Pro M1 6GB (bootloader is already unlocked through official way due to fastboot command not working)

    1. Hi Vysair. That’s at least what I have read on multiple XDA threads.

      Have you given a try to another Intel-based PC? I have never used Ryzen, so I couldn’t vouch for it.

  24. Mmh,
    I do not want to install TWRP (as its existence ‘disturbs’ other apps that will not run in its environment).
    The Magisk tool and its ‘boot’ patch is my preferred way.
    I did already manage to unlock the bootloader of my device, a rather obscure Cubot Quest phone with Android 9, MTK6762.

    When patching the boot.img the Magisk tool generates a patched version that is just 1/3 of the original size!
    This cannot be a patch, rather an excerpt, for all I understand.
    The boot.img of my FW file is 32MB, yet the finished patched version, created without any errors, is only 9.5MB?! Can that be? Does it contain Magisk and whatever else is needed for the boot process??

    I am VERY reluctant to write this small file to my device by the Fastboot flash process. Unless someone else can confirm that this small file size is NOT suspicious and indeed not a mistake by Magisk!
    The last I need is a bricked Android device that is basically brandnew..

    Who can tell me typical file sizes of the boot.img and their resulting magic_patched.img files?

    1. Hi. It’s completely normal. My 67.1 MB stock boot from the Pixel 3 XL was reduced to about 35 MB. And I am currently using it. So yes, I can confirm that it works. Also, make sure that you have the stock boot image in hand before proceeding.

      Even if there’s a 0.09% chance that it doesn’t work, then you can simply re-flash the stock boot image to restore your phone.

  25. HI there great step by step procedure.
    And thanks for your time.
    I am having problems trying to flash the magisk_patched.img
    I have followed each step as requested my phone is a HTC U11 have just update OTA to PIE
    And now unable to also fastboot boot twrp.img but am hoping to patch magisk error below.
    I am doing this in fastboot mode. OR should it be done in download mode?

    PS E:\HTC\ADB tools with latest twrp.img Use this one 2019\platform-tools> fastboot flash boot magisk_patched.img
    target reported max download size of 536870912 bytes
    sending ‘boot’ (37589 KB)…
    OKAY [ 0.828s]
    writing ‘boot’…
    FAILED (remote: Not allowed on PRODUCTION device)
    finished. total time: 0.838s
    PS E:\HTC\ADB tools with latest twrp.img Use this one 2019\platform-tools>


    1. Hi Robert. Have you tried the same in Download Mode?

      Also, is your phone’s bootloader unlocked?

  26. You can just install the magisk zip file via ADB no need to go way out of your way to get a boot image to patch.

    1. Yes, of course you can do that. However, some people just prefer to use Magisk root and not install TWRP at all. Or, TWRP also doesn’t support every Android, even unofficially it could be buggy. In that case, the second method is a saviour.

  27. Please share stock boot image for redmi note 5 pro.
    Android version :Pie
    MIUI version: Global

    1. Hi. You can get the latest Fastboot image for Global Redmi Note 5 Pro from here. You will need to extract the file to get the boot.img (stock boot image).

  28. A750F ODIN method fails .
    ADB still waiting to find device ! can you send me a video or steps !

    1. Hi Shubham. I don’t think I have mentioned an Odin method anywhere. Could you please elaborate a bit more on what you’re trying to do?

  29. Hi it’s me Albert, what I was saying is you are so intelligent for your age, That’s all, please respond soon I’m getting ready stomp on this phone because of no root access….

  30. Hi my is Albert, I’m new to the tech world I love playing video games since I was a kid, my first video game I played was Pac-man, I’m 46 now and I give you a lot of respect for such a young man,well I need your help with my Samsung galaxy J3 prime from metro pcs with rooting this phone I hate, I want to root it with Magisk but no access to pc please help me…

    1. Hi Albert. In order to root, your phone’s bootloader should be unlocked. Please enable Developer options using the instructions in this post and then see if the OEM Unlock toggle is available within it.

      However, since it is locked to MetroPCS, you will first need to carrier-unlock your device. Please contact MetroPCS on how to do it.

  31. Bonjour, je n’arrive pas a installer magiks avec la 1er méthode ceci m’affiche un message d’erreur
    updater procces ended with error: 1
    Error installing zip files ‘/sdcard/download/magisk-v18.1(18100).zip’

    1. Hi. Can you please share the complete log or a picture of it as shown in TWRP (When the error appears)?

  32. Hey bro i install magisk be patched_boot.img method by command “fastboot boot patched_boot.img”
    Everything works fine but now as new pie ota has come i uninstall magisk by using complete uninstall and while reboot it stuck at no command.
    I believe stock boot.img didnt restore properly then again i apply patched_boot.imf by fastboot and device restart normally.
    is there any way to restore stock boot.img.
    My device- xaomi mia1 on oreo 8.1 with nov2018 security patch.
    Pls help

    1. Hi Utsav. You can download the stock fastboot image from here and extract the boot.img from it. Once done, flash the boot image to boot_a and boot_b partitions. It should all be fine.

      I believe you’re doing this to update to Pie. As I am posting this comment, I am also finishing up the tutorial to update Mi A1 to Pie using the TWRP flashable image and unofficial fastboot ROM.

    2. Thanks for the reply. Is it necessary to flash fastboot boot.img with same build no. As device because i find my ver. In list.
      And when i choose restore img in magisk it shows img restore successful can i intall ota after this…
      Is there any link by which i can download stock boot.img only without downloading whole rom

    3. Hi Utsav. If you flash a boot image of a prev/next version, your phone will probably not boot.

      Just let me know the build number of the software installed. Go to Settings > System > About phone to check that.

  33. i have installed it but when i start reboot it was showing only the Logo for Hours do i have to do anything?

    1. Hi Shiva, please let me know more about your device, like the model number and Android version installed on it. Also, please mention which version of Magisk installer did you use?

  34. I’m new to the tech world but I have tried the top 10 rooting apps N none work could someone please help me root my ZTE blade z982 from metropcs

  35. Thank You so much for posting about Magisk …
    It is really Helpful…Even we don’t install custom ROM…
    2nd method helped me…👍 CHEERS!!!

  36. Hi I root my asus zenfone 2 Z00A but magisk manager is not working properly and super SU says Binary code occupied. What’s wrong???

  37. Good day
    I installed Magisk and Magisk Manager on my Galaxy A5 2016 – LineageOS 15.1 phone. Everything went fine but when I launch Quick Boot, it indicates “no root”. Isn’t Magisk supposed to root the phone ?

    1. C:\Users\ALEX PEREIRA\Desktop\adb-fastboot-tool-2016\adb-fastboot-tool-2016>fastboot flash recovery recovery.img
      target reported max download size of 536870912 bytes
      sending ‘recovery’ (22560 KB)…
      OKAY [ 0.648s]
      writing ‘recovery’…
      OKAY [ 0.005s]
      finished. total time: 0.656s

  38. lg g5
    followed instructions twice only change flash command at end from instructions to ramdisk command with same result
    C:\Minimal ADB and Fastboot>fastboot flash ramdisk patched_boot.img
    target reported max download size of 536870912 bytes
    sending ‘ramdisk’ (32104 KB)…
    OKAY [ 0.751s]
    writing ‘ramdisk’…
    FAILED (remote: unknown command)
    finished. total time: 0.772s

    C:\Minimal ADB and Fastboot>

  39. Hey, the root process worked properly on my phone. But now I can’t activate the WiFi. The slider is always on ‘off’ and i can’t toggle it ‘on’. I deleted the network settings and edited the file /data/misc/wifi/wpa_supplicant.conf

    I also used a few apps which may solve the trouble

    Now I flashed the original firmware and the WiFi works properly again

    My device:
    BQ Aquaris U Plus
    Android 7.1.1

    I am thankful for every answer and solution

  40. Thanks for the procedure, it worked for me. When I reboot the system, I’m losing the root. Could you help me?

  41. nothing in secific,only not boot beging ..and restore boot image after initilizing but whithout sorry by my english

    1. Okay. So kindly let me know which firmware (build number) and Android version are you using on the Moto Z2 Play?

      You can find this information in Settings > About phone.

  42. hi! i have a problem. when i tri to flash it it gives me an error 1 error installing zip file……….
    i will apriciate if you help me a little

    1. Hi, kindly redownload the ZIP and flash it. It seems to be an error with an incomplete download. I have already flashed the ZIP on 3 different devices without any problems.

  43. Hey guys I don’t know what’s causing this problem but when I choose patch boot image file it opens contacts to choose boot file I’ve installed latest version of magisk manager plz help

    1. Hi Shreyash, it seems like you do not have a file manager app on your phone. Magisk Manager shall automatically open the default file manager in order to select the boot.img. Simply download a file manager, such as “Solid File Manager” from the Play Store. Then re-install Magisk Manager (Or clear its data) and try again.

  44. I used one click root to root my phone with magisk. I removed magisk following the directions and have bricked my phone according to one click route. After paying them $40 to root the phone they’re now asking for $60 to unbrick it from the removal of the app they installed.

    1. Hi Sue, first of all. Never ever opt for a paid rooting solution, those are pretty much fake and may often brick the phone like your case.

      Now, please let me know your phone’s manufacturer, model, carrier, and Android version installed it. This information will allow me to help you better.

  45. hi!i am using honor 8 pro with new oreo update.i tried to install magisk by Method 2( Patch Stock Boot Image).everything went well till the actual flashing fastboot mode i got this

    C:\adb>fastboot flash boot patched_boot.img
    target reported max download size of 471859200 bytes
    sending ‘boot’ (8626 KB)…
    OKAY [ 0.187s]
    writing ‘boot’…
    FAILED (remote: partition length get error)
    finished. total time: 0.201s

    can you please give some advice?

    1. Hello, it seems like the Honor 8 Pro, like the newer Honor devices, follows a different partition layout. So, kindly try the following command instead:

      fastboot flash ramdisk patched_boot.img

      Let me know how this goes. Also make sure that you’re using the boot image corresponding to your phone’s model and firmware version.

    2. target reported max download size of 134217728 bytes
      sending ‘ramdisk’ (9112 KB)…
      OKAY [ 0.744s]
      writing ‘ramdisk’…
      FAILED (remote: download for partition ‘ramdisk’ is not allowed
      finished. total time: 0.766s

    3. Hello, have you unlocked the bootloader of the device? (Please mention the device as well)

Leave a Reply

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