Sunday, May 23, 2010

Putting Android Froyo and/or the SDK on your WINDOWS machine

I read Gizmodo almost daily, but sometimes their Apple focus gets tiring, and I don't just meant the iPhone. They recently posted an article on How to Try Android Froyo on your Computer, and while they got the DL links basically right, the rest of the article kind of assumed you were running a Mac. To the extent they even kind of implied there wasn't a Linux version when there VERY MUCH is.

So, for the other 90% of the world, here's a few of the tips you need to know to run it on your Windows Machine (XP, Vista, or 7). Linux users might find this helpful also, but I wouldn't bet on it.

First, as the article correctly directs you, download the latest Android SDK base package.

Next, extract the files somewhere that has a few Gigs of extra space. The SDK isn't too huge, but you're going to be adding packages and a simulated SD card.

Now, go to where you extracted the files, and double-click on "SDK Setup.exe" which should have the little android icon showing as well. In Vista and 7 your will be asked if it's ok to let the program make changes to your computer. Let it do so.

You'll either get a screen asking you to choose packages to install, or you may get a screen complaining that it can't connect to the HTTPS link for refreshing the library list. Either way, close this screen. If you got the error message, click on the "Settings" option in the remaining screen and select "Force https://... sources to be fetched using http://". Either way, you're now ready to click on Available Packages, where you will see a good number of options. I personally suggest you click to install all of them since that helps avoid any missing older items, and best supports work you might want to do to support older versions of Android.

Once it's installed, you now need to exit out of the SDK, and it's time to open a Command Line with the "Run as Administrator" option (Vista or 7 - for XP just open a command line). For Vista and 7 you can do this by finding the Command Line in your Accessories folder and right-clicking on it to choose the Run as Administrator option.

You now need to navigate on the command line to the folder where you placed the SDK, and move to the Tools folder under that (For example "F:\AndroidSDK\tools"). You are now going to create the "virtual" SD card that your "virtual" Android device will be using. I personally recommend a 4GB sized one if you have the space since that is the most common size of card. So you now want to run the tool (mksdcard) specifying the location where the file will be created. So for my example:
"mksdcard -l Test4G 4096M F:\Test4G.img"
which will create a 4 Gig image file named "Test4G.img" and labeled "Test4G" in the root directory of your F drive. Note that this will take several minutes to run even on a fast machine. Since some Android programs use the label to detect if a card has been changed out... well, you get the idea :-)

Time to go back into the SDK again (run SDK Setup again), close the first window to show the same window you had the last time. You should now see a lot of packages when you click "Installed Packages".

Now click on "Virtual Devices", which is where you will create your virtual device. You should have nothing here, so click "New". Call the device anything you want, but make sure the "Target" is "Android 2.2 - API Level 8", and that for SD Card you select the IMG file you just created. Now click "Create AVD", and the system will take a minute, and then you'll be back at the same menu. Click on the name of the Virtual Device you just created, and choose Start.

About two minutes later (on my Core i7, it may take less or more time for you), I had the default Android screen with it's helpful tips.

As always, drop me a line or a comment if you have questions.

0 comments: