[Nokia 2.2] dk_miner:
Since there are only 3 useful guides about modifying this specific phone, and some really don't answer a few barriers placed in our way by HMD Global and its ridiculous OEM unlocking restrictions (-_-), and also Google probably dropped making OTA updates for it (which was very important to me, because Android 9 and 10 had bugs), I decided to mix them all up (I will give credits, obv) and add some more info I found and create a thread which will work on Android 11, which worked on my phone, not tested on another Nokia 2.2.

Hope it helps y'all!! :D

Part 0: Preparations

WARNING: Your storage will be wiped completely!! so make sure to back everything you need up before doing anything. Unless you have bricked/soft locked your phone.

Requirements:

A good computer

Obviously a network connection on your computer for downloading files, and on your phone if you wanna update thru OTA

USB cable, capable of transferring data, and without any annoying repeated disconnections or "has to be put in the right angle and position". Just use a fresh one

VCOM and adb drivers, which can be a little annoying getting them to work. Best option is to install 15 seconds minimal ADB and make sure you say Yes when it asks if you want to install device drivers.

Another option for VCOM drivers is this setup from TheCustomDroid. Disconnect your phone from your PC, and after installation is complete, restart your computer.

Android SDK Platform tools, which can be downloaded from here (NOTE: You have to use Platform tools. minimal adb will NOT work with fastboot on this device. So go to C:\adb and delete everything in there, then extract platform tools in that folder instead)

And the most important of them all: MTK Client by Bkerler which can be downloaded from here. Follow the installation instructions in the link, install the right Python version (anything more than 3.9, which is compatible with all modules needed by MTK client)

Also usbdk installer featured in the Github instructions for MTK Client

All done? Great! moving to the next part

Part 1: Unlocking the bootloader

The most annoying part. Thanks to hikari_calyx for their awesome guide on how to unlock the bootloader for this phone. We will follow it step by step until we reach step 6, where we are about to flash all those backed up img's back using mtk-su. Here's the problem, you can use mtk-su only on Android 9. it doesn't work on Android 11 sadly. so we just make sure we have unlocked sec1.img and seccfg.img in a safe place, then install a fresh stock Android 9 rom om our phone with any method we are most comfortable with, like SP Flash tool like in the guide, or booting into recovery and sideloading thru adb or from sdcard. just search the net and I'm sure you will find a loooot of sites explaining how you can flash a stock android on your phone. Just make sure you won't mess IMEI and Serial Number up!!!

**There is a "unlock bootloader" option in the flash tools tab of MTK Client. haven't tried it out myself but you can give it a try**

Extra: Booting into stock recovery

There is another detailed guide on how to enter recovery mode, by foobar1123321 which you can see in here. You might need it to apply updates to your phone

After flashing and updating your OS to latest version of Android 11, it's time for Unlocking the bootloader again. but sadly, Unlocked OEM doesn't let OTA updates to be received, and trying to flash sec1.img and seccfg.img on Android 11 is not possible without root, and root is not possible without OEM unlocking :\

So here comes the neat part, ✨MTK Client✨

Part 1-2: Unlocking the bootloader again

First of all, we need to get MTK client working. Go to the folder where you installed MTK Client (hopefully you know how git works and got it cloned correctly)

Open a CMD window in MTK folder by typing in cmd in the address bar. It's better to open cmd window with admin privileges instead of using mtk_gui.bat file. Write python mtk_gui into the cmd window and hit enter. Do NOT close this cmd tab. After a while, the app will start and asks you to connect your phone.

Shut down the phone, and after 5 seconds, press and hold both volume up and down keys (without the power button) and connect the phone to your computer via cable while still holding the volume buttons. If you have installed the drivers successfully, then you'll see some texts generate in the cmd window, and will (probably) wait for the Preloader VCOM.

You can let go of the volume keys.... but not for so long. Disconnect the USB cable, hold both volume keys again, and connect the phone another time and you'll see that MTK Client successfully gets access to your phon. YAAAY!!

now you can let go of those volume keys

