On the surface, your i Phone connects to the computer, i Tunes recognizes the device but somewhere down the line, i Tunes thinks that the cable is not really that good or suddenly Wi-Fi starts ill-functioning.
Even your computer may turn out to be the real villain.
I happen to have the same situation with you, and I tried a third-party software called Reiboot to restore my device. go into cydia and delete any dimming apps like flux and dim. also delete fingerprint scanner for the time being.
It workes the same with i Tunes and directly put your i Phone into recovery mode. this might help one of you but my phone just had an issue where it turned off then when turning back on it would turn on fine but the screen would just be black. then finally delete a tweak that will reset your phone.
Before you connect your i Phone with the USB cable, start i Tunes. If this happens and you see the Apple logo disconnect the i Phone and start from step 1.
Make sure i Tunes is finished downloading podcasts, updating, etc. Connect your i Phone to the computer and wait 10-15 seconds for the connection. Press and hold both the sleep/wake button and home button on your i Phone. After 10 seconds, release the sleep/wake button and continue to hold the home button only. Wait a few more seconds and i Tunes should pop up a dialogue box that asks if you are ready to restore your i Phone. After restoring your i Phone OS you can sync your contacts and music, or even restore from a backup (as long as you've synced your i Phone and made a backup previously on the same computer). 99% of the time your phone will turn on completely fine. then it is crucial to go into your settings and remove your password.
Barring OTA updates, any update that is done through i Tunes runs the risk of several errors and one of them, the 4013/4014, is our concern here.
Put simply, the error is hardware related but like all things digital, you don’t really get to fix this one without your share of head-banging.: This means that the modem firmware could not be updated.If you are performing a downgrade (1.1.4 to 1.1.3, for example), this is normal.You will need to use a tool like independence (MAC) or jailbreak 1.1.2 (PC) to boot the phone out of recovery mode then your downgrade should be completed.If your phone says “needs repair” and you tried to restore and got this error, you probably have a permanently damaged phone.just remember not to let your phone turn off again as this will happen.