Installing Google Android for Mobile Browser Testing on Mac OS X

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.

About a year ago I wrote a post walking you through installing the Google Android SDK on your machine to use as a mobile web browser. This time I am doing it on Mac OS X but I might just make a Windows version too if I get a little time… let me know if you’d like to see that happen.

Let’s get started…

Get the SDK…

  1. Go to the Android SDK page.
  2. Download Android SDK for Mac OS X (intel)
  3. Unzip it and move it to the root of your home directory.

Set it up…

  1. Open Terminal, enter the following commands…
    cd ~
    nano .bash_profile
    
  2. Paste this into the new file, or add it if there are existing contents.
    export PATH=${PATH}:~/android-sdk-mac/tools
    

  3. Press “Control X” and save the file.
  4. Close Terminal.

Load up an Android OS…

  1. Open Terminal, enter the following command…
    android

    The Android SDK and AVD Manager will open.

  2. Choose “Available Packages”
  3. Click the arrow beside “dl-ssl.google.com…”
  4. Check one or more Android Platforms, I chose Android 1.6 and 2.0 for good measure you can choose whatever versions you are targeting.
  5. Click “Install Selected” and then “Install Accepted”
  6. Your SDK is now complete and ready to run… Stick in your Android SDK and AVD Manager let’s make a device!

Getting your virtual Android device ready…

  1. Chose “Virtual Devices”
  2. Click “New…”
  3. Give your AVD a name for this tutorial I chose “default2.0″
  4. Choose one of the Android platforms you downloaded in the “Target” pulldown, I chose Android 2.0.
  5. Give the SD card some value, let’s say 25mb.
  6. Click “Create AVD”
  7. You should return back to the home screen, click your new Android AVD’s name and press “Start”
  8. Success!

Create an icon of sorts to launch your new emulator…

  1. Open Terminal, enter the following commands…
    cd ~/Desktop/
    nano Android.command
    
  2. Add this command to the new file…
    emulator -scale .7 -avd default2.0
    

  3. Press “Control X” and save the file
  4. Run this final command….
    chmod 755 Android.command
    
  5. Close Terminal
  6. Double click on Android.command on your desktop… Success!

Related posts:

  1. How To: Install and Browser Test Your Site With Google Android Right on Your PC
This entry was posted in General, Mobile Web and tagged , , , , , , , , . Bookmark the permalink.

16 Responses to Installing Google Android for Mobile Browser Testing on Mac OS X

  1. Definitely very nice – I don’t have an Android phone myself but it will be nice to test the mobile themes of my various sites using the Android mobile browser on my my MacBook Pro :)

  2. john says:

    when i type “android” i get the following message:

    “-bash: android: command not found”

    any suggestions? thanks!

  3. Pingback: John From Berkeley » links for 2009-11-25

  4. Dakota Reese says:

    Great post. Thanks.

    @John- The walk-through omits that when you save the command in Terminal (Step 2), you should rename it “android.”

  5. Pingback: How To: Install and Browser Test Your Site With Google Android Right on Your PC – buildcontext

  6. buy r4 dsi says:

    I just came across your blog and wanted to drop you a note telling you how impressed I was with the information you have posted here.
    Keep up the great work, you are providing a great resource on the Internet here!

  7. Joseph says:

    Cheers for the nice post on the Android SDK!

    -Joseph

  8. kang says:

    thanks for your guide:-)

  9. Bill says:

    I actually have a real-live Android TMO MyTouch. I’d love to know how to actually get the SDK user interface to show me exactly what’s on the screen of my MyTouch. Or better yet, grab JPG images of whatever’s on the phone display. Is this even do-able? Thanks in advance!
    –Bill

  10. James says:

    Thanks! There’s one major omission, and it’s NOT to rename the .bash_profile as suggested above (that caused hours of headache).

    The thing that needs to be clarified is that you need
    export PATH=${PATH}:~/android-sdk-mac/tools

    To actually say:
    export PATH=${PATH}:~/FULL PATH HERE/tools

    Mine was something like this:
    export PATH=${PATH}:~/Users/james/Documents/SDK/tools

    If you screw this up once you will end up with multiple .bash files in your home directory. You can download Houdini to see files that start with a “.” and delete what needs to be fixed.

  11. James says:

    One other thing, for those not as familiar with Terminal (I wasn’t), you can just double-click the ‘Android’ file in the /tools/ folder and it will launch in Terminal.

  12. Dave says:

    Hey there.
    First of all, thanks for the great post.
    There’s a new version of the Android SDK available here: http://developer.android.com/sdk/index.html

  13. Pingback: HOW TO: Optimize Your Mobile Site Across Multiple Platforms

  14. Pingback: 123-sale.com Blogs - HOW TO: Optimize Your Mobile Site Across Multiple Platforms

  15. Pingback: HOW TO: Optimize Your Mobile Site Across Multiple Platforms | RetweetToday.com | News for Us, by Us!

  16. Ben Sinclair says:

    How do I get Android to hook up to my computers localhost? I have MAMP installed.

    Thanks for your help!

    Ben

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>