Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/build-debian-packages/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ runs:
run: |
sudo docker build --file "tools/buildutils/cw/Containerfile" --tag "android-cuttlefish-build" .
sudo docker run -v=$PWD:/mnt/build -w /mnt/build -v=$HOME/bazel-disk-cache:/root/bazel-disk-cache android-cuttlefish-build base -d /root/bazel-disk-cache
sudo docker run -v=$PWD:/mnt/build -w /mnt/build android-cuttlefish-build container
sudo docker run -v=$PWD:/mnt/build -w /mnt/build android-cuttlefish-build frontend
sudo docker run -v=$PWD:/mnt/build -w /mnt/build android-cuttlefish-build cuttlefish-integration-gigabyte-arm64
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ jobs:
matrix:
dir:
- "e2etests"
- "container/src/libcfcontainer"
- "container/src/podcvd"
- "frontend/src/host_orchestrator"
- "frontend/src/libcfcontainer"
- "frontend/src/libhoclient"
- "frontend/src/liboperator"
- "frontend/src/operator"
- "frontend/src/podcvd"
- "tools/baseimage"
steps:
- name: Checkout repository
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ cuttlefish-*_*.*.*.tar.xz
/*/debian/debhelper-build-stamp
/*/debian/*.log

container/src/podcvd/podcvd

frontend/src/operator/webui/src/environments/version.ts

/bazel-*
Expand Down
5 changes: 5 additions & 0 deletions container/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cuttlefish-container (1.46.0) UNRELEASED; urgency=medium

*

-- Seungjae Yoo <seungjaeyoo@google.com> Tue, 03 Mar 2026 16:49:04 +0900
20 changes: 20 additions & 0 deletions container/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: cuttlefish-container
Maintainer: Cuttlefish Team <cloud-android-ext@google.com>
Section: misc
Priority: optional
Build-Depends: config-package-dev,
debhelper-compat (= 12),
golang (>= 2:1.23~) | golang-1.23,
Standards-Version: 4.5.0
Rules-Requires-Root: no

Package: cuttlefish-podcvd
Architecture: any
Depends: adb,
android-sdk-platform-tools-common,
podman,
Pre-Depends: ${misc:Pre-Depends}
Description: Cuttlefish Android Virtual Device companion package
Contains a binary named 'podcvd' needed to launch Cuttlefish Android
Virtual Device on the isolated host environment prepared on rootless
container instances.
5 changes: 5 additions & 0 deletions container/debian/cuttlefish-podcvd.cuttlefish-podcvd.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# defaults for cuttlefish-podcvd

# CIDR of 'podcvd' network interface used for routing into IP addresses of
# Cuttlefish container instances.
#podcvd_cidr=192.168.80.0/24
74 changes: 74 additions & 0 deletions container/debian/cuttlefish-podcvd.cuttlefish-podcvd.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash
#
### BEGIN INIT INFO
# Provides: cuttlefish-podcvd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Setup initial environment to use podcvd
# Description: This script sets up initial environment to launch
# Cuttlefish instances on the container instance via podcvd,
# such as network interface preparation.
### END INIT INFO
#
# Copyright (C) 2026 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if [ -f /etc/default/cuttlefish-podcvd ]; then
. /etc/default/cuttlefish-podcvd
fi
podcvd_cidr=${podcvd_cidr:-192.168.80.0/24}

podcvd_ifname="podcvd"

start() {
ip link add "${podcvd_ifname}" type dummy
ip link set "${podcvd_ifname}" up
ip route add local "${podcvd_cidr}" dev "${podcvd_ifname}"
}

stop() {
for cidr in $(ip route show table local dev ${podcvd_ifname} | awk '{print $2}'); do
ip route del local "${cidr}" dev "${podcvd_ifname}" || true
done
ip link set dev "${podcvd_ifname}" down || true
ip link del "${podcvd_ifname}" || true
}

usage() {
echo $0: start\|stop\|status
}

if test $# != 1; then
usage
fi
case "$1" in
condrestart|force-reload|reload|restart|try-restart)
stop && start
;;
shutdown|stop)
stop
;;
start)
start
;;
status)
rh_status
;;
*)
usage
;;
esac
exit $RETVAL
1 change: 1 addition & 0 deletions container/debian/cuttlefish-podcvd.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/podcvd/podcvd /usr/lib/cuttlefish-common/bin/
1 change: 1 addition & 0 deletions container/debian/cuttlefish-podcvd.links
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/usr/lib/cuttlefish-common/bin/podcvd /usr/bin/podcvd
42 changes: 42 additions & 0 deletions container/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/make -f

# Start build by executing:
# $ debuild --prepend-path /usr/local/bin -i -us -uc

# Uncomment this line out to make installation process more chatty.
# Keep it on until we know there's no outstanding problems with installation.
# export DH_VERBOSE=1

GOBIN := $$(which go || echo /usr/lib/$$(ls /usr/lib | grep "^go-1." | sort -V | tail -1)/bin/go)
PODCVD_SOURCE_DIR := src/podcvd

%:
dh $@ --with=config-package

.PHONY: override_dh_auto_build
override_dh_auto_build:
(cd ${PODCVD_SOURCE_DIR} && $(GOBIN) build -v -buildmode=pie -ldflags="-w")

.PHONY: override_dh_auto_test
override_dh_auto_test:
(cd ${PODCVD_SOURCE_DIR} && $(GOBIN) test)
dh_auto_test

.PHONY: override_dh_installinit
override_dh_installinit:
dh_installinit --name=cuttlefish-podcvd
dh_installinit

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
rm -f $(PODCVD_SOURCE_DIR)/podcvd
dh_auto_clean

# Debug info was stripped by ldflags=-w
.PHONY: override_dh_dwz
override_dh_dwz:

# Debug info was stripped by ldflags=-w
.PHONY: override_dh_strip
override_dh_strip:
dh_strip --no-automatic-dbgsym
1 change: 1 addition & 0 deletions container/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
3 changes: 3 additions & 0 deletions container/debian/source/lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This is a "local package" for now
cuttlefish-container source: no-nmu-in-changelog
cuttlefish-container source: source-nmu-has-incorrect-version-number
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (m *CuttlefishContainerManagerImpl) ExecOnContainer(ctx context.Context, ct
func (m *CuttlefishContainerManagerImpl) StopAndRemoveContainer(ctx context.Context, ctr string) error {
timeout := int(30)
stopConfig := container.StopOptions{
Signal: "SIGKILL",
Signal: "SIGKILL",
Timeout: &timeout,
}
if err := m.cli.ContainerStop(ctx, ctr, stopConfig); err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/google/android-cuttlefish/frontend/src/libcfcontainer
module github.com/google/android-cuttlefish/container/src/libcfcontainer

go 1.24.0

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ podcvd is experimental project. A lot of features may be unstable today.

```bash
cd /path/to/android-cuttlefish
cd frontend/src/podcvd
cd container/src/podcvd
go build .
```

Expand Down
6 changes: 3 additions & 3 deletions frontend/src/podcvd/go.mod → container/src/podcvd/go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/google/android-cuttlefish/frontend/src/podcvd
module github.com/google/android-cuttlefish/container/src/podcvd

go 1.24.0

toolchain go1.24.8

replace github.com/google/android-cuttlefish/frontend/src/libcfcontainer => ../libcfcontainer
replace github.com/google/android-cuttlefish/container/src/libcfcontainer => ../libcfcontainer

require github.com/google/android-cuttlefish/frontend/src/libcfcontainer v0.0.0-00010101000000-000000000000
require github.com/google/android-cuttlefish/container/src/libcfcontainer v0.0.0-00010101000000-000000000000

require (
dario.cat/mergo v1.0.2 // indirect
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"os/exec"

"github.com/google/android-cuttlefish/frontend/src/libcfcontainer"
"github.com/google/android-cuttlefish/container/src/libcfcontainer"
)

func ConnectAdb(ccm libcfcontainer.CuttlefishContainerManager, instanceGroup InstanceGroup) error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"time"

"github.com/google/android-cuttlefish/frontend/src/libcfcontainer"
"github.com/google/android-cuttlefish/container/src/libcfcontainer"

"github.com/containerd/errdefs"
"github.com/docker/docker/api/types/container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"crypto/sha256"
"fmt"

"github.com/google/android-cuttlefish/frontend/src/libcfcontainer"
"github.com/google/android-cuttlefish/container/src/libcfcontainer"

"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/podcvd/main.go → container/src/podcvd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"os"
"sync"

"github.com/google/android-cuttlefish/frontend/src/libcfcontainer"
"github.com/google/android-cuttlefish/frontend/src/podcvd/internal"
"github.com/google/android-cuttlefish/container/src/libcfcontainer"
"github.com/google/android-cuttlefish/container/src/podcvd/internal"
)

func disconnectAdb(ccm libcfcontainer.CuttlefishContainerManager, groupName string) error {
Expand Down
1 change: 0 additions & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/src/host_orchestrator/host_orchestrator
/src/podcvd/podcvd
/src/cvdserver_bootstrapper/cvdserver_bootstrapper
/src/operator/operator
Loading