Clone this repo:


  1. 5f807dd [roll] Update submodules by global-integration-roller · 49 minutes ago main
  2. 5a8ef03 [roll] Update submodules by global-integration-roller · 11 hours ago
  3. 64f709e [roll] Update submodules by global-integration-roller · 13 hours ago
  4. 9a4f573 [roll] Update submodules by global-integration-roller · 17 hours ago
  5. be2df36 [mvp] Populate .build_id after cipd_manifest.json creation by Jiaming Li · 21 hours ago

SDK Samples: Fortune Teller

This repository contains instructions and source code to build, package and run Fuchsia samples using only the Fuchsia SDK.


  1. Install a Bazel version no older than the one defined in the WORKSPACE.bazel file, by following the instructions at In some Linux distributions, sudo apt-get install bazel should be enough.

  2. Make sure this repository has the required submodules:

    git submodule update --recursive --init
  3. Ensure that there are Fuchsia SSH keys in your host machine. You will need them for running the Fuchsia emulator.

     [[ -f "${HOME}/.ssh/fuchsia_ed25519" ]] || ssh-keygen -P "" -t ed25519 -f "${HOME}/.ssh/fuchsia_ed25519" -C "${USER}@$(hostname -f) Shared SSH Key for Fuchsia"
     [[ -f "${HOME}/.ssh/fuchsia_authorized_keys" ]] || ssh-keygen -y -f "${HOME}/.ssh/fuchsia_ed25519" > "${HOME}/.ssh/fuchsia_authorized_keys"

Build and package the sample

Now the repository is ready to build the sample.

  1. Fetch an emulator image and start an emulator

    tools/ffx product-bundle get workstation.qemu-x64
    tools/ffx emu start -H workstation.qemu-x64
  2. (optional) watch the device log in a separate window

    tools/ffx log
  3. Run the fortune-teller component

    bazel run --config=fuchsia_x64 //src/fortune_teller:pkg.component

    Watch that your fortune is printed in the log.