This S7 root tutorial can he very helpful especially for the persons that intend to flash a custom ROM on their device because will do both necessary steps before starting that:
-getting root access
-installing a custom recovery,in our case TWPR
-By flashing a custom recovery will trip the Knox warranty bit so must verify with your carrier if they will still cover warranty in this case. If you understand the risk or do not care about warranty please continue on.
-The Samsung Galaxy S7 boot image has a new protection wich will prevent you from booting if you swipe to enable system modifications. If you do that your phone will be stuck on dm-verity verification failed. This can be avoided as long as you follow carefully steps from the tutorial!
Files that need to downloaded for the root
-TWRP custom recovery
Supported S7 models for rooting with twpr recovery
Step by step tutorial on how to root using a custom recovery
1.Download the files needed for root,please be careful to choose the exact custom recovery for your phone.
2.Install the Samsung drivers
3. Connect the phone in normal mode to your computer and transfer to the phone the SuperSU installer UPDATE-SuperSU-v2.74.zip and the Dm-verify fix file no-verity-opt-encrypt.zip
4.On your phone go to Settings/About Device and tap 7 times on the Build number till will show on screen "You are now a developer"
5.From Settings/Developer options enable Usb debugging and Enable OEM unlock
6.Put the phone in download mode :
-Switch it off
-Hold Home,Power and Volume down till you get to a Warning screen
-Press Volume Up to Continue and should see "Downloading" on screen
7.Open Odin and select for AP the custom recovery file that you downloaded.The extension of the file must be .tar or .tar.md5 ,if is .zip need to extract the content before selecting in Odin
8.Connect phone to computer and the COM box from Odin should turn to light blue.
9.From Options tab from Odin Untick(Unselect) the option Auto Reboot. Do no modify anything else. Press back to Log tab and then can press START.
10.After you see on Odin "RESET" and disconnect the phone .
11.Now hold home, power and volume down buttons as you did when you got in Download mode (even if is in download mode already) ,this will make it go to the Warning screen with the 2 option to Continue in Download mode or Reboot.
12. This time, press Volume Down again to reboot,then very fast (do not let it boot) start holding Home,Power and volume UP to get into recovery mode .You could wait till the phone turns on,then switch off again but has happened for some devices not to boot properly in the custom recovery.
13.After you see the TeamWin logo should get to a screen ,where at the bottom is the option "Swipe to Allow Modifications". Please swipe to the right!
14.Once in the custom recovery menu press the "Install" and look for the UPDATE-SuperSU-v2.74.zip file, tap on it and "Swipe to Confirm Flash"
15.Again from the recovery menu press the "Install" and look for the no-verity-opt-encrypt.zip file, tap on it and "Swipe to Confirm Flash".
16. Once you see the confirmation that both files were successfully flashed press the "Reboot System" button. Very Important: Do not reboot until you are sure both files were successfully flashed because if not will not be able to boot.
17. The phone will turn on and be rooted. Can confirm the root has worked properly by using a root checker application like "Root Checker Basic "
If any of the steps is not working properly please read again the full tutorial to be sure you have not missed anything. If still not working please leave a comment bellow and for sure will find together a solution.