My phone currently is rooted with 4.1.2. I think the cause for the failure to flash any ROM may be that I had flashed a stock 4.3 ROM, the flash was successful but afterwords my phone acted really slow, every a few second an error message will popup saying some system app is not responding. So I tried to flash another stock 4.1.2 ROM from samsung-updates.com, that flash failed massively, put my phone to yellow triangle screen. From that point on trying to flash anything other than CF-Auto-Root-t0lteatt-t0lteatt-samsungsghi317.tar.md5 will fail the same way.
I also tried to reset the phone to factory settings and wipe data partition from recovery mode, and use triangleaway to reset the flash count and device status, nothing helps. The flash count can only go down to 1, and the device status from settings/about device is always "modified".
Does anyone have any ideas of how to reset the phone back to the unrooted state so I can get the automatic official update from the phone?