[T-Mobile Samsung Galaxy S 4] vesperwillow:
I troll here a lot for information, as I fix devices for friends for free, so if I'm posting up for help here it means I've run out of internet solutions and energy. Mods, I've spent a week searching and reading through threads, no single thread solved my issue which is why I'm posting up; please move the post if it better fits elsewhere.

The Phone: T-Mobile Samsung Galaxy S4 SGH-M919

Current Firmware: M919UVUFNK2 Stock T-Mobile (M919UVUFNK2_M919TMBFNK2_M919UVUFNK2_HOME.tar.md5)

Current Bootloader: M919UVUFNK2 (also verified with getprop ro.bootloader)

Current Baseband: M919UVUFNK2

PDA: M919UVUFNK2

Hardware Revision: REV0.7

Current Android Version: 4.4.4

Current Kernel: 3.4.0-2437203 dpi@SWDD6020 #1 Mon Nov 17 19:20:38 KST 2014

Current Build: KTU84P.M919UVUFNK2

Device/Product: jfltetmo

CSC Code: TMB

Firmware CSC: (blank)

Active CSC: TMB

Product Code: SGH-M919XXXTMB

GPS Works: Yes, verified

BT Works: Yes, verified

WiFi Works: Yes, verified (all bands, secure and unsecure)

Sound Works: Randomly, causes issues. When it does work it is crystal clear

Network Radio Works: Yes, verified

Battery: 2 new batteries, one OEM and one Rav

IMEI/ESN: Free and clear, verified to be a TMO device by TMO

Error Messages Seen (if any): "Process system isn't responding"

Odin Versions Used: All 3.x up through 3.10.6

Alternate ROM Tries: Candy5 v2.1.0 jfltetmo

Alternate Recovery: TWRP 2.8.4

Odin "Double-Flash w/o Auto-Reboot" Used: Yes, multiple times (even triple and quadruple times)

FSCK Used: Yes, no issues detected

The Story:

I was presented with a challenge, fix a phone which just came back from the manufacturer. Sadly, not the first time I've had to clean their mess up. It was sent in under warranty because of screen bubbles, and returned with an OEM LCD, and a new battery. And, before anyone asks, the manufacturer refuses to take a look at it again. It's now out of warranty (by a month or so) and they said it worked fine when it left their hands. Yes it did, but only for a few weeks. From the time they shipped it back out until it crashed, nothing had changed on the user's end, no software additions or anything.

Appeared to only need re-flashing. After it booted and reached the unlock screen it seemed fine. If you unlocked the phone, it would immediately freeze up. When it did this it would usually be frozen for about a minute or two and then reset itself. Most of the time it would return to the lock screen, sometimes it would hang on the T-Mobile flash screen. One time I was able to get in but once it started syncing messages it locked up again. It had the latest firmware (M919UVUFNK2).

I used OEM recovery to wipe the cache and return it to factory fresh. It quickly booted up to the lock screen and everything seemed fine, I swiped and moved around the menus like normal. Sound was random though, sometimes it would work, sometimes not. Wifi, Bluetooth, Data .. everything worked like it should. I began to notice, however, that anytime something tried to use sound (ringer, notification, changing the volume) the system would lock up and stutter somewhat. Eventually it got to the point where it would just hard-lock every time sound was used. So I wiped it fresh and clean again--I wiped it several times in a row infact, just to be sure.

Again, everything seemed fine but sound would be random, and sound always seems to trigger issues. A few times I immediately muted all audio as soon as I factory-reset and rebooted the phone, in order to see if that mattered. One of those times it locked up within 2 minutes of use, and the other times it locked up eventually. It seems to last longer when audio is muted, but I wouldn't correlate that directly because it's not easy to scientifically prove.

In order to see what might be going on I went to install CatLog from the sdcard, but that needs root to work properly. I tried using SuperSU and CF-Auto-Root (jfltetmo/sghm919) to no avail. What happens when either of these methods are used: They run flawlessly and say everything is good, but upon rebooting the phone locks up at the Tmo flash screen. No matter what I do, rooting causes it to lock, and when it's locked the phone gets ultra hot as if the CPU is stuck in a loop.

After re-flashing the stock rom umpteen times and getting the same issues, I tried finding a PIT file to no avail. Gave up on that. For giggles I tried previous TMO stock roms. I realize that you normally can't do this, and some advise against it, but when you're up a creek it sometimes doesn't hurt to try, and I've had this work on other phones in the past. I tried ll of them actually, in chronological order of release so as to simulate upgrading:

These wouldn't flash to the phone at all:

M919UVUEMK2

M919UVUAMDL

These flashed/took and actually worked without an issue, they just all eventually locked up like NK2:

M919UVUFNH7

M919UVUFNB4

M919UVUAMDB

I re-flashed NK2 another 20 times or so, still producing the same problem. Decided to try 5.x out in case that might solve something. So far I've only tried 1 rom for it, Candy5. Several times I was able to get it to boot and use it just fine. One time it actually lasted almost 2 days. Since I'm talking about Candy, the folks did a fine job with it, I really like the layout/aesthetics. Free plug there.

Sadly, it crashes under Candy as well. Same problem as with NK2. Boot crashes, boot loops, sound issues. I've since sucessfully reverted to NK2. Presently it's sitting on my desk receiving emails, downloading apps and working just fine. I have all audio disabled. It's been going for about an hour. (edit, right as I posted this it crashed and rebooted itself)

My Theory:

Theory 1: The reason I want to re-PIT is because I theorize something in the filesystem, somewhere, has taken an epic dump. The more the phone is used the quicker it crashes--this happens almost every single time, and battery/CPU temps are normal. After a certain amount of use/time, the phone craps itself. Storage use isn't always sequential, so something is mapped as good when it isn't, and when it's put to use it dies. One way I correlate this with sound is that perhaps the system doesn't cache the soundbyte, so when it goes to read the file it craps.

Theory 2: Same as above, but instead of storage, the problem is bad RAM causing the same data corruption/issue. No easy way to solve this. I will be stress-testing the RAM chips tonight.

Update:

I stress-tested the CPU and RAM using some available apps, and ran it for quite a long time. Didn't seem to cause or exacerbate the issue any.

Closing:

Anyone have any ideas? I thought maybe re-PITing the thing may help, but couldn't find any files on it. The only other TMO S4 I have access to is a friend's who doesn't want it rooted (a requirement to read a PIT file I've been told). I appreciate any advice/input on this matter. Would be nice to get this thing going.