Advertisement

In this tutorial, we will show you how to unlock the bootloader and root the Samsung Galaxy S20, Galaxy S20+, and Galaxy S20 Ultra using Magisk. This guide is applicable to Galaxy S20 phones running Android 11 (One UI 3.0) and Android 10 (One UI 2.x).

Samsung has quite a reputation for making things difficult when it comes to custom development. During the past few years, the company has implemented several new security features that have hindered the rooting/development process, such as the Prenormal RMM State, DEFEX, etc.

Starting with the Galaxy S10 series, Samsung introduced even more complexities that initially prevented users from rooting their phones by following the traditional method. The changes were explained in detail by Magisk’s creator John Wu over at XDA.

To quickly recap, there are two ways to install Magisk and gain root access. You could either flash the installer ZIP via a custom recovery such as TWRP, or you could patch the phone’s stock boot image and flash the resultant patched boot back to your phone.

If you have installed TWRP recovery on your Galaxy S20, you can easily root the phone by flashing the Magisk ZIP.

But, if you do not find any particular use for TWRP, installing it is redundant and just an additional step in the rooting process. In which case, you can easily root the Galaxy S20 by patching the AP firmware binary using Magisk, and then flashing it back to your phone using Odin. The instructions below will take you through the complete process in a detailed step-by-step manner.

Did you know? You can easily remove bloatware from the Galaxy S20 series without root.

Important Note

Rooting your phone will wipe the data completely and trip the KNOX counter. This means your phone’s warranty will be void (destroyed) and you will not be able to use apps like Samsung Pay, Secure Folder, etc.

This is irreversible, so make sure that you keep it in mind before you begin following the instructions.

Supported Devices

This guide is applicable to any Galaxy S20, S20+, and S20 Ultra running Android 11 (One UI 3.0) or Android 10 (One UI 2.x) with the following model numbers.

Device Name Model Number
Galaxy S20 SM-G980F or SM-G980F/DS
Galaxy S20 5G SM-G981B or SM-G981B/DS
Galaxy S20+ SM-G985F or SM-G985F/DS
Galaxy S20+ 5G SM-G986B or SM-G986B/DS
Galaxy S20 Ultra 5G SM-G988B” or “SM-G988B/DS
Galaxy S20 (Hong Kong, Taiwan, China mainland) SM-G9810
Galaxy S20+ (Hong Kong, Taiwan, China mainland) SM-G9860
Galaxy S20 Ultra (Hong Kong, Taiwan, China mainland) SM-G9880
Galaxy S20 (Korea) SM-G981N
Galaxy S20+ (Korea) SM-G986N
Galaxy S20 Ultra (Korea) SM-G988N

Note: Galaxy S20 devices with a Snapdragon SoC that are sold in the US with “U”, “U1”, and “W” suffix in the model number are not compatible. This is because these models do not support bootloader unlocking.

However, Recognized Developer elliwigy has come up with SamPWND, a paid service that allows unlocking the bootloader on these models. For more information about this service, please visit the original XDA thread here.

Table of Contents

Before You Begin

Before you start performing the instructions, there are a couple of things you should do.

Take a Complete Backup

Before anything, you should take a complete backup of all your important data stored on your phone. Unlocking the bootloader and rooting will completely erase all the data, including installed apps, messages, contacts, and everything stored in the internal storage.

You could also take a look at our article on backing up different types of data stored on Android devices. Alternatively, you can also take a complete backup using Samsung’s Smart Switch utility.

Install Samsung USB Drivers

Generally, your Windows computer will automatically install the required USB drivers for your Samsung Galaxy smartphone. But that is not always the case though. So, if you’re operating on a Windows machine, you might want to download and install the official Samsung USB drivers.

If you’re using a macOS/Linux PC, you wouldn’t need any additional drivers at all.

Charge your Galaxy S20

If you’re new to things like bootloader unlocking, we strongly suggest that you take your time to understand what each step does.

Having a sufficient battery charge in your Galaxy S20 will ensure that it doesn’t power off while you’re following the instructions and performing them. We suggest charging your phone to a minimum of 40-50% battery level.

Instructions

The process of unlocking the bootloader and rooting the Galaxy S20 series is a true and tried method. We have split the instructions into 10 steps so that it’s easy for you to understand the complete process.

The only things you’ll require to perform the instructions are:

  • Your Galaxy S20, S20+, or S20 Ultra
  • A Windows computer
  • A compatible USB Type-C cable

With that out of the way, let’s begin with the steps.

Step 1: Enable OEM Unlocking

The first step is to enable OEM Unlocking on your Galaxy S20 device. This option must be turned on before you can attempt to unlock the bootloader. OEM unlocking resides inside the ‘Developer options’ menu, which is hidden by default to prevent users from unknowingly accessing them.

