FORUMS
Remove All Ads from XDA

[HOW-TO] ADB via VirtualBox USB passthrough (Windows host to Ubuntu guest)

24 posts
Thanks Meter: 23
 
By commandar, Junior Member on 12th October 2009, 03:29 PM
Post Reply Email Thread
9th January 2012, 03:44 AM |#11  
Senior Member
Thanks Meter: 26
 
More
I realize this is an old thread and as such the situation may not completely apply, but I'm trying to get my Ubuntu 11.10 guest (Win7 host) access my Samsung Galaxy Nexus (LTE) via adb and I'm failing. It works great in Win7, and I've tried everything in this thread. Virtualbox even looks like it gets the right USB device, but "adb devices" gives me nothing. Any suggestions?

Edit: a simple lsusb shows me that the USB devices (specifically, the phone) aren't being accessed by Ubuntu. So I'll investigate that some more.
 
 
3rd March 2012, 02:38 AM |#12  
justlovejoy's Avatar
Senior Member
Flag Cybertron/Earth
Thanks Meter: 1,051
 
Donate to Me
More
Quote:
Originally Posted by strikeir13

I realize this is an old thread and as such the situation may not completely apply, but I'm trying to get my Ubuntu 11.10 guest (Win7 host) access my Samsung Galaxy Nexus (LTE) via adb and I'm failing. It works great in Win7, and I've tried everything in this thread. Virtualbox even looks like it gets the right USB device, but "adb devices" gives me nothing. Any suggestions?

Edit: a simple lsusb shows me that the USB devices (specifically, the phone) aren't being accessed by Ubuntu. So I'll investigate that some more.

any news yet? I am using e4gt and just set up my repos now i need the device specific files to get it working for a test build. Thanks

Edit: the op trick worked. I am on lisa via virtualbox and adb crazy
18th March 2012, 05:10 AM |#13  
Inactive Recognized Developer
New Orleans
Thanks Meter: 3,519
 
Donate to Me
More
I cannot believe that this has been here for a year and no one thanked the OP.

Maybe its just common knowledge now, but I don't know anything about virtual machines and was going crazy. Seriously, I am running a nook here, and just found this by accident. Well written and clear, thanks a million.
18th March 2012, 06:26 AM |#14  
exb0's Avatar
Senior Member
Flag Spokane
Thanks Meter: 432
 
More
Quote:
Originally Posted by mateorod

I cannot believe that this has been here for a year and no one thanked the OP.

Maybe its just common knowledge now, but I don't know anything about virtual machines and was going crazy. Seriously, I am running a nook here, and just found this by accident. Well written and clear, thanks a million.

I don't use the G1 anymore but I agree, this guide was nicely written and very informative. Gave it a thanks
27th April 2012, 12:33 AM |#15  
Senior Member
Thanks Meter: 28
 
More
This very helpful. Thanks a ton.
7th October 2012, 01:04 AM |#16  
Junior Member
Flag Houston, TX
Thanks Meter: 0
 
More
Thumbs up I love you.
Quote:
Originally Posted by commandar

After spending the last 45 minutes or so trying to figure this one out, I figured I'd document it for the next person that tries this. It's not particularly hard, but it's not quite as straight-forward as expected, either.

Virtualbox is an open source virtual machine host, allowing you to run one operating system from inside of another. Since some of the AOSP stuff requires a Linux or OS X box, and I don't have a spare machine currently, I figured I'd create an Ubuntu VM and use that.

I've tested this using a Vista x64 host with an Ubuntu 9.04 guest, but I don't see any reason it shouldn't work with other versions of Windows.

If you're not familiar with Virtualbox, here's a basic walkthrough on setting up the VM itself:

http://moxiefoxtrot.com/2009/04/23/i...irtualbox-202/

It's for Virtualbox 2.2, but the process is the same for Virtualbox 3.

Next up, wggdlr previously posted a helpful how-to on setting up the Android SDK on Ubuntu that you can find here:

http://forum.xda-developers.com/showthread.php?t=537508

Now here comes the voodoo magic part. Normally you can set up USB devices to pass through to the guest OS just by clicking the USB icon at the bottom of the VB window and checking the device. Unfortunately, Windows grabs onto the device at a low enough level that if you try this, VB will error out on trying to grab the device.

Here's how we get around that:

* Shut down your VM.

* Plug your G1 into your computer's USB port and allow Windows to recognize it.

* In the main Virtualbox window, select your Ubuntu VM and then click on the USB properties link:



* Then click on the green plus icon to add a new USB filter, and select "HTC Android Phone [0100]":



which should give you this:



* Click okay and close out the preferences window
* Unplug your G1
* Start your Ubuntu VM
* Now plug your G1 back in. You should see a device manager pop-up in the corner of your screen telling you that Windows is installing a Virtualbox USB Device.

From here, you should be able to use ADB from your guest operating system. I did reboot my VM one time after the VB USB device finished installing just to be sure, though. The only caveats should be that the phone must be unplugged when you start Virtualbox and you have to plug the phone in after you start your VM each time. If you need to use fastboot from the VM, you'll need to repeat this process with the phone loaded into the bootloader as the phone reports itself slightly differently to the host OS in fastboot mode.

Basically, what's happening here is that Windows is very touchy about the G1 USB device for some reason, and once it gets hold of it, it doesn't really want to give it up. I had a bit of a hard time getting ADB drivers for Windows installed on this same machine for this reason. What we've done here is set up a filter so that Virtualbox grabs the device on plug-in before Windows sinks its teeth into it.

Enjoy!

Seriously. Thank you.
23rd February 2015, 01:49 PM |#17  
cabbieBot's Avatar
Senior Member
Thanks Meter: 109
 
More
Thumbs up
Worked like a charm for the B&N NookColor!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes