Chosen Solution

After doing a screen repair on an iphone 7 it launched into the boot loop. I tried to restore on itunes which prompted the 4013 error. I then took it to a repair shop where we used an apple original screen with a new camera/speaker system and with a different battery, all of which continued to give the same error. I have run out of options and want to know if theres anything I can do!

error 4013 usually points to a nand issue, when trying to restore if you get the progress bar on screen under the apple logo try disconnecting the cable from the phone and plugging back in straight away

Have you tried doing a software restore with no LCD attached, sometimes it resolves issues, once the software has been done, disconnect the battery and reconnect the LCD and front camera.

It could be several issues, is the touch ID in tact ? Is the proximity sensor installed correctly? Did the device slow boot (hang on apple logo before you repaired ? And agree with above Daniel could be Nand or even a audio IC issue we are seeing lots like this at the moment Hope that helps