1# Cuttlefish Getting Started 2 3## Try Cuttlefish 4 51. Make sure virtualization with KVM is available. 6 7 ```bash 8 grep -c -w "vmx\|svm" /proc/cpuinfo 9 ``` 10 11 This should return a non-zero value. If running on a cloud machine, this may 12 take cloud-vendor-specific steps to enable. For Google Compute Engine 13 specifically, see the [GCE guide]. 14 15 [GCE guide]: https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances 16 172. Download, build, and install the host debian package: 18 19 ```bash 20 git clone https://github.com/google/android-cuttlefish 21 cd android-cuttlefish 22 debuild -i -us -uc -b 23 sudo dpkg -i ../cuttlefish-common_*_amd64.deb || sudo apt-get install -f 24 sudo reboot 25 ``` 26 27 The reboot will trigger installing additional kernel modules and applying 28 udev rules. 29 303. Go to http://ci.android.com/ 314. Enter a branch name. Start with `aosp-master` if you don't know what you're 32 looking for 335. Navigate to `aosp_cf_x86_64_phone` and click on `userdebug` for the latest build 346. Click on `Artifacts` 357. Scroll down to the OTA images. These packages look like 36 `aosp_cf_x86_64_phone-img-xxxxxx.zip` -- it will always have `img` in the name. 37 Download this file 388. Scroll down to `cvd-host_package.tar.gz`. You should always download a host 39 package from the same build as your images. 409. On your local system, combine the packages: 41 42 ```bash 43 mkdir cf 44 cd cf 45 tar xvf /path/to/cvd-host_package.tar.gz 46 unzip /path/to/aosp_cf_x86_64_phone-img-xxxxxx.zip 47 ``` 48 4910. Launch cuttlefish with: 50 51 `$ HOME=$PWD ./bin/launch_cvd` 52 5311. Stop cuttlefish with: 54 55 `$ HOME=$PWD ./bin/stop_cvd` 56 57## Debug Cuttlefish 58 59You can use `adb` to debug it, just like a physical device: 60 61 `$ ./bin/adb -e shell` 62 63## Launch Viewer (WebRTC) 64 65When launching with `---start_webrtc` (the default), you can see a list of all 66available devices at `https://localhost:8443` . For more information, see the 67WebRTC on Cuttlefish 68[documentation](https://source.android.com/setup/create/cuttlefish-ref-webrtc). 69 70## Launch Viewer (VNC) 71 72When launching with `--start_vnc_server=true` , You can use the 73[TightVNC JViewer](https://www.tightvnc.com/download.php). Once you have 74downloaded the *TightVNC Java Viewer JAR in a ZIP archive*, run it with 75 76 `$ java -jar tightvnc-jviewer.jar -ScalingFactor=50 -Tunneling=no -host=localhost -port=6444` 77 78Click "Connect" and you should see a lock screen! 79