Howto install Calyx OS on FP4

Flashing random .zips usually isn’t a feature in any of the modern recoveries, those were the good 'ol TWRP days :face_with_monocle:. But even if it was, I would strongly advise against using it, you will break OTA-updates.

Don’t modify /system directly, create a Magisk module.

1 Like

Thanks for the quick reply. So I will repeat what I learned recently (about how to create a Magisk module). :wink:

A post was split to a new topic: Magisk module for (system-)camera apps

Thats the standard AOSP recovery I think, at least its the standard FPOS recovery (FP2+FP3)…

1 Like

Yes, this could be. When I researched about it, it felt like that it exists and behaves that way for a long time already and over several Android versions. Looks like I always used TRWP or Lineage Recovery over the years with my FP2 (got it end of 2016) and I never had the pleasure of using ASOP recovery.

Here are my five cents on installing CalyxOS on FP4:

After a few hours of sweating blood, I managed to install CalyxOS with a locked bootloader.
I followed the instructions listed on the top of this thread with the following modifications>

  • I used the newer CalyxOS Install image BETA 3.7.2 from the mentioned link.
  • I additionally also did fastbood flash unlock_critical first as mentioned in the CalyxOS install instructions (which included an additional reboot, clicking through setup and re-enabling USB debugging and OEM unlock).

