USB host and accessories
Talks to USB devices plugged into the phone.
In one line
Can talk to plugged in USB gear on Android; iPhone mostly limits apps to certified devices
Talks to USB devices plugged into the phone.
Reveals attached gear (drives, keyboards, radios, microcontrollers). Android lets an app drive raw USB; iPhone mostly limits apps to MFi devices and cameras.
What it can and can't do
What the user does: You plug in a USB device and tap Allow when asked
It can
- Open a connection to a drive, keyboard, radio or board (Android)
- Remember your choice if you pick Always open (Android)
- Use USB cameras and mics on iPhone 15 and later through the camera system
It cannot
- Use a device on Android without a prompt for that device
- Run raw USB on iPhone; that is iPad only
- Keep permission after unplug on Android 14 and later when it resets
How it differs between platforms: Android apps can drive raw USB after a prompt; iPhone allows certified (MFi) accessories and USB cameras and mics, and raw USB only on iPad.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Supported | Partial |
| First version | Android 3.1 (API 12) | iOS 10.0 |
| Permission or entitlement | android.hardware.usb.host; per device USB permission dialog | com.apple.developer.driverkit.transport.usb (iPad), UISupportedExternalAccessoryProtocols (MFi) |
| Protection level | dangerous | entitlement |
| How access is granted | prompt | entitlement |
| What the user sees | Allow app to access USB device? (with an Always open option) | No raw prompt; MFi chip or DriverKit entitlement |
| How long it lasts | Per device and app, optional default | Per accessory |
| How to take it back | Settings > Apps > Open by default > Clear defaults | Remove app |
| Store policy | None listed | MFi licence for accessories |
| API | UsbManager, UsbDeviceConnection, UsbRequest | ExternalAccessory, DriverKit (iPadOS 16+), AVCaptureDevice external |
| Notes | Android 14 can reset USB permission on disconnect. | iPhone 15 and later USB-C: UVC cameras and mics work through AVFoundation; raw USB for apps is iPadOS only. |
Data you get
What comes back: Raw USB transfers
Shape: stream
How often: up to 480 Mbit/s (USB 2) or 5 Gbit/s (USB 3 on supported phones)
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
vendor id | integer | id | 0 to 65535 | exact |
product id | integer | id | 0 to 65535 | exact |
Technical limits
- Vendor and product IDs expose what is plugged in
The story
What it is
Lets an app talk to things plugged into the phone's USB port, like cameras, keyboards and audio gear.
For you
You plug something in and a pop up asks whether the app may use it. On Android that can be a drive, a microphone or a gadget board. On iPhone, cameras and mics work, but most other gear does not.
For makers
USB turns the phone into a tool for pros. A creator can plug in an audio interface or camera, and engineers can program boards. Android opens raw access to apps. iPhone keeps raw access for iPad.
Where you see it
| Type | Example | Apps |
|---|---|---|
| creative | A musician plugs a studio audio interface into the phone and records a track with a recording app. | GarageBand |
| live | A streamer plugs in a USB camera and microphone and goes live from a phone. | Twitch |
| developer | A hobbyist programs a microcontroller board straight from a phone. | None named |
| games | A gamer plugs a wired controller into a phone for console style play on the go. | None named |
| health | A technician connects a medical or lab sensor and logs readings. | None named |
| enterprise | A shop plugs in a barcode scanner or card reader for the till. | None named |
| security | A hardware security key plugged in proves who you are when you log in. | YubiKey |
Risks
- Unknown gadgets can steal or inject data
- Permission may be remembered
- Data copied from drives
Android and iPhone in short
- Android: Android 14 can reset a USB permission when the device is unplugged.
- iPhone: iPhone 15 and later with USB-C support cameras and mics through AVFoundation. Raw USB access for apps is on iPadOS only.
What the platform says
- Google: USB host. Connect Android to USB gadgets such as keyboards, cameras and drives, and talk to them from your app.
Good uses and abuse
Legitimate uses
- Cameras
- Audio interfaces
- Programmers
Known abuse
- Fingerprinting by attached gear
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 2 of 5 | How much the user has to do |
| Fingerprint bits | 5 | Rough identifying entropy, when known |
History
- 2011-12, Android 3.1 (API 12): USB host mode
- 2022-09, iPhone iPadOS 16: DriverKit for USB drivers
- 2023-09, iPhone iOS 17: External USB-C cameras and mics for AVFoundation
Related capabilities
Related
- External display and casting output. Can show a separate screen on a connected monitor, TV or AirPlay device
Same idea on the web
- WebUSB. Can talk to one USB device you pick from a list
Sources
How well checked: Based on official documentation.