Camera is flipped and black and white

Hello,

So I opened the phone to change the display and after assembling it back everything is working fine except the camera. When I open the camera app first it opens the front camera (instead of the main camera) and the picture flipped upside down. After switching to the back (main) camera the pictures is still flipped up and also it is only black and white.

I installed Open Camera and through that app the camera's pictures are not flipped up but still the picture of the main camera is only black and white.

Any ideas how to fix this?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0