How To: Install and Browser Test Your Site With Google Android Right on Your PC

Update: Post on how to install Android 2.0 on Mac OSX is here.

This post is for Android SDK versions 1.1 and under.

Browser testing is critical to any web developer, designer… really any web professional. You need to know how your users or customers are seeing your work through the multitude of browsers and devices available to them, new ones become available every day. I wasn’t able to find a quick answer to browser testing on the new Google Android mobile platform so I blazed a trail, captured and boiled down the steps so anyone can follow and get Android up and running on their Windows PC quickly and painl.

Installing the SDK and Browser

  1. First things first visit the Android SDK download page and download the Windows version of the SDK.
  2. Create a folder under C:\Program Files called “android-sdk”
  3. Un-zip the contents of the Android SDK you downloaded into this folder.
    Installing Google Android SDK
  4. Now that you have the all files you need to edit your “path” so Windows can find the emulator when it is run.
    Installing Google Android SDK

    • Right click on “My Computer”
    • Select “Properties”
    • Click the “Advanced” tab
    • Click on the “Environment Variables” in “System Variables” scroll down to “Path”
    • Double click on “Path” move to the end of the “Variable value” and paste in this path (don’t forget the semicolon to close the previous path)
      ;C:\Program Files\android-sdk\tools
    • Click “Ok” on all open windows.
  5. Ok now the SDK is set up to run, lets quickly create some shortcuts icons to launch our emulator.
    Installing Google Android for Browser Testing

    • Right click on your Desktop, mouse over “New” then click “Shortcut”
    • Paste this command into the entry field then click next
      emulator.exe -datadir "C:\Program Files\android-sdk" -skin HVGA-P
    • If you like give your shortcut a name I chose “Android – Standard” (I chose “Standard” for a reason if you want to try the other versions see “Extra Credit“)

Success!

Double click your shortcut and you should see the Android emulator starting up, it does take a little time the first run.
Google Android Emulator Browser Testing

Doing Some Quick Testing

  • 10

    Once the emulator phone boots, click “Menu” on the phone and proceed to the browser.

    Click on the Browser icon

  • 11

    Click “Menu” again then click “Go to URL”

  • 12Type in the URL of the site you are interested in and see what your users see!
  • 13

    That should be enough to get you going, there is a lot more to find in the Android emulator poke around and understand the experience on these new devices and keep looking out for new ways your users are seeing your site.

    -Ben

Extra Credit

If you are interested there are three more iterations on the Google Android screen that will be in users’s hands. Create shortcuts for these commands if you’d like to try them.

emulator.exe -datadir "C:\Program Files\android-sdk" -skin HVGA-L14

emulator.exe -datadir "C:\Program Files\android-sdk" -skin QVGA-P15

emulator.exe -datadir "C:\Program Files\android-sdk" -skin QVGA-L16

No related posts.

This entry was posted in Mobile Web and tagged , , , , , . Bookmark the permalink.

11 Responses to How To: Install and Browser Test Your Site With Google Android Right on Your PC

  1. HSD says:

    i have follow all steps that are defined above but when i click on shortcut then a command prompt window open just for a second after that nothing will display.
    Please suggest what’s the wrong there.

  2. carlos says:

    same for me, not working

  3. Ben says:

    Yep, I think it’s because you are installing Android SDK version 1.5 instead of 1.0 and 1.1 when this was written. There is a new requirement to create and “AVD” before you start the emulator. I added a note to the top of the post saying I will update the post for Android 1.5 as soon as I can. I happen to be out at the Google I/O developer conference right now so maybe I can talk the the Android team about simplifying for this use case.

    Thanks for the feedback,
    -Ben

  4. Pat says:

    Here is how to do it:
    From a command prompt type:
    1) create the avd
    android create avd -n -t 1
    2) list them to make sure it got created
    android list avd
    3) add the following to your shortcut
    -avd
    so
    emulator.exe -avd anyname -datadir “C:\Program Files\android-sdk” -skin HVGA-P
    Works for me.

  5. Pat says:

    oops the got rid of part of my comment
    After the avd in step 1 specify anyname and you use that name in step 3

  6. Kevin Wilson says:

    I was having trouble setting this up. After reading through help files and playing around with it, these are the instructions I came up with to install from scratch and get it working:

    1) Download the “Android SDK 1.5″ for Windows from the following URL:

    http://developer.android.com/sdk/1.5_r3/index.html

    2) Create a folder:

    C:\Program Files\android-sdk\

    3) Unzip the Android SDK 1.5 into this folder. After unzipping the contents of the SDK into this folder, you should see the following sub-folders: add-ons, docs, platforms, tools, usb_driver

    4) Create the following sub-directory:

    C:\Program Files\android-sdk\Virtual Devices\

    4) Add the following to your system path (as the instructions above outline):

    C:\Program Files\android-sdk\tools\

    5) Execute the following to create the “Virtual Devices” sub-directory and create an Android 1.5 virtual device in it:

    C:\Program Files\android-sdk\tools\android.bat create avd -f -t 2 -n MyVD -p C:\PROGRA~1\ANDROI~1\VIRTUA~1

    6) Create a shortcut with the following as the “Target”:

    “C:\Program Files\android-sdk\tools\emulator.exe” -datadir “C:\Program Files\android-sdk” -skin HVGA-P -avd MyVD

  7. jeux sport says:

    Thank you for explaining the process of Android SDK versions 1.1 which i really required. It is very helpful to me. after setting the path, when i tried to start eclipse a error window flashed on the screen saying that ” a java Runtime environment or jdk must be available inorder to run eclipse. I have been using windows xp 2002 version sevice pack 2. Please tell me solution. Thanks in advance.

  8. Pingback: Installing Google Android for Mobile Browser Testing on Mac OS X – buildcontext

  9. Pingback: Designing Your Site for Your Audience « Draknet Tips « DrakNet Web Hosting Blog

  10. Pingback: links for 2010-06-15 « The Adventures of Geekgirl

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>