Skip to content

Include crosvm and secure_env in the debian package - #3008

Draft
Databean wants to merge 1 commit into
google:mainfrom
Databean:package_crosvm
Draft

Include crosvm and secure_env in the debian package#3008
Databean wants to merge 1 commit into
google:mainfrom
Databean:package_crosvm

Conversation

@Databean

Copy link
Copy Markdown
Member

crosvm is always built in opt to disable debug assertions, which crash over an IO safety issue in sandbox mode. As a side effect, this noticeably improves VM runtime performance.

This additionally introduces secure_env into the debian package, which makes the debian package built from the git repository complete enough to launch a device without downloading cvd-host_package.tar.gz, with some caveats. To reproduce:

$ bazel run //cuttlefish/package:cvd -- fetch \
  --default_build=git_main/aosp_cf_x86_64_only_phone-trunk_staging-userdebug \
  --target_directory=$HOME/dl \
  --host_substitutions=only \
  --bootloader_build=aosp_u-boot-mainline/u-boot_crosvm_x86_64
$ bazel run //cuttlefish/package:cvd -- create \
  --product_path=$HOME/dl \
  --host_path=$HOME/dl \
  --reuse \
  --enable_wifi=false \
  --gpu_mode=guest_swiftshader \
  --enable_sandbox=true
$ bazel run //cuttlefish/package:cvd -- clear
$ bazel run //cuttlefish/package:cvd -- create \
  --product_path=$HOME/dl \
  --host_path=$HOME/dl \
  --reuse \
  --enable_wifi=false \

Caveats:

  • There are no wifi images downloaded, so wifi is disabled.
  • There is no bootloader prebuilt, so that is added to the fetch command.

Bug: b/402274999

@Databean
Databean requested a review from jmacnak August 12, 2026 23:05
crosvm is always built in `opt` to disable debug assertions, which crash
over an IO safety issue in sandbox mode.  As a side effect, this
noticeably improves VM runtime performance.

This additionally introduces secure_env into the debian package, which
makes the debian package built from the git repository complete enough
to launch a device without downloading `cvd-host_package.tar.gz`, with
some caveats. To reproduce:

```
$ bazel run //cuttlefish/package:cvd -- fetch \
  --default_build=git_main/aosp_cf_x86_64_only_phone-trunk_staging-userdebug \
  --target_directory=$HOME/dl \
  --host_substitutions=only \
  --bootloader_build=aosp_u-boot-mainline/u-boot_crosvm_x86_64
$ bazel run //cuttlefish/package:cvd -- create \
  --product_path=$HOME/dl \
  --host_path=$HOME/dl \
  --reuse \
  --enable_wifi=false \
  --gpu_mode=guest_swiftshader \
  --enable_sandbox=true
$ bazel run //cuttlefish/package:cvd -- clear
$ bazel run //cuttlefish/package:cvd -- create \
  --product_path=$HOME/dl \
  --host_path=$HOME/dl \
  --reuse \
  --enable_wifi=false \
```

Caveats:

- There are no wifi images downloaded, so wifi is disabled.
- There is no bootloader prebuilt, so that is added to the fetch
  command.

Bug: b/402274999
@Databean

Copy link
Copy Markdown
Member Author

It looks like specifically snapshots are broken. Local repro steps:

$ bazel run //cuttlefish/package:cvd -- fetch \        
  --default_build=git_main/aosp_cf_x86_64_only_phone-trunk_staging-userdebug \
  --target_directory=$HOME/dl
$ bazel run //cuttlefish/package:cvd -- snapshot_take \
  --force \
  --auto_suspend \
  --snapshot_path=$HOME/snapshot

The second command hangs.

@Databean
Databean marked this pull request as draft August 14, 2026 01:09
@Databean

Copy link
Copy Markdown
Member Author

I couldn't reproduce the hang with a regular crosvm cargo build, but I did see that b/345541669 is still an issue, which will also block this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant