[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],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"]]