Android USB host and hidden devices

Solution 1:

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.

Solution 2:

Excellent! This worked on my Envizen V700NA running Android 4.0.4.

Minor Typo: <feature name="android.hardware.usb.host">

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

Procedure:

  1. adb pull /system/etc/permissions/tablet_core_hardware.xml
  2. Update that file and create android.hardware.usb.host.xml as specified by Greg-q.
  3. adb push android.hardware.usb.host.xml /system/etc/permissions
  4. adb push tablet_core_hardware.xml /system/etc/permissions
  5. Reboot.

Solution 3:

Worked like a charm on a micromax A120 canvas 2 phone (kitkat 4.4.2). now i can control my Arduino! i used busybox tools to do all the command line work (otherwise chmod wouldn't work). my steps (perhaps some were not required):

(0) install PDAnet drivers (http://pdanet.co/a/) on my Windows 8 computer. (1) root the phone using Vroot (now called iRoot) at http://www.mgyun.com/m/en. Very simple, only catch is that the su grant/deny page is partly in chinese, no big deal. (2) install busybox and jackpal's Android-Terminal-Emulator (see github https://github.com/jackpal/Android-Terminal-Emulator or play store https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en )

(3) open a terminal window and become the superuser:

# su

(4) the file system may be read-only, so you might have to remount it:

# mount -o rw,remount -t yaffs2 /

or

# mount -o rw,remount -t rootfs /

or

# mount -o rw,remount -t rootfs rootfs /system

see http://www.pocketmagic.net/write-on-the-android-read-only-file-system/ also, see Android 2.3 : Read-Only file system stuck also, https://ckirbach.wordpress.com/2012/11/27/how-to-remount-system-as-read-write-in-android/

(5) make default.prop read/write:

chmod 666 /default.prop

(6) edit /default.prop, make the following changes:

ro.secure=0
ro.debuggable=1
persist.service.adb.enable=1

see https://android.stackexchange.com/questions/28653/obtaining-root-by-modifying-default-propro-secure or http://bclary.com/blog/2014/04/14/splitting-and-packing-android-boot-images/

Finally, just for completeness, as the answer above says (https://stackoverflow.com/a/11992683/979369):

(7) 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 section.

(8) Reboot your device. Usb host api should work.