Android Usb Host and Hidden Devices

Android USB host and hidden devices

To enable USB host API support you should add a file named

android.hardware.usb.host.xml
and containing the following lines:

<permissions>
<feature name="android.hardware.usb.host"/>
</permissions>

into folder

/system/etc/permissions

in that folder find file named

handheld_core_hardware.xml or tablet_core_hardware.xml 

and add

<feature name="android.hardware.usb.host" />

into <permissions> section.

Reboot your device. Usb host api should work.

Tested on CUBE U30GT with android 4.

Android USB Host - Why is a thumb drive visible while another Mass Storage Device is hidden?

UPDATE

As pointed out by Chris Stratton in the comments, the issue had nothing to do with OTG. The device I was trying to read was a FAT12 File System, which was unsupported by that phone.


Well after reaching out to an engineer in the company that produces the device with which I was trying to connect, I finally have an answer. USB OTG is an extension of the USB protocol. If the device does not support the OTG extension (which this particular device did not) and those extensions are needed by the USB mass storage drivers on Android, then the usb device will not be successfully enumerated by the host.

How to detect usb in android tablet which act as USB Host?

Check if your device supports host mode.
try this perhaps this may help: Android USB host and hidden devices

How to detect USB device in Android tablet which acts as USB Host?

I had the same problem and I suspect that the host feature may be disabled on your tablet so I suggest that you check.

The following post is probably the best reference to look at as it is concise
Android USB host and hidden devices

You should be able to check if the file android.hardware.usb.host.xml exist with the adb shell

getDeviceList() always gives empty in Android

It works fine for me(for Samsung devices) thanku to @Gurupad Mamadapur,

To enable USB host API support you should add a file(xml file) and that containing the following lines:

<permissions>
<feature name="android.hardware.usb.host"/>
</permissions>

into folder(Location of the file)

/system/etc/permissions

in that folder find file named
handheld_core_hardware.xml or tablet_core_hardware.xml

and add

<feature name="android.hardware.usb.host" />

and
Reboot your device. Usb host api should work.

Source: Android USB host and hidden devices

But for Motog device still not detecting

USB host mode on ICS 4.0.3 - what am I missing?

I decided to re-check everything. The android.hardware.usb.host.xml file definitely was in the /system/etc/permissions directory, and it had appropriate file permissions, but when I came to look at the contents I found that it contained the HTML description for the page at http://code.google.com/p/ics-nexus-s-4g/source/browse/trunk/system/etc/permissions/android.hardware.usb.host.xml rather than the raw text file that can be downloaded from there. Looks like my instruction to "install the file from this link" was taken too literally! Putting the correct contents in the file made it work a treat. Relief!!



Related Topics



Leave a reply



Submit