Project S22

2024-05-23 06:07

Be aware!

I have read several complaints about no service before and since buying the phone. Eventually I encountered this issue. I completely reinstalled the OS and all firmware (Vendor, Product, Boot, etc) - and even installed GSI to no avail. Turns out, and I feel dumb for missing this - the Sim card doesn't press down on the pins enough to make good contact with the contacts on the board. Putting a piece of electrical tape between the sim and the door fixed my issues.

If you have no service - check if you can make the sim "spring" in and out with your finger. If you can, you may have the same issue!

Root and LSposed (Xposed but different)

(this assumes you know something about rooting android and ADB/Fastboot commands)

Root and LSposed set the foundation of almost everything else in this guide.

To start with - it is advisable that you update to the latest version of android possible if you haven't already. You may not be able to update when rooted.

Anyway, the upshot of it is you want to go to this XDA post: https://xdaforums.com/t/tut-root-how-to-root-cat-s22-flip-on-version-30.4626971/ and download the patched boot.img, and the vbmeta.img, at the bottom of the post. Install the magisk app onto the phone, and then put the boot.img on there also - and use the app to patch it. Put the file created on your PC.

The rest is as simple as it gets. Go to the settings, about, and spam build number until dev settings are enabled. Go there, and activate bootloader unlocking, and USB debugging. Connect to your PC, and use adb/fastboot to reboot to fastboot:

.\adb reboot fastboot

Be aware that you may end up in "FastbootD" - use the volume buttons and hangup button to reboot to "bootloader"

Then root the phone:

.\fastboot flashing unlock (this will factory reset the device!)

.\fastboot flash boot boot.img

.\fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img

.\fastboot reboot

(it isn't clear if VBmeta is needed or not, but I had no issues after flashing it)

Now it's time for LSposed. Go into the magisk settings and enable zygisk - then just install the module with the button at the top of the modules menu. https://github.com/LSPosed/LSPosed/releases/

Debloat

Many will tell you to simply get android universal debloater - and actually, so will I, but you need to do more than that too - it only uninstalls apps for the current user - system apps will still exist after being deleted like this, including some Google and Tmobile bloat.

It is a very friendly way to see what is installed though, and the descriptions of apps it shows are helpful - so I do recommend you use it to guide you. To delete stuff though, I recommend you use de-bloater on F-Droid: https://f-droid.org/en/packages/com.sunilpaulmathew.debloater/ this actually uninstalls system apps, and like all magisk modules, puts them in a sort of void so you can restore them.

You can safely remove almost all google, T-Mobile, and Sprint apps - as well as the unlocking apps "RSU" - and many default front end apps, like the Camera, Contacts, messaging and the default dialer - but it's the only one I could find that beeps when you press hardware buttons... so I kept that.

You can also remove some more default apps like Accessibility suite and Quickstep, but these do remove certain functionality outside of apps, like the default multitasking menu.

There is a modified ROM you can install also that comes with a significant amount (but not all!) of the bloat removed. https://t.me/cats22flip/2002. See below for more details - install is similar but you flash Super instead of system.

Note - In testing, I found that after uninstalling Google play, this ROM would hang at boot.

Alternative ROMs

https://xdaforums.com/t/cat-s22-flip-installing-gsi-rom.4660690/

In the event you break something: https://xdaforums.com/t/cat-s22-flip-revert-to-stock.4626603/

You can make the Debloat process a bit easier by installing a ROM that never had anything made by google to begin with. The main choices are:

There are 3 things that are effected by using a custom ROM:

  • Keyboard backlight not turning on - shell commands can turn it on/off. You can used Xposed Edge to make this happen whenever you wish (screen on, screen off, boot, etc...)

  • VoLTE/WiFi is unusable - I can live without this, but if you can't, there are work arounds depending on what ROM you've installed.

  • The back screen is unusable - Whilst there's progress towards replicating the commands the stock ROM uses for this, I don't know of anything we can do just yet. Here's a clue - apparently the "SystemUI" application manages this in the stock ROM.

You do however get the ability to move to android 14, run 64 bit apps, and have a truly degoogled OS without having to figure out what can be removed and what can't.

GSI 18 is the most well documented ROM on the Cat S22.

To install, follow these steps (more details on xda):

  • If installing GSI, it likely has a SU already, which could conflict with magisk. Uninstall it by flashing the stock boot.img.

  • With USB debugging, reboot to fastbootd (not a typo).

  • If your PC cannot recognise the device in fastbootd, go to your driver settings, find the cat S22 (which will likely have a '!' next to it), right click and "update driver". Browse your computer and pick from the list - pick android phone, then Android bootloader interface.

  • Delete the product partition: fastboot delete-logical-partition product

  • Flash the rom: fastboot flash system image.img

Replacements

If you've removed google services, or standard apps, you may need replacements. This is what I recommended:

Google services, replace with MicroG

This one gets it's own explanation because it's a huge pain in the ass. The initial install is very easy, but actually getting it fully working isn't.

My advice is this: you need to install Luckypatcher (r/luckypatcher) Install the APKs, and then install https://github.com/whew-inc/FakeGApps - this is required to allow MicroG to trick other apps into thinking it's actually google play services. You'll be prompted by LSposed to enable it when you install it.

Lastly, use lucky patcher to elevate MicroG to a system level app. Tick use magisk module so you can easily undo this. I'm not sure why, but I found it didn't work correctly until I did this.

To be honest, I only really did this because some apps I have rely on it for notifications. Otherwise I wouldn't need google at all.

If privacy is a concern turn off as much functionality within MicroG as possible and don't sign in. Use alternate clients to access google sites/apps without an account (and often with some tracking removed), some of which I've listed below.

If you want to access the play store, use Aurora store: https://f-droid.org/en/packages/com.aurora.store/

As for everything else:

  • Default apps, messaging, camera, contacts, notes, clock, etc: A combo of Simple apps and Fossify apps.

  • Youtube: LibreTube with ViMusic for Music.

  • Internet: FOSS Browser, and Native A (Which sort of behaves like PWA installs on PCs).

  • Keyboard: Simple Keyboard and Traditional T9

  • Speech to text : Sayboard

  • Email: Fairmail

  • Android wear: GadgetBridge (Although I use with a pebble, media controls don't work right without the wear app - with this they do)

  • Webview: https://github.com/ungoogled-software/ungoogled-chromium-android/releases/tag/99.0.4844.51-1-webview - This needed to be installed as a system app to work. You may need to go to dev settings to assign it, but mine assigned automatically.

I didn't replace everything, and I highly recommend this: https://github.com/tycrek/degoogle?tab=readme-ov-file#the-lighter-side - if you need more ideas.

Kernal Tweaks

I am working on a modified version of UAT (Unified Android Tweaker) that prioritizes foreground activities in an attempt to save power and potentially improve responsiveness of a single task slightly. Overall performance, especially for background tasks, is reduced slightly. I have nothing definitive yet.

I find the UAT module does improve performance somewhat but also seems to hurt battery life.

By default, there is 1.5GB of Zram - heavier use, browsing, or multitasking may benefit from increasing this to 2GB.

Given the low processing power this phone is a decent candidate for actually benefiting from being tweaked for specific uses.

Button Binding

The keypad is literally, a big part of this device. So, I set out to make it more useful, and I couldn't of done it without Xposed Edge.

Go to the "Keys" section and simply add all the keys by hitting add and then the key. Note that with the hangup/home buttons you may be taken out of the app - tap to get back in. If you use a button to get back in, the app will pick up that button.

What you do is up to you, but since the app can do shell commands, conditions, and emulate button presses, you can pretty much do anything and you can make buttons do different things depending on what you're doing. You can also create variables which change when apps are opened or certain device things occur like charging and boot.

All buttons have a press, double press, and hold option.

Some examples of what I have are:

  • Phone button press - if ringing, answer, else, open contacts.

  • Phone hold - open dialler.

  • Speaker button hold - switch between volume modes.

  • PTT button double tap - if music is active, play/pause.

  • PTT button press - change input method.

  • Menu - Active apps drawer (this is different from the standard menu which shows what's cached - it also doesn't take you out of your current app).

  • Back hold - previous app.

  • */0/# hold - if not in call, call person a/b/c (essentially speed dial keys)

  • Volume key press - if current app is camera, take picture

You can also do things that have nothing to do with buttons, like:

  • When opening app, decrease screen DPI - this will allow more content to show. When leaving app, reset DPI.

  • When using the phone app, show VoLTE Status bar logo. When closing the phone app, hide VoLTE Status bar logo.

The sky is the limit.