You can activate Developer Options by following our tutorial. Once you have done that, go to ‘Setting‘ → ‘Developer options‘ on your Galaxy S20 and turn ON the ‘OEM unlocking‘ toggle. Then select ‘Enable‘ when prompted to confirm.

Enable OEM Unlocking on the Galaxy S20, S20+, or S20 Ultra

Step 2: Unlock Galaxy S20 Bootloader

With OEM unlocking enabled, you now need to unlock the bootloader of your Samsung Galaxy S20/S20+/S20 Ultra.

Unlike a majority of other OEM devices, Samsung doesn’t require using any fastboot commands or involve retrieving any unlock keys. It could be done straight on the device itself. When you turned ON the toggle, the bootloader enabled a special ‘Device Unlock Mode’ which is used for unlocking.

To unlock the bootloader, power off your Galaxy S20 first. Then connect it to the computer using the USB cable while holding the Volume Up and Volume Down keys together. You should see the bootloader screen on your phone.

Now long-press the Volume Up key to enter ‘Device unlock mode‘. You should be presented with a confirmation prompt for unlocking the bootloader. Finally, press the Volume Up key to confirm and unlock the bootloader on your Galaxy S20.

Unlock the Bootloader on Galaxy S20, S20+, and S20 Ultra
*Image for reference only

Your Galaxy S20’s bootloader is now unlocked and it should reboot automatically. You should also see a warning message right before the Samsung splash screen, just as shown in the picture below. This is an obligatory warning message and completely normal. And before you ask, no, there’s no way to get rid of it (unless of course, you relock the bootloader, which shouldn’t be done while rooted).

Samsung Galaxy S20 Unlocked Bootloader Warning Message
*Image for reference only

The first boot after unlocking the bootloader could take some time (took around 3-4 minutes for me). So be patient.

Now that the bootloader is unlocked, it is important to go through the initial setup and verify OEM unlocking to prevent the Vaultkeeper service from kicking in and relocking the bootloader. After your phone boots, set it up and connect it to the internet. Then enable the Developer options as shown in step #1 and go to ‘Settings‘ → ‘Developer options‘. The OEM unlocking toggle should be greyed out and say that the bootloader is already unlocked.

Verify bootloader unlock status on Galaxy S20 series
*Image for reference only

Now that the bootloader is unlocked, it’s time to start with the rooting process.

Step 3: Verify the Software Build Number

Before you can download the stock firmware package, it’s important that you verify the build number of the software installed on your Galaxy S20. This will ensure that you use and patch the correct firmware file in the steps that follow.

To verify the build number, go to ‘Settings‘ → ‘About phone‘ → ‘Software information‘ and note down the information right under the ‘Build number‘ section. The latter part of the shown information is the build number.

Go to 'Settings' > 'About tablet' > 'Software information' on Galaxy S20

Note: While you’re verifying the build number, it’s a good idea to also check for any pending software updates by going to ‘Settings’ → ‘Software update’ → ‘Download and install’. In doing so, you will ensure that your Galaxy S20 is on the latest available software and take out the hassle of manually updating right after rooting.

Step 4: Download the Stock Firmware Package

Rooting the Galaxy S20 series involves patching the AP firmware file with Magisk. So, begin by downloading the stock firmware package for the software build number currently installed on your phone.

While you could use online databases like SamMobile, SamFrew, etc, we recommend using Frija or Samloader tool to download the stock firmware package. These tools download the latest firmware directly from Samsung’s update servers without any speed caps. In order to use them, you will need your phone’s model number and CSC/regional code.

First, verify the model number by going to ‘Settings’ → ‘About phone’. As for your phone’s CSC code, you can view it by downloading and using the ‘Phone Info SAM‘ app from the Play Store.

Once you have the information, you can launch the Frija tool, input the required data in the fields, and download the stock firmware package for your Galaxy S20 to your computer.

Download the stock firmware package for your Galaxy S20

Step 5: Extract the AP Firmware and Transfer it to your Phone

Once the firmware package has been downloaded, the next step is to extract its contents. So, go to the location on your computer where the firmware package was downloaded, right-click on it, select ‘Extract All’ and click ‘Extract’ to extract the contents of the firmware package to a folder.

Extract the stock firmware package on your computer

The extracted folder should contain the individual firmware binaries in .tar.md5 format. These will be:

  1. AP
  2. BL
  3. CP
  4. CSC and HOME_CSC

While you’ll only need the AP firmware for patching, don’t delete the rest of the files. You will need these files later on during this guide.

Extracted Galaxy S20 firmware files (AP, BL, CP, and CSC)

