| # fx emu |
| |
| start fuchsia in an emulator |
| |
| ```none |
| usage: fx emu [-a <mode>] [-c <text>] [-N [-I <ifname>]] [-u <path>] [-v <build_variant>] [-g <port> [-r <fps>] [-t <cmd>]] [-x <port> [-X <directory>]] [-e <directory>] [-w <size>] [-s <cpus>] [-m <mb>] [-k <authorized_keys_file>] [-K <kernel_image>] [-z <zbi_image>] [-f <fvm_image>] [-p mouse|touch] [-H|--headless] [--audio] [--hidpi-scaling] [--software-gpu] [--debugger] |
| -a <mode> acceleration mode (auto, off, kvm, hvf, hax), default is auto |
| -c <text> append item to kernel command line |
| -ds <size> extends the fvm image size to <size> bytes. Default is twice the original size |
| -N run with emulated nic via tun/tap |
| -I <ifname> uses the tun/tap interface named ifname |
| -u <path> execute emu if-up script, default: linux: no script, macos: tap ifup script. |
| -v <build_variant> uses the build system variant to modify the total memory. |
| -e <directory> location of emulator, defaults to looking in prebuilt/third_party/android/aemu/release/PLATFORM |
| -g <port> enable gRPC service on port to control the emulator, default is 5556 when WebRTC service is enabled |
| -r <fps> webrtc frame rate when using gRPC service, default is 30 |
| -t <cmd> execute the given command to obtain turn configuration |
| -x <port> enable WebRTC HTTP service on port |
| -X <directory> location of grpcwebproxy, defaults to looking in prebuilt/third_party/grpcwebproxy |
| -w <size> window size, default is 1280x800 |
| -s <cpus> number of cpus, 1 for uniprocessor |
| -m <mb> total memory, in MB |
| -k <authorized_keys_file> SSH authorized keys file, otherwise defaults to ~/.ssh/fuchsia_authorized_keys |
| -K <kernel_image> path to image to use as kernel, defaults to kernel generated by the current build. |
| -z <zbi_image> path to image to use as ZBI, defaults to zircon-a generated by the current build. |
| -Z <zbi tool> path to a version of the `zbi` tool to use; defaults to the one in the current build directory. |
| -f <fvm_image> path to full FVM image, defaults to image generated by the current build. |
| -F <fvm tool> path to a version of the `fvm` tool to use; defaults to the one in the current build directory. |
| -A <arch> architecture of images (x64, arm64), default is the current build. |
| -p mouse|touch set pointing device used on emulator: mouse or multitouch screen; defaults to mouse. |
| -H|--headless run in headless mode |
| --audio run with audio hardware added to the virtual machine |
| --hidpi-scaling enable pixel scaling on HiDPI devices |
| --host-gpu run with host GPU acceleration |
| --software-gpu run without host GPU acceleration |
| --debugger pause on launch and wait for a debugger process to attach before resuming |
| --no-build do not attempt to build the fvm and zbi tools and the zbi image |
| ``` |
| |
| [emu source code](https://cs.opensource.google/fuchsia/fuchsia/+/main:tools/devshell/emu) |