Installation on FP5 - stuck at flashing both on Win11 and Ubuntu

I’m struggling to install 2.5t

Under Win11 when I execute
chmod +x flash_FP5_factory.sh && ./flash_FP5_factory.sh
I get an error that the device is not unlocked. But I’m pretty sure it is because I’ve followed the instructions to the letter multiple times, (fastboot flashing unlock_critical, booted to bootloader and see device status as unlocked).

So I read somewhere that it might be a Win problem so I switched to Ubuntu and now I get to
chmod +x flash_FP5_factory.sh && ./flash_FP5_factory.sh
and it hangs on “Looking for connected devices”. If I issue the command
adb devices
I get nothing in return, no device listed. But the command
adb reboot bootloader
reboots to bootloader
On the other hand with the command
fastboot devices -l
I get
(correct serial no.) fastboot usb:2-3

Any ideas would be much appreciated.

Still stuck …

On Win11 I have checked I have the latest composite USB driver
I have tried three different cables
I still get the error message telling me the phone is locked.

In Ubuntu I have made sure I am a member of the right group to use the USB
I have tried sudo for all commands
I still can’t connect to the FP when I run the flashing command.

Back on Win11 today and still looking for a solution.

Any ideas ?

In case one wants to prepare an answer … with which are you more comfortable … Windows or Ubuntu. Let’s not continue with both :slight_smile:

Perhaps the problem is not specific to your PC OS … I am thinking let’s concentrate on the device … was there anything in the install page Install /e/OS on a Fairphone FP5 - “FP5” before the section

Unlocking the bootloader

… which might have seemed “difficult” in any way ??

Just as it’s not mentioned…
You also used fastboot flashing unlock (without “_critical”), right?

@aibd I am comfortable with both. At work I use Windows for 3d modeling and Ubuntu for everything else. At home, (which is where I mostly do this because I can’t take too much time out at work), I have to use Windows because of the 3d modelling problem, (can’t run Fusion 360 on Linux), and I only have one laptop. I never managed to get dual boot running properly as Windows trashed the boot sequence with every update.

Unlocking the bootloader was not difficult. I have previously installed e/os on my Samsung, (twice), and also on my tablet without too much difficulty.

@ff2u Yes, I used fastboot flashing unlock then _critical unlock and it all went according to the instructions.

1 Like

Sorry but just doing small things at a time, others have previously not immediately spotted the difference between fastboot and fastbootd.

So the test for fastboot, is of course

fastboot devices

I make a point of always running this before each fastboot operation, just to check for any silly mistake.

After unlock, the device will Factory reset, so you should go back to the phone and do enable Developer options > USB debugging/enable OEM unlock (one or both, not sure with FP5, but just as you did the first time).

I think the problem could be into the script as pointed in a recent post

No problem with my new FP3 3 days ago…

@aibd I run fastboot devices -l to check and the serial number and USB port comes up. I also have tried rebooting the stock ROM and starting from scratch, re-locking, unlocking, re-wiping, (with fastboot unlock / _critical unlock), and the script just gets stuck thinking my phone is still locked.

@piero I have seen that thread and commented. A user even posted a flashing script to replace the e/os supplied version but I hesitate to use it because, well, I don’t know that user, they’ve been in the community for only a month, I don’t know where they are in the e/os ecosystem and I don’t have the skills to validate the script myself.

I also see that an easyinstaller beta was produced then rescinded, I think because of the security patch bricking issue. I am half tempted to try that now defunct version because my security patch dates are good.

I’m in a bind because I have already resold my old 'phone, (this FF5 is replacing my Samsung), so need to re-install stock on the Samsung and get that in the post tomorrow. I didn’t anticipate this setback, duh.

Edit The test I first wrote below fails to test the fastboot executable which comes with the download, as opposed to any fastboot you have as system installed.

So fastboot devices will test system installed as will fastboot --version

Please now navigate to bin-Linux-x86 or the similarly named folder in your downloaded ROM, check for the fastboot executable there, then try

./fastboot version
./fastboot devices

Please can you paste the full trace of the failing script run.

I would like to look at the script you are using. Did you download official or community?

1 Like

I downloaded Stable. I tried both 2.4.1 and 2.5

I’ve been using ./ before the commands btw

This is the output from the flashing command:

$ chmod +x flash_FP5_factory.sh && ./flash_FP5_factory.sh

*** Fairphone 5 flashing script ***

INFO: The procedure will start soon. Please wait…
Note that this will detect and flash only on Fairphone 5 device.
INFO: You are using MinGW on Windows
INFO: Looking for connected device(s)…
INFO: One Fairphone 5 in fastboot mode found (serial number: 1f070822).
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…

Also, when running fastboot flashing unlock again, I get:

Nick@NDLenovo MINGW64 /c/platform-tools
$ ./fastboot flashing unlock
FAILED (remote: ’ Device already : unlocked!')
fastboot: error: Command failed

Nick@NDLenovo MINGW64 /c/platform-tools
$ ./fastboot flashing unlock_critical
FAILED (remote: ’ Device already : unlocked!')
fastboot: error: Command failed

I decided to start again from scratch, re-locked the phone and went back to the beginning, by which I mean right back to:

  • Enter the code for USB unlocking. OK
  • Reboot to recovery with adb. OK
  • Flashing unlock and rebooting directly into bootloader (I had previously noted that if you boot back into Android after unlock then the USB debugging fails and you have to go back into developer settings to put that right). OK
  • Flashing unlock_critical and rebooting directly into bootloader and not into Android. OK
  • Check fastboot with ./fastboot devices. OK
  • Execute flashing script. FAIL. Device returns locked error message as before.

I’ve spent the best part of a day on this and have to give up for the moment. What I hate is that tomorrow I’ll be using a google phone for the first time in many, many years which is beyond frustrating.

You can reproduce the changes from the FP4 script to the FP5 one, or use the traditionnal fastboot method is place of the script one.

Where can I find a guide to, “the traditional fastboot method” ?

Thank you for the detailed outputs.

Ok, firstly, perhaps you have no platform-tools system installed …
… but I still don’t know for certain if Edit you and the script have access to two different versions of fastboot :slight_smile:

So here you are in platform-tools

whereas

will run the fastboot parts of script out of /your/path/to/IMG-e-2.5-t-20241108446629-official-FP5/bin-linux-x86.

Personally I would really want to resolve this, maybe you feel you have, but of course I cannot see what you can see.

The start of the script tries to ensure nothing is wrong with the environment … to sidestep the script one would have to be really confident in the manual steps.

If you take some time to read [HOW-TO] Flash /e/-OS on Fairphone 3 using Debian based GNU/Linux Note it is FP3, you will see towards the end of the OP, just after the short paragraph starting Update May 2023

Back to your FP5

Compare the above with the contents of your unzipped folder

I found this


$ cd test-fp5/
~/test-fp5$ cd IMG-e-2.5-t-20241108446629-official-FP5/

~/test-fp5/IMG-e-2.5-t-20241108446629-official-FP5$ ls
abl.img        devcfg.img            keymaster.img    uefisecapp.img
aop.img        dsp.img               modem.img        vbmeta.img
bin-linux-x86  dtbo.img              multiimgoem.img  vbmeta_system.img
bin-msys       featenabler.img       qupfw.img        vendor_boot.img
bluetooth.img  flash_FP5_factory.sh  shrm.img         xbl_config.img
boot.img       hyp.img               super.img        xbl.img
cpucp.img      imagefv.img           tz.img

If you felt confident enough you could deconstruct the script and take just the install lines from line 114 - 148 as guidance and flash each of the .img files to the relevant partition.

Late edit Inspired by this in the script:

    echo "ERROR: Could not flash the ${2} partition on device ${1}."
    echo ""
    echo "ERROR: Please unplug the phone, take the battery out, boot the device into"
    echo "ERROR: fastboot mode, and start this script again."

You might consider, with the phone unlocked, and briefly checking that the existing OS seems to run correctly, shutdown and removal of the battery – before a fresh start.

Simply flash all partitions.img included into the IMG-e.zip

Thanks for your input - it’s really appreciated. Shame you’re not in Arles!

I have platform-tools installed at C:\platform-tools, IMG-e-2.5-t-20241108446629-official-FP5 is on my D:\ drive. Two versions of fastboot…? I don’t know what’s going on there.

Personally I would really want to resolve this, maybe you feel you have, but of course I cannot see what you can see.

I don’t understand the logic of having :

I have followed plenty of install guides with success, (on my old LG I installed various OS’s including Firefox, Ubuntu, AOSP etc.), so I am not incapable. Either I am missing some step in the install logic or it’s the script. Probably it’s me.

The start of the script tries to ensure nothing is wrong with the environment … to sidestep the script one would have to be really confident in the manual steps.

I’m not going to sidestep the script but I will install the traditional way if this carries on. On my Samsung I got into the habit of booting to the E recovery and installing from an SD card. Really simple. But I don’t see any e/os recovery I can flash for the FP5.

First I only want to rule it out, secondly some comments, like [1], have suggested that the script is failing through failing to connect to fastboot.

So I an referring to this from install page Install /e/OS on a Fairphone FP5 - “FP5”

  1. Confirm that extracted directory contains following content:
  • bin-linux-x86 directory - which contains linux tools including fastboot and adb
  • bin-msys directory - which contains Windows tools including fastboot and adb.
  • .img files - The .img files that are to be flashed onto the device.
  • flash_FP5_factory.sh - The installer script.
On my machine versions are as
$ cd platform-tools
~/platform-tools$ ./fastboot --version
fastboot version 35.0.2-12147458
Installed as /home/iain/platform-tools/fastboot

~$ cd test-fp5/
~/test-fp5$ cd IMG-e-2.5-t-20241108446629-official-FP5/
~/test-fp5/IMG-e-2.5-t-20241108446629-official-FP5$ cd bin-linux-x86/
~/test-fp5/IMG-e-2.5-t-20241108446629-official-FP5/bin-linux-x86$ ./fastboot --version
fastboot version 33.0.3-8952118
Installed as /home/iain/test-fp5/IMG-e-2.5-t-20241108446629-official-FP5/bin-linux-x86/fastboot

To be clear I am only making the point in case that your (successful) unlocking may be happening in a way different from the script.

I don’t know Fairphone in “hands on detail”, but they are different hence the reason for the install method being a Fastboot ROM (all_in_one).

[1]

Edit. If using Windows then this applies

Windows users, we advise to use Git Bash. For more info about Downloads and Installation see Official Documentation

and fastboot will be your equivalent of

/home/iain/test-fp5/IMG-e-2.5-t-20241108446629-official-FP5/bin-msys/fastboot.exe