yashsingh1/xdaforums huggingface dataset:
[HTC Sensation] SebastianFM:
When you connect USB OTG Adapter to the phone it is switched into USB Host mode. The board of HTC Sensation isn't capable of giving power to USB peripherals, so USB Y Cable or USB Hub with external power supply is required to connect USB peripherals to the phone. You can connect different types of USB peripherals: USB Hub, USB mass storage devices (e. g. USB HDD, USB Stick, MP3 player), USB HID devices (e. g. USB mouse, USB keyboard, Wireless mouse or keyboard with USB receiver).

Requirements:

Micro USB Host OTG Cable with USB power

or

USB OTG Adapter + USB Y Cable

or

USB OTG Adapter + USB Hub with external power supply

My Overclocked kernel (v1.5.2 or newer) for HTC Sensation

My Overclocked kernel (v1.4.0 or newer) for HTC Rezound

/sdcard/usb

Create usb directory on the root of your SD card.

/system/etc/vold.fstab

If you want to enable automatic mounting of USB mass storage devices to /sdcard/usb directory by the system, you need modified vold.fstab. This file is included in my kernel package and will be updated during install.

Tested USB peripherals:

LogiLink USB Hub with 4 USB ports.

Seagate 250GB USB HDD.

Sandisk CRUZER 4 GB USB stick.

Sandisk Sansa Clip MP3 with 2 GB storage.

Logitech USB mouse.

Logitech Wireless mouse and keyboard with USB receiver.

USB mass storage devices:

If you connect USB mass storage device then first FAT/FAT32 partition (if any) will be mounted automatically to /sdcard/usb directory and Media Library will index its content. Files can be viewed using Gallery, Music or any file manager. It won't happen if other USB mass storage device already has automatically mounted partition.

You can manually mount FAT, FAT32 and NTFS partitions.

For example, to mount first, FAT/FAT32 partition to /sdcard/usb1 directory:

[b]su
mkdir /sdcard/usb1
mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,dmask=0702 /dev/block/sda1 /mnt/sdcard/usb1[/b]

To mount third, NTFS partition to /sdcard/usb2 directory:

[b]su
mkdir /sdcard/usb2
mount -t ntfs -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,dmask=0702 /dev/block/sda3 /mnt/sdcard/usb2[/b]

To unmount:

su

umount /sdcard/usb1
[HTC Sensation] redoano:
Yessss, this is the progress we were waiting for, thanks for your work. we need external power source on hdd, but do we also need it on usb sticks?
[HTC Sensation] SebastianFM:
Unfortunatelly yes. But there is one advantage of this, it saves battery. ;)
[HTC Sensation] ninjabadger:
This is amazing, yet again your kernel proves the best, so happy I came back.

Going to order cable now!

Sent from my SuperSensation.

ViperS ROM 1.1.0.

D-SHEL Undervoltage mod.

Anker battery.
[HTC Sensation] redoano:
No problem for me :) I always carry a usb cable with me =) From now on i will carry the one also with female standard usb socket, it seems :) Can i use it with vipers?
[HTC Sensation] mike2nl:
Amazing and cool.

Sebastian so as allways.

But where o can get the right sensation xe cable?

Has someone a link or a hint, thank you.
[HTC Sensation] galaxys:
Super kernel stuff again! Great work sebastion!!
[HTC Sensation] rawrfische:
So in theory, you could use this with a USB y-cable and a rechargeable USB battery pack, right?

/edit

I just realized you would need a USB OTG y-cable with a male and female connector at the split. I'm not even sure such a cable exists. :p
[HTC Sensation] SebastianFM:
Yes, there shouldn't be any differences in connecting second plug of USB Y-cable into USB charger, USB power supply, PC, car USB charger or USB battery pack.

No. You need common USB Host cable (Micro USB Male <-> USB A Female). If you haven't USB HUB with external power supply, you also need USB y-cable (2 x USB A Male <-> USB Mini Male). This is standard cable used to connect USB HDD when single USB port provides insufficient power.

To connect e. g. USB Stick, you must use USB A Female to Mini USB Female Adapter at the end.
[HTC Sensation] saigon66:
Where can i buy this set? Thanks

Verstuurd van mijn GT-P7500 met Tapatalk
[HTC Sensation] luis4ever:
Not working on ViperS 1.1.0.

Phone connected to OTG Cable, USB Male-Male from OTG to HUB. Flash Memory to HUB and HUB to power. usb created in root of SdCard. Am i missing something?
[HTC Sensation] gallardo5:
It`s just a guess, but maybe try with AOSP rom, like CM9? Check it it will work
[HTC Sensation] SebastianFM:
On ViperS 1.1.0 files from USB storage won't be added to Media Library because this ROM is based on HTC Ville C2 ROM and it hasn't added /sdcard/usb directory to storage list. But if you connected everything correctly, USB storage should be still automatically mounted to /sdcard/usb.

Did you flash Overclocked kernel v1.5.1?

Run command ls /dev/block in Terminal Emulator and check if output contains sda and sda1. If not, send me your logcat and dmesg log.
[HTC Sensation] luis4ever:
Which rom are you running with Host working? Also, should i use TE with or without OTG connected?

This is what i get without OTG connected:
[HTC Sensation] SebastianFM:
With connected USB OTG cable and USB peripheral.

If output doesn't contain sda and sda1:

1. Reboot your phone.

2. Connect everything after boot.

3. Run commands: logcat -d -v time > /sdcard/logcat.txt, ls -l -R /sys > /sdcard/sys.txt, dmesg > /sdcard/dmesg.txt in Terminal Emulator.

4. Send me or upload these three files from your SD card.
[HTC Sensation] gallardo5:
Does it work with mouse, keyboard or USB gamepad?
[HTC Sensation] jazzzzzzz:
I have been waiting for this months.....I'm gonna try this for sure....

:) :) :)
[HTC Sensation] luis4ever:
You don't need that cable. Just use a Micro USB with 5 pin to USB Male, an adapter with 2 USB Female, an USB cable with both male and a HUB. Connect Micro USB to phone(be sure it has 5 pin), connect the adapter to Female. Then connect the Male-Male cable to adapter and HUB. Connect USB or keyboard and HUB to power. You will need more cables but they are a lot easier to find than a 2 Male-1 Female.
[HTC Sensation] jazzzzzzz:
Delete
[HTC Sensation] luis4ever:
Do you mean the original cable that came with HTC's? At least my USB cable has 4 pin only. BB cables have 5 pin we need. This is the same config i use for the One S. Original not works and BB ones work.
[HTC Sensation] mike2nl:
No issue at all. If you have questions, please ask. We will help you out of your issues.

I think i will make some photos today to show what is working right now....
[HTC Sensation] superevans:
Thanks :) Totally appreciate your support. Thanks to SebastianFM for the kernel that makes USB OTG working.
[HTC Sensation] mike2nl:
Here a little update over the tested hardware. All done today ;). Ok the quality is not the best, but for an overview is that enough...
[HTC Sensation] gallardo5:
I think no one seen this, so it`s like bump. I think it can be a big saving of money, buying this and a PS2 controller is cheaper than original PS3 controller, and lot of people has PS2 controllers already;) does anyone know if it would work or not?
[HTC Sensation] MMoodyB:
I tried a PS2 pad+Play.com PS2>USB conveter & the right analogue stick wouldn't function properly. A different converter might work, but it's a bit of a gamble.

A cheap PC gamepad I bought from Maplin - Speedlink Strike - also had the same problem with the right analogue stick.

If you're running an AOSP or AOKP based rom then I'd just get a 2nd hand genuine PS3 pad from a Game store & the SixAxis app off Google Play.

Much less hassle & guaranteed to work pretty much flawlessly.

And should be an even better option if the SixAxis author adds wired PS3 pad support as you'll then be able to use it with Sense based roms.
[HTC Sensation] nikos444:
I prefer to use CMX...so Sebastian` kernel doesn`t work with CMX. I installed TAM CORE kernel, which also include USB OTG. With TAM CORE kerenel I can use usb-mouse, but I can`t mount usb flash card (with FAT32). When I plug flash card there is no reaction and folder `usb` on /sdcard/ is emprty...

Who know how USB OTG work on TAM CORE kernel???
[HTC Sensation] arabi.theboss:
Thanks

awesome dude

works great with sensation xe with elegancia rom and of course with other roms too

thanks a lot

u r truly BOSS
[HTC Sensation] mike2nl:
1st you can do is check in Terminal if your USB device is present.

Otherwise you can use some tools i have tested -> link to my posting
[HTC Sensation] MMoodyB:
Tamcores kernel doesn't mount to 'usb'. It mounts to a different folder name.

What it is I can't remember right now, but of you search the OpenSensation thread for USB OTG it should give you the correct folder name.
[HTC Sensation] mike2nl:
+1 right..

so as one of the tools in my posting. I don't remember it right now, but it was one of the tested one.
[HTC Sensation] TamCore:
Wrong. My kernel has nothing to do with the used mountpoint. Create your desired mountpoint, use the command from OP and all is good. OpenSensation uses /mnt/usbdisk per default (see this commit)
[HTC Sensation] creonx:
Hey, can anyone test it with an Canon EOS Digital Camera WITHOUT Power and WITH Power? I can need it without any power for outdoor photography. otherwise would it run with a mobile powerbar?

its very important! i wait for this, since i have this phone :'( i dont want to buy a tablet with otg ...
[HTC Sensation] The_Hamster:
Works perfectly with power with my EOS 1000D, but not without power :(
[HTC Sensation] creonx:
The_Hamster

Thanks for your reply :) can you test it with any powerbar?
[HTC Sensation] bazji:
Guys anyone know if this can be mounted on the phone I've tried all the options in the op. I've got USB sticks working just not this

http://www.currys.co.uk/gbuk/wester...ternal-hard-drive-1tb-black-03661634-pdt.html

Regards

Barry
[HTC Sensation] Omertron:
Do you need a "original" or "htc" branded OTG cable for this?

I've ordered a generic one for my Xoom (~£1.50), just wondering if I can expect it to work with the sensation or if I'd need to get another one.
[HTC Sensation] TamCore:
Every OTG cable that fits into the sensations microusb slot should work.
[HTC Sensation] Omertron:
Great, seeing as it arrived today, I shall test it out :D
[HTC Sensation] gallardo5:
Someone said before that the one from SGS3 wouldn`t work. But every cable except that will work;)
[HTC Sensation] mike2nl:
Hi Barry,

- have you conneted this harddrive once to your PC and have you checked the FAT system (16,32,ntfs,ext4,mac)?

- How many partitions do you have on that drive?

- Depending on the FAT system you have a max of possible partition/drive size (Kb, Mb, Tb and so on ;))

-- Please report on that.

Next you can do is a test and make a partion with, let say, 4 GigaByte.

That must run with the phone.

----------------------------------------------------------------------

I have tested a lot of things with the vold.fstab and have a lot of settings.

Sam Mehat is the one who has figured out most of the things.

I have added things to my vold.fstab to get extra things running.

On chinese site we can found a lot of help ;).

They are not stupid, only the written language is an issue, sometimes

---------- Post added at 09:51 AM ---------- Previous post was at 09:06 AM ----------

+1 it is working, because i have one of them.
[HTC Sensation] EndOfDays-Wildfire:
Hey guys, is that the only thing I will need to connect my Xbox 360 Controller(also got the Wireless Receiver) with my Sensation(running ARHD 6.7.2)?

http://www.ebay.de/itm/310421036965?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649#ht_2247wt_1139

(you can just translate it to English if you don´t understand German)

Thanks in advance.
[HTC Sensation] mike2nl:
That cable is and must be working. They are all the same, one producer worldwide.

Sometimes it is for SGS, sometimes for tabs and sometimes for the XE.

All the same...

Update:

you need a power source too. Possible an cheaper USB 2.0 hub (4 port)

with power adapter...

Not all XE's have an self powered USB Host port. strange enough, because

on my site i can connect my Kingston 4 or 8 GB USB-Stick and it is working
[HTC Sensation] tessut:
Dafoug ? Hmmm where did you buy your sensation xe ?
[HTC Sensation] LEGOracer69:
I have HP usb hub, some kind of leather edition, I couldn't find it in the internet, but it has the same ports as LogiLink USB Hub in Sebastians thread. Anyway I have no charger, and my configuration looks like that:

Power source on micro usb (usb charger), Phone on original cable on one USB port in HUB, pendrive or mouse on the other one. I have the power source, but it is still not working. Why? Please help me.

EDIT1:

OS: ARHD 6.7.2

Kernel: My Overclocked 1.5.2

Device: z2710 (Normal Sensation)

No supercid
[HTC Sensation] SebastianFM:
You need USB OTG Adapter.
[HTC Sensation] LEGOracer69:
Okay, so there is any electricity?
[HTC Sensation] taffypride:
oh hell yes!

Means I can now watch movies from my external HDD while in the car....as long as the kernel is CM9 compatible....
[HTC Sensation] MMoodyB:
Use Tamcore's kernel if you need an AOSP based one with OTG support.

http://files.tamcore.eu/android/?dir=tamcore-kernel
[HTC Sensation] bazji:
hi

sorry for late reply been away for a few days.

just checked the drive and it is an 1TB NTFS it has no other partitions on it.

regards

barry
[HTC Sensation] AleyKsi:
I just bought a flexible USB keyboard.

Was usable pretty quickly but the key layout was stuck to QWERTY even though my keyboard was a french (AZERTY).

I had to transfer thoses files and follow the step described here: http://xdaforums.com/showthread.php?t=1499353

Might be useful
[HTC Sensation] nidish_5505:
nokia c7-00 usb otg cable

i just bought a cable for my nokia c7-00 and i need help.....when i connect a pendrive it shows usb uses a lot of power.....on ur post it was given tht external power supply should be connected.....pls can u tell me how can i do tht.....or shud i change the cabl ........or is it safe to continue using ignoring this warning.......

please reply asap.......
[HTC Sensation] kometbaru:
Dear all,

I tried this with my EVO3D CDMA.

I connect my ext hdd ( NTFS partitioned ) and mounted.

it can show all files in my ext hdd thru root explorer.

but i can only read *.txt and*.apk files, other dont ( mp3, flv, mp4, doc etc ).

any advice !

thanks
[HTC Sensation] Quincux:
How do you doing that? Via terminal?

Sent from my HTC Sensation Z710e
[HTC Sensation] kometbaru:
yes mount it via terminal.

works now ( convert the partition into fat32 ).

all files can be read now :)
[HTC Sensation] Quincux:
I can't read any NTFS partition, only FAT32, I have tested a USB Stick and external HDD both NTFS. Ps3 pad, wireless mouse, and external USB keyboard works great.

Sent from my HTC Sensation Z710e
[HTC Sensation] AleyKsi:
Hayo,

I tried various things, keyboards and mices work wonderfully but i can't get my gamepad, a logitech F310, to work.

The current flows, leds are up but there's no response from the phone. Even apps that are supposed to detect gamepad don't work.

Any solution ?
[HTC Sensation] Vatharian:
Hello!

SebastianFM - thank you very much for your work on OTG. You've just completely obliterated any need for Samsung SGS! And I was close to desperate (I mean buying actual SGS or note).

However:

I've tried 1.5.2 with ARHD 6.7.2 (root and S-off) and it doesn't work. With straight OTG cable (not powered), normal microUSB -> USB-A and female-female A-A connector. I do not have Y-cable.

I've tried connecting low-power mouse - no effect

I've tried connecting keyboard - no effect.

I've tried connecting couple of pendrives - no effect (automount and manual).

When any device is attached dmesg spits something, but I don't have anything beside USB Host Check from Chainfire, and it only displays dmesg log. I'll try to dump it through wireless adb later.

I've also tried several USB hubs (my DELL monitor, Belkin, D-Link, Unitek, 4Tech, and some no-name crap) - they all signal that power supply is connected, but they never go active, - the hub does not turn on - i.e. in D-Link 7-port hub all ports are dark. Devices connected to hubs do not cause any reaction on the phone.

I've scourged through the pages of this thread and it seems that ARHD have some issues with your OTG code. I'll try to notify mike1986 about this.

I'm also worried about your remark, that HTC skipped implementing some code. Will this be very troublesome for your implementation? I must admit, that I'm pretty much addicted to Sense and I'd rather not switch to Cyanogen.
[HTC Sensation] Quincux:
Now I can mount NTFS partitions using USB OTG Helper (search on XDA Android app subforum). All works flawlessly.

How can I disable automount?

Sent from my HTC Sensation Z710e
[HTC Sensation] EndOfDays-Wildfire:
Im using IC 2.4 with 1.5.2 Kernel, Xbox 360 Controller+that Wireless Receiver from Microsoft and I dont get it to work. I connected my phone to an old USB Hub(guess it´s even 1.1 haha ;) ) but mouse, usb sticks and keyboard work fine. Is this maybe a sense bug or am I doing something wrong(saw that someone here confirmed it working so I´m wondering)
[HTC Sensation] tsmarios:
Hello!!

what needs to change in vold.fstab to disable automount?
[HTC Sensation] Quincux:
Delete the last line only. Make a nandroid backup first.

Sent from my HTC Sensation Z710e
[HTC Sensation] jazzzzzzz:
Where to find file in phone
[HTC Sensation] SebastianFM:
/system/etc/vold.fstab
[HTC Sensation] Jaglicic:
I am not able to connect anything with usb otg, using usb otg helper - - - 'no device found', what I am doing wrong?

Cable is working great with SGSIII..!

Venom 1.3.0...and this kernel.

Tried:flash 8gb,external hdd with additional power supply, ps2.

Edit:Tried also to mount with terminal.
[HTC Sensation] razvanwin95:
the best kernel from here!!!
[HTC Sensation] jazzzzzzz:
I have some suggestion for this USB otg..in most phones when otg is connected the phone cannot be charged....but here charging and USB mounting is done simultaneously...the problem here is that when we connect hardisk to a USB fast charging enabled rom the supply won't be able to gave power for the both ..fr example my externel hdd can be successfuly mounted but after some minutes it will unmount itself and the motor of the hardisk is not spinning ...it means that the power supply is not capable of gaving around 800ma to phone and 1A to ext hdd ..so its better to disable charging when otg is connected and its a kernel thing...it will be good to have an option to disable and enable it....may be...:o
[HTC Sensation] Quincux:
Try to add root access to USB OTG Helper. ViperS Superuser give troubles. Update SuperSU binaries.

Pd: I prefer Chainfire's Stickmount, it can mount up 8 USB sticks, HDD or HID devices using a USB HUB.

Sent from my HTC Sensation Z710e
[HTC Sensation] Jaglicic:
Tried...but no luck...I am going crazy...
[HTC Sensation] jazzzzzzz:
Dmesg would help experts..... Post it
[HTC Sensation] Jaglicic:
Edit : Stupid me... :(
[HTC Sensation] Jaglicic:
Can someone please look at this log... I am desperate.. http://db.tt/LPA3djUe
[HTC Sensation] MMoodyB:
I haven't looked at your log as I wouldn't know what to look for, but try rebooting your phone with the usb otg cable+powered hub attached to the phone.

Then once your phone has loaded & you are at your homescreen, attach your usb device to the hub.
[HTC Sensation] boomboomer:
Anyone had problems getting a mouse pointer to show after plugging a mouse in?

Everything I've tried works perfectly, mass storage, keyboard etc but each mouse I try gives the correct clicks and scroll wheel function - but no pointer which makes it very hard to control.

This is using HyperNonSense ROM and Sebastian's excellent kernel.

Thanks.
[HTC Sensation] M3r0De4DoR:
Cable for USB OTG should be included in all capable devices! :(
[HTC Sensation] non1oson:
very cool, can this be done with galaxy s3 and note 2 coming up? same kernels used etc?

thanks
[HTC Sensation] mykar3z99:
Must be use adapter, its worked.. :)

Sent from my Sensation XE with Beats Audio Z715e
[HTC Sensation] non1oson:
ddd
[HTC Sensation] :
I need to know is it possible to connect USB gamepad on Nokia C7 or Nokia 5800 XE via microUSB?

Is it possible to connect USB device like gamepad or flash memory on android phone that does not include USB OTG in spec list of device itself, is it possible to do it with some sort of app, driver, kernel extension... ?

Thanks.
[HTC Sensation] TamCore:
Theoretically you can connect/use every gamepad that is supported by your used kernel.
[HTC Sensation] omit94:
I can't get usb host to work, I've tried it with numerous devices without success. The OTG cable does work with my Archos 70 but on my Sensation it doesn't. My external hdd which is powered on its own spins up when you connect the usb cable, only on my Sensation it doesn't. It's like there is no signal passing through the cable. Can I fix this somehow or is my cable faulty?

Many thanks!

Edit: I have added "android.hardware.usb.host.xml" to /system/etc/permission/ and it says I have API support now, but it still doesn't detect the devices. :(
[HTC Sensation] boomboomer:
It sounds like you may be missing the vital step of the powered USB hub, using the OTG cable by itself produces nothing.
[HTC Sensation] omit94:
But when I use it with a dslr that's powered by itself do I still need it?
[HTC Sensation] boomboomer:
When I use a self powered drive then yes, I have to use a powered usb hub.
[HTC Sensation] omit94:
That's a shame, not really portable then :p

Thanks!
[HTC Sensation] Quincux:
It's needed
[HTC Sensation] chleoj:
pretty c00l...got to try this one :fingers-crossed:
[HTC Sensation] UnixNerd:
EVO 3D

My OTG cable is shipping, anyone know if it works with the HTC EVO 3D, I am running SOS M | VER 2.0 S-Off. I ordered a USB Y and a powered USB hub (for different situations). If using a USB Y (or a powered USB hub for that matter), does it power the host phone as well? I read above that power is required even if using a self powered DSLR, would a USB battery pack suffice? I bet there isn't an easy solution for supporting the MHL video adapter at the same time (would a USB VGA adapter work with this?)... Also (I hope I don't hijack the tread), would it be possible to plug an android into a computer as a HID (run commands on the phone and it type them on the computer as a HID (no software-the computer would recognize it as an HID))?
[HTC Sensation] boomboomer:
Flashing this kernel into an evo will produce some interesting results, for the rest you need to go away search and read.
[HTC Sensation] UnixNerd:
Is host mode support in the kernel or ROM or both (do I just need to find a kernel to support it that would be compatible or do I need to find an entire ROM)?
[HTC Sensation] TamCore:
The main thing is in the kernel. But not all Roms support otg. On them you need to use an app like stickmount.
[HTC Sensation] behnamsarhandi:
Is it possible to do that without Adapter connects my phone ?:confused:

it is possible for htc one x ! in last update .:rolleyes:

So why not Sensation Xe ?!:crying:

please tell me if it possible.:fingers-crossed:
[HTC Sensation] TamCore:
What? You always need an adapter to connect the device with your phone.
[HTC Sensation] vinit91:
how can i get the otg y cable in India ???????? sorry for the lame question.. :P
[HTC Sensation] jazzzzzzz:
I create it myself
[HTC Sensation] HJ200:
Hi there,

I've created a small app to mount and unmount. I need some testers (I myself have this app running on my HTC EVO 3D) to find out if it's really working :)

The app uses HTC SDK and needs Su ofcourse

Disk Mounter
[HTC Sensation] vinit91:
I tried n messed up while soldering :confused:
[HTC Sensation] hinxnz:
Hi :) I gonna make one too, seems like it would be easy.. Is it just a matter of joining all the reds together, (same with the whites, greens and blacks) on 2 female and a male USB's?

Edit: I just tried that anyway and couldn't get it working also tried without using the green and white from the male (powered) usb.. I guess I should stop stabbing in the dark :laugh:

Edit: Ok now I understand here is a video how to engage the host mode :D