commit | 2df23d61294c513ecb4d9518d590317a3b70be74 | [log] [tgz] |
---|---|---|
author | Alistair Delva <adelva@google.com> | Thu May 14 11:26:02 2020 -0700 |
committer | Alistair Delva <adelva@google.com> | Wed May 20 00:49:00 2020 +0000 |
tree | e0e1c38a51eb629b83ace3e7c81c6c41dab72b9f | |
parent | 285ec67f294a9aae03e9698dff6db284e6efef5e [diff] |
Use O_TRUNC + fd->Truncate() instead of dd Originally CreateBlankImage was used for simple/small partition images which needed to be reliably zeroed, so performance didn't really matter. Now we will be using this utility function for larger, multi-GB partitions, so let's make this code more efficient. By opening the file with O_CREAT | O_TRUNC we can be sure that even existing files will be truncated to zero length, and then using fd->Truncate() they will be implicitly zeroed to the desired size. This is more efficient as most filesystems don't need to write data blocks for freelists. Bug: 156286088 Change-Id: Ief47f2a085222a2f6a9c95b97a06ec2521e6e6f4 Merged-In: Ief47f2a085222a2f6a9c95b97a06ec2521e6e6f4
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
aosp-master
if you don't know what you're looking foraosp_cf_x86_phone
and click on userdebug
for the latest buildArtifacts
aosp_cf_x86_phone-img-xxxxxx.zip
-- it will always have img
in the name. Download this filecvd-host_package.tar.gz
. You should always download a host package from the same build as your images.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
Stop cuttlefish with:
$ 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!