Documentation / Mobile phones

Test on Android


Driving Android from Docker only works on a Linux host since there’s is no way at the moment to map USB on Mac!


If you don’t use Docker you need to:

  • Install the Android SDK on your desktop (just the command line tools!). If you are on a Mac and use Homebrew just run: brew tap caskroom/cask && brew cask install android-platform-tools
  • Start the adb-server on your desktop: adb start-server

On your phone

  • Install Chrome
  • Enable developer USB access to your phone: Go to About device (or About phone) in your settings, tap it, scroll down to the Build number, tap it seven (7) times.
  • Disable screen lock on your device.
  • Enable Stay awake in Developer options.
  • Enable USB debugging in the device system settings, under Developer options.
  • Install the Stay Alive app and start it.
  • Plug in your phone using the USB port on your desktop computer.
  • When you plugin your phone, click OK on the “Allow USB debugging?” popup.


You are now ready to test using your phone:

Remember: To test on Android using Docker you need to be on Linux (tested on Ubuntu). It will not work on OS X.

docker run --privileged -v /dev/bus/usb:/dev/bus/usb -e START_ADB_SERVER=true --shm-size=1g --rm -v "$(pwd)":/ sitespeedio/  -n 1 --browsertime.xvfb false

You will get result as you would with running this normally with summaries and waterfall graphs.

If you want test coming Chrome versions you can use for latest beta and for latest development version (make sure installed them on your phone first).


If you run by default, the phone will use the current connection. The connectivity flag is currently not supported (would love a PR for that!) but you can set connectivity by using TSProxy.

  1. Download TSProxy and make sure you have at least Python 2.7 installed.
  2. Check the local IP of your machine (in this example the IP is and the default port for TSProxy is 1080).
  3. Start TSProxy and bind it to your IP: python --bind --rtt=200 --inkbps=1600 --outkbps=768
  4. Run $ proxy-server="socks://"

You could also use phuedxs Pi Network Conditioner, but using that requires some additional work but more reliable metrics.

Video and SpeedIndex

You can also collect a video and get Visual Metrics. Running on Mac or without Docker you need to install the requirements for VisualMetrics yourself on your machine before you start. If you have everything setup you can run: --video --speedIndex

And using Docker (remember: only works in Linux hosts):

docker run --privileged -v /dev/bus/usb:/dev/bus/usb -e START_ADB_SERVER=true --shm-size=1g --rm -v "$(pwd)":/ sitespeedio/  -n 1 --browsertime.xvfb false

If you want to run Docker on Mac OS X, you can follow Appiums setup by creating a docker-machine, give ut USB access and then run the container from that Docker machine.

Collect trace log

One important thing when testing on mobile is to analyze the Chrome trace log. You can get that with --video --speedIndex

You can also change which categories to get. In this example we only get the devtools.timeline category. --chrome.timeline

Collect the net log

If you really want to deep dive into the what happens you can use the Chrome net log. You collect it with