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

Commit 604fa532 authored by Rohit Sekhar's avatar Rohit Sekhar
Browse files

Merge branch '8365-t-fpx_unlock_check' into 'v1-t'

fixup! flash_FPx_factory.sh: Check if phone is unlocked

See merge request !176
parents c7bddcdb 693f0c57
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -89,21 +89,21 @@ find_device() {
# Check if the device is properly unlocked
check_unlock_status() {
  PHONE_IS_READY=true
  if (fastboot getvar is-userspace 2>&1 | grep -q yes); then
  if ("${FASTBOOT_BIN}" getvar is-userspace 2>&1 | grep -q yes); then
    echo "Info: Your phone is in fastbootD mode."
    if (fastboot getvar unlocked 2>&1 | grep -q no); then
    if ("${FASTBOOT_BIN}" getvar unlocked 2>&1 | grep -q no); then
      echo "Error: Your phone is still locked."
      echo "Did you execute 'fastboot flashing unlock'?"
      PHONE_IS_READY=false
    fi
  else
    echo "Info: Your phone is in regular bootloader mode."
    if (fastboot getvar unlocked 2>&1 | grep -q no); then
    if ("${FASTBOOT_BIN}" getvar unlocked 2>&1 | grep -q no); then
      echo "Error: Your phone is still locked."
      echo "Did you execute 'fastboot flashing unlock'?"
      PHONE_IS_READY=false
    fi
    if (fastboot oem device-info 2>&1 | grep -q "critical unlocked: false"); then
    if ("${FASTBOOT_BIN}" oem device-info 2>&1 | grep -q "critical unlocked: false"); then
      echo "Error: Critical partitions are still locked."
      echo "Did you execute 'fastboot flashing unlock_critical'?"
      PHONE_IS_READY=false
+4 −4
Original line number Diff line number Diff line
@@ -84,21 +84,21 @@ find_device() {
# Check if the device is properly unlocked
check_unlock_status() {
  PHONE_IS_READY=true
  if (fastboot getvar is-userspace 2>&1 | grep -q yes); then
  if ("${FASTBOOT_BIN}" getvar is-userspace 2>&1 | grep -q yes); then
    echo "Info: Your phone is in fastbootD mode."
    if (fastboot getvar unlocked 2>&1 | grep -q no); then
    if ("${FASTBOOT_BIN}" getvar unlocked 2>&1 | grep -q no); then
      echo "Error: Your phone is still locked."
      echo "Did you execute 'fastboot flashing unlock'?"
      PHONE_IS_READY=false
    fi
  else
    echo "Info: Your phone is in regular bootloader mode."
    if (fastboot getvar unlocked 2>&1 | grep -q no); then
    if ("${FASTBOOT_BIN}" getvar unlocked 2>&1 | grep -q no); then
      echo "Error: Your phone is still locked."
      echo "Did you execute 'fastboot flashing unlock'?"
      PHONE_IS_READY=false
    fi
    if (fastboot oem device-info 2>&1 | grep -q "critical unlocked: false"); then
    if ("${FASTBOOT_BIN}" oem device-info 2>&1 | grep -q "critical unlocked: false"); then
      echo "Error: Critical partitions are still locked."
      echo "Did you execute 'fastboot flashing unlock_critical'?"
      PHONE_IS_READY=false
+4 −4
Original line number Diff line number Diff line
@@ -84,21 +84,21 @@ find_device() {
# Check if the device is properly unlocked
check_unlock_status() {
  PHONE_IS_READY=true
  if (fastboot getvar is-userspace 2>&1 | grep -q yes); then
  if ("${FASTBOOT_BIN}" getvar is-userspace 2>&1 | grep -q yes); then
    echo "Info: Your phone is in fastbootD mode."
    if (fastboot getvar unlocked 2>&1 | grep -q no); then
    if ("${FASTBOOT_BIN}" getvar unlocked 2>&1 | grep -q no); then
      echo "Error: Your phone is still locked."
      echo "Did you execute 'fastboot flashing unlock'?"
      PHONE_IS_READY=false
    fi
  else
    echo "Info: Your phone is in regular bootloader mode."
    if (fastboot getvar unlocked 2>&1 | grep -q no); then
    if ("${FASTBOOT_BIN}" getvar unlocked 2>&1 | grep -q no); then
      echo "Error: Your phone is still locked."
      echo "Did you execute 'fastboot flashing unlock'?"
      PHONE_IS_READY=false
    fi
    if (fastboot oem device-info 2>&1 | grep -q "critical unlocked: false"); then
    if ("${FASTBOOT_BIN}" oem device-info 2>&1 | grep -q "critical unlocked: false"); then
      echo "Error: Critical partitions are still locked."
      echo "Did you execute 'fastboot flashing unlock_critical'?"
      PHONE_IS_READY=false