when i try to run the flash_FP4_factory.sh script i get the following text:
Info: Your phone is in regular bootloader mode.
Error: Your phone is still locked.
Did you execute ‘fastboot flashing unlock’?
Error: Your phone is not ready for flashing yet (see above), aborting…
however, i ran ‘fastboot flashing unlock’ and if i try again, it tells me the device is already unlocked.
does anyone have any idea what the issue might be?
I just ran into this issue as well. The problem for me was that the bash script tries to run fastboot but if you don’t add fastboot and adb to your path, the script will error and tell you that your phone is still locked. TBH very weird that the script doesn’t check if fastboot is availabe.
To fix the script, run export PATH="$<path-to-platform-tools>/platform-tools:$PATH" so that the bash script can actually find fastboot. (Obviously replace <path-to-platform-tools> with the actual path)
adb and fastboot are included with the downloaded ROM and as long as the unzipped download remains intact and the user changes directory to work there the script is expected to find fastboot within the ROM.
include adb and fastboot in the bin-linux-x86 directory. However, the flash_FP4_factory.sh script included with the build does not correctly call fastboot in the function check_unlock_status(). The whole function is pretty hacky. I am pretty busy, but I will try to send a bug report or a patch later, just have to read up on how to do that for e/OS.
I’m having the same issue although I unlocked successfully git Bash it shows the “Error: Your phone is still locked” message.
I tried your instructions but failed…
Here ist what I did: (I’m doing it on windows)
I run gitBash within the unzipped folder (with all the files and the two folders with adb)
then I run your command, in my case: export PATH="$</c/Fairphone4eOSinstallation/bin-msys>/platform-tools:$PATH"
I’m not sure if something happend but there is no error message either
then I run the flashing command (and I have the same error agin)
any idea what I’m doing wrong? or maybe I should add it directly in the script?
UPDATE
As I did not succeed with Noel’s solution I did use an other method. I just edited the flash_FP4_factory.ch and deleted the part from the code where the unlock status of the phone is checked as well as the variable mentioning of the unlock check (or what it is ^^) at the end of the script.
But I must admit I am not entirely sure what happens if you do that and your device is actually still locked. So be careful please.(be sure your device is unlocked)
It worked very fine for me and I have /e/ OS on the phone now
I also ran into this issue yesterday and today with my new Fairphone 5 and the flash_FP5_factory.sh script (eOS image 2.4.1 (stable)). I had the bootloader unlocked, but the flash-fp5-script complained falsely about the phone still being locked.
In my opinion, the script defines the fastboot-binary correctly in the function ‘os_checks()’.
However the function ‘check_unlock_status()’ uses a plain “fastboot” instead of the variable “${FASTBOOT_BIN}” (where the correct binary is stored). This probably has been forgotten to be adjusted in the script.
I replaced the “fastboot” commands inside ‘check_unlock_status()’ with the variable “${FASTBOOT_BIN}” and afterwards the script passes the check, detects the correct fastboot mode and does not complain anymore about the phone still being locked.
The changed function ‘check_unlock_status()’ looks like this after the modification:
# Check if the device is properly unlocked
check_unlock_status() {
PHONE_IS_READY=true
if ("${FASTBOOT_BIN}" getvar is-userspace 2>&1 | grep -q yes); then
echo "Info: Your phone is in fastbootD mode."
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_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_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
fi
fi
if [ "$PHONE_IS_READY" = "false" ]; then
echo "Error: Your phone is not ready for flashing yet (see above), aborting..."
exit 1
fi
}
I will also ping the developer of the script (mentioned inside the script) about this thread so that this issue can be addressed properly.