Access an instance

In some cases, it might be necessary to access an individual instance for debugging reasons. You can do this on the command line with the amc command.

Access an instance with amc

The amc command provides simple shell access to any instance managed by AMS. To access a specific instance you only need its ID:

amc shell <id>

This command opens a bash shell inside the instance.

Access the Android environment

The command for accessing Android depends on the instance’s execution model.

Containerized Android

Use anbox-shell to access the Android container. If you combine the anbox-shell command with amc exec, you can get direct access to the Android container:

amc exec <id> -- anbox-shell

If you only want to watch the Android log output, use the following command:

amc exec <id> -- anbox-shell logcat

amc shell and amc exec open various possibilities for automation use cases. See the help output of the commands for further details.

Virtualized Android

Use adb shell instead of anbox-shell for an instance running virtualized Android. The command connects to the Android environment inside the Cuttlefish virtual machine:

amc exec <id> -- adb shell