How to Root Samsung running Android 9.0 Pie with Magisk


Let's go directly to the rooting topic.

How to Root Samsung running Android 9 Pie

Getting Started: Preparation

  • Samsung Device with Android 9 without root access;
  • At least 50% battery level;
  • USB Cable (the original one recommended);
  • Install the adb and fastboot. Just download the Google SDK Platform-Tools package for using the adb and fastboot. on your Windows. And Terminal for Mac.
  • The Platform-Tools download websites: https://developer.android.com/studio/releases/platform-tools

    how to root Android 10 with Magisk
  • The Latest Magisk Package. Download URL: https://magiskmanager.com/

Step by Step to Root Your Samsung Device with Magisk

Step 1: Plug your Android device into your computer via USB cable.

Step 2: Unzip the Platform-Tools package you download and then press "Shift" and click the right mouse, select " Open the command line here". Or just input the "cmd" in the top address bar the press the "Enter".

You will get the "cmd" window. All the following "adb" commands and fastboot commands are entered under the DOS interface.

Check your device whether it connects to network by input the following command in under the DOS interface: adb devices  Check your USB and debugging if your device can't connect to network.

Step 3: Unlocking Bootloader of Samsung.

  • Allow bootloader unlocking in Developer options → OEM unlocking
  • Reboot your device to download mode. Either use adb reboot download, or use the key combo for your device.
  • Long press volume up to unlock the bootloader. This will wipe your data and automatically reboot.

Just when you think the bootloader is unlocked, it is actually not! Samsung introduced VaultKeeper, meaning the bootloader will reject any unofficial partitions before VaultKeeper explicitly allows it.

  1. Go through the initial setup. Skip through all the steps since data will be wiped again later when we are installing Magisk. Connect the device to internet in the setup!
  2. Enable developer options, and confirm that the OEM unlocking option exists and grayed out! The VaultKeeper service will unleash the bootloader after it confirms that the user has the OEM unlocking option enabled.
  3. Your bootloader now accepts unofficial images in download mode.
  4. Step 4: Samsung Need to Use the System-as-root

    • Download the firmware for your device.
    • Unzip the firmware and copy the AP tar file to your device. It is normally named as AP_[device_model_sw_ver].tar.md5.
    • Magisk Manager will patch the whole firmware file and store the output to [Internal Storage]/Download/magisk_patched.tar
    • Copy the patched file to your PC with adb pull /sdcard/Download/magisk_patched.tar. Do not use MTP as it is reported to corrupt files.
    • Reboot to download mode, and flash magisk_patched.tar as AP in Odin, together with the BL, CP and HOME_CSC files. Never flash only an AP file, as Odin can shrink your /data file-system if you do.
    • Magisk is now successfully flashed to your device!

    Step 5: Install Recovery Boot.img

    • Use volume buttons to navigate through the stock recovery menu, and the power button to select an option. Choose Wipe data/factory reset to wipe the data of the device.
    • Use volume buttons to navigate through the stock recovery menu, and the power button to select an option. Choose Wipe data/factory reset to wipe the data of the device.