Android Local Testing

April 2013

  1. Start the adb server.

     sudo adb start-server
  2. Ensure that your device is in developer mode over USB and connected.

    If you’re using the Android SDK/AVD then it will automatically be connected and show as emulator-{id}.

     adb devices
     List of devices attached
     {YOURDEVICEID}    device
  3. Mount the system as read-write, so you can edit the host file.

     # If you're using an emulator:
     adb remount
     # Continue with the following for both emulator and native device:
     adb shell
     # If you're using an emulator:
     echo '' >> /etc/hosts
     # If you're using native device:
     mount -o rw,remount /system
     echo '' >> /etc/hosts
  4. Fire up on your Android device and test your site locally. | Github | Twitter | Updates | RSS/XML FeedPowered by Wintersmith