JTAG stands for joint test action group, which is essentially a common IEEE serial port located on the motherboard of many devices. In a phones case, a Riff box is used to access the port and flash device specific files to the motherboard directly, thus eliminating the need for the phone to be on or functioning in the first place.
In this case, the jtag port is used to write to the emmc chip directly to override the system check and flash earlier firmware.
You can on the S4 but you need MDK firmware, you're better off asking in the S4 forum.
Sent from my HTC6525LVW using Tapatalk