Acloud is a command line tool that assists users to create an Android Virtual
Device (AVD).
Add acloud to your $PATH by lunching your environment.
$ source build/envsetup.sh
$ lunch aosp_cf_x86_phone-userdebug
You should now be able to call acloud from anywhere.
If you're a googler, please check https://goto.google.com/acloud-googler-setup
to ensure a smooth setup experience.
Acloud commands take the following form:
acloud <command> <optional arguments>
Available commands:
Create is the main entry point in creating an AVD, supporting both remote
instance (running on a virtual machine in the cloud) and local instance
(running on your local host) use cases. You also have the option to use
a locally built image or an image from the Android Build servers.
Disclaimer: Creation of a cuttlefish local instance is not formally supported, please use at your own risk.
Here's a quick cheat-sheet for the 4 use cases:
$ acloud create
m dist
to build the image)$ acloud create --local-image [local-image-path]
$ acloud create --local-instance
m dist
to build the image)$ acloud create --local-instance --local-image
When specifying an Android Build image, you can specify the branch,
target and/or build id (e.g. --branch my_branch
). Acloud will assume the
following if they're not specified:
--branch
: The branch of the repo you're running the acloud command in, e.g.
in an aosp repo on the master branch, acloud will infer the aosp-master branch.
--build-target
: Defaults to the phone target for cuttlefish (e.g.
aosp_cf_x86_phone-userdebug in aosp-master).
--build-id
: Default to the Last Known Good Build (LKGB) id for the branch and
target set from above.
Additional helpful create options are:
--flavor
: This can be one of phone, auto, wear, tv, iot, tablet and 3g.
This will be used to choose the default hw properties and infer build target
if not specified.
--autoconnect
: This defaults to true and upon creation of a remote instance,
creates a ssh tunnel to enable adb and vnc connection to the instance. For the
local instance, acloud will just invoke the vnc client. If you don't want
autoconnect, you can pass in --no-autoconnect
--hw-property
: This is a string where you can specify the different
properties of the AVD. You can specify the cpu, resolution, dpi, memory,and/or
disk in a key:value format like so:cpu:2,resolution:1280x700,dpi:160,memory:2g,disk:2g
The full list of options are available via --help
$ acloud create --help
List will retrieve all the remote instances you've created in addition to
any local instances created as well.
Cheatsheet:
$ acloud list
$ acloud list -v
Delete will stop your remote and local instances. Acloud will find all
instances created by you and stop them. If more than one instance is found
(remote or local), you will be prompted to select which instance you would
like to stop.
Cheatsheet:
$ acloud delete
$ acloud delete --all
$ acloud delete --instance-names [instance-name]
Reconnect will re-establish ssh tunnels for adb/vnc port forwarding for all
remote instance created by you. It will then look for any devices missing inadb devices
and reconnect them to adb. Lastly it will restart vnc for all
devices that don't already have vnc started for them.
Cheatsheet:
$ acloud reconnect
$ acloud reconnect --all
$ acloud reconnect --instance-names [instance-name]
Setup will walk you through the steps needed to set up your local host to
create a remote or local instance. It will automatically get invoked through
the create command if we detect some necessary setup steps are required. This
is a standalone command if the user wants to do setup separate from the create
command.
Cheatsheet:
$ acloud setup
$ acloud setup --gcp-init
$ acloud setup --host
$ acloud setup --force
If you have any questions or feedback, contact acloud@google.com.
If you have any bugs or feature requests, go/acloud-bug.