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:
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:
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 ":
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.