The Magisk file provided here is a modified one.
READ THIS BEFORE ROOTING DEVICE
- Any of below said method to root will trip knox and void warranty forever.
- Root process needs wipe data so make backup of important data (including Internal Device storage) before proceed.
- As of now you will lose Samsung Pay and Secure folder forever if you root once, even unrooting won't help. (hope in future we can get it working on tripped knox device). Also you may not able to run some banking apps, you can use Magisk Hide
- OTA likely won't work once you root device.
- To unroot device completely, simply flash Samsung stock firmware, Remember, Unrooting won't revokes warranty nor you will be able to use Secure folder/Samsung Pay. Once rooted, these feature gone for you unless some magic happen in future and may find a way to use it.
This Magisk file is outdated, Magisk hide is not more working SafetyNet Fail
How to Use
Before Beginning I recommend update to the latest oreo update.
1.Enable Developer Option (settings - about phone - Software information - Tap 7 times on build number to activate developer option in settings menu)
2.Enable OEM Unlock from developer option (Currently no workaround for those who doesn't have this option )
3.Download TWRP for S9 or S9+
4.Switch Off device
5.Press Vol down + Bixby + Power to reboot to download mode, press volume up when asked to continue to download mode
6.Download Odin and open it, Disable 'Auto reboot' from option menu of Odin
7.Select TWRP (tar image) with AP tab of Odin and Start
8.Once Successfully flashed, you will see 'Passed' in Odin tab
9.Disconnect device and hold Vol down + power till screen goes off, Now immediately press Vol Up + Bixby + Power to reboot to TWRP
10.Select to allow modification
11.From TWRP, Select WIPE menu - Then FORMAT DATA - You need to type 'yes' to perform wipe. WARNING : This will erase all data including Int SD storage from device
12.Once format device completes, go back and select REBOOT' Menu and then - 'RECOVERY', This will reboot to TWRP again
13.Flash no-verity-opt-encrypt-samsung-1.0 and then Magisk
14.Once flash successfully finish, Reboot to System
15.Open settings - Developer option - Look for OEM Unlock option. It will automaticaly change to unticked after some reboot don't stress it's normal.
16.MAKE A BACKUP IN CASE OF BOOTLOADER RELOCK.
Enjoy ! You have your Galaxy S9 or S9+ rooted.
Credits goes to jesec https://forum.xda-developers.com/member.php?u=6371894 for the modification of Magisk.
Magisk 16.3 modified: