How to restrict USB data access on your locked iPhone or iPad

Find out how to block or allow USB data access on your locked iPhone and iPad when it’s connected to a Mac, Windows PC, or other accessories. You can restrict access to protect your device from forced unlocking or allow access if you face difficulties connecting it to other accessories.

Close up of a USB cable connected to iPhone's charging port

USB Restricted Mode prevents devices plugged into the USB-C or Lightning port from accessing data when an iPhone or iPad has been locked for more than an hour. This security measure is in place to make passcode attacks harder and is enabled by default on all iPhones and iPads running iOS 12 and newer.

According to Apple, “If you don’t first unlock your password-protected iOS device—or you haven’t unlocked and connected it to a USB accessory within the past hour—your iOS device won’t communicate with the accessory or computer, and in some cases, it might not charge.”

After iOS cuts access to data if the device wasn’t unlocked in the past hour, USB Restricted Mode limits the port to just charging the devices.

What’s the need for this?

In order to defeat physical data access by forensic firms like Cellebrite and hacking tools such as GrayKey, Apple tightened up the security in iOS 12 and all subsequent versions by narrowing the cut-off window for USB data access via the USB-C/Lightning port from seven days down to just one hour.

As a result, hacking boxes are unable to run code on these devices after the hour is up.

Now that malicious parties have just an hour or less to get your phone to a cracking machine, that alone could cut access by as much as 90 percent, security researchers estimated.

GrayKey hacking box uses iPhone USB data to help law enforcement officials crack your passcode
USB Restricted Access severely curtails law enforcement tools like this GrayKey box.

With this feature, Apple aims to protect its customers in countries where phones are frequently stolen by criminals with extensive resources. The feature should also help in the unfortunate case of your iPhone being seized by a foreign law enforcement agency that may be bound by fewer legal restrictions than under US law.

Hacking tools such as the GrayKey box, pictured above, could crack a typical six-digit iPhone passcode in less than 24 hours —hence, the one-hour security threshold is there to protect from such brute attempts.

To boost this important security protection even further and help its customers defend against hackers and intrusions into their personal lives, Apple lets you adjust if USB accessories are permitted to access a locked iOS device.

How to adjust iPhone USB data access

iOS defaults to preventing USB accessories from connecting to a locked iOS device past the one-hour threshold until you reauthorize. Here’s how you can adjust this behavior:

1) Open the Settings app on your iPhone or iPad.

2) Tap Face ID & Passcode or Touch ID & Passcode and type in your passcode.

3) Scroll to the bottom and toggle the Accessories or USB Accessories option:

  • When “Accessories” is toggled on: USB accessories are permitted to connect to your iOS device at any time, even if it’s been locked for more than an hour.
  • When “Accessories” is toggled off: Accessories cannot establish a USB data connection when your iOS device has been locked for more than an hour.
Accessories option in iPhone passcode settings

USB Restricted Mode is disabled if the Accessories toggle is enabled, and vice versa.

If your USB accessory isn’t properly recognized after you have unlocked an iOS device, disconnect the accessory, unlock your device, and then reconnect the accessory.

Who would want to turn this on?

People with disabilities may want to allow USB data access at all times.

If you use an assistive accessory to enter your passcode, you might want to permit your iPhone or iPad to communicate with your assistive accessory even while it’s locked.

Computer problems?

USB Restricted Mode increases security at the expense of convenience.

You won’t be able to sync with Finder or iTunes after the one hour has expired, unless you reauthorize, because USB Restricted Mode limits the port to charging. If you use iOS accessories or connect your device to a Mac or Windows PC, you may therefore need to periodically re-authenticate with your passcode, Touch ID or Face ID.

Related: What the ‘Trust This Computer’ alert on iPhone or iPad means, and how to untrust previously allowed Macs and PCs

Charging issues?

If you plug a USB accessory based on the iPod Accessory Protocol (iAP) into your iOS device, you may be prompted to unlock the iOS device to permit data access. This affects the following types of iAP devices:

  • CarPlay
  • Assistive devices
  • Charging accessories
  • Storage carts

Some third-party iAP chargers may not work if your iOS device has been locked for more than an hour unless you reauthorize it. Thankfully, Apple doesn’t require you to unlock an iOS device being charged via one of Apple’s own USB power adapters.

Check out next: