• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Virgin Mobile] otg usb?

I've been pretty curious about this too. there are a handful of requirements -

1. usb otg cable. you can hack one up yourself but srsly it seems to range from 3 to 8 bucks USD from spamazon, including prime shipping. I absolutely hate soldering on wires that tiny, so - helloooooooo, nurse!

2. OS > v3.1 - hm, I think all of us on the Victory are set there ;-)

3. mobile drivers. this gets a little dicey - s2, s3 are supported by helper apps like this one Devices | USB OTG Helper (and even reports of s4) - and some devices even already come with the requisite kernel modules built-in, no helper app necessary. BUT a lot of the reports are carrier-specific. so, VMU...?!

honestly, if it it was not for the lack-of-TF-slot-nonsense and the otg special dance, google would have had my money an entire year ago for a Nexus phone.

oh and the painfully obvious

#4. you may want a powered usb hub, probably not required for TF but certainly if you are trying to fire up anything that draws >= 500mA@5V.

I'll probably end up getting several of the inexpensive otg cables and report back, either way.

vae victis!
 
Upvote 0
hrm now I'm also reading that for optimus V, the cable must be powered, no matter if you're only connecting directly to a flash memory. ok that does make some sense.

probably true for Victory as well? h*ll probably just about every phone.

gonna need a bigger boat. er, gonna need to look thru my box-o-bricks and find one that will fit a usb hub. also, all the usb hubs I can see on my desk don't even take external power. wonderful. couple cheapie powered hubs will be here from spamazon in 2 days.

total pilot error lol.

vae victis!
 
Upvote 0
thanks kwknott -

I'm almost sorta glad I did not find the Y cables first - people have differing reports about some Y cables shorting the data pins depending on what brick you have i.e. the device might not show up anyway. which is not even the fault of the cable, but the brick maker. which makes sense - why bother with the other 2 pins if all you're trying to accomplish is charging?

guessing that most or all of the usb-female-A bricks I have, will be like that. a mayan pilot needs no aeroplane*, or some junk. i.e. I will continue to commit pilot error.

vae victis!

*did not link real redshift 'cos demanding-cat-version is just too hilarious
 
Upvote 0
interesting news and weird news, but mostly GOOD NEWS!

I realized I have an old powered SATA dock that has both esata and usb outputs. found an old unused disk and tried variations of 2 different helper apps and of having the disk formatted as fat32, ntfs, and exfat. none of which worked.

but what I did notice was that lsusb was seeing the dock itself (and in fact the kernel was seeing the HD as sg0/sda, although I could not mount or even fdisk it)

but then I slapped my head and looked at the dock and remembered that it is an unholy child of a 4-port usb powered hub, mated to a SATA bridge. (1 usb port goes for the sata bridge, 1 usb port goes to an SD slot, and the remaining 2 usb ports are standard A sockets)

so the next thing I did was plug a mouse into one of the docks usb ports - Victory sez: mouse recognized, and a pointer appears on my screen. plugged a keyboard into the other A port, Victory sez: kbd recognized (and I no longer have to type CLI stuff on the tiny onscreen kdb, yay)

unplugged the mouse, plugged in a fat32 16gb usb flash, and it automounts as /storage/UsbDriveB.

froze the helper app just to make sure it wasn't involving itself, pulled the flash drive, put it back in, and it auto mounted just as the first time.

then I tried undocking then hot-docking of the SATA drive, but no dice. kernel definitely sees it show up as a generic scsi device of type disk, but it still no like.

EDIT: the link seemed necessary /EDIT
 
  • Like
Reactions: saskaraz
Upvote 0
the sata bridge issue must be something about the dock itself, I dnno.

because I just now took a 2.5" sata-usb sled, and plugged it into the dock's hub. it has 2 ext3 partitions on it and 1 ntfs (oh and 1 swap, but whatever)

initially, android UI told me the drive was blank. but fdisk /dev/block/sdb and all 4 partitions showed there exactly as they should.

so I unfroze usb otg helper and ran it, and it mounted all 3 partitions just fine.

not sure if the stock os dislikes the multiple partitions, or if what it disliked was the one ntfs partition.

I'm assuming that ext2/3/4 are built into the kernel, since they don't show up as modules. and after getting the ntfs partition mounted, lsmod did not show any ntfs3g, so usb otg helper must be using the complete userland/fuse method (which is smart of them)
 
Upvote 0
oh and sorry to keep rambling on and on, but

what really cracked me up is that the official samsung page for the VM-branded SPH-L300, they explicitly list a non-Y otg cable as compatible accessory.
Micro USB to USB Adapter
(except if you click the FEATURES tab, it shows a completely different cable that is a Y. except except, the description text on that features tab seems like it is talking about an entirely different charging device. also also, spamazon and newegg only show the non-y cable if you search for that part #) - so maybe some marketing editor typoed on a copy-pasta, or maybe it's the truth.

meh, I'm curious enough, maybe samsung has some hidden secret circuitry in there that tells the device "hey it's ok to send JUST ENOUGH POWER" - also I wish I had searched more thoroughly when buying those 2 cheapie cables - spamazon has the samsung official cable for half the price samsung lists, and only 1 dollar more than one of the no-names I bought. let y'all know what happens whenever it arrives.
 
Upvote 0
so when my cord comes, i should able plug in mouse/kb (basic devices)
the android should load it??
edit, i looked online at Samsung, were suppose have support default? basic like fat or ext2/3 and basic hid devices, if you look at the cable, i bet its nothing but wires inside, don't think will matter unless the grade of wiring, and i taken apart alot usb cables in pass, most are hollow with a wire soldered to pins but knoted or filled with glue
 
Upvote 0
yes, the mouse and kbd (basic HID) totally worked without any helper app. this was with:
1. stock 4.1.2 rom
2. rooted (not sure if this makes a difference in this case)
3. generic otg cable
4. powered hub

doubt it makes any difference, but for reference it was:
- logitech marble trackball
- cheapest-MS-kbd-you-can-buy.
both worked great at the same time.

and also tested:
- ibm/lenovo trackpoint usb kbd/mouse.
instead of "mouse connected; keyboard connected", it only said "keyboard connected". but the trackpoint mouse still worked fine. (makes sense, the pair actually shows up as only a single HID - 17ef:6009)

without the powered hub, when you plug the cable in, the kernel sees new usb device, but only 1 - the built-in qualcomm ehci root hub, i.e. the phone sees itself. but not the connected device. at least not with any device I tried.

as mentioned, fat32 stick (single partition) worked fine on powered hub too. extfs should be built in, but I have not yet tried a device with single ext partition (again I'm unsure why, without the helper app, stock os did not like my drive - it could be multiple partitions that it doesn't like, or it could be that it did not like the ntfs partition) - I'll try some tests later with: single-partition exfat, single-partition ntfs, and single-partition ext2/3.
(but even if that fails, the helper app is free and as mentioned worked fine to mount all sorts of things. it was a little slow, I wonder if it is doing fsck every time to every partition...)

I don't know if the samsung cable is made of magical wish-granting plastic or has any special electrics inside, or you're right it could be exactly the same as the generic cables. but for 9 bucks, and the fact that samsung don't claim any extra power requirement, I was curious enough to pay to find out. spamazon sez it will arrive 7/24, so I'll report back about it when it comes.

I was also very curious what would happen if I connect my wired xbox360 controller - dmesg showed that the kernel knew exactly what it was lol - MS xbox controller. but doesn't act as a mouse or pointer or anything. basically, the left stick and the d-pad both work as UDLR arrow keys, and that was all.

one last bit of interesting trivia - from what I've read, people say otg wants you to have your device connected to the otg cable, before you plug the micro-b connector into the phone. but, with the hub, I was able to connect otg to the phone (and at this point the phone will say recognized usb connection, even if nothing is connected to the otg cable), then connect and power up the hub, phone saw hub, then add and remove devices from the hub at will, and the phone was 100% cool with all of that.
 
Upvote 0
FYI- Game controllers do have keyboard.kl files under /system/usr/keylayout, but only games designed to be played with them will work beyond the UDLR (emulators and apps designed for controllers). You can view the files in the keylayout directory in a text viewer and see which controllers are supported. Here's a quick list:

Vendor_045e_Product_028e.kl = Xbox360 USB controller
Vendor_046d_Product_c216.kl = Logitech Dual Action controller
Vendor_046d_Product_c294.kl = Logitech G25 Racing Wheel (in compatibility mode)
Vendor_046d_Product_c299.kl = Logitech G25 Racing Wheel (in native mode)
Vendor_046d_Product_c532.kl = Logitech Revue Wireless keyboard
Vendor_04e8_Product_7021.kl = Samsung Mobile Keyboard for Android
Vendor_054c_Product_0268.kl = Sony Playstation(R)3 contoller
Vendor_05ac_Product_0239.kl = Apple Wireless keyboard (crapple will be removed from Victorious!)
Vendor_22b8_Product_093d.kl = Motorola Bluetooth Wireless Keyboard

There are also keylayout files for Philips and Samsung remote controls, and seemingly generic remote control layout from Code Aurora Forums, and support for Bluetooth AVRCP.

Most of the above devices are bluetooth, but a couple are usb, and deserve testing.
 
Upvote 0
(the following is all with stock rom, rooted, no otg helper apps involved. 16gb TF card in a usb multi-sd-reader-thing.)

first of all, I finally had the good sense to notice that vold.fstab lists all the external usb mounts (UsbDriveA, UsbDriveB, etc.) and specifies that they ONLY support exfat. which, given that my fat32 sticks worked ok, I suppose implies that exfat is a superset of fat.

so, ok, some experiments:

- single fat32 partition - ok. automounts.

- single exfat partition - ok. automounts.

- single ntfs partition - fail. "blank card." also, no built-in ntfs .ko or ntfs3g/fuse, so cannot mount from CLI. but fdisk recognizes partition as hpfs/ntfs.

- single ext2/ext3/ext4 partition - fail. "blank card." but
$ su
# mkdir /sdcard/foo
# mount /dev/block/sdb1 /sdcard/foo
works fine. i.e. messing around with supported filesystems in one's vold.fstab, would likely fix this.

- 2 fat32 partitions - partial. first partition automounts, second partition does not.

at this point I got bored so did not try e.g. mixing fat32 ntfs and extfs partitions together.

it seems we are supposed to be satisfied with single partition fat devices, exfat apparently superseding vfat, fat32 still supported. I did not test fat16 but I'm guessing that'll probably work as well.

which is probably most of the target market, and to be honest that isn't exactly unreasonable. and at least we do have the helper apps that pick up the slack when needed.

I do wonder how CM deals with this - although my thought it is really more a function of the specific kernel and/or if you have some kind of fuse support installed. (and again, having a less-ignorant vold.fstab configuration)
 
Upvote 0
(the following is all with stock rom, rooted, no otg helper apps involved. 16gb TF card in a usb multi-sd-reader-thing.)

first of all, I finally had the good sense to notice that vold.fstab lists all the external usb mounts (UsbDriveA, UsbDriveB, etc.) and specifies that they ONLY support exfat. which, given that my fat32 sticks worked ok, I suppose implies that exfat is a superset of fat.

so, ok, some experiments:

- single fat32 partition - ok. automounts.

- single exfat partition - ok. automounts.

- single ntfs partition - fail. "blank card." also, no built-in ntfs .ko or ntfs3g/fuse, so cannot mount from CLI. but fdisk recognizes partition as hpfs/ntfs.

- single ext2/ext3/ext4 partition - fail. "blank card." but
$ su
# mkdir /sdcard/foo
# mount /dev/block/sdb1 /sdcard/foo
works fine. i.e. messing around with supported filesystems in one's vold.fstab, would likely fix this.

- 2 fat32 partitions - partial. first partition automounts, second partition does not.

at this point I got bored so did not try e.g. mixing fat32 ntfs and extfs partitions together.

it seems we are supposed to be satisfied with single partition fat devices, exfat apparently superseding vfat, fat32 still supported. I did not test fat16 but I'm guessing that'll probably work as well.

which is probably most of the target market, and to be honest that isn't exactly unreasonable. and at least we do have the helper apps that pick up the slack when needed.

I do wonder how CM deals with this - although my thought it is really more a function of the specific kernel and/or if you have some kind of fuse support installed. (and again, having a less-ignorant vold.fstab configuration)

FYI- the Victory does use fuse, that's how it loads the extSdCard and mounts/fuses it to the internal sdcard0. However, the fuse library files are probably proprietary, so I don't know if the standard commands will work (needs testing).
 
Upvote 0
(oh and things like stickmount and otg usb helper are definitely using ntfs3g, and if I had to guess I'd say they probably come with their own version of fuse? since not all devices will have it in the first place. ugh, and like a lot of apps, they also come with their own version of busybox since they assume you may not have that either. the classier ones give you a checkbox to decide which busybox to use lololol)

I haven't actually tried StickMount yet, since it seems geared mainly for Nexus machines. but since it's Chainfire...
 
Upvote 0
not a huge surprise, but the official samsung adapter is in fact not made of magical wish-granting plastic - does not function unpowered.

it works fine with powered hub, i.e. just the same as the non-name otg cables. which we all had basically guessed, but again I was curious enough about the description on the official page that claimed it would work (and the instruction book that came with it, does as well)

of course, the box and instruction book that came in it, are both labelled for galaxy sII. so obviously some drone copy-pasta'd the text to the official samsung website Victory compatible accessories etc. etc.

but I was curious enough and hey, now I have another inexpensive spare otg cable.

on a different note -

while my sata-dock-usb-hub-gone-wrong-thing worked perfectly as a usb hub for otg, and the no-name cheap 4-port hub I picked up ("gear head" brand - nice 'cos it has a power switch right on the hub) also works great,

BUT

the d-link 4-port (DUB-H4) does not work at all - the phone continually loops between "keyboard connected" and "keyboard disconnected" and yet nothing (not a keyboard, not nothing) is even connected to the hub. and when I actually plug anything into the hub, the phone loops on seeing that too. I wonder if this may be because one of the ports on the hub is some special "high power charging + data" port and the pins are tied weirdly on it.

anyway just some anecdata on what hub not to use for otg lol.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones