diff --git a/flash/FP3/flash_FP3_factory.sh b/flash/FP3/flash_FP3_factory.sh index 566cedcd39c1350b035d74861d8eae70197ecedc..2a601ae3c546a92650d392c5953aae6313280672 100755 --- a/flash/FP3/flash_FP3_factory.sh +++ b/flash/FP3/flash_FP3_factory.sh @@ -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 diff --git a/flash/FP4/flash_FP4_factory.sh b/flash/FP4/flash_FP4_factory.sh index 608b770aac08ccae726035b0e5e0396514497b56..3078fc6a8b5939536c111c86e587833da1fd5564 100755 --- a/flash/FP4/flash_FP4_factory.sh +++ b/flash/FP4/flash_FP4_factory.sh @@ -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 diff --git a/flash/FP5/flash_FP5_factory.sh b/flash/FP5/flash_FP5_factory.sh index 122086077ff0efe1982d2a191abdd0e9753b2719..1a28d82377cf4c3d98e7c3ed8aa4edce6ea6f2de 100755 --- a/flash/FP5/flash_FP5_factory.sh +++ b/flash/FP5/flash_FP5_factory.sh @@ -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