Jump to content


Photo

[HACK] Enable USB host mode (ie thumb drives) on the Xoom


  • Please log in to reply
40 replies to this topic

#1 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 10 March 2011 - 01:16 PM

My first Xoom mod! :) Many thanks to Koush, as this boot.img is 99.9% what he had done - I just added a few lines to it.

NOTE:
This is based off the original HRI39 firmware, but I just updated to the 3/11 update (HRI66), and this still works. That's because the HRI66 patch is not updating the boot.img, nor is it touching vold.fstab. If it does break, re-applying it should work fine with HRI66.

4/2011 EDIT:
This is for the 3G Xoom, only! I am hearing reports that the Wifi Xoom may already have this support buitin. See the thread for details.

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

Boot image Replacement Link (for 3G Build HRI39 and HRI66):
http://www.mediafire...mw4q7wy0dlnoj7i
Alternate Link: http://www.megaupload.com/?d=YZMXRX9Q

md5sum: 69dc51315878884461be4a1a76eaabd3


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

Pre-requisites: You need the device rooted and unlocked, to use this. Details on how to do that are here: http://www.koushikdu...oom-rooted.html. Alternatively, you could use my boot.img as a replacement for his rootboot.img, if you are rooting the device for the first time.

You also need an OTG Cable that will work with the Xoom. I have this exact cable, and it is working with my device: http://cgi.ebay.com/...=item3a640778bb

Instructions:

Very similar to rooting the device. Extract the img file from the ZIP above, and place it in the same folder as your adb and fastboot binaries. Then, run this:

adb reboot bootloader

(reboots into the bootloader)

fastboot flash boot rootboot.usbdisk.img

(which loads the new boot.img onto the system)

fastboot reboot

(Reboots the device)

Lastly -- using adb or root explorer, you need to alter your /etc/vold.fstab by adding this line to it:

dev_mount usbdisk /mnt/usbdisk auto /devices/platform/tegra-ehci

This tells VOLD where to mount the device, when it's plugged in. After the change, you need to reboot.

The altered boot.img adds a folder called /usbdisk, so that way if you connect a USB thumb drive using the cable I linked to above, it will automount the thumb drive and you can access files. I tested this with an HP 125W FAT32 8GB thumb drive, and it worked without an issue.

The only caveat I can think of is that YMMV on thumb drives - some might require more power than the Xoom can supply.

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

Screenshots:

Posted Image

Music playing off the thumb drive:

Posted Image



Reference on the init change: In case you are wondering, I added these to the stingray init:

export EXTERNAL_STORAGE_UDISK /mnt/udisk
	mkdir /mnt/usbdisk 0000 system system
	symlink /mnt/usbdisk /usbdisk

This was lifted right from my GTAB. I'm not even sure if "udisk" makes any sense, but it works so I'm not complaining. :lol:

Edited by roebeet, 02 April 2011 - 10:32 AM.

  • Mp4, xaueious and mrsburnout like this
Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#2 Mp4

Mp4

    Admin Ninja

  • Administrators
  • 2,558 posts

Posted 10 March 2011 - 03:29 PM

Woohoo
cant wait till I can get my wifi Xoom

:clapping:
Are you lost, Follow us on Twitter
http://twitter.com/slatedroid
C8+/Hp Touchpad/Galaxy Tab/
http://androidtabletfirmware.net

#3 Apeman

Apeman

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 10 March 2011 - 06:04 PM

Awesome job! I am going to do this this weekend and see if this will work with my Ubuntu install of Ubuntu, and if I can access the Android part of the device over the "network" and try to access the drive. Another way that it may work is through adb connect, and then using adb push/pull to transfer files.

#4 terminander

terminander

    Advanced Member

  • Moderator
  • PipPipPip
  • 784 posts

Posted 11 March 2011 - 06:07 AM

roebeet, this is cool, would love to try on the Novel.

Any idea where to get a cable for the Novel, need Mini not Micro?

Edited by terminander, 11 March 2011 - 09:36 AM.

Live is not the breath you take, but the moments that take you breath away. Country singer George Strait

#5 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 11 March 2011 - 09:58 AM

roebeet, this is cool, would love to try on the Novel.

Any idea where to get a cable for the Novel, need Mini not Micro?


I actually have an OTG cable for the Novel - I tried it on the 9 inch device a few days back but it doesn't work. It's the same cable that I use with my SmartQ R10, which does work. It's probably the 2.0 OS or the kernel on the PDN that doesn't support OTG.

This came up recently as someone was asking if they could use it to add a USB sound card, to get a mic added.
Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#6 darcnes

darcnes

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 11 March 2011 - 10:59 AM

Would love to know if this USB Host Mode would allow pairing of a PS3 controller. It's been virtually impossible to do on Android due to the lack of pairing mode I think.. but the controller goes into pairing mode when it's connected to a usb host.. I suspect it would take a bit more software to actually facilitate the pairing process, but I would love to know if there's any active communication happening.

#7 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 11 March 2011 - 12:56 PM

Would love to know if this USB Host Mode would allow pairing of a PS3 controller. It's been virtually impossible to do on Android due to the lack of pairing mode I think.. but the controller goes into pairing mode when it's connected to a usb host.. I suspect it would take a bit more software to actually facilitate the pairing process, but I would love to know if there's any active communication happening.


It seems to be able to power a PS3 controller, but not much else.
Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#8 xaueious

xaueious

    Advanced Member

  • Hero Member
  • PipPipPip
  • 954 posts
  • LocationOntario

Posted 12 March 2011 - 09:34 AM

Congrats for Engadget publicity: http://www.engadget....orola-or-googl/

Tinkerer-extraordinaire roebeet is the man to thank


Their journalism is giving you 100% of the credit for the hack.

Not sure why you posted the instructions for the mod here while posting your actual changes as well as your initial post on XDA. Makes no sense:
http://forum.xda-dev...ad.php?t=988512

A good day for Slatedroid?



Wanted to drop in here to say that I bought the USB host cable to try for my Huawei Ideos S7, but Engadget's post is going to get that seller a ton of orders. Better not delay mine. FFFFFFFFFF

Edited by xaueious, 12 March 2011 - 09:40 AM.


#9 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 12 March 2011 - 12:10 PM

Congrats for Engadget publicity: http://www.engadget....orola-or-googl/



Their journalism is giving you 100% of the credit for the hack.

Not sure why you posted the instructions for the mod here while posting your actual changes as well as your initial post on XDA. Makes no sense:
http://forum.xda-dev...ad.php?t=988512

A good day for Slatedroid?



Wanted to drop in here to say that I bought the USB host cable to try for my Huawei Ideos S7, but Engadget's post is going to get that seller a ton of orders. Better not delay mine. FFFFFFFFFF



The XDA post has a link back to here, purposely. Later on I added the actual init changes on one post on XDA, but for anyone looking for them this is the best place to find it. All the advertising I've seen so far links back here, which is exactly what I would have wanted.

I actually emailed that seller as I figured he had no idea why his cable suddenly became so popular! EDIT: he ended his eBay item -- he sold 120 of them. Nice!

Edited by roebeet, 12 March 2011 - 12:17 PM.

  • mrsburnout likes this
Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#10 xaueious

xaueious

    Advanced Member

  • Hero Member
  • PipPipPip
  • 954 posts
  • LocationOntario

Posted 12 March 2011 - 01:03 PM

Actually I might be a little confused by your line 'export EXTERNAL_STORAGE_UDISK /mnt/udisk'... Instead of /mnt/usbdisk
Or does that actually not work on the Xoom?

Just saw this...
http://www.reddit.co...can_use/c1kg4jw
I have no idea.

120 orders is a lot to process for one guy. Oh boy...

Edited by xaueious, 12 March 2011 - 01:05 PM.


#11 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 12 March 2011 - 02:56 PM

Actually I might be a little confused by your line 'export EXTERNAL_STORAGE_UDISK /mnt/udisk'... Instead of /mnt/usbdisk
Or does that actually not work on the Xoom?

Just saw this...
http://www.reddit.co...can_use/c1kg4jw
I have no idea.

120 orders is a lot to process for one guy. Oh boy...


Honestly, it confused me as well. But that's the line in my G-Tablet so I didn't want to mess with it. :lol:

I actually find it interesting that changes like this one make it to Engadget, but then major mods I've done for things like the Pandigital Novel or the Gtablet never get any press. The Xoom is more of a media darling that those two other devices, I suppose.

I don't know if that eBay seller is loving me or hating me, right now. Hey, it works well so that's not my fault!

Edited by roebeet, 12 March 2011 - 02:56 PM.

Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#12 mogrith

mogrith

    SlateGeek / Wiki Mod

  • Global Administrator
  • 2,428 posts
  • LocationBrea, CA

Posted 12 March 2011 - 04:13 PM

Monoprice is a very good source for cables. But I did not see that cable there. More searching came up with this.

It looks like what you are using is a 5pin mini B to female A

Would a USB female to female work with a regular cable?
http://www.cablewhol.../30u1-02400.htm
Posted Image
Posted Image

#13 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 12 March 2011 - 06:08 PM

Monoprice is a very good source for cables. But I did not see that cable there. More searching came up with this.

It looks like what you are using is a 5pin mini B to female A

Would a USB female to female work with a regular cable?
http://www.cablewhol.../30u1-02400.htm


It would actually need to be a micro USB cable, keep in mind.
Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#14 hitlin37

hitlin37

    Newbie

  • Jr. Member
  • Pip
  • 2 posts

Posted 12 March 2011 - 11:37 PM

I don't understand it.
android 3.0 says:USB host mode support to support keyboards and USB hubs.(http://developer.and...ndroid-3.0.html)
then why do all this required?
I guess it should be available by default in android 3.0.
And if not then what's the reason that usb host support comes disabled in xoom?
Is it like motrola made it disabled in xoom or its disabled in asop image?

#15 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 13 March 2011 - 11:18 AM

I don't understand it.
android 3.0 says:USB host mode support to support keyboards and USB hubs.(http://developer.and...ndroid-3.0.html)
then why do all this required?
I guess it should be available by default in android 3.0.
And if not then what's the reason that usb host support comes disabled in xoom?
Is it like motrola made it disabled in xoom or its disabled in asop image?


USB Host mode is actually there - I can use a USB keyboard with JUST the cable and no other other changes. It's actually enabling thumb drive / external storage that's the problem (and thus requires the hack). The reason why I put "USB Host Mode" in the title is because there's actually two parts to this process - one is getting the right cable, the second is the changes to the system to enable thumb drives.

I wish I knew why Motorola didn't add this feature. Maybe it was an oversight or maybe it was intentional. but my hope is that future firmware has this feature enabled by default so that we don't have to do things like things to get it working.
Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3

#16 hitlin37

hitlin37

    Newbie

  • Jr. Member
  • Pip
  • 2 posts

Posted 13 March 2011 - 11:27 PM

USB Host mode is actually there - I can use a USB keyboard with JUST the cable and no other other changes. It's actually enabling thumb drive / external storage that's the problem (and thus requires the hack). The reason why I put "USB Host Mode" in the title is because there's actually two parts to this process - one is getting the right cable, the second is the changes to the system to enable thumb drives.

I wish I knew why Motorola didn't add this feature. Maybe it was an oversight or maybe it was intentional. but my hope is that future firmware has this feature enabled by default so that we don't have to do things like things to get it working.


Thanks for the explanation.
I too hope they do this by default in future.
My understanding now is , android 3.0 default image comes with very basic support for usb host support(like u said keyboard n all)and lacks mass storage driver and its upto the OEM/ODM to add whatever feature they want related to usb-host support.
Adding something like this could be as easy for anyone as compiling and loading appropriate drivers.
Once again,good work and thanks for the reply:)

#17 andrewbarron

andrewbarron

    Newbie

  • Jr. Member
  • Pip
  • 2 posts

Posted 14 March 2011 - 04:29 PM

USB Host mode is actually there - I can use a USB keyboard with JUST the cable and no other other changes. It's actually enabling thumb drive / external storage that's the problem (and thus requires the hack). The reason why I put "USB Host Mode" in the title is because there's actually two parts to this process - one is getting the right cable, the second is the changes to the system to enable thumb drives.

I wish I knew why Motorola didn't add this feature. Maybe it was an oversight or maybe it was intentional. but my hope is that future firmware has this feature enabled by default so that we don't have to do things like things to get it working.



#18 andrewbarron

andrewbarron

    Newbie

  • Jr. Member
  • Pip
  • 2 posts

Posted 14 March 2011 - 04:34 PM

Any thoughts to merging this kernel with the overclock kernel by Coolbho3000? The OC kernel made a huge difference?

thanks

#19 aludal

aludal

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 338 posts
  • LocationCapitola, CA

Posted 14 March 2011 - 09:56 PM

To roebeet:

Awesome!
I wonder, apart from USB drive, can USB (Web) cam/mic be made operational with similar stanzas?

Two secret wishes though:
1. Wish you own the NookColor, and
2. Wish you can perform a similar hack on the NC's boot image (Honeycomb, or maybe even CM7)

My sincere apologies for OT.
fineoils.blogspot.com or Fine Oils, I'm maroger there

#20 roebeet

roebeet

    Advanced Member

  • FW Developer
  • PipPipPip
  • 3,286 posts

Posted 15 March 2011 - 09:09 PM

Any thoughts to merging this kernel with the overclock kernel by Coolbho3000? The OC kernel made a huge difference?

thanks


This was requested over at XDA as well, so I have my changes clearly listed here. If any of the kernel developers want to take what I've done and add them to their kernels, they are more than welcome to do so. That's probably the best solution.

To roebeet:

Awesome!
I wonder, apart from USB drive, can USB (Web) cam/mic be made operational with similar stanzas?

Two secret wishes though:
1. Wish you own the NookColor, and
2. Wish you can perform a similar hack on the NC's boot image (Honeycomb, or maybe even CM7)

My sincere apologies for OT.


I tried a USB webcam and a external USB sound card, and neither worked. Likely it's a problem with kernel drivers. Luckily thumb drive support seems to be built in and we just needed to "activate" it.

I actually considered a Nook Color several times, as its got a nice screen. But a 7 inch device is not what I want in a tablet - it's just too small a screen.

No USB host mode on the NC, I assume? If the kernel supports, I suppose the the ramdisk and vold config could be altered for thumb drive support.

Edited by roebeet, 15 March 2011 - 09:13 PM.

Android Devices: Viewsonic GTab, Notion Ink Adam, ASUS Transformer, Cowon D3