- Phones and tablets
- iPhone
Error 21
Apple error 21 on iPhone or iPad: possible hardware issue during restore

Risk level
High
Professional inspection is recommended.
Urgency
Medium
Quick answer
Apple lists error 21 among errors that may point to a hardware issue. Before assuming a fault, quit and reopen iTunes, check security software, the cable, computer and network, and restore again.
Safety first
Stop and check this first
- Error 21 alone does not prove a part is broken: Apple only says it may point to a hardware issue. Do not accept a part replacement without a test that confirms it.
- Restore reinstalls iOS and erases all your data. Always choose Update first and avoid restoring without a recent backup when you can.
Safe checks you can perform
- Quit and reopen iTunes, Finder or Apple Devices
- Third-party security software
- USB cable, port and computer
- Restore in recovery mode
Leave these tasks to a qualified professional
- Do not attempt this professional task: Contact Apple Support
- Do not attempt this professional task: Diagnosis at Apple or an Apple Authorized Service Provider
What a technician must be able to justify
A technician is coming
These are the steps they must carry out and show you. Tick them as they work: if steps are skipped, do not accept a part swap.
These are not instructions for opening or handling the equipment yourself. They are the checks that should support a technical conclusion.
Contact Apple Support
What they doIf the error repeats after updating the computer, changing the cable and trying another computer, Apple Support reviews the case and decides whether service is needed.
They must show youthe case number and the steps they asked you to repeat.
In writingthe diagnosis and, if there is a repair, the part and the reason.
Diagnosis at Apple or an Apple Authorized Service Provider
What they doAn Apple or Apple Authorized Service Provider technician checks the device with their diagnostic tools and repeats the restore on their own computer and network.
They must show youthe device test result and that the restore also fails on their equipment.
In writingwhich test failed, which part is replaced, its reference and the reason.
Before accepting a part or repair
Nothing has been shown yet. Do not accept a part swap based on the code alone.
Checks and evidence, step by step
Follow the documented order. An error code identifies the affected system, but it does not prove by itself which part has failed.
- 1
Quit and reopen iTunes, Finder or Apple Devices
No special tools
Procedure
- Who:
- you.
- How:
- if iTunes (or the app you use) is already open, quit it completely, reopen it and repeat the restore with the same cable.
- Result that matters:
- whether the same error number comes back.
- If it does not:
- it was a one-off session glitch; finish the restore.
- If the same number returns:
- go through security software and the connection before suspecting hardware.
- Evidence to keep:
- the time of each attempt and the number shown.
Evidence: iOS update and restore errors
- 2
Third-party security software
No special tools
Procedure
- Who:
- you, on your own computer.
- How:
- check whether an antivirus, firewall or other non-Apple security software blocks connections during the update. Set it up to allow them or turn it off temporarily following its maker's instructions, then try again.
- Result that matters:
- whether the error changes or goes away with protection adjusted or paused.
- If it works then:
- the security software was blocking the connection; keep a rule that allows the update and turn protection back on.
- If nothing changes:
- turn protection back on; the cause is elsewhere.
- Evidence to keep:
- the security software name and the setting you changed.
Evidence: iOS update and restore errors
- 3
USB cable, port and computer
No special tools
Procedure
- Who:
- you.
- How:
- use the cable that came with the device or another Apple-certified USB cable; switch to a different USB port on the computer, never the keyboard port (Apple warns keyboards often lack sufficient power), and if it still fails try another computer. Try again after each change.
- Result that matters:
- which combination of cable, port and computer makes the error go away.
- If it goes away after changing the cable or port:
- the USB connection was the cause; stop using that cable or port for restores.
- If it repeats with another cable and another computer:
- rule out the USB connection and check security software.
- Evidence to keep:
- which cable, port and computer you tried and the result of each attempt.
Evidence: iOS update and restore errors
- 4
Restore in recovery mode
No special tools
Procedure
- Who:
- you, ideally with a backup already made.
- How:
- with your Mac up to date or the latest Apple Devices app on your PC, connect the device with the USB cable, open the Finder or Apple Devices and bring the device to the "Connect to computer" screen (iPhone 8 or later: press and quickly release Volume Up, then Volume Down, then hold the side button). Choose Update first and Restore only if Update does not work.
- Result that matters:
- whether the computer downloads the software and the process finishes.
- If it finishes:
- set up the device and bring your data back from the backup.
- If you cannot reach recovery mode or it fails again:
- Apple says you might need service.
- Evidence to keep:
- the date of your last backup and the final message.
Evidence: If you can't update or restore your iPhone or iPod touch
Where this code applies
A code is meaningful only inside the right product and version context.
Primary scope
- System
- Phones and tablets
- Brand
- Apple
- Product type
- iPhone
Known code variants
- 21
- error 21
- Error 21 height sensor
- Height sensor has been pressed
- iPhone error 21
- iTunes error 21
- Mi Electric Scooter error 21
- Ninebot codigo 21
- Ninebot error 21
- patinete Segway error 21
- patinete Xiaomi error 21
- Roborock Error 21
- Segway error 21
- Segway Ninebot E2 Pro error 21
- Segway Ninebot error code 21
- Xiaomi bateria error 21
- Xiaomi error 21
- Xiaomi error 21 6 km/h
- Xiaomi scooter error 21
What it means
Apple groups error 21 with errors that might indicate a hardware issue during update or restore. Even so, it first asks you to quit and reopen iTunes, check third-party security software, make sure the USB cable, computer and network are reliable, try the restore again and rule out outdated or modified software. Only if it persists after that does a technical review make sense.
Warnings and stop conditions
- Mediumeditorial warning
Error 21 alone does not prove a part is broken: Apple only says it may point to a hardware issue. Do not accept a part replacement without a test that confirms it.
Evidence: iOS update and restore errors
- Highsource verified
Restore reinstalls iOS and erases all your data. Always choose Update first and avoid restoring without a recent backup when you can.
Evidence: If you can't update or restore your iPhone or iPod touch
Symptoms and causes
Probable causes · in order
- Unreliable cable, computer or networkPossible
The error changes or goes away with another cable, computer or connection.
Evidence: iOS update and restore errors
- Third-party security softwarePossible
It goes away when the antivirus or firewall is adjusted or paused.
Evidence: iOS update and restore errors
- Outdated or modified softwarePossible
The device was jailbroken or someone tried to install an earlier version; restoring to the latest version solves it.
Evidence: iOS update and restore errors
- Hardware issuePossible
Apple says there might be one, but only a technical diagnosis confirms it after ruling out the above.
Evidence: iOS update and restore errors
Virtual technician
Does Error 21 still appear after these checks?
Answer a few questions to narrow down the likely cause and the safest next action. Guidance only - it never replaces a professional.
Sources and technical references
- 1
Apple · 2026 · official_doc
- 2
If you can't update or restore your iPhone or iPod touch
Apple · 2026 · official_doc
Was this entry useful?