[Galaxy S II Themes and Apps] Td8f4:
USE ANY USB KEYBOARD WITH YOUR USB OTG SUPPORTED ANDROID DEVICE!!!!

I've been experimenting with Wifi cards and the samsung galaxy sII

and realized people where having the same problem as i was having with plugging in usb keyboards.

turns out it all has to do with a vendors permission issue. if your device is not in the list, it will seen as "unknown".

As it turns out you can simply add your device and it'll work. mind you it was to be a simple input device and will have the power constraints of 100mW. But if u can compile a driver and splice in dc power.... skies the limit!

steps:

1. Android must be rooted (not going over that) and must support USB OTG (on-the-go)

2. You can either buy a USB OTG micro to female adapter on ebay for like 4 bucks. i decided to make one myself since i have lots of spare parts.

Heads up: a simple micro usb to female usb connector IS NOT THE SAME AS A USB OTG CABLE, they may look the same but the OTG cable has Pin 4 grounded to pin 5 on the micro usb side. This is how the device distinguishes aach type of cable. WARNING: IF MAKING THIS YOURSELF DO NOT CROSS BLACK AND RED, this WILL fry your PHONE.if you don't know you rway around a soldering iron, just buy one :D

3. Check what manufacturer your device is on this chart, if it's not there, check on the internet or plug the usb device into a linux box and run "lsusb" in the command promt and look for your device, the number will look like this:

Bus ### Device ###:ID <THIS ONE!>:<more numbers> " Company"

here's the chart: (taken from here :http://developer.android.com/guide/developing/device.html)

Company	USB Vendor ID
Acer	0502
ASUS	0b05
Dell	413c
Foxconn	0489
Garmin-Asus	091E
Google	18d1
HTC	0bb4
Huawei	12d1
K-Touch	24e3
KT Tech	2116
Kyocera	0482
Lenevo	17EF
LG	1004
Motorola	22b8
NEC	0409
Nook	2080
Nvidia	0955
OTGV	2257
Pantech	10A9
Philips	0471
PMC-Sierra	04da
Qualcomm	05c6
SK Telesys	1f53
Samsung	04e8
Sharp	04dd
Sony Ericsson	0fce
Toshiba	0930
ZTE	19D2

eg my keyboard is lenovo , so code is 17EF, you get it

4. log in as root, mount system as read-writeable, Create this file: /etc/udev/rules.d/51-android.rules

if its already there, then just append the command you want after.

if you dont have root explorer or otherwise installed here is how to in bash:

su
su
mount -o remount,rw system /system
mkdir -p /etc/udev/rules.d/
cd /etc/udev/rules.d/

now in the "51-android.rules" file add this line (or more for more device support):

SUBSYSTEM=="usb_device", SYSFS{idVendor}=="<VENDOR CODE>", MODE "0666", NAME=="<VENDOR>"

my example with my lenovo keyboard:

SUBSYSTEM=="usb_device", SYSFS{idVendor}=="17EF", MODE "0666", NAME=="lenovo"

save.

5. plug in the USB OTG cable and plug in your keyboard or other device. it sould say "usb host cable" then "usb device".

on some keyboards the numlock light wont work, due to the fact of power contraints on the phone, you can add support by plicing in 5v DC in to the line (soldering needed) or you can probably jsut attach a powered usb hub :D

And thats IT, now you can actually type documents at a reasonable pace, without paying an arm and a leg for a supported bluetooth keyboard!!!

-td8f4

* to moderators i know i have less than 50 posts hopefully i dont get banned, i thought this was considered dev*