Documentation / Mobile phones
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:
brew install android-platform-tools
adb start-server
You are now ready to test using your phone:
sitespeed.io --browsertime.chrome.android.package com.android.chrome https://www.sitespeed.io
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 --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io --browsertime.xvfb false --browsertime.chrome.android.package com.android.chrome https://www.sitespeed.io
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 com.chrome.beta for latest beta and com.chrome.dev 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.
python tsproxy.py --bind 10.0.1.7 --rtt=200 --inkbps=1600 --outkbps=768
$ sitespeed.io --browsertime.chrome.android.package com.android.chrome --browsertime.chrome.args proxy-server="socks://10.0.1.7:1080" https://www.sitespeed.io
You could also use phuedxs Pi Network Conditioner, but using that requires some additional work but more reliable metrics.
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:
sitespeed.io --browsertime.chrome.android.package com.android.chrome --video --speedIndex https://www.sitespeed.io
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)":/sitespeed.io sitespeedio/sitespeed.io -n 1 --browsertime.chrome.android.package com.android.chrome --browsertime.xvfb false https://www.sitespeed.io