script fix
All checks were successful
image / image (push) Successful in 2h2m20s

This commit is contained in:
Jorijn van der Graaf 2026-08-18 02:32:22 +02:00
commit 0b753a03e3

View file

@ -7,7 +7,7 @@
# until restored. Isolated by experiment, 2026-08-09 (fp6 journal/modem). # until restored. Isolated by experiment, 2026-08-09 (fp6 journal/modem).
# #
# This installer never lets the bootloader write boot: # This installer never lets the bootloader write boot:
# 1. fastboot erase dtbo (verified safe) # 1. fastboot erase dtbo_a/_b (verified safe)
# 2. fastboot flash userdata (rootfs; not a boot write - believed safe, # 2. fastboot flash userdata (rootfs; not a boot write - believed safe,
# final isolation pending; step 5 verifies) # final isolation pending; step 5 verifies)
# 3. fastboot boot boot.img (RAM boot - writes nothing; verified safe) # 3. fastboot boot boot.img (RAM boot - writes nothing; verified safe)
@ -57,8 +57,11 @@ EOF
read -r _ read -r _
# --- 1+2: safe fastboot writes ------------------------------------------------- # --- 1+2: safe fastboot writes -------------------------------------------------
say "erasing dtbo" # Both slots: a bare `erase dtbo` resolves to the current slot only, leaving
fastboot erase dtbo # the other one able to boot stock if the bootloader ever falls back to it.
say "erasing dtbo (both slots)"
fastboot erase dtbo_a
fastboot erase dtbo_b
say "flashing rootfs to userdata" say "flashing rootfs to userdata"
fastboot flash userdata "$ROOTFS" fastboot flash userdata "$ROOTFS"
@ -137,9 +140,7 @@ cat "$BOOT" | ssh $SSHOPTS "user@$PHONE" \
# shellcheck disable=SC2086 # shellcheck disable=SC2086
Z=$(ssh $SSHOPTS "user@$PHONE" \ Z=$(ssh $SSHOPTS "user@$PHONE" \
"$SUDO od -An -tx1 -N4096 /dev/disk/by-partlabel/modemst1 | sort -u | wc -l" 2>/dev/null || echo 0) "$SUDO od -An -tx1 -N4096 /dev/disk/by-partlabel/modemst1 | sort -u | wc -l" 2>/dev/null || echo 0)
if [ "$Z" -gt 2 ]; then if [ "$Z" -le 2 ]; then
# echo "modem NV intact."
else
cat <<'EOF' cat <<'EOF'
WARNING: the modem NV reads empty. If this device previously ran stock WARNING: the modem NV reads empty. If this device previously ran stock
Android, its factory copy (fsg) is still on the device but postmarketOS Android, its factory copy (fsg) is still on the device but postmarketOS