I have/had the same problem after i switched my front panel/lcd assembly – when I was stuck on the apple-loop and 4013 error. The initial issue turned out to be the front camera assembly.
In general I suppose I damaged the cable or contacts of the front camera assembly. So I first changed the entire camera assembly to the original, undamaged one – and I could start up my phone again - but the cameras stayed black. Seemed like a minor inconvenience in comparison to not having a phone.
What works for me at the moment:
When I switched to camera "Time Lapse" my camera starts up and works though! – Then I can switch to the other modes. It still has issues focusing some time, but whenever I switch to Time Lapse it resolves it temporarily. And I also have to go into "Time Lapse" to switch from front to back camera.
This all makes me believe I damaged some part of the connector on the logic board.
It might be inconvenient having to switch to time lapse all the time, and I cannot make the camera work in every app, but hey – better than nothing. It's a work around I can live with.
Try it, maybe some of the camera modes restarts your camera too..
In case anyone else experienced the same issue, or has any ideas about what I might have damaged or if it is a software bug for which an actual work around exists reply please :)