commit | 1a3c7ba564ac886ef4573472af842f3a35152366 | [log] [tgz] |
---|---|---|
author | Jiyong Park <jiyong@google.com> | Mon Sep 28 17:46:37 2020 +0900 |
committer | Jiyong Park <jiyong@google.com> | Tue Oct 13 14:57:24 2020 +0900 |
tree | 924a3d8e1a941294d80eabd3f00c6d8f7c733cf7 | |
parent | 0669ce129a7fdde24238ac41f357f5fdbfb303a3 [diff] |
Package cvd_host_package.zip using soong This change adds a new Soong module type cvd_host_package and its instance cvd_host_package (the names are the same). The module is expected to replace cvd-host-package.tar.gz which is built in host_package.mk. The need for doing this in Soong are as follows: 1) We had to track transitive dependencies (like the shared libs used by the host tools), which is very error-prone. The soong module tracks transitive dependencies automatically, so we need to specify the dependencies to the top-level host tools. 2) We had mixture of x86 and arm64 binaries in the same package. This not only increases the size of the package, but also made the structure of the package complicated as binaries had to be stored in different sub directories (e.g. aarch64-linux-gnu v.s. x86_64-linux-gnu) to avoid conflict. With the new Soong module, the package is created for each target and each pacakge has only the artifacts for the target. One notable change is that the format has changed from tar.gz to zip. The change was needed because the tar that we use in Soong doesn't support appending files to an existing archive. Appending is necessary because we have to gathe files from different base directories: For the Linux/arm64 target, arch-specific files are gathered from under out/soong/host/linux_bionic-arm64, while common-arch files are gathered from out/soong/host/linux-x86. (Note: it actually has to be out/soong/host/linux_bionic-common, but we keep the old path for compat reason). soong_zip supports the use case. WARNING: this does NOT yet replace cvd-host_package.tar.gz with the new cvd_host_package.zip. The switch will be made later. Bug: 168086242 Test: m out/soong/host/linux_bionic-arm64/cvd_host_package.zip out/soong/host/linux-x86/cvd_host_package.zip Change-Id: I4c60b0095431e9a47d7318b7d78c7172e08a9f97
Make sure virtualization with KVM is available.
grep -c -w "vmx\|svm" /proc/cpuinfo
This should return a non-zero value. If running on a cloud machine, this may take cloud-vendor-specific steps to enable. For Google Compute Engine specifically, see the GCE guide.
Download, build, and install the host debian package:
git clone https://github.com/google/android-cuttlefish cd android-cuttlefish debuild -i -us -uc -b sudo dpkg -i ../cuttlefish-common_*_amd64.deb || sudo apt-get install -f sudo reboot
The reboot will trigger installing additional kernel modules and applying udev rules.
Go to http://ci.android.com/
Enter a branch name. Start with aosp-master
if you don't know what you're looking for
Navigate to aosp_cf_x86_phone
and click on userdebug
for the latest build
Click on Artifacts
Scroll down to the OTA images. These packages look like aosp_cf_x86_phone-img-xxxxxx.zip
-- it will always have img
in the name. Download this file
Scroll down to cvd-host_package.tar.gz
. You should always download a host package from the same build as your images.
On your local system, combine the packages:
mkdir cf cd cf tar xvf /path/to/cvd-host_package.tar.gz unzip /path/to/aosp_cf_x86_phone-img-xxxxxx.zip
Launch cuttlefish with:
$ HOME=$PWD ./bin/launch_cvd
$ HOME=$PWD ./bin/stop_cvd
You can use adb
to debug it, just like a physical device:
$ ./bin/adb -e shell
You can use the TightVNC JViewer. Once you have downloaded the TightVNC Java Viewer JAR in a ZIP archive, run it with
$ java -jar tightvnc-jviewer.jar -ScalingFactor=50 -Tunneling=no -host=localhost -port=6444
Click "Connect" and you should see a lock screen!