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

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

Merge branch '1705-t-GS290' into 'v1-t'

flash: factory.common: Don't break flashing if oem device-info is not supported

See merge request !257
parents e255566d bda050fa
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -30,8 +30,10 @@ check_unlock_status() {
      echo "Please follow the instructions to unlock the bootloader!"
      PHONE_IS_READY=false
    fi
    DEVICE_INFO_OUTPUT=$("${FASTBOOT_BIN}" oem device-info 2>&1)
    if [[ $DEVICE_INFO_OUTPUT != *"Device critical unlocked: true"* ]]; then
    DEVICE_INFO_OUTPUT=$("${FASTBOOT_BIN}" oem device-info 2>&1 || true)
    if [[ $DEVICE_INFO_OUTPUT == *"unknown command"* ]] || [[ $DEVICE_INFO_OUTPUT == *"FAILED"* ]]; then
      echo "Info: Device does not support 'oem device-info', skipping critical unlock check."
    elif [[ $DEVICE_INFO_OUTPUT != *"Device critical unlocked: true"* ]]; then
      echo "Error: Critical partitions are not unlocked."
      echo "Please execute 'fastboot flashing unlock_critical' first!"
      PHONE_IS_READY=false