[General Questions and Answers] Drow_Warlord:
Greetings.

I didn't post in very long time on this forum,since I could handle most of the problems on my own,now I need some andvanced tips and advices,so I'm reporting in.

I bough myself a Samsung Galaxy S4 Black Edition last year here in Bosnia and Hercegovina.Beautiful phone,never got a scratch on it,It had Android 4.2.2 Jelly Bean out of the box but all of the features from basic S4 except one,it couldn't update firmware to Lolipop 5.0.1.

That used to bother me,since I had much older devices that supported JB and this phone was just special,enough that I couldn't let it be my daily driver having unused potential,so i threw myself at work(which will later prove a very bad decision).

I checked for OTA updates in the settings and that option would litteraly do nothing,providing no info,or searching for new updates.

Smash that Build number,got into developer mode,toggle USB debugging,Install Kies on PC,run it as Admin,download latest drivers,connect the device,Firmware update asks for IMEI and s/n,type them in,says to check my s/n and IMEI,do that few times under different compatibility options,still the same.

I thought it must be something bad with data/catche so i reset to recovery mode and wipe them out,setup the phone,enter the OTA update for second time,it shows me "Your device have been modified, Software updates are not available", check device status and it states "Samsung",after several attempts it sometime said "Modified" sometimes "Samsung",Kies didn't recognise the device through all this process.

I was already lost here,but I thought,hell Kies isn't working,neather is OTA,i could flash using Odin,that might do the trick.

Went to Sammobile,downloaded latest drivers and Odin,found one Firmware that I though was compatible.,unbloked them in properties and set to rin as Admin.

Uninstalled Kies and checked for leftover drivers again,and it was all clear to go,ran odin,mounted firmware,set device in download mode and started flashing but Odin poped out "complete(write) operation fail" error.

Didn't want to try fixing it,went straight back to SM and downloaded two other firmwares,one said "complete(write) operation fail",and the other "Re-Partition operation failed",so I thought Odin was bad,since I checked on two PC's with several USB ports.

Download two more versions of Odin and find a stock s4 PIT file here somewhere for repartrition error.

Extracted everything,unblocked and ran with privilegies,same thing on both Odin versions,except that only Odin 3.07 could flash the pit file alone with no problems it passed.

Next time i ran download mode i tried to flash the firmware write fail came up again,extracted recovery and flashed it alone,worked like a charm,so I tried flashing once again,it proceedes a little further with same write error.

Reset the phone to wipe data and catche and it goes into "Firmware Upgrade Encountered An Issue Error",Install kies,it still doesn't recognise the phone.

Out of option right now I go for search of alternative recovery software,and I found the famous "Dr.Fone" (how stupid I was to not read all those,"if it wasn't for this software my phone would die" comments)

Installed it,ran recovery my phone shuts down and displays "set warranty bit: kernel message",from this point nothing works except recovery mode,so I install CWM recovery and flash a Custom ROM,now only this option that sets my phone in working order and I want to recover it's Firmware back,Anyone that could help me with this issue,or had it solved before?

Atleast give it a try.