Okay, I've taken the time to tinker with Heimdall a bit to get the partition identifiers from my own phone (which matches up from the info from this old thread
), and have put together the following, which seems to work for me. This was with Heimdall 1.4-rc1; I think earlier versions don't accept numeric identifiers.
You'd probably better have a plan on hand to get things back to normal if this doesn't work (I'm not responsible for your bricking your own device if this doesn't work).
You'll need to extract the .tar image before using this; if you're at a command line,
should suffice to do that. You'll end up with the following files:
Afterwards, boot your phone into download mode (from a powered-down phone, Vol Down + Home + Power Button until you see the Samsung logo) and make sure you're completely ready and have backups and all before you run the following (I'm not going to be held responsible for you bricking your own phone and being unable to recover from it afterwards):
heimdall flash --1 NON-HLOS.bin --3 sbl2.mbn --4 sbl3.mbn --5 aboot.mbn --6 rpm.mbn --7 boot.img --8 tz.mbn --14 system.img.ext4 --17 cache.img.ext4 --18 recovery.img
You should be able to get away with flashing only some of those images instead of all of them (in particular, if you have a third party recovery from somewhere, you might want to omit the recovery image); that said, if you're only flashing some of the specified images as opposed to all of them, I'm almost certain it will trip the flash counter. (I don't know if flashing *everything* will trip the flash counter or not, though, seeing as I deliberately did not flash the recovery during my own test for ease of restoring my phone to its normal happy state.)