Fixing OTG USB device unrecognized on Android after major security update

Root Cause Diagnosis

A security update rarely removes USB host support from the kernel. It usually resets or tightens a policy layer above the hardware: an OEM OTG toggle reverting to off, USB data signaling blocked while the screen is locked (Samsung Auto Blocker, GrapheneOS, Android Advanced Protection), a re-applied MDM restriction, or a vendor USB HAL and Type-C firmware mismatch that leaves the port in device role. A peripheral enumerates only if the Type-C port is in host (DFP) role, VBUS is supplied, and the framework allows data. If any of the three fails, no entry appears in UsbHostManager, and the device is silently ignored rather than reported as an error.

Quick Fix

  1. Unlock the phone and keep the screen on.
  2. Turn on the OEM OTG toggle, if your device has one:
    • Xiaomi/HyperOS: Settings > Additional settings > OTG connection
    • ColorOS/Realme: Settings > Additional Settings > OTG
    • Vivo: Settings > More settings > OTG
    • Samsung: Settings > Security and privacy > Auto Blocker; disable it, or disable Block commands and software updates by USB cable
  3. Unplug the adapter and peripheral, then reconnect them with the screen unlocked. If the peripheral has its own power, plug that in first.

To see which layer fails, read the port state from a PC:

adb shell dumpsys usb | grep -iE 'mDevices|data_role|power_role|connected|current_functions'

An empty mDevices with the peripheral attached means the kernel never enumerated it, so continue below.

Step-by-Step Resolution

1. Check the Type-C role and kernel enumeration

adb shell cat /sys/class/typec/port0/data_role      # expect: [host] device
adb shell cat /sys/class/typec/port0/power_role     # expect: [source] sink
adb shell ls /sys/class/typec/                      # port0-partner exists when a partner is attached
adb shell ls /sys/bus/usb/devices/                  # 1-1, 2-1 ... = enumerated devices
adb shell cat /sys/bus/usb/devices/1-1/product
ResultMeaningGo to
data_role is [device]Port is not in host modeSteps 2, 3, 8
data_role is [host], no /sys/bus/usb/devices/* entryVBUS or cable/device faultStep 5
Device listed in sysfs, absent in dumpsys usbFramework policy blockSteps 3, 6
Device in dumpsys usb, not usable in the appPermission or filesystem issueSteps 4, 7

Sysfs paths vary by SoC, and older micro-USB devices use /sys/class/extcon/ instead. Some builds restrict these reads to root.

See also  Resolving USB HID Device Permission Denied on Ubuntu Without Root Access (udev rule)

2. Watch the framework live while replugging

adb logcat -c
adb logcat -s UsbHostManager:V UsbPortManager:V UsbDeviceManager:V vold:V
  • Adding device or USB device attached means enumeration succeeded.
  • No output on plug-in means the port never entered host mode, or data is blocked at the HAL level.
  • Unable to open, Permission denied or avc: denied points to Step 7.

Because the USB port is occupied, use wireless debugging: Settings > Developer options > Wireless debugging, then:

adb pair <ip>:<pairing_port>
adb connect <ip>:<port>

3. Disable USB data restrictions tied to lock state

Recent updates introduced or re-enabled these controls, and the exact labels vary by build:

  • Samsung One UI 6.1+: Settings > Security and privacy > Auto Blocker. Disable it, then retest.
  • Android Advanced Protection (Android 16): Settings > Security & privacy > Advanced Protection. It can block USB data while the device is locked.
  • GrapheneOS: Settings > Security & privacy (USB peripherals; older builds call it “USB-C port”). Set it to allow data, not “charging-only”.

Test with the screen unlocked at plug-in time. If it works unlocked but not locked, a lock-state policy is the cause.

4. Mass storage: check the volume, not just the port

adb shell sm list-disks
adb shell sm list-volumes all
  • A disk: entry with no mountable volume means an unsupported or damaged filesystem. Android mounts FAT32, exFAT and ext4; NTFS is not supported natively.
  • Reformat from a PC, or use a storage-format tool. Partition tables must be MBR or GPT with a single primary data partition.
  • If no disk: entry exists at all, the kernel did not enumerate the drive (Step 5).
See also  Thermal printer feeding continuous paper without stopping on feed button tap

5. Rule out power and cable faults

  • Bus-powered HDDs and some SSDs draw about 1 A at spin-up. Use a powered hub.
  • Use a data-capable cable. Charge-only cables and unbranded Type-C-to-A adapters without correct CC pull-down resistors will not put the phone into host role.
  • Try a different adapter and a known-good peripheral (a keyboard is a quick test) to separate device faults from port faults.
  • Disable battery saver and charge above about 20%. Some OEMs cut VBUS output at low battery.

6. Check for MDM or user restrictions

adb shell dumpsys user | grep -iE 'DISALLOW_USB_FILE_TRANSFER|DISALLOW_MOUNT_PHYSICAL_MEDIA|no_usb|no_physical_media'
adb shell dumpsys device_policy | grep -iE 'usb|mount'

Any match under a work profile or device owner means the restriction comes from your organization’s policy (Intune, Knox Manage, Workspace ONE), not the update itself. Remove the policy or ask the administrator. A restriction removed manually returns at the next policy sync.

7. Application-level access

For apps using the USB host API, check these in order:

adb logcat | grep -iE 'UsbManager|permission|avc:.*usb'
  • The app must call UsbManager.requestPermission() for each device. Declaring USB_DEVICE_ATTACHED with a device_filter only auto-launches the app; it does not grant access.
  • Apps targeting SDK 34+ that start a connectedDevice foreground service must hold USB permission for the device first, or startForeground() throws a SecurityException.
  • Serial adapters (CH340, CP210x, FTDI, PL2303) have no Android kernel driver. They require a userspace library such as usb-serial-for-android inside the app. HID devices, audio devices and storage work without app code.
  • If the OTA updated SELinux policy, an old vendor-specific app may hit avc: denied for usb_device. Update the app.

8. Restore the Type-C role state

adb shell getprop | grep -iE 'usb'
adb reboot

After a large OTA, the USB HAL and Type-C controller state can be stale. A reboot with nothing attached, followed by plugging the adapter in after boot, clears it in most cases. If it persists, boot into safe mode (hold Power off > long-press Power off > OK) to rule out third-party USB blockers, VPN/MDM agents and “USB lock” apps.

See also  Fixing FTDI USB driver latency timer causing slow industrial sensor packet reception

9. Charging hubs and role conflicts

If a USB-C hub with power passthrough is used, the phone may negotiate as power sink and data device (UFP) because the charger wins the PD role swap. Disconnect the charger, use a hub that defaults the phone to host, or connect the peripheral directly.

Why This Fails for Some Users

  • Micro-USB phones: They need an OTG cable that grounds the ID pin. A standard cable never enables host mode, and the update has nothing to do with it.
  • Type-C without host support: Some budget models ship without OTG hardware, or with a vendor kernel that omits host mode. data_role stays [device] and cannot be changed.
  • Xiaomi/Realme/Oppo auto-off timer: The OTG toggle disables itself after roughly 10 minutes without an attached device, and some updates reset it to off. This looks like a post-update regression but is the toggle reverting.
  • Custom ROM or kernel with a stock vendor update: A vendor image from a newer security patch level can mismatch the kernel’s Type-C/PD drivers. Flash a matching kernel and vendor set.
  • Rooted devices: A Magisk module or kernel tweak that touches /sys/class/typec/ or persist.sys.usb.config can revert or conflict after OTA. Disable modules, then retest.
  • Work profile only: With a managed profile, restrictions can apply to the whole device, not just the work profile. Test on a personal device to confirm.
  • DAC, audio and camera peripherals: USB audio routing can be disabled at Settings > Developer options > Disable USB audio routing. USB video class devices need an app that opens the camera through the UVC stack, and many OEM camera apps do not.
  • Wireless-debugging assumption: adb over USB cannot run while the port is in host mode. Use wireless ADB for diagnostics.
  • Enterprise or child-safety controls: Some restrictions are enforced by Google Family Link or a device-admin app and are not visible in the standard Settings pages. Check Settings > Security > Device admin apps.

Leave a Comment