How to Disable USB Accessories on the iPhone Lock Screen

The Brute Force Vulnerability

By default, the iPhone’s Lightning or USB-C port remains fully active for data transfer even when the phone is locked. This is a massive security vulnerability. Advanced thieves and law enforcement agencies utilize specialized USB hacking hardware (like GrayKey boxes) that plug into the port and attempt to rapidly brute-force the passcode or extract unencrypted RAM data. If your phone is confiscated or stolen, leaving the data pins active on the USB port is highly dangerous. You must force the operating system to completely shut off the data connection after the phone has been locked.

How to Turn Off USB Accessories

You can permanently sever the USB data pins from the locked state via the Face ID settings.

  1. Open the Settings app on your iPhone.
  2. Scroll down and tap on Face ID & Passcode (or Touch ID & Passcode).
  3. Enter your device’s master PIN code to access the secure menu.
  4. Scroll down to the section labeled “Allow Access When Locked.”
  5. Locate the toggle switch labeled Accessories.
  6. Toggle this switch to the Off position (the green background will disappear).

A Hardened Port

The change takes effect instantly. The iPhone will now actively monitor its lock state. If the phone has been locked for more than one hour, the operating system will completely sever the data connection to the physical charging port. The port will still accept electrical power to charge the battery, but it will become entirely blind to data. Any hardware hacking box plugged into the port will fail to establish a connection, guaranteeing your encrypted data remains perfectly safe against physical brute-force attacks.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.