Now, connect your Galaxy S20 to the computer via USB and enable the ‘File Transfer’ mode on it. Copy over the extracted AP firmware file to your Galaxy S20’s internal storage. You can copy this file anywhere, we just suggest copying it to the root directory (outside all folders) for easier access.

Copy the AP Firmware File to your Galaxy S20's internal storage

Step 6: Patch the AP Firmware via Magisk Manager

Now you have to patch the AP firmware with Magisk, through the Magisk Manager companion application. So, download the latest Magisk Manager from the official Github page and install the APK on your phone.

Next, go to the app drawer and launch Magisk Manager on your Galaxy S20. Then press the settings icon (cogwheel) on the top-right of the app’s window and press the ‘Update channel‘ option. Select ‘Beta‘ from the list and go back to the app’s main screen.

Why do you need to do this? The latest version of Magisk that supports Android 11 (i.e. Magisk 21.2) is only available on the public beta channel for now. Don’t worry about it, builds on the public beta channel are completely stable as well.

Change Magisk Manager's Update Channel

Now, press the ‘Install‘ button ‘Next‘ and then choose ‘Select and Patch a File‘ from the list of available installation methods. This should instantly open the file selection window for you to choose the file you want to patch with Magisk. So, navigate to your phone’s internal storage and select the AP firmware file.

Patch Galaxy S20 AP Firmware via Magisk Manager

Once the file has been selected, press ‘LET’S GO!‘. Magisk Manager will download the latest version of Magisk and patch the AP firmware with it. The patching process might take a minute or two depending on the filesize.

Galaxy S20 AP firmware successfully patched with Magisk

After the process finishes, the patched AP firmware (magisk_patched.tar) will be stored inside the ‘Download‘ folder of your Galaxy S20’s internal storage. Connect your phone to the computer and copy the patched AP firmware file to the folder where the rest of the firmware files are present (BL, CP, CSC, etc).

Transfer patched AP firmware from your Galaxy S20 to the computer

Step 7: Boot your Galaxy S20 into Download Mode

In order to use the Odin tool to flash the patched AP firmware, you’d need to boot your Samsung Galaxy S20 into Download Mode (Odin mode).

To do this, power off your phone first. Then connect it to your computer over USB while holding the Volume Up and Volume Down keys together. You should now see the Bootloader screen (what you saw while performing step #2). Simply, press the Volume Up key once to enter Download Mode.

Here’s how the Download Mode looks like:

Boot your Samsung Galaxy S20 into Download Mode

Step 8: Download and launch Odin Flash Tool on the computer

To flash the AP firmware file, you will need the infamous Odin Flash Tool. So, download Odin v3.14.1 (or newer) and extract the contents of the downloaded ZIP package on your computer.

Now launch the Odin tool on your computer by double-clicking the ‘Odin3 v3.14.1.exe‘ executable file. If you’re prompted with a message on the screen, select “Ok“. You should now see the tool’s GUI on your computer screen.

Launch Galaxy S20 Odin Flash Tool on your computer

The tool will automatically recognize your Galaxy S20 in Download Mode and display the corresponding COM port number on the top-left of the interface.

Tip: If you’re operating on a Linux/macOS computer, you can flash the firmware on Samsung devices using Heimdall.

Step 9: Flash the Patched AP Firmware and Root Galaxy S20 using Magisk

With everything now ready, it’s time to flash the patched AP firmware file and root your Samsung Galaxy S20/S20+/S20 Ultra with Magisk.

Begin by loading the firmware binaries in the Odin tool as instructed below:

  • First, click ‘BL‘ and select the BL firmware file (BL_xxxxxxxxxxx.tar.md5)
  • Click ‘AP‘ and select the Magisk-patched AP firmware file (magisk_patched.tar)
  • Next, click ‘CP‘ and select the CP firmware file (CP_xxxxxxxxxxx.tar.md5)
  • Finally, click ‘CSC‘ and select the CSC firmware file (CSC_xxxxxxxxxxx.tar.md5)

Few things to note:

  1. It’s essential to use the regular CSC file instead of HOME_CSC when rooting the phone initially.
  2. Do not attempt to flash the patched AP firmware on its own. Always flash it along the rest of the firmware files like BL, CP, and CSC).

Flash patched AP firmware to root Galaxy S20 using Magisk

Once all the firmware files have been loaded in their corresponding slots, click the ‘Options‘ tab in Odin and uncheck ‘Auto Reboot‘ (This is important). Finally, click ‘Start‘ to begin the flashing process.

After the flashing process is complete, you should see a ‘PASS!‘ message in Odin and your Galaxy S20 should reboot automatically. You can close the tool and disconnect your phone from the computer.

