Android Mobile SDK Web Browser Testing on OSX

Because it’s painful, here’s how I did it on OSX :

1) Download Android SDK

2) Install it

/Android/android-sdk-mac_86
cd /Android/android-sdk-mac_86/tools

3) Setup the Emulator

./android
  • A Java app opens
  • Click SDK Platform Android 2.1 and download Archive for MacOS X
  • Click Virtual Devices and New
  • Give a name (AndroidTest), set the target to the SDK you downloaded
  • Set Size to 512
  • Create the AVD (Android Virtual Device)

4) Run the Emulator

./emulator -avd AndroidTest -partition-size 128

5) Setup the Hosts file

Set the device to read-write

./adb remount
./adb pull /etc/hosts

Edit the hosts with the following

nano hosts
10.0.2.2 localhost
./adb remount
./adb push hosts /system/etc

Congratulations you should now be able to browse the hosts

Leave a Reply