[Galaxy S 4 i9505 Original Android Development] elsandosgrande:
So, there is no need to worry if you're going for a custom version of Android.

As you can see if you go back a few pages, I was asking around here about rooting my Galaxy S4. One person gave me a warning that I did not heed and that was that it's not a good idea to root the stock version of Android made by Samsung. I went for it and, lo and behold, something went haywire. It was the GApps suite. It kept crashing constantly, slowing down my phone after a minute at most to a point where you'd think it was an old Windows XP laptop with not enough RAM for Service Pack 3 (trust me, I sadly know from experience since my mom held onto that laptop until XP support was no more, since we didn't have enough money to buy a new one, but this pressured her enough to go out and buy one, except that that new laptop was weak as well, but AutoCAD work needed for school finally got my mom to buy me a laptop that's actually decent and for me, also, I'm turning 16 in June of this year), so I deviated from my original plan and flashed TWRP from their Official TWRP app, made a backup of the rotting stock Android (that seems to refuse to be restored now, sadly, since I need it to regain access to my Discord account via Authenticator), downloaded the latest nightly image of LineageOS (https://download.lineageos.org/jfltexx) and flashed it. It WORKS! (https://imgur.com/a/X4aFj) :D Since it doesn't come with the GApps suite (it's based off of AOSP/the Android Open-Source Project which doesn't come with the proprietary GApps suite), I flashed the OpenGApps package (https://wiki.lineageos.org/gapps.html) after flashing SuperSU (http://www.supersu.com/download), but it doesn't matter in which order, since each update unroots the phone, but the GApps suite hasn't crashed once on LineageOS after reflahing the SuperSU package. P.S. If you want updates that you don't have to manually flash each time, use Lineage Downloader and, if you don't want to reflash SuperSU after each update, add it to the list of additional packages to flash, just be wary that, if it stops automatically flashing the .zip and you have it on the memory card, you will need to put it in the Lineage_Downloader folder, I don't know if that's the case when it's in internal storage.

Since you have the international model (I9505), the bootloader is unlocked (that's the one I have as well), so you're all set to go in that department. Now, download the TWRP package and the Odin software if you're using Windows, but Heimdall if you're using a Linux distro and, I guess, macOS/OS X/Mac OS. Power off your phone if it's on, hold down the volume down key as it's powering on, then press the volume up key to proceed into Download mode. Connect your phone to your computer, open Odin or Heimdall (depending on OS), then (I forgot what to select exactly, but if you download the CF Autoroot package, which is how I got root the first time after flashing his package, and open Odin, the only option available is the only one you need, so just select the TWRP package and proceed), then put SuperSU, OpenGApps and LineageOS on your microSD card if you haven't already, hold down the volume up button as your phone is powering on (you need to see RECOVERY BOOTING... in blue followed by a red and a yellow line of text, the yellow I think says Set warranty bit: recovery), then you go to Install (if you want to back up your current stock Android before flashing LineageOS, make sure you have at least 11GB free on the microSD card, go to Backup, select all partitions, Select storage > microSD card, Swipe for backup, wait until it's finished and then proceed to LineageOS, oh, and the backup does not save any photos or stuff like that, but flashing LineageOS didn't erase it either), you select the LineageOS image, swipe to install. If you don't want root, flash the OpenGApps package (same process as for LineageOS), then go to Reboot, select System and be greeted by the LineageOS boot animation and then do the setup (I assume it appears,since I flashed OpenGApps only after I booted up LineageOS for the first time, but it still worked, even though they warned against it, I was only missing the first-time Google account setup, but that's been dealt with now). If you do want root, just flash the SuperSU package the same way as the previous two, it doesn't really matter when, but of course before the first boot if you want to have it right away.

Please reply if something was too ambiguous! :) Good luck!

P.S. (Edit) https://twrp.me/ https://twrp.me/site/update/2017/01/05/official-twrp-app.html