Patched AP firmware successfully flashed on Galaxy S20

Step 10: Complete the Additional Magisk Setup

Before you could start using your rooted Galaxy S20, there are a couple of things you should do. So, after your phone boots, connect it to the internet and set it up by following the on-screen instructions.

Then, go to the app drawer and launch the Magisk Manager app. Magisk initially installs a stub and will prompt you to install the full Magisk Manager app. So select ‘Ok’ and then ‘Install’.

Install full Magisk Manager app and replace the stub

Once the full Magisk Manager application is installed, open it. You will then be prompted to complete the additional setup. So, press ‘Ok’ and wait for the magic to happen. Once it is complete, your phone will reboot automatically.

Complete additional Magisk setup

Your Galaxy S20 is now Rooted!

That’s it! You have successfully rooted your Galaxy S20, S20+, or S20 Ultra using Magisk. To verify this, you can launch the Magisk Manager app and you should see the installed Magisk version right next to the ‘Installed’ label. You can further check if your rooted phone passes SafetyNet by pressing the ‘Check SafetyNet’ button in Magisk Manager.

From Magisk v20.4 onwards, Magisk Hide is turned off by default on new installations. So, make sure to turn it ON from the Manager app’s settings and then recheck SafetyNet status.

Now go ahead and start using root applications like Titanium Backup. You could also hide root from banking and security apps that might generally not work on a rooted device.

You could install some famous mods like ViPER4Android, EdXposed Framework, and more. With Magisk, you also have the ability to apply modifications to the software systemless-ly using modules, like FOSSAPPS.

Frequently Asked Questions (FAQs)

Q. A new update for Magisk has arrived, how can I update it?

  • It’s easy. Open Magisk Manager and tap on the ‘Update’ button and let it do the rest for you. According to the developer, you can only upgrade Magisk from within the Magisk Manager app.

Q. Can I get re-lock the bootloader and get rid of the warning message?

Q: How can I install software updates on my Galaxy S20 after rooting?

  • Do not install OTA updates once your phone is rooted. After a new software update is released, download its firmware package and re-perform step 5-9 of this tutorial again. Do not attempt to flash the stock AP firmware file once you have rooted.
  • During the upgrade process, you can use the HOME_CSC file when performing step #9 instead of the regular CSC. This will prevent the data on your phone from being erased during the upgrade process.

Q: My rooted Galaxy S20 doesn’t pass the SafetyNet test and shows Hardware evalType. Is there anything I could do?

So by now, you have learned how to unlock the bootloader and root Samsung Galaxy S20, S20+, and S20 Ultra using Magisk. If you have any questions or find yourself in a difficult position while performing the instructions, let us know.

Source: Magisk’s Github

Comments

  1. I have already gotten quite far into the process but I have one problem, I have no windows computer, so I caan’t use Odin. Unfortunately this tutorial does not include a tutorial for Heimdall. If I could ask so politely, could you explain how I continue the process of rooting my phone with Heimdall instead of Odin?

    1. No, this method does not involve installing or using a custom recovery such as TWRP at all.

    1. Yes, you can. Although, it’s now recommended to extract the boot.img.lz4 (boot image) from the AP firmware tar package and patch it with Magisk, instead of patching the full AP tar. Everything else in the tutorial remains the same.

      If you can wait, I will update the instructions. Or, you can check out the instructions on this XDA thread.

  2. Hello. I have SM G988B I would like to know if it is possible to root using your method on Android 11. Also can you direct or give instructions to how one can hide root from banking apps.

    1. Yes, you can root the SM-G988B using this tutorial.

      As for hiding root access from banking apps, once you have successfully rooted, open the Magisk App, go to the Settings and enable Magisk Hide. The feature is disabled out-of-the-box on new installations since Magisk v20. Once you have done this, apps that specifically detect root access or Magisk should work.

      On the other hand, if any of your apps verify integrity through SafetyNet, you might want to try out the Universal SafetyNet Fix module. Also, give a read to this article on SafetyNet’s hardware-backed Attestation.

    1. Yes, it’s actually very simple. Just download the latest firmware for your S20 using Frija, then flash the firmware through Odin. If you need guidance, the instructions could be found on this page.

      If you went through the rooting process, chances are that you already have the firmware downloaded. If so, just boot your S20 into Download Mode and connect it to the computer. Then load the AP, CP, CSC, and BL firmware binaries in Odin and hit the “Start” button. Doing this will unroot your phone and restore the official stock firmware on it.

Leave a Reply to ZEDGE Cancel reply

Comment Policy: We welcome relevant and respectable comments. Only input your real first name and valid email address if you want your comment to appear. Read our comment policy fully before posting a comment.