Everything went as described (including the Cannot load Android system. error that can be resolved with the factory reset.

After successfully booting into CalyxOS, I found I was hit by this issue. :weary:
image

In short: you cannot enable OEM unlocking through the OS (above shown option is greyed out,not 100% clear why), but the command fastboot flashing get_unlock_ability returns get_unlock_ability=0. :warning:Attempting to lock the bootloader in that state seems to brick your phone! :warning:

Since I wanted to have the security of a locked bootloader I went through the cumbersome procedure described in this post, which involved using Magisk to patch boot.img, boot that with fastboot and using the command
adb shell su -c 'resetprop ro.boot.flash.locked 1'
after which I was able to enable OEM unlocking again and got me get_unlock_ability=1.
After this I was confident enough to relock the bootloader using fastboot flashing lock.
My prayer were answered and after another factory reset, the bootloader was locked and I have now CalyxOS with a locked bootloader. :sweat_smile:

Thanks everyone in this (and other) threads (especially @hirnsushi and @R2D2) for their help and tips on installing CalyxOS!

3 Likes

I’m really glad this worked for you :smiley:

Could you please check what state fastboot flashing get_unlock_ability is in, now that you went through the whole process :thinking:
If it got reset to 0 again, consider yourself lucky…

2 Likes

When I check now, I get get_unlock_ability: 0 but I have not activated OEM unlocking at the moment, so I guess that’s expected? :man_shrugging:

But you didn’t deactivate yourself, right?!
Otherwise, I think it should stay enabled.

If you follow the thread with those instructions just a bit further, you’ll notice we very quickly discovered that it would just reset to 0 again. That’s why I haven’t recommended that method again after that.

You got lucky, you had the right conditions on your phone (likely down to the patch level being the same or newer than what you had before), but if you didn’t, I’m pretty sure you would have bricked your device.

1 Like

In addition to what @hirnsushi wrote, this statement/warning is IMO wrong!
That state does not always lead to a bricked phone. It rather can cause a bricked phone if something goes wrong while locking the phone (mainly because as said above you downgrade the patch level) because then you’re no longer able to unlock it again.

3 Likes

Could you enable it or is it greyed out?

I can enable it now. I guess that allows me to re-open the bootloader if I ever decide to switch to another OS.

Once you lock the bootloader the option isn’t greyed out anymore, it’s only greyed out while the bootloader is unlocked.

That’s why tricking the system, via Magisk, into thinking the bootloader is locked makes that switch toggleable again.

It does, but keep an eye on get_unlock_ability and don’t install any ROM with an older patch level.
Your device is affected by this bug, be careful not to brick it.
And I would flip the OEM Unlocking switch to ON, otherwise, if something happens to your system, you won’t be able to fix it by unlocking the bootloader. Have a look at this post for a nice comparison of the different states.

2 Likes

who can tell me something about this or write, because I am in the directory and have unpacked it. It was a big one and after I unpacked it there was another one in the directory. I then extracted them again from the directory?? /home/carrabelloy/Downloads/FP4-calyxos/FP4-sp2a.220505.002# ./flash_
all.sh
. bash: ./flash_
all.sh
.: Datei oder Verzeichnis nicht gefunden

No need to unpack the second zip within the first one. When you unpack the first one there is flash_all.sh; the second zip is handled by the script.

2 Likes

Little add regarding the question:

How to find new CalyxOS releases/builds for the FP4 as long as not official?

Maybe just directly filter the issues to the releases label and additionally check (within the issue) if it is available for the FP4 (if it is ticked in the list) as @hirnsushi described it.
CalyxOS issues filtered to lable_name “Releases”

If available for the FP4 → take the build number in the related issue (table at the top of each release issue) and swap it into the link like @hirnsushi described it. If it is still in beta state or already stable you should check the details of the issue. Availability of a factory image (so if your manual created link leads to something) is a good indicator, that it is stable , as well. :wink:

2 Likes

I’m having the strangest issue with this install. I followed it to the letter (using 3.7.2 instead of OP’s original version) without problems until steps 8/9 (when you flash the extracted FP4 update.)

Prior to starting the installation, I downloaded 3.7.2, extracted it, and changed directory via Powershell to the folder with the extracted files.

The FP4 files flashed successfully, but the device then rebooted into FPOS as if nothing had happened!

Just to confirm, I have :

  • USB debugging enabled
  • OEM unlocked
  • ADB & Fastboot installed
  • Bootloader unlocked

I initially flashed without using fastboot flashing unlock_critical and received those same error messages as OP on some of the files. But after the phone rebooted to FPOS the first time, I enabled unlock_critical and reflashed. Same result.

I also tried flashing the files with both Windows Powershell and Cmd Prompt. Same result.

What am I doing wrong? Like most of us installing CalyxOs, I was a little worried that I might brick the phone. I never would have imagined this outcome.

Hopefully I’ve just made a silly mistake. But I need a gut check here. :upside_down_face:

Interesting issue :thinking:

Does the script throw any errors? Could you please post the output :pray: maybe we’ll get some clues.

Have you checked that you have the latest fastboot version installed? The install script is very particular about the minimum requirements.

I’m not a Windows user, so this might be a known problem :man_shrugging: If you have a Linux “live CD” lying around you could always try that (or run it in WSL).

Here’s the full output. I’m working on reinstalling my fastboot to see if that helps. I’ll report back shortly:

C:\Users\Majorian\Downloads\FP4-factory-22307020\FP4-sq3a.220705.003.a1>flash-all.bat

target reported max download size of 805306368 bytes

sending 'abl_a' (148 KB)...

OKAY [ 0.017s]

writing 'abl_a'...

OKAY [ 0.014s]

finished. total time: 0.037s

target reported max download size of 805306368 bytes

sending 'abl_b' (148 KB)...

OKAY [ 0.014s]

writing 'abl_b'...

OKAY [ 0.004s]

finished. total time: 0.020s

target reported max download size of 805306368 bytes

sending 'aop_a' (176 KB)...

OKAY [ 0.012s]

writing 'aop_a'...

OKAY [ 0.004s]

finished. total time: 0.021s

target reported max download size of 805306368 bytes

sending 'aop_b' (176 KB)...

OKAY [ 0.007s]

writing 'aop_b'...

OKAY [ 0.005s]

finished. total time: 0.018s

target reported max download size of 805306368 bytes

sending 'bluetooth_a' (940 KB)...

OKAY [ 0.029s]

writing 'bluetooth_a'...

OKAY [ 0.009s]

finished. total time: 0.045s

target reported max download size of 805306368 bytes

sending 'bluetooth_b' (940 KB)...

OKAY [ 0.030s]

writing 'bluetooth_b'...

OKAY [ 0.008s]

finished. total time: 0.043s

target reported max download size of 805306368 bytes

sending 'core_nhlos_a' (108492 KB)...

OKAY [ 2.338s]

writing 'core_nhlos_a'...

OKAY [ 0.659s]

finished. total time: 3.009s

target reported max download size of 805306368 bytes

sending 'core_nhlos_b' (108492 KB)...

OKAY [ 2.343s]

writing 'core_nhlos_b'...

OKAY [ 0.555s]

finished. total time: 2.910s

target reported max download size of 805306368 bytes

sending 'devcfg_a' (44 KB)...

OKAY [ 0.006s]

writing 'devcfg_a'...

OKAY [ 0.004s]

finished. total time: 0.011s

target reported max download size of 805306368 bytes

sending 'devcfg_b' (44 KB)...

OKAY [ 0.006s]

writing 'devcfg_b'...

OKAY [ 0.004s]

finished. total time: 0.013s

target reported max download size of 805306368 bytes

sending 'dsp_a' (65536 KB)...

OKAY [ 1.412s]

writing 'dsp_a'...

OKAY [ 0.251s]

finished. total time: 1.675s

target reported max download size of 805306368 bytes

sending 'dsp_b' (65536 KB)...

OKAY [ 1.405s]

writing 'dsp_b'...

OKAY [ 0.243s]

finished. total time: 1.660s

target reported max download size of 805306368 bytes

sending 'featenabler_a' (88 KB)...

OKAY [ 0.048s]

writing 'featenabler_a'...

OKAY [ 0.038s]

finished. total time: 0.137s

target reported max download size of 805306368 bytes

sending 'featenabler_b' (88 KB)...

OKAY [ 0.026s]

writing 'featenabler_b'...

OKAY [ 0.029s]

finished. total time: 0.108s

target reported max download size of 805306368 bytes

sending 'hyp_a' (396 KB)...

OKAY [ 0.014s]

writing 'hyp_a'...

OKAY [ 0.013s]

finished. total time: 0.036s

target reported max download size of 805306368 bytes

sending 'hyp_b' (396 KB)...

OKAY [ 0.018s]

writing 'hyp_b'...

OKAY [ 0.012s]

finished. total time: 0.060s

target reported max download size of 805306368 bytes

sending 'imagefv_a' (524 KB)...

OKAY [ 0.021s]

writing 'imagefv_a'...

OKAY [ 0.034s]

finished. total time: 0.085s

target reported max download size of 805306368 bytes

sending 'imagefv_b' (524 KB)...

OKAY [ 0.022s]

writing 'imagefv_b'...

OKAY [ 0.036s]

finished. total time: 0.085s

target reported max download size of 805306368 bytes

sending 'keymaster_a' (240 KB)...

OKAY [ 0.010s]

writing 'keymaster_a'...

OKAY [ 0.032s]

finished. total time: 0.089s

target reported max download size of 805306368 bytes

sending 'keymaster_b' (240 KB)...

OKAY [ 0.016s]

writing 'keymaster_b'...

OKAY [ 0.030s]

finished. total time: 0.078s

target reported max download size of 805306368 bytes

sending 'modem_a' (146332 KB)...

OKAY [ 3.164s]

writing 'modem_a'...

OKAY [ 0.648s]

finished. total time: 3.821s

target reported max download size of 805306368 bytes

sending 'modem_b' (146332 KB)...

OKAY [ 3.166s]

writing 'modem_b'...

OKAY [ 0.741s]

finished. total time: 3.919s

target reported max download size of 805306368 bytes

sending 'multiimgoem_a' (16 KB)...

OKAY [ 0.011s]

writing 'multiimgoem_a'...

OKAY [ 0.047s]

finished. total time: 0.098s

target reported max download size of 805306368 bytes

sending 'multiimgoem_b' (16 KB)...

OKAY [ 0.009s]

writing 'multiimgoem_b'...

OKAY [ 0.037s]

finished. total time: 0.082s

target reported max download size of 805306368 bytes

sending 'qupfw_a' (56 KB)...

OKAY [ 0.006s]

writing 'qupfw_a'...

OKAY [ 0.004s]

finished. total time: 0.014s

target reported max download size of 805306368 bytes

sending 'qupfw_b' (56 KB)...

OKAY [ 0.025s]

writing 'qupfw_b'...

OKAY [ 0.047s]

finished. total time: 0.124s

target reported max download size of 805306368 bytes

sending 'tz_a' (2944 KB)...

OKAY [ 0.067s]

writing 'tz_a'...

OKAY [ 0.013s]

finished. total time: 0.086s

target reported max download size of 805306368 bytes

sending 'tz_b' (2944 KB)...

OKAY [ 0.068s]

writing 'tz_b'...

OKAY [ 0.013s]

finished. total time: 0.094s

target reported max download size of 805306368 bytes

sending 'uefisecapp_a' (124 KB)...

OKAY [ 0.014s]

writing 'uefisecapp_a'...

OKAY [ 0.004s]

finished. total time: 0.023s

target reported max download size of 805306368 bytes

sending 'uefisecapp_b' (124 KB)...

OKAY [ 0.008s]

writing 'uefisecapp_b'...

OKAY [ 0.011s]

finished. total time: 0.021s

target reported max download size of 805306368 bytes

sending 'xbl_a' (3300 KB)...

OKAY [ 0.082s]

writing 'xbl_a'...

OKAY [ 0.189s]

finished. total time: 0.279s

target reported max download size of 805306368 bytes

sending 'xbl_b' (3300 KB)...

OKAY [ 0.117s]

writing 'xbl_b'...

OKAY [ 0.116s]

finished. total time: 0.240s

target reported max download size of 805306368 bytes

sending 'xbl_config_a' (96 KB)...

OKAY [ 0.014s]

writing 'xbl_config_a'...

OKAY [ 0.043s]

finished. total time: 0.086s

target reported max download size of 805306368 bytes

sending 'xbl_config_b' (96 KB)...

OKAY [ 0.008s]

writing 'xbl_config_b'...

OKAY [ 0.042s]

finished. total time: 0.078s

target reported max download size of 805306368 bytes

sending 'frp' (512 KB)...

OKAY [ 0.017s]

writing 'frp'...

OKAY [ 0.041s]

finished. total time: 0.088s

target reported max download size of 805306368 bytes

sending 'devinfo' (4 KB)...

OKAY [ 0.010s]

writing 'devinfo'...

OKAY [ 0.004s]

finished. total time: 0.019s

erasing 'misc'...

OKAY [ 0.024s]

finished. total time: 0.026s

erasing 'modemst1'...

OKAY [ 0.022s]

finished. total time: 0.023s

erasing 'modemst2'...

OKAY [ 0.019s]

finished. total time: 0.051s

fastboot: unknown option -- set-active=a

rebooting into bootloader...

OKAY [ 0.038s]

finished. total time: 0.038s

< waiting for device >

erasing 'avb_custom_key'...

OKAY [ 0.016s]

finished. total time: 0.019s

target reported max download size of 805306368 bytes

sending 'avb_custom_key' (1 KB)...

OKAY [ 0.006s]

writing 'avb_custom_key'...

OKAY [ 0.054s]

finished. total time: 0.077s

fastboot: unknown option -- skip-reboot

rebooting into bootloader...

OKAY [ 0.003s]

finished. total time: 0.003s

Press any key to exit...

Edit: Updated the format per Hirnsushi’s recommendation

There’s your error, apparently flash-all.bat doesn’t include a version check, I just checked (pun intended :smirk:).
What’s the output of fastboot --version? You need at least 31.0.3.

BTW, please put the output of the script between code tags like this…

```
Your output
```

… or push the </> button, makes it way easier to read.