Chosen Solution

When I use the camera app it shows just a black screen and it says camera failed. Also I tried using a third party camera app and the front camera worked but the rear had green lines running across the screen. I went online and tried everything software wise to get it back to normal. I wiped the cache Portion and did a factory reset but still the same thing happened. Then I bought a new rear camera and still nothing. When I opened the third party camera the screen was black for the rear but worked in the front. Any other ideas?

Could it be possible that the phone was in contact with water? Did you try cleaning the connector before reassembling the new camera part? Have you tried flashing another firmware?