TWRP Recovery can be used after flashing it to install SuperSU, the program that grants you root access to your phone.