[AT&T Samsung Galaxy S II Skyrocket SGH-I727] MidnightJava:
I borrowed a friend's S2 Skyrocket i727 several months ago because I was developing an app that my phone couldn't handle. With his permission I rooted it, but didn't install a custom ROM or a custom recovery. Best I can recall, what I did was unlock it by flashing a boot img via heimdall and then installed SuperSU.

When i was ready to give it back to him, I tried to do a factory reset from the settings menu, and the result was a bootloop. I couldn't get it into recovery mode or download mode. I bought a usb jig, and with that I was able to get into download mode. But I've tried several approaches to flash something that will fix it, and nothing has worked.

I Downloaded the stock 4.1.2 ROM, untarred the tar file, and tried to install the files there with the following command (using Ubuntu 13.10)

sudo heimdall flash --pit s2.pit --FACTORYFS factoryfs.img --CACHE cache.img --HIDDEN hidden.img --MODEM modem.bin --KERNEL zImage --PARAM param.lfs --PRIMARY-BOOT boot.bin --SECONDARY-BOOT Sbl.b

All the files above were in the downloaded tar file, except s2.pit, which I downloaded from the device using heimdall download-pit. I also tried not specifying a pit file, so it would use the one on the device. These attempts fail because the pit file does not have most of the partitions I'm referencing, e.g. FACTORYFS and KERNEL. The pit file printout is pasted below.

Since there is a BOOT and a RECOVERY partition, I tried flashing just boot.bin to the RECOIVERy partition. This didn't seem to have any effect. I also downloaded the CWM recovery image for the i727 and tried to flash recovery.img to the RECOVERY partition. But still I'm unable to boot into recovery or to anything else.

I don't know if my pit file is corrupted, or if I have to flash a custom ROM, or if I need to map the files above to other partitions listed in my pit file. Other than rooting my HTC Inspire 4G a couple years ago and rooting the S2, I don't have much experience with flashing files from a PC, so I don't know the particulars of what goes into what partition.

Here is my pit file:

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Entry Count: 28
Unknown 1: 808876088
Unknown 2: 0
Unknown 3: 0
Unknown 4: 0
Unknown 5: 0
Unknown 6: 0
Unknown 7: 0
Unknown 8: 0

--- Entry #0 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 146
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 204800
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SMD_HDR
Flash Filename:
FOTA Filename:

--- Entry #1 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 77
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL1
Flash Filename: sbl1.mbn
FOTA Filename:

--- Entry #2 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 81
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 3000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL2
Flash Filename: sbl2.mbn
FOTA Filename:

--- Entry #3 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 5
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 30000000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name:
Flash Filename:
FOTA Filename:

--- Entry #4 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 71
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RPM
Flash Filename: rpm.mbn
FOTA Filename:

--- Entry #5 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 69
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 4096
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SBL3
Flash Filename: sbl3.mbn
FOTA Filename:

--- Entry #6 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 76
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 5000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: ABOOT
Flash Filename: aboot.mbn
FOTA Filename:

--- Entry #7 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 72
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 20480
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: BOOT
Flash Filename: boot.img
FOTA Filename:

--- Entry #8 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 70
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: TZ
Flash Filename: tz.mbn
FOTA Filename:

--- Entry #9 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 93
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SSD
Flash Filename:
FOTA Filename:

--- Entry #10 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 145
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1000
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PIT
Flash Filename:
FOTA Filename:

--- Entry #11 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 147
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 20480
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: PARAM
Flash Filename: param.lfs
FOTA Filename:

--- Entry #12 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 12
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 200704
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MODEM
Flash Filename: amss.bin
FOTA Filename:

--- Entry #13 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 74
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 6144
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MSM_ST1
Flash Filename: efs.img
FOTA Filename:

--- Entry #14 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 75
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 6144
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MSM_ST2
Flash Filename:
FOTA Filename:

--- Entry #15 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 88
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 6144
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MSM_FSG
Flash Filename:
FOTA Filename:

--- Entry #16 ---
Binary Type: 1 (CP)
Device Type: 2 (MMC)
Identifier: 143
Attributes: 0 (Read-Only)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 200704
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: MDM
Flash Filename: mdm.bin
FOTA Filename:

--- Entry #17 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 89
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 6144
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: M9K_EFS1
Flash Filename: efsclear1.bin
FOTA Filename:

--- Entry #18 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 90
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 6144
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: M9K_EFS2
Flash Filename: efsclear2.bin
FOTA Filename:

--- Entry #19 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 91
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 6144
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: M9K_FSG
Flash Filename:
FOTA Filename:

--- Entry #20 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 171
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 20480
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: DEVENC
Flash Filename: enc.img.ext4
FOTA Filename:

--- Entry #21 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 96
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 20480
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: RECOVERY
Flash Filename: recovery.img
FOTA Filename:

--- Entry #22 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 148
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 20480
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: FOTA
Flash Filename:
FOTA Filename:

--- Entry #23 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 165
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 1224704
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: SYSTEM
Flash Filename: system.img.ext4
FOTA Filename:

--- Entry #24 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 166
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 4198400
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: USERDATA
Flash Filename: userdata.img.ext4
FOTA Filename:

--- Entry #25 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 168
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 618496
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: CACHE
Flash Filename: cache.img.ext4
FOTA Filename:

--- Entry #26 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 169
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 264192
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: TOMBSTONES
Flash Filename: tomb.img.ext4
FOTA Filename:

--- Entry #27 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 144
Attributes: 1 (Read/Write)
Update Attributes: 0
Partition Block Size/Offset: 512
Partition Block Count: 10
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: UMS
Flash Filename: ums.rfs
FOTA Filename: