5,593,587 Members 38,846 Now Online
XDA Developers Android and Mobile Development Forum

USB OTG

Tip us?
 
SebastianFM
Old
(Last edited by SebastianFM; 3rd September 2012 at 11:05 AM.)
#1  
Senior Member - OP
Thanks Meter 5286
Posts: 636
Join Date: Dec 2009
Location: Warsaw

 
DONATE TO ME
Default USB OTG

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:
Code:
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
To mount third, NTFS partition to /sdcard/usb2 directory:
Code:
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
To unmount:
su
umount /sdcard/usb1





The Following 83 Users Say Thank You to SebastianFM For This Useful Post: [ Click to Expand ]
 
redoano
Old
(Last edited by redoano; 7th August 2012 at 07:55 PM.)
#2  
redoano's Avatar
Senior Member
Thanks Meter 94
Posts: 333
Join Date: Jun 2008
Location: Erzurum
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?
Many Nokia Models
Eten M500 (bricked)
Eten X500 (bricked)
HTC Touch HD aka Blackstone (sold)
HTC HD2 aka Leo (sold)
HTC Sensation-Pyramid (Current phone, with:ViperS 1.5.2, Bricked Kernel)
HTC Butterfly or M7 ( In the future )


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

"THANKS" BUTTON COSTS NOTHING


 
SebastianFM
Old
#3  
Senior Member - OP
Thanks Meter 5286
Posts: 636
Join Date: Dec 2009
Location: Warsaw

 
DONATE TO ME
Quote:
Originally Posted by redoano View Post
Yessss, this is the development we were waiting for, thanks for your work. we need external power source on hdd, but do we also need it on usb sticks?
Unfortunatelly yes. But there is one advantage of this, it saves battery.
The Following 7 Users Say Thank You to SebastianFM For This Useful Post: [ Click to Expand ]
 
ninjabadger
Old
#4  
ninjabadger's Avatar
Senior Member
Thanks Meter 102
Posts: 485
Join Date: May 2012
Quote:
Originally Posted by SebastianFM View Post
Unfortunatelly yes. But there is one advantage of this, it saves battery.
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.
Note 2 Android 4.3
 
redoano
Old
(Last edited by redoano; 7th August 2012 at 11:11 PM.)
#5  
redoano's Avatar
Senior Member
Thanks Meter 94
Posts: 333
Join Date: Jun 2008
Location: Erzurum
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?
Many Nokia Models
Eten M500 (bricked)
Eten X500 (bricked)
HTC Touch HD aka Blackstone (sold)
HTC HD2 aka Leo (sold)
HTC Sensation-Pyramid (Current phone, with:ViperS 1.5.2, Bricked Kernel)
HTC Butterfly or M7 ( In the future )


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

"THANKS" BUTTON COSTS NOTHING


 
mike2nl
Old
#6  
mike2nl's Avatar
Senior Member
Thanks Meter 517
Posts: 3,570
Join Date: Jul 2009
Location: Near Utrecht
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.
Sensation XE: 光盤 6, PYDX & AIO latest
SGT 10.1 3G: JellyBeanICS v8, Yoda 2.4
SGT 7 3G: CM 11, 4.4.2 storm31
HD2: 光盤 3.7, marc 0.2.3
Teams: CHTBeta & Art, CD
Apps: 3D Photo Browser Mods
Android Test Links: USB Echo
 
galaxys
Old
#7  
galaxys's Avatar
Senior Member
Thanks Meter 458
Posts: 7,506
Join Date: May 2007
Location: Vegas & Cosmos
Super kernel stuff again! Great work sebastion!!
LGNexus5 <LGNexus4sold <HTCSensationsold <HTCNexus1sold <HTCHermessold <LG5250sold <MotorolaStarTacvault.
The XDA Cheerleaders hope your devices are winners! Happy Flashing!

Galaxys Enterprises: Fashion is a Passion - Life in the Cardio Fast Lane - High Energy Techno Mix - Reach for the Universe!
 
rawrfische
Old
(Last edited by rawrfische; 7th August 2012 at 09:49 PM.)
#8  
rawrfische's Avatar
Senior Member
Thanks Meter 144
Posts: 481
Join Date: Aug 2011
Location: California
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.
 
SebastianFM
Old
(Last edited by SebastianFM; 7th August 2012 at 10:37 PM.)
#9  
Senior Member - OP
Thanks Meter 5286
Posts: 636
Join Date: Dec 2009
Location: Warsaw

 
DONATE TO ME
Quote:
Originally Posted by rawrfische View Post
So in theory, you could use this with a USB y-cable and a rechargeable USB battery pack, right?
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.

Quote:
Originally Posted by rawrfische View Post
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.
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.
The Following 3 Users Say Thank You to SebastianFM For This Useful Post: [ Click to Expand ]
 
saigon66
Old
#10  
saigon66's Avatar
Senior Member
Thanks Meter 36
Posts: 501
Join Date: Feb 2008
Where can i buy this set? Thanks

Verstuurd van mijn GT-P7500 met Tapatalk
DEVICE: HTC Sensation
ROM: [Android 4.3.1] CM10.2 with PMEM [11/1/2013]
Firmware: User-Friendly 3.33 Universal
Recovery: 4ext Recovery Touch 1.0.0.5 RC9 build:40
HTC-RIL: 4.0.0037HQM
RADIO ver. : 11.76A.3504.00U_11.24A.3504.31_M
BOOTLOADER: 1.27.1100
CID : HTC_044
MID: PG5813001
SD Card: SAMSUNG microSDHC 32GB Class: 10

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes