Example: Customise Android

Note: With the latest 1.23.0 release, the Anbox Cloud documentation is moved to https://documentation.ubuntu.com/anbox-cloud/en/latest/. Hence, the information in this discourse post may be obsolete. The documentation posts on discourse will be unlisted and archived shortly.
Discourse will still be used for user engagement and release announcements.

To do any customisation to the Android system that runs your application, use the anbox-shell tool within a hook. This tool is useful to interact with the Android system directly.

In this example, we create a hook that configures the Android system to use an HTTP proxy:

#!/bin/sh -ex

# The settings we change are persistent, so we only need to set them once
if [ "$INSTANCE_TYPE" = "regular" ]; then
  exit 0
fi

anbox-shell settings put global http_proxy myproxy:8080