"The flash will not work if the rear camera has failed.
So the first thing to do is to try a known-good rear camera. That would solve both problems at the same time. If the replacement camera doesn't work, than you likely have an issue on the logic board. this would require a micro-soldering repair."
"Occassionally the Rear Camera IC (U2501) can fail & stop supplying power to the Rear Camera
U2501 is located on the rear of the board (just above the Wi-Fi Module) a method of testing & temporarily bypassing the switching mode of the IC is to remove U2501 & solder a jumper wire between the pads A1 & A2 beneath the IC
This method should be temporay because it will supply power to the Rear camera permanently, even when the Rear Camera is not in use
Potentially resulting in increased Battery consumption & maybe shortening the life expectancy of the Rear camera itself?
(U2501 provides power to the Rear Camera whilst its being used & no power whilst the Camera isn’t in use?)
In addition Pad B2 is GND & Pad B1 is supplied via L1802 (Coil) which primarily provides the additional power for the autofocus feature
L1802 is part of the Buck9 line and is generated via the Main PMIC
Check for a Micro tear in the Flex connector, I have had issues with erratic charging, No touch ID, Bootloop (Recovery mode) & overheating caused by a Microscopic tear in the flex.. I have just temporarily removed the flex connector & all of the issues above have dissappeared.. I now have no rear flash & I presume no rear camera until my replacement flex arrives
I have an iPhone 7 that had a smashed screen I replaced the screen and put the original camera and home button back on and tried it. First thing I noticed is that the boot takes a good 5 mins. It also had a slight overheating issue while charging from what I can gather (towards the top of the phone) the camera (front and back) don’t work nor do the flash. I’ve taken all cables off, cleaned them and re-seated them. But it’s still the same, I’ll have try a new camera unless someone else can suggest a better test (I don’t have any spare parts for iPhone 7)