Skip to Content
Platform.Ontology

USB host and accessories

Talks to USB devices plugged into the phone.

Asks you firstHardware and accessoriesWiredAndroid and iPhoneWhile you use it

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

AndroidiPhone
StatusSupportedPartial
First versionAndroid 3.1 (API 12)iOS 10.0
Permission or entitlementandroid.hardware.usb.host; per device USB permission dialogcom.apple.developer.driverkit.transport.usb (iPad), UISupportedExternalAccessoryProtocols (MFi)
Protection leveldangerousentitlement
How access is grantedpromptentitlement
What the user seesAllow app to access USB device? (with an Always open option)No raw prompt; MFi chip or DriverKit entitlement
How long it lastsPer device and app, optional defaultPer accessory
How to take it backSettings > Apps > Open by default > Clear defaultsRemove app
Store policyNone listedMFi licence for accessories
APIUsbManager, UsbDeviceConnection, UsbRequestExternalAccessory, DriverKit (iPadOS 16+), AVCaptureDevice external
NotesAndroid 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)

FieldTypeUnitRangePrecision
vendor idintegerid0 to 65535exact
product idintegerid0 to 65535exact

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

TypeExampleApps
creativeA musician plugs a studio audio interface into the phone and records a track with a recording app.GarageBand
liveA streamer plugs in a USB camera and microphone and goes live from a phone.Twitch
developerA hobbyist programs a microcontroller board straight from a phone.None named
gamesA gamer plugs a wired controller into a phone for console style play on the go.None named
healthA technician connects a medical or lab sensor and logs readings.None named
enterpriseA shop plugs in a barcode scanner or card reader for the till.None named
securityA 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

ScoreValueMeaning
Sensitivity3 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bits5Rough 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

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.

On this page