Just carry on to the below description and follow the step by step process to root and install TWRP recovery on Galaxy A5 (2016).
How to Root Samsung Galaxy S7 SM-G930F/G930FD/G930X/G930W8/G930S
Before you begin:
Disclaimer: This tutorial includes multiple operations including Custom recovery and root. Follow the guide on your own risk, we are not responsible if you brick or damage your device however the chances of bricking a device are rare but you have to pay full attention on the complete guide to avoid any issues and difficulties while performing any of the above mentioned operation.
You need to have a TWRP recovery installed on your Galaxy S7 so follow this guide to flash TWRP recovery on your device.
Enable USB Debugging (Settings >> Developer Options >> USB debugging)
Your phone battery should be charged minimum 80%
Download these files:
Download Samsung USB drivers
Download SuperSU v2.65
How to root Galaxy S7 on Android Marshmallow
Connect your device to PC and Copy the download SuperSU zip file on the internal storage of device.
Turn off your device completely.
Now turn it on again by pressing and holding Volume Up + Home + Power up simultaneously until your device boot into recently installed TWRP recovery.
In the recovery menu tap install and select the SuperSU 2.65.zip and flash it.
Reboot your device now.
You have successfully rooted your Galaxy S7 SM-G930F/G930FD/G930X/G930W8 and G930S on latest Marshmallow firmware.