Skip to content

A rootless Android app that boots Alpine Linux: run containers (Podman/Docker/LXC) and GUI desktop apps.

fix(build): make the boot test honest and the deploy in place

ExTv76e32184a89f
diff --git a/build-all.sh b/build-all.sh
index 727151f..b575e21 100755
--- a/build-all.sh
+++ b/build-all.sh
@@ -42,7 +42,6 @@ Commands:
clean Remove build artifacts and temporary containers
Options:
- --fast Skip QEMU native builds if binaries already exist
--help Show this help message
EOF
@@ -165,7 +164,6 @@ build_apk() {
deploy_apk() {
log "Deploying to device..."
- adb uninstall com.excp.podroid.debug || warn "Uninstall failed (likely not installed)."
adb install -r app/build/outputs/apk/debug/app-debug.apk
success "Deployed and ready."
}
@@ -185,9 +183,8 @@ run_boot_test() {
deploy_apk
# Reset State
- log "Resetting VM storage for clean test..."
+ log "Resetting boot log for clean test..."
adb shell am force-stop "$pkg" 2>/dev/null || true
- adb shell run-as "$pkg" rm -f files/storage.img 2>/dev/null || true
adb shell run-as "$pkg" rm -f files/console.log 2>/dev/null || true
# Launch
@@ -221,7 +218,7 @@ run_boot_test() {
console=$(adb shell run-as "$pkg" cat files/console.log 2>/dev/null || echo "")
local errors=0
- local checks=("Podroid - Alpine Linux" "IP:" "Ready!" "Loading kernel modules")
+ local checks=("Loading kernel modules" "Network found" "Almost ready" "Ready!")
for check in "${checks[@]}"; do
if echo "$console" | grep -q "$check"; then
success "Check passed: $check"
@@ -242,9 +239,6 @@ run_boot_test() {
[ $# -eq 0 ] && { show_help; exit 1; }
-FAST=false
-for arg in "$@"; do [ "$arg" == "--fast" ] && FAST=true; done
-
case "$1" in
kernel) build_kernel ;;
initramfs) build_initramfs ;;
diff --git a/build-rootfs/build-rootfs.sh b/build-rootfs/build-rootfs.sh
index 9c03913..206ba9b 100755
--- a/build-rootfs/build-rootfs.sh
+++ b/build-rootfs/build-rootfs.sh
@@ -53,8 +53,8 @@ apk -X "https://dl-cdn.alpinelinux.org/alpine/v${ALPINE_BRANCH}/main" \
# does this, but we set them explicitly so the squashfs ships with the
# correct security.capability xattr (preserved by mksquashfs without -no-xattrs).
if command -v setcap >/dev/null 2>&1; then
- setcap cap_setuid+ep "$ROOTFS/usr/bin/newuidmap" 2>/dev/null || true
- setcap cap_setgid+ep "$ROOTFS/usr/bin/newgidmap" 2>/dev/null || true
+ setcap cap_setuid+ep "$ROOTFS/usr/bin/newuidmap"
+ setcap cap_setgid+ep "$ROOTFS/usr/bin/newgidmap"
fi
# Ensure doas and sudo are setuid-root. apk usually does this, but on
@@ -132,8 +132,6 @@ ln -sf podroid-hostd "$ROOTFS/usr/local/bin/podroid-power"
ln -sf podroid-hostd "$ROOTFS/usr/local/bin/podroid-headless"
ln -sf podroid-hostd "$ROOTFS/usr/local/bin/podroid-server"
chmod +x "$ROOTFS/usr/local/bin/podroid-"*
-mkdir -p "$ROOTFS/etc/conf.d"
-cp /work/files/etc/conf.d/podroid "$ROOTFS/etc/conf.d/"
# vsock agent's initial forward table (read at podroid-vsock startup).
mkdir -p "$ROOTFS/etc/podroid"
cp /work/files/etc/podroid/forwards.conf "$ROOTFS/etc/podroid/forwards.conf"