the Chromium logo

The Chromium Projects

xBuddy for Devserver

xBuddy (short for "cros buddy", and "x" is a rotated cross) allows you to obtain ChromiumOS images or other artifacts off Google Storage and reference locally built images. When used with devserver (or scripts that use it), it can also be used to update your ChromiumOS machine to any image.

xBuddy Paths

Each xBuddy path contains four elements in the form of "location/board/version/image_type". Each of these elements can have different values such as:

Examples

Some valid examples of xBuddy path are:

xBuddy Path Overrides

There are abbreviations for some common paths. For example, an empty path is taken to refer to the latest local build for a board.

The defaults are found in chromite/lib/xbuddy/xbuddy_config.ini, and can be overridden with shadow_xbuddy_config.ini.

xBuddy Interface and Usage

Devserver RPC: xbuddy

Please see Using the Devserver for more details about the devserver.

If there is a devserver running on host ${HOST} and port ${PORT}, stage artifacts onto it using xBuddy paths by calling "xbuddy". The path following xbuddy/ in the call URL is interpreted as an xBuddy path.

The up to date documentation can be found under the help section of devserver's index, http://${HOST}:${PORT}/doc/xbuddy

http://${HOST}:${PORT}/xbuddy/${XBUDDY_PATH}

Or download the artifact by calling:

wget http://${HOST}:${PORT}/xbuddy/${XBUDDY_PATH} -O chromiumos_test_image.bin

To get the directory name that the artifact will be found in:

http://${HOST}:${PORT}/xbuddy/${XBUDDY_PATH}?return_dir=true

Devserver RPC: xbuddy_list

If there is a devserver running, check which images are currently cached on it by calling xbuddy_list:

http://${HOST}:${PORT}/xbuddy_list

Using cros flash

To use xBuddy path with cros flash:

cros flash ${DUT_IP} xbuddy://${XBUDDY_PATH}

xbuddy:// is optional.

See cros flash page for more details.

Updating from a DUT: update_engine_client

If there is a devserver running, and you have access to the test device, update the device by calling update_engine_client with an omaha_url that contains an xBuddy path. The omaha_url is a call to devserver's update RPC. Documentation found under the help section of devserver's index. http://${HOST}:${PORT}/doc/update

To update the image to the latest stable:

update_engine_client --update --omaha_url=${HOST}:${PORT}/update/

To update to a specific xBuddy artifact:

update_engine_client --update --omaha_url=${HOST}:${PORT}/update/xbuddy/{XBUDDY_PATH}

See update engine page for more details.