From f457bac1980b93585541ed8f36c0864ec05a842e Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sun, 9 Aug 2026 02:35:00 +0200 Subject: [PATCH] install.sh: capture fastboot output before testing it - grep -q SIGPIPE wedge The lock-check piped 'fastboot oem device-info' into grep -q, which exits on first match; fastboot dies of SIGPIPE mid-transaction and leaves the bootloader's fastboot state machine wedged, hanging the NEXT command (the mysterious erase-dtbo stall). Capture-then-test everywhere. Co-Authored-By: Claude Fable 5 --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 2be0299..5c86647 100755 --- a/install.sh +++ b/install.sh @@ -43,9 +43,15 @@ command -v fastboot >/dev/null || die "fastboot not found (install android-tools command -v ssh >/dev/null || die "ssh not found" [ -f "$BOOT" ] || die "$BOOT not found (download it from the release)" [ -f "$ROOTFS" ] || die "$ROOTFS not found (download it from the release)" -fastboot devices 2>/dev/null | grep -q fastboot || \ +# NEVER pipe fastboot into grep -q or anything that exits early: the reader +# quitting mid-output SIGPIPEs fastboot to death mid-transaction and leaves +# the bootloader's fastboot state machine wedged - the NEXT command then +# hangs. Capture completely, test afterwards. +DEVICES=$(fastboot devices 2>/dev/null || true) +printf '%s' "$DEVICES" | grep -q fastboot || \ die "no device in fastboot mode (Vol-down + Power, USB connected)" -fastboot oem device-info 2>&1 | grep -q "Device unlocked: true" || \ +DEVINFO=$(timeout 20 fastboot oem device-info 2>&1 || true) +printf '%s' "$DEVINFO" | grep -q "Device unlocked: true" || \ die "bootloader is LOCKED - nothing was changed. Unlock it first (OEM unlocking in Android developer settings + Fairphone's unlock code: https://support.fairphone.com/hc/en-us/articles/10492476238737),