• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps usbManager.getDeviceList() returns empty list after boot

Leodev

Lurker
Jan 27, 2023
1
0
I'm developing small android app using android studio and java. App have to write to serial port of connected Arduino. There is no issues with connection to device once otg cable plugged, but if I reboot the phone while cable is plugged app unable to establish connection. It turned that usbManager.getDeviceList() returns empty HashMap<String, UsbDevice>. If I re-plug cable app able to communicate.

My device is Xiaomi Redmi Note 11 it is unlocked and rooted. I'm attaching device information I've collected during my research.

This app is not gonna be published and going to run on this particular phone only.
 

Attachments

  • sys_devices_drivers.txt
    2.2 KB · Views: 76
  • sys_devices_sys_class.txt
    25.5 KB · Views: 75
  • sys_devices_Virtual.txt
    981.9 KB · Views: 95
Last edited:

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones