Revert from CalyxOS to Official Stock ROM

Hi, fellow fairphoners!
I used my fairphone4 happily for almost 2 years now with calyxOS and felt like i wasnt missing a thing, but ive now upgraded to a fairphone5, and handed my 4 down to my GF.
Im somewhat stuck reverting to stock now tho. Ive downloaded the most recent fastboot package from here and ran the .sh file from cli. Im on EndeavourOS (Arch) and my platform-tools are correctly installed und working. I work with adb and fastboot a lot so i can warrant for that, as you can also see below.

*** Fairphone 4 flashing script ***

INFO: The procedure will start soon. Please wait...
INFO: The package type is "user-factory"
INFO: The build number is "TP29"
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: eXXXXXXX).
INFO: The device is fully unlocked.
INFO: Proceeding to flash the device.
INFO: flashing partitions...
Sending 'abl_a' (152 KB)                           OKAY [  0.009s]
Writing 'abl_a'                                    OKAY [  0.002s]
Finished. Total time: 0.022s
Sending 'abl_b' (152 KB)                           OKAY [  0.006s]
Writing 'abl_b'                                    OKAY [  0.002s]
Finished. Total time: 0.018s
Sending 'aop_a' (174 KB)                           OKAY [  0.015s]
Writing 'aop_a'                                    OKAY [  0.003s]
Finished. Total time: 0.028s
Sending 'aop_b' (174 KB)                           OKAY [  0.005s]
Writing 'aop_b'                                    OKAY [  0.003s]
Finished. Total time: 0.018s
Sending 'bluetooth_a' (940 KB)                     OKAY [  0.033s]
Writing 'bluetooth_a'                              OKAY [  0.004s]
Finished. Total time: 0.049s
Sending 'bluetooth_b' (940 KB)                     OKAY [  0.032s]
Writing 'bluetooth_b'                              OKAY [  0.004s]
Finished. Total time: 0.048s
Sending 'boot_a' (98304 KB)                        OKAY [  2.414s]
Writing 'boot_a'                                   OKAY [  0.248s]
Finished. Total time: 2.672s
Sending 'boot_b' (98304 KB)                        OKAY [  2.410s]
Writing 'boot_b'                                   OKAY [  0.225s]
Finished. Total time: 2.645s
Sending 'core_nhlos_a' (111900 KB)                 OKAY [  2.746s]
Writing 'core_nhlos_a'                             OKAY [  0.280s]
Finished. Total time: 3.104s
Sending 'core_nhlos_b' (111900 KB)                 OKAY [  2.752s]
Writing 'core_nhlos_b'                             OKAY [  0.237s]
Finished. Total time: 3.065s
Sending 'devcfg_a' (42 KB)                         OKAY [  0.010s]
Writing 'devcfg_a'                                 OKAY [  0.001s]
Finished. Total time: 0.022s
Sending 'devcfg_b' (42 KB)                         OKAY [  0.007s]
Writing 'devcfg_b'                                 OKAY [  0.001s]
Finished. Total time: 0.019s
Sending 'dsp_a' (65536 KB)                         OKAY [  1.597s]
Writing 'dsp_a'                                    OKAY [  0.145s]
Finished. Total time: 1.752s
Sending 'dsp_b' (65536 KB)                         OKAY [  1.595s]
Writing 'dsp_b'                                    OKAY [  0.152s]
Finished. Total time: 1.756s
Sending 'dtbo_a' (24576 KB)                        OKAY [  0.618s]
Writing 'dtbo_a'                                   OKAY [  0.055s]
Finished. Total time: 0.693s
Sending 'dtbo_b' (24576 KB)                        OKAY [  0.613s]
Writing 'dtbo_b'                                   OKAY [  0.053s]
Finished. Total time: 0.686s
Sending 'featenabler_a' (84 KB)                    OKAY [  0.010s]
Writing 'featenabler_a'                            OKAY [  0.003s]
Finished. Total time: 0.024s
Sending 'featenabler_b' (84 KB)                    OKAY [  0.005s]
Writing 'featenabler_b'                            OKAY [  0.003s]
Finished. Total time: 0.019s
Sending 'hyp_a' (399 KB)                           OKAY [  0.015s]
Writing 'hyp_a'                                    OKAY [  0.003s]
Finished. Total time: 0.029s
Sending 'hyp_b' (399 KB)                           OKAY [  0.015s]
Writing 'hyp_b'                                    OKAY [  0.003s]
Finished. Total time: 0.028s
Sending 'imagefv_a' (524 KB)                       OKAY [  0.024s]
Writing 'imagefv_a'                                OKAY [  0.003s]
Finished. Total time: 0.038s
Sending 'imagefv_b' (524 KB)                       OKAY [  0.024s]
Writing 'imagefv_b'                                OKAY [  0.003s]
Finished. Total time: 0.038s
Sending 'keymaster_a' (257 KB)                     OKAY [  0.013s]
Writing 'keymaster_a'                              OKAY [  0.003s]
Finished. Total time: 0.028s
Sending 'keymaster_b' (257 KB)                     OKAY [  0.014s]
Writing 'keymaster_b'                              OKAY [  0.005s]
Finished. Total time: 0.030s
Sending 'modem_a' (149596 KB)                      OKAY [  3.693s]
Writing 'modem_a'                                  OKAY [  0.360s]
Finished. Total time: 4.157s
Sending 'modem_b' (149596 KB)                      OKAY [  3.690s]
Writing 'modem_b'                                  OKAY [  0.329s]
Finished. Total time: 4.114s
Sending 'multiimgoem_a' (13 KB)                    OKAY [  0.007s]
Writing 'multiimgoem_a'                            OKAY [  0.001s]
Finished. Total time: 0.020s
Sending 'multiimgoem_b' (13 KB)                    OKAY [  0.006s]
Writing 'multiimgoem_b'                            OKAY [  0.001s]
Finished. Total time: 0.018s
Sending 'qupfw_a' (53 KB)                          OKAY [  0.006s]
Writing 'qupfw_a'                                  OKAY [  0.001s]
Finished. Total time: 0.018s
Sending 'qupfw_b' (53 KB)                          OKAY [  0.007s]
Writing 'qupfw_b'                                  OKAY [  0.001s]
Finished. Total time: 0.018s
Sending 'recovery_a' (98304 KB)                    OKAY [  2.406s]
Writing 'recovery_a'                               OKAY [  0.220s]
Finished. Total time: 2.638s
Sending 'recovery_b' (98304 KB)                    OKAY [  2.407s]
Writing 'recovery_b'                               OKAY [  0.252s]
Finished. Total time: 2.669s
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::compare: __pos (which is 496) > this->size() (which is 0)
./flash_fp4_factory.sh: line 214: 855509 Aborted                 (core dumped) ( "${FASTBOOT_BIN}" -s "${1}" flash "${2}" "${3}" )
ERROR: Could not flash the super partition on device eXXXXXXX.

ERROR: Please unplug the phone, take the battery out, boot the device into
ERROR: fastboot mode, and start this script again.
ERROR: (To get to fastboot mode, press Volume-Down and plug in the USB-C)
ERROR: (cable until the fastboot menu appears.)
ERROR: Aborting now (press Enter to terminate).

this is where it stops and refuses to continue. As is understand it, super is the partition which includes system and some others.

Changing Cables (often suggested) and rerunning from windows hasn’t amounted to any change in the outcome, so im hoping somebody here can help.

Thanks a lot in advance!

To me it sounds a bit like the probleme here: Can't flash stock FP4 ROM

For one person the solution was to use fastboot directly downloaded from Google instead of the version that came with their Linux distro.

2 Likes

Arch Linux caution!

2 Likes

cool /sarcasm.
I saw that post with one eye but apparently didnt want it to be true, so kept looking :crazy_face:
Weirdly i got the same error from my windows-vm but didnt check the version there.Will come back with attempt from another version!

1 Like

so yeah, this is aparently an issue with the specifically packaged fastboot version for arch. Using the officially supplied binary from google got me to actually run the flashing script successfully. Thanks for the assistance!

1 Like