Preparations
Install a ROOT Genie on your computer
Procedure
1) first install the downloaded "ROOT Genie" on your computer. If Baidu does not search for "ROOT Genie", download and install it, after the installation, we connect the phone to the computer (the usb debugging mode must be enabled on the phone. We recommend that you enable the USB debugging option)
2) after enabling usb, we now connect the mobile phone to the computer, and then the ROOT genie in the computer will automatically recognize the mobile phone, on the ROOT Wizard page, we can see "ROOT now". You only need to click it.
3) then the following prompt page appears on the computer. Please operate on the mobile phone as prompted
4) as long as we click "ROOT", we only need to wait. After a while, we will prompt that the root operation is successful.
Note: s5 uses Android 4.4, so you can refer to this tutorial to obtain the root permission for all devices using Android 4.4.