[Galaxy S 4 Q&A, Help & Troubleshooting] sallad08:
Hi all,

Having some issues flashing Cyanogenmod 12 on a GT-i19505 LTE. Been using Cyanogenmod 12.1 on one GT-i9505 with no issues (except the odd dud nightly but a new one fixed it). My wife's phone was on CM11 and got a weird bug that I tried to fix. The bug was that mobile signal would drop every time the phone screen turned off but would come back on as you turned the screen back on. So backed up everything and did a factory reset. Issue was still there. Tried flashing CM12.1 on that, the same thing, bug still remained. Still thought it maybe software so I tried uninstalling / freezing non-system apps, same issue. So I then decided to do a flash back to a stock android rom (4.2.2 or 4.4.2 can't remember), the one that came with the phone originally. I flashed that using a Heimdall package that I made on Linux, which worked on my phone previously. Anyway that worked fine again, the weird mobile signal dropping out when screen goes off issue was gone. So I installed TWRP recovery (replacing CWM touch) with Heimdall and that worked. Tried to flash CM12.1, gapps, and su user but the CM12.1 zip was corrupt.

Forgive my ignorance here, I don't really understand how Android file systems and partitions work or how the CM installation works, but what I think happened is the corrupted zip deleted all the partitions in preparation for install and then bombed out. It then left me with a phone that couldn't boot even into recovery, it couldn't do anything except go into download mod (thank god!). When I tried flashing through Heimdall I was getting errors, so I tried a few versions of Odin on a windows box that I have, and got the same errors. It was always something about the PIT file being in error (sorry I can't remember the exact errors now it was last night). I did some googling and kept trying. Somehow I got the android stock recovery to flash on it, so I could at least access that. But I still had other flash errors, so more googling and then it seemed from what I was reading that I was missing the bootloader which was causing the issue. So I changed the install sequence in the Heimdall package to install boot.img first and it flash, as did the rest of the system. So the stock rom flashed and works fine, the issue went away. I was able to flash TWRP again through Heimdall with no issue. I was able to flash CM11 through TWRP zip load with no issue. But I can't seem to install CM12.1, it just doesn't work (latest error is unable to mount /data). Whenever I install it through TWRP, it says it completes successfully but when I reboot the phone does nothing and TWRP recovery gets knocked out. So I have to go back to square one to and reflash my stock package.

Anyway, I did some more reading and I am trying to use the repartition option by checking that checkbox and reflashing the PIT, but the PIT file I extracted to make my Heimdall package was from my phone when it was already running CM12.1. That PIT file fails PIT check. I have tried downloading some other ones, but they fail too. The errors I get with them, saying it can't find the end of the file and it fails to flash anything. I am getting errors by trying to flash with ODIN as well just using the PDA method, repartition not checked, and just loading a compressed file of a stock rom (I have tried 4 different ones, 2 from my mobile's carrier, and 2 unbranded) which don't work. These have all worked in the past. So I guess I would like to know, how would I get an original PIT file for a GT-i9505 LTE? It is the 16GB version, and the original stock rom that came with it was I9505XXUEMK9_I9505TELEMK1_TEL, which is a Telstra Australia stock rom. I have a feeling I need to repartition with the PIT file so I can get CM12.1 to work. Or does anyone have any other suggestions? Thanks for your time.

TLDR: Corrupted download of CM12.1 soft-bricked device, I think taking out every partition (bootloader, recovery, etcetera), only download mode worked. Finally am able to flash stock rom and it works, can flash CM11 and it works, can flash CM12.1 but system is broken after that and won't boot or go into recovery. Rinse and repeat. Want to try and repartition with PIT file but can't find a PIT file that works during flash. Anyone know where I can get a PIT file for a 16GB GT-i9505?