Go to "Read partitions" tab, and select Boot_a, Boot_b, sec1, and seccfg (make sure you wouldn't mistake them with unlocked sec1 and seccfg)

And then click on Read partitions button in the right side, and choose a location to save these partitions

🌟You can also check userdata, if you have bricked/soft locked your phone and wanna backup your Internal storage data. You can see its content if you have previously decrypted your user partition (more details on that later) You can flash it again with this app after you have fixed your phone. and if the problem wasn't caused by your data, you can use them again like you never wiped your phone

After everything is backed up, go to "Write partitions" tab, and find sec1 and seccfg, click on "set", browse and select the respective unlocked partitions we got in Part 1 (you may need to change their extension from .img to .bin for them to show up)

Click on "Write partitions", and done! You have unlocked your OEM on Android 11!! and if everything is done correctly, you'll see

or something like this when powering it on, congrats!!

Part 2: Installing TWRP

From the official TRWP page for Nokia 2.2, download the latest TWRP image file and move it to c:\adb on your computer and rename it to twrp.img

you will also need to download a stock vbmeta image, which can be found here or simply by reading it from your phone via MTK Client (there will be two A/B partitions, any of them works) and rename the downloaded/grabbed file into vbmeta.img and move it to c:\adb

power off your phone, then boot into fastboot by holding Volume down + Power for a few seconds, until it says FASTBOOT MODE => then connect the phone to a PC, and write:

and then

Now we have the latest TWRP on our Nokia 2.2 :D , but seems like accessing TWRP is only possible by either rebooting to recovery when the phone is powered on, via Magisk, Termux, or any other app with power options (after rooting the phone), or writing:

when the phone is in fastboot mode.

You can use TWRP and all of its awesome features now, except for MTP, backup, reading userdata partition, etc.

To fix that, you gotta wipe internal storage, and then flash this zip by zackptg5. So make a backup of your files (if any) before processing, and make sure to rename that zip to "fec.zip", we don't need any more options.

**IMPORTANT: Do NOT flash TWRP after rooting the phone or it will unroot it**

Part 3: Rooting via Magisk

I'm gonna use Magisk because... it's better than other SU apps (You can also use Magisk-delta too if you want).

Get it from here and install it on your phone. Now that you have your OEM unlocked and TWRP installed, we need to grab our newly modified boot partitions again. So launch MTK client, power off your phone and connect it to your PC the way you did it before. Once it is recognized, in "Read partitions" section, select boot_a and boot_b, nothing else. Save them in a location (let's say Desktop) and after reading process is done, disconnect your phone and power it up.

Now you must transfer boot_a.bin and boot_b.bin files from Desktop (or any other location you chose in the previous step) to your phone. After copying them both, you can delete those files from Desktop so you wouldn't get confused later.

Launch Magisk app, select Install Magisk, then "Select and Patch a file", and then navigate to where you stored your boot partitions. Select boot_a.bin, and then tap "Let's go". Wait until patching is finished, take note of where Magisk saved it, and go into downloads folder and rename our freshly patched file to boot_a.bin or you will get confused later (take note that you must change the file extension from img to bin, or else MTK client will not see the file)

After that you can choose boot_b.bin to be patched, and after it's done, go to Downloads folder and rename it to boot_b.bin too.

Copy them both back to your pc, and power off your phone. Launch MTK client app, and after everything is set up, go to "Write partitions" tab. Click on "Set" button for boot_a and boot_b and choose the right image for each partition (i.e. boot_a.bin for boot_a and boot_b.bin for boot_b, duh) and click on "write partitions" button to start the process. Wait for the program to finish, and then boot up your phone.

An alternative method for this part without using MTK client is to copy patched boot partitions to C:\adb and using fastboot to flash these patched images.

After you get sure device is not connected to the computer via cable, and is powered off, hold down the volume down key with power button, until your phone boots into fastboot mode. Then connect it to your computer via cable.

Now open a cmd in C:\adb, and write

when done, disconnect your device, and restart.

You can check the Magisk app, and realize you now have superuser permissions!!!

**UPDATE** Part 3-2: Hiding Magisk and passing SafetyNet

Hiding Magisk and passing SafetyNet is another challenging problem some people may face. When you try to Hide the Magisk app, you'll come to a simple "Failed!" error which is most probably caused by SELinux status. It cannot be bothered in new Androids. To fix that error we should wait a bit until phone is booted completely, close and re-open Magisk app and try again.

For bypassing SafetyNet, follow the instructions below:

First of all, install Busybox from Google Play or any other source. It's not necessary, but it's good to have. simply just install it, no need to restart.

Open Magisk -> settings -> hide the Magisk app. Choose a name (settings by default) and wait until app launches itself, asking you to add a shortcut to your home screen (optional). This way, your Magisk app now has a random package name and signature and can't be detected by other apps.

In Magisk settings, enable Systemless hosts. it will add its module to the modules tab. check if it's enabled

Then toggle Zygisk in Magisk settings, and restart your phone.

Once your phone booted up, on the main screen of Magisk, check if it says Yes in front of Zygisk. if yes, than congrats!! we are not down yet tho

Download Shamiko with your phone. Go to Modules tab and install Shamiko by selecting the downloaded zip file. Do not hit reboot yet, instead tap that back arrow in top left. Go to Magisk settings. For Shamiko to work, you don't need to select "Enforce DenyList". You just select apps that you want to hide root from in "Configure DenyList" section. Go there, and on top right, click on three dots and check "Show system apps". Choose the following apps:

and also you can choose your banking apps, or any app that prevents you from using them on rooted phones like Netflix or some games.

Now we gotta install another module which is Universal SafetyNet fix by kdrag0n which can be found here. Download it to your phone, choose it in Magisk module browser, wait for it to finish, and restart your phone so changes can take place all together

Now that we did all this, we have to clear data of apps in our DenyList so they would never remember if we ever had root.

Go to settings (the actual settings, not our now hidden Magisk app) -> Apps -> all apps -> tap the 3 dots on top -> show system apps, then find all the apps you added to your DenyList and clear their data (not cache, data itself)

Now that this is down, restart your phone ((╯°□°)╯︵ ┻━┻) it's the last time, you can stop raging now (┬─┬ノ( º _ ºノ))

Now we can install an app like YASNAC and run SafetyNet attestation, if the results showed two pass checks, Congratulations, you have passed SafetyNet!!! :D

But if for whatever reason it didn't work, you can use the module from this thread, which will automatically uninstall Universal SafetyNet fix upon installation. hopefully it will work for you.

Optional: You can also install MagiskHidePropsConf for more intense SafetyNet bypass, and other reasons, only if you know how to work with it.

Totally worth the restarts. (Special thanks to Droidwin for their article)

And that's it!! Hope you enjoy your now rooted Nokia 2.2 phone with latest Android 11 update!