Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc6241d6 authored by Sahil Sonar's avatar Sahil Sonar 💬
Browse files

flash: factory.common: Skip super-wipe if system is logical

  * There's a weird behaviour on retrotfit dynamic, if system is already logical wipe-super fails.
  * We obviously still need wipe-super when upgrading from A12 to A15.
parent 9ecd929a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -166,8 +166,13 @@ fi

if [ "${WIPE_SUPER}" = "true" ]
then
  IS_LOGICAL=$("${FASTBOOT_BIN}" -s "${sn}" getvar is-logical:system 2>&1 | grep "is-logical:system" | awk '{print $2}')
  if [ "${IS_LOGICAL}" != "yes" ]; then
    echo "INFO: Wiping super image"
    "${FASTBOOT_BIN}" -s "${sn}" wipe-super "${IMAGES_DIR}/super_empty.img"
  else
    echo "INFO: System partition is already logical, skipping wipe-super"
  fi
fi

  flash_images_ab_or_abort "${sn}" "${FLASH_AB_IMGS}"