Fairphone 4 currently with IodéOS installed. I want to reflash the phone to Fairphone OS 11 and possibly flash either Ubports or /e/OS on the phone. I have adb and fastboot installed on a Q4OS Linux install with runit as init system.
I have tried both the Fairphone 4 script, as well as the /e/OS script. The phone is detected by fastboot:
$ sudo fastboot devices
b96db9a6 fastboot
Unfortunately neither script gets any further than this:
$ sh ./flash_FP4_factory.sh
./flash_FP4_factory.sh: 22: Bad substitution
*** Fairphone 4 flashing script ***
INFO: The procedure will start soon. Please wait...
Note that this will detect and flash only on FP4 device.
INFO: You are using a Linux distribution.
INFO: Looking for connected device(s)...
Have been following this thread as well? Essentially the wrong USB cable was the culprit. It sounds a little bit like this is the case with you as well.
One of the worst experience is using low budget USB-cables. To avoid is, use only premium USB-data-cables. Otherwise you are struggling with various strange and mysterious problems.
$ sh ./flash_fp4_factory.sh
*** Fairphone 4 flashing script ***
INFO: The procedure will start soon. Please wait...
INFO: The package type is "user-factory"
INFO: The build number is "FP4K"
INFO: You are using a Linux distribution.
INFO: Validating the integrity of the package.
This might take a while. Please wait...
INFO: Validation complete.
-en
WARNING: Flashing this image wipes all user data and settings on the phone.
It will also remove the Google factory reset protection.
Are you sure you want to continue?
Type "Yes" (case sensitive) and press enter to continue: Yes
-en
INFO: Looking for connected device(s)...
./flash_fp4_factory.sh: 102: [[: not found
-en
WARNING: No Fairphone 4 found in fastboot mode.
WARNING: Make sure that a Fairphone 4 is connected.
-en
I have tried two different cables. The first, is the same one that I used when I flashed the phone last time. It has just been sitting at home, not banging around in a bag, so I don’t see why it suddenly wouldn’t work…
in your terminal ? You enter fastboot with the device powered off, hold Volume Down + Power.
Edit:
I think, you are running the wrong shell. Which operation system you are running on ?
If you look into the script, you can see, that the shebang is looking for bash
#!/usr/bin/env bash
Try to start the script with
/bin/bash flash_FP4_factory.sh
or simply typing
./flash_FP4_factory.sh
if you shell is already bash. You can determine the shell in your environment by typing
$ ./flash_fp4_factory.sh
*** Fairphone 4 flashing script ***
INFO: The procedure will start soon. Please wait...
INFO: The package type is "user-factory"
INFO: The build number is "FP4K"
INFO: You are using a Linux distribution.
INFO: Validating the integrity of the package.
This might take a while. Please wait...
INFO: Validation complete.
WARNING: Flashing this image wipes all user data and settings on the phone.
It will also remove the Google factory reset protection.
Are you sure you want to continue?
Type "Yes" (case sensitive) and press enter to continue: Yes
INFO: Looking for connected device(s)...
INFO: One Fairphone 4 in fastboot mode found (serial number: b96db9a6).
Yes, I am using bash shell. I have the phone set to the fastbootd menu. The script exited. On the phone, I get:
Now send the package you want to apply to the device with “adb sideload ”…
Install completed with status 3.
Installation aborted.
Interesting. So, I wasn’t able to flash Fairphone OS onto the phone for some reason, but the /e/OS version flashed directly over the IodéOS. What if I want to Install UBPorts instead?
Not, if you call the script with a different interpreter like sh. On Debian, Ubuntu, … sh is linked to dash, which isn’t 100% compatible with scripts written for bash.
Using dash is the reason, why you get errors like
I checked that already. I am in the correct slot, as far as I can tell.
Please note that I successfully flashed Murena /e/ over IodéOS, but not sure what was different. I am still interested in knowing how to get Fairphone OS Android 11 back on the phone so that I can flash UBports on it.
A. I am not sure, if it is already there (yet). One could tear appart the script flash_fp4_factory.sh and execute the fastboot flash commands manually in order to observe pure fastboot commands error handling.
B. Considering the workflow, it might be worth putting the 1. fairphone in fastboot mode. 2. Then detach cable. 3. Fire up the original script. And once it awaits for an available FP4, 4. reconnect the cable.
As the title states, the article is about managing the bootloader (if it is locked). My phone was already unlocked. There is nothing about how to make sure the phone is in fastboot mode, rather than fastbootd…
I just used the usual procedure on the phone with the volume down and power on buttons. From there, I navigated to fastboot(d).
Now I am confused. So when I start the phone with the volume down button pushed, I don’t arrive at fastboot when I chose recovery mode and then advanced?