Chosen Solution
This iPhone 5S boots into Recovery mode. When connecting to iTunes and clicking restore, the device turns off right after the extracting software step. Then restarts into DFU.(iTunes err 4013) Any ideas? Thank you!
Error 4013 is cause by a misbehaving NAND or just flat out faulty NAND. First I would try other tools before you declare this phone bricked. Like try to use 3u tools or something like that. Typically if a device can’t leave DFU mode then the logic board needs to be repaired.
You can try to to connect it to itunes and click on restore without the screen attached to the iphone. Afther that you can connect the screen back to your iphone, but don’t forget to disconnect battery first before putting back your screen.