iPhone 5 error 4005 is an error that usually occurs when your iTunes version and needs updating or there are USB connection issues.
Some of the solutions to this error include testing, replacing, or repairing the hardware.
Please see our in-depth walk-through solutions below.
It is highly advisable to do DFU restoration multiple time before declaring a hardware failure.
Restore the device using Device Firmware Update Mode
Run iTunes then connect the original USB cable to your computer and iPhone 5.
Then, press and hold for 10 seconds the power and the home button.
After 10 seconds release the power button only.
Release the home button when a message “iTunes has detected an iPhone in recovery mode” prompt on your monitor.
When a confirmation message to restore your iPhone 5 appears, click OK.
Wait for the firmware update to finish and see if error 4005 disappeared.
NOTE: If it fails, proceed with testing the hardware.
Test your hardware
NOTE: If the error is caused by a faulty hardware, please send your device to Apple service center for warranty claim.