This post should help you recover an AT&T Galaxy S4 SGH-I337 back to stock 4.4.2 using a modern 64 bit version of OS X, I tried 32 bit 10.6.8 and Heimdall wouldn’t run, so I presume you need OS X 10.7 64bit and above to run Heimdall.
First off, you need to uninstall Samsung Kies so Heimdall has USB access to the S4 drivers, it will require a reboot and possibly command line uninstalls:
Secondly, you need your recovery file. I used the big ass stock file from Stockroms (dot) net /file /GalaxyS4 /SGH-I337 /4.4.2 /”the big one there”. You’ll need to rename it to just .tar, then untar that file, and put it in a folder from which you’ll run Heimdall.
Third, install Heimdall.
Read through this post over on XDA:
Follow the OP’s steps, but see 8d) below:
8a) heimdall flash --RECOVERY recovery.img --SYSTEM system.img.ext4 --HIDDEN hidden.img.ext4 --BOOT boot.img 8b) heimdall flash --MDM modem.bin --APNHLOS NON-HLOS.bin --ABOOT aboot.mbn --BOOT boot.img --TZ tz.mbn 8c) heimdall flash --CACHE cache.img.ext4 8d) heimdall flash --SBL1 sbl1.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --RPM rpm.mbn
You will have to sudo all those and I added line 8d) per Trevor7. Thanks to tom_callahan for the original post which all things considered made this quite painless for an Android wipe.
As the original poster said, each push will require a boot back into Odin’s Download Mode, just hold the volume down button in between reboots, then press volume up to get back to it. After step 8d) you’ll want to boot to the stock Recovery Mode (volume up on boot) and do a “Factory Reset / User Data Wipe”; this will insure you’re good to go.
It should boot to an AT&T logo with a startup sound, it will take a couple of minutes, then you should be back to stock TouchWiz / AT&T bloated stock 4.4.2. Godspeed.