A partir de 27 de março de 2025, recomendamos usar android-latest-release em vez de aosp-main para criar e contribuir com o AOSP. Para mais informações, consulte Mudanças no AOSP.
A reinicialização aciona a instalação de outros módulos do kernel e aplica as regras
udev.
O Cuttlefish faz parte da plataforma de código aberto do Android (AOSP). Os builds do
dispositivo virtual estão no site de integração contínua do Android. Para
encontrar um índice de todos os builds do Android, navegue até o site de integração
contínua do Android em
http://ci.android.com/.
Navegue até o build de destino aosp_cf_x86_64_only_phone e clique em
userdebug para conferir o build mais recente.
Clique na caixa verde abaixo de userdebug para selecionar esse build. Um painel Details (detalhes)
vai aparecer com mais informações específicas
sobre o build. Clique em Artifacts (artefatos) para conferir uma lista de todos
os artefatos anexados a esse build.
No painel "Artifacts", faça o download dos artefatos do Cuttlefish.
Clique no artefato aosp_cf_x86_64_phone-img-xxxxxx.zip para x86_64 ou
no artefato aosp_cf_arm64_only_phone-xxxxxx.zip para ARM64, que
contém as imagens do dispositivo. No nome de arquivo, "xxxxxx" é o ID do build
do dispositivo.
Role para baixo no painel e faça o download de cvd-host_package.tar.gz. Sempre
faça o download do pacote host do mesmo build das imagens.
Crie uma pasta de contêiner no seu sistema local e extraia estes pacotes:
Na mesma pasta em que você iniciou o Cuttlefish, execute o
comando abaixo para conferir uma lista de todos os dispositivos Android disponíveis pelo adb na
máquina host:
./bin/adb devices
Acessar e interagir com o dispositivo virtual na Web
Por padrão, o Cuttlefish é iniciado com --start_webrtc, o que ativa uma WebView
pela porta 8443 na máquina host.
Para acessar e interagir com seus dispositivos virtuais, acesse
https://localhost:8443 no navegador da Web.
Pare o dispositivo virtual no mesmo diretório usado para
iniciá-lo:
HOME=$PWD ./bin/stop_cvd
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-07-27 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-07-27 UTC."],[],[],null,["# Get started\n\nThis page describes how to launch an AOSP build using\n[Cuttlefish](/docs/devices/cuttlefish).\n\nVerify KVM availability\n-----------------------\n\nCuttlefish is a virtual device and is dependent on virtualization being\navailable on the host machine.\n\nIn a terminal on your host machine, make sure that virtualization with a\nKernel-based Virtual Machine (KVM) is available: \n\n grep -c -w \"vmx\\|svm\" /proc/cpuinfo\n\nThis command should return a nonzero value.\n| **Note:** On a cloud machine, you might need to follow cloud-specific or vendor-specific steps to enable KVM. For Google Compute Engine (GCE), see [About nested virtualization](https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances).\n\nWhen running on an ARM64 machine, the most direct way is to check for\n`/dev/kvm`: \n\n find /dev -name kvm\n\n| **Tip:** You can use this command to confirm support of KVM on any environment.\n\n*** ** * ** ***\n\nLaunch Cuttlefish\n-----------------\n\n1. In a terminal window, download, build, and install the host Debian packages:\n\n sudo apt install -y git devscripts equivs config-package-dev debhelper-compat golang curl\n git clone https://github.com/google/android-cuttlefish\n cd android-cuttlefish\n tools/buildutils/build_packages.sh\n sudo dpkg -i ./cuttlefish-base_*_*64.deb || sudo apt-get install -f\n sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f\n sudo usermod -aG kvm,cvdnetwork,render $USER\n sudo reboot\n\n The reboot triggers installing additional kernel modules and applies `udev`\n rules.\n2. Cuttlefish is part of the Android Open-Source Platform (AOSP). Builds of\n the virtual device are found at the Android Continuous Integration site. To\n find an index of all Android builds, navigate to the Android Continuous\n Integration site at\n \u003chttp://ci.android.com/\u003e.\n\n3. Enter a branch name. Use the default `aosp-android-latest-release` branch or\n use a [generic system image (GSI) branch](/docs/setup/create/gsi#building-gsis)\n such as `aosp-android13-gsi`.\n\n4. Navigate to the **aosp_cf_x86_64_only_phone** build target and click\n **userdebug** for the latest build.\n\n | **Tip:** For ARM64, use the branch `aosp-android-latest-release` and the device target `aosp_cf_arm64_only_phone-userdebug`.\n5. Click the green box below **userdebug** to select this build. A **Details**\n panel appears with more information specific to\n this build. In this panel, click **Artifacts** to see a list of all the\n artifacts attached to this build.\n\n6. In the Artifacts panel, download the artifacts for Cuttlefish.\n\n 1. Click the `aosp_cf_x86_64_phone-img-xxxxxx.zip` artifact for x86_64 or\n the `aosp_cf_arm64_only_phone-xxxxxx.zip` artifact for ARM64, which\n contains the device images. In the filename, \"xxxxxx\" is the build\n ID for this device.\n\n 2. Scroll down in the panel and download `cvd-host_package.tar.gz`. Always\n download the host package from the same build as your images.\n\n7. On your local system, create a container folder and extract the packages:\n\n 1. x86_64 architecture:\n\n mkdir cf\n cd cf\n tar -xvf /path/to/cvd-host_package.tar.gz\n unzip /path/to/aosp_cf_x86_64_phone-img-\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003exxxxxx\u003c/span\u003e\u003c/var\u003e.zip\n\n \u003cbr /\u003e\n\n 2. ARM64 architecture:\n\n mkdir cf\n cd cf\n tar -xvf /path/to/cvd-host_package.tar.gz\n unzip /path/to/aosp_cf_arm64_only_phone-img-\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003exxxxxx\u003c/span\u003e\u003c/var\u003e.zip\n\n \u003cbr /\u003e\n\n8. Launch Cuttlefish:\n\n HOME=$PWD ./bin/launch_cvd --daemon\n\nVerify that Cuttlefish is visible through adb\n---------------------------------------------\n\nSimilar to a physical device, Cuttlefish is visible through the\n[Android Debug Bridge (adb)](/docs/setup/build/adb).\n\nIn the same folder where you launched Cuttlefish, run the following\ncommand to see a list of all the Android devices available through adb on your\nhost machine: \n\n ./bin/adb devices\n\nView and interact with the virtual device in the web\n----------------------------------------------------\n\nBy default, Cuttlefish launches with `--start_webrtc`, which enables a webview\nthrough port 8443 on the host machine.\n\nTo view and interact with your virtual devices, navigate to\n**https://localhost:8443** in your web browser.\n\nFor more information, see\n[Cuttlefish: WebRTC Streaming](/docs/devices/cuttlefish/webrtc).\n\nStop Cuttlefish\n---------------\n\nStop the virtual device within the same directory as you used to launch the\ndevice: \n\n HOME=$PWD ./bin/stop_cvd"]]