iTunes Unknown Error (4013)
An interesting thing happened to me yesterday while attempting to update a fully functioning iPhone 5S to iOS 10.3.1. The iPhone was running 10.2.x. I updated it and the update failed. No big deal I thought, so I plugged it into iTunes to do a Restore. To my dismay the restore failed almost immediately with an "An Unknown Error Occured (4013)". So I did the normal stuff, I tried a different cable, tried a different computer, macOS and Windows 7 and so and so on. Apple has a good article on troubleshooting update or restore failures HERE.
During these multiple attempts I noticed something. When the iPhone would fail just as the restore was initializing, the screen on the iPhone would blink red for a split second. Given that I thought this phone was a total loss at this point I thought I should remove the screen and try the restore again. Sure enough, the phone restored normally. No more Unknown Error 4013. I re-attached the screen and it worked. The iPhone now boots up, but a remnant of the error remains.
This was a fully working iPhone prior to this update, but even now after a restore, when the iPhone boots up, the screen flashes red for a split second but it then works and the phone boots normally. That's not all the issues though. Now neither my forward facing or selfie cameras work normally. Neither will initialize unless I open the Camera app and go to Video recording mode first. If I go to still camera mode first they both just sit at black screens. If I go to video mode then back to camera mode, they work fine. But I can not go from still photo mode to still photo mode. I must always go to video mode to initialize either camera even if I had already been using that camera in still photo mode. This isn't a surprise to me as I have seen this dozens of times particularly on the iPhone 5, 5C and 5S. About 20% of the time when I do a screen replacement, one of the cameras stops working properly. Sometimes reseating calbes can help, but most often I have found the cameras are either just dead or iOS has issues initializing them. This iPhone however had two perfectly good working cameras prior to this update failing. So who knows if this is linked or not.
If you are stuck with an iPhone that will not restore due to Unknown Error 4013 and have had a 3rd party screen replacement, try detaching the screen and doing the restore. My suspicion is that Apple is somehow checking for 3rd party screen replacements in a similar fashion to the Error 53 for the TouchID issue a while back. If you run into this, please drop me an email using the link below. I would like to hear from others. It is entirely possible my screen and camera system died at the same time I did the update, but these circumstances seemed a little fishy to me. My iPhone 5S is just a test and loaner phone I use here at my office, so I am not out much, but if this can help others I wanted to post a quick note on my fix for this issue. Good luck to you if you have run into this error.
Office: 301 Minnesota Ave North, Aitkin, Minnesota 56431
I am available for a free phone consultation prior to any work commitment or cost to you. Please contact me via phone or email in order to hire me or to inquire about my services.
iCanHelp! provides Apple Mac, iPhone and iPad technical support and Repair in the Aitkin, Cuyuna, Brainerd Lakes and surrounding areas of Central Minnesota. (MN). iCanHelp!'s service area includes but is not limited to Aitkin 56431, Brainerd MN 56401, Baxter MN 56425, Pequot Lakes MN 56472, Breezy Point MN 56472, Nisswa MN 56468, Pine River MN 56456, Jenkins MN 56456.