[Upgrading, Modifying and Unlocking] nuttydoc:
NOTE: This is highly risky process and don't blame me if you brick your phone. However due to unlocked bootloader most brick can be recovered from, but still don't blame me if something goes wrong. Everything you do with your phone is with your own responsibility.

UPDATE: LOS 20 seems to work fine with this phone. GSI ROM for LOS 20 can be found here https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-td/. Rest of the guide is same as below. In case of LOS 20, one more setting is needed for incoming calls to work with VOLTE, which is --> go to Misc Features in Phh's Treble Settings scroll down to telephony near the bottom and select "Allow binder threads on incoming calls" reboot. Thanks to @seawildflower for testing this out. For details see post #257

This guide is for flashing Lineage 18 GSI (android 11) rom in CAT S22 Flip mobile phone. There are many other GSI roms with higher android versions but AFAIK 4G VOLTE doesn't work with them.

STEPS:

1. It is assumed that you are running latest stock rom (android 11, v30)

2. Go to settings, about phone, tap build number ~7 times, Go to system/ developer options, enable OEM unlock and enable usb debugging.

3. Reboot to bootloader

- Boot to fastboot (adb reboot fastboot or hold volume down when powering on) run:

This will lead to fastbootd, select reboot to bootloader

- or better use adb reboot bootloader

adb reboot bootloader
fastboot flashing unlock

If that fails try

fastboot oem unlock

4. Get GSI image

NOTE: GSI image has only system image, all other boot/recovery/vendor are used from stock rom. If something goes wrong you will need to reflash stock rom using this guide https://xdaforums.com/t/cat-s22-flip-revert-to-stock.4626603/

Download GSI rom from here https://sourceforge.net/projects/andyyan-gsi/files/lineage-18.x/

Choose file with a64. I used lineage-18.1-20240121-UNOFFICIAL-a64_bvS.img.xz which is basically vanilla image with root, no gapps. This is compressed file and you will need to extract .img file from this using your favorite app, e.g., tar

5. Reboot to fastbootd

fastboot reboot fastboot

6. Prepare partitions and install GSI image

You will need to delete one partition "product" which is not required for GSI rom, otherwise flashing will fail due to inadequate space.

{{ After this if you want to go back to stock rom you will need to recreate "product" partition and delete "scratch" partition". }}

fastboot delete-logical-partition product

fastboot flash system <GSI Image>
fastboot reboot

If boot fails, just do factory reset and delete cache from recovery. Use vol.down+power key to boot into fastboot and select recovery from there.

WHAT IS NOT WORKING:

1. Outer screen doesn't work. (not essential I think)

2. PTT button and TAB button doesn't work, but they can be remapped using key-mapper

3. Keyboard backlight doesn't start automatically, it can be started manually using adb, command is somewhere in next few posts.

SOME WORKAROUNDS:

1. 4G VOLTE

go to settings >> Phh Treble Settings >> IMS features >> Install IMS APK from Qualcomm

Reboot

EDIT: I have attached apk file here.

Go to settings >> Networks >> Mobile network >> Preffered network type >> choose LTE

also select VoLTE

2. Bluetooth

bluetooth for calls works by default but for it to work with media do this

Go to settings >> Phh Treble Settings >> force-disable A2DP offload

Settings >> Phh Treble Settings >> Qualcomm features >> Use alternate audio policy

3. Keyboard backlight

It can be manually turned on using adb command (with root) or you can run adb commands from phone using aShell (f-droid) with shizuku. With aShell command can be bookmarked, so you won't need to type it everytime. Hint: use scrcpy from linux computer to mirror your device on laptop, and use laptop keyboard to type. Code for turning keyboard backlight on/off using adb shell or ashell

echo 0 > /sys/class/leds/keyboard_light/brightness
echo 0 > /sys/class/leds/keyboard_light/brightness

EDIT: To automate turning of keyboard backlight run below command using aShell (f-droid)

while true; do if [[ $( < /sys/class/leds/lcd-backlight/brightness) == 0 ]]; then echo 0 > /sys/class/leds/keyboard_light/brightness; else echo 1 > /sys/class/leds/keyboard_light/brightness; fi; sleep 5 ; done &

WHAT IS GOOD

1. I haven't noticed blank screen which sometime occurs in stock rom, esp., when receiving call

2. Battery life appears to be improved.

3. No google

EXTRAS:

1. To get magisk working, use this https://github.com/AndyCGYan/sas-creator/tree/master to modify image file and remove root. After this you can patch boot image with magisk patched boot as per https://xdaforums.com/t/tut-root-how-to-root-cat-s22-flip-on-version-30.4626971/

WARNING: don't use securize option to remove root from Phh Treble Settings, you phone will fail to boot after this.

EDIT: attached modified GSI image, with "su" binary removed, so magisk can be flashed easily. This will help with some banking apps. I have also added basic call recorder in system apps, so you will just need to install official BCR app from github and call recording will work. Rooted adb still works.

2. Use Key-mapper from f-droid to remap PTT and TAB keys, you can create many different remaps using this. e.g., receive call using call button will also require remap.

3. To minimize touch usage, use virtual mouse. Details are posted in 4# post in this thread.

EDIT:

One common issue found when flashing GSI rom is about getting inadequate partition size error. If there is such error after deleting product partition, solution is to delete vendor partition ( mostly it is taking larger size than needed), recreate vendor partition, and re-flash it with stock v30 vendor partition. I have uploaded stock v30 partition somewhere down the line. Command for deleting partition is "fastboot delete-logical-partition vendor", it can be recreated with "fastboot create-logical-partition vendor 0"