How To Guide [GUIDE] How to unlock the bootloader for Nokia 2.2

Search This thread

areallydumbperson

Senior Member
ANDROID 12 GSI: SUCCESSFUL BOOT 😍

UPDATE: MY OVER EXCITED SELF COMPLETELY OVERLOOKED THAT IT WAS NOT MEANT TO BE A DAILY DRIVER. PASS THIS ONE, IT'S NOT WORTH IT 🥱

Guys I was able to boot into android 12 GSI (AOSP)!
I was on Android 11, trying every single GSI I could find. Accidentally downloaded the only android 12 GSI on github , flashed it, then realised I made a mistake, but tried to see what happens if I try to boot and it booted in like 30 seconds.

--what works--


I've tested WiFi, calls, 3G (I don't have 4G SIM, never needed it), camera (video quality is trash as it is in every non-stock system), sound from speakers and earpiece, gps. I also saw option to take scrolling screenshot.

--what doesn't works--


headphone jack :(

Also there is no browser but the default Webview tester.

View attachment 5386901View attachment 5386903View attachment 5386905View attachment 5386907View attachment 5386909View attachment 5386911View attachment 5386913View attachment 5386917View attachment 5386919View attachment 5386921

I don't think there's much to test in Nokia 2.2

It's funny how absolutely no daily driver OS I tried booted successfully. Only this was successful which had 0 expectations and mattered the least...
Thanks to everyone on this thread for ebery bit of help. I guess I'll be going back to stock for while.

One more thing - I didn't flashed vbmeta after I flashed system. After which I did fastboot erase userdata since fastboot -w did nothing.
That is absolutely ****ing amazing props to u for finding the image
 

areallydumbperson

Senior Member

areallydumbperson

Senior Member
ANDROID 12 GSI: SUCCESSFUL BOOT 😍

UPDATE: MY OVER EXCITED SELF COMPLETELY OVERLOOKED THAT IT WAS NOT MEANT TO BE A DAILY DRIVER. PASS THIS ONE, IT'S NOT WORTH IT 🥱

Guys I was able to boot into android 12 GSI (AOSP)!
I was on Android 11, trying every single GSI I could find. Accidentally downloaded the only android 12 GSI on github , flashed it, then realised I made a mistake, but tried to see what happens if I try to boot and it booted in like 30 seconds.

--what works--


I've tested WiFi, calls, 3G (I don't have 4G SIM, never needed it), camera (video quality is trash as it is in every non-stock system), sound from speakers and earpiece, gps. I also saw option to take scrolling screenshot.

--what doesn't works--


headphone jack :(

Also there is no browser but the default Webview tester.

View attachment 5386901View attachment 5386903View attachment 5386905View attachment 5386907View attachment 5386909View attachment 5386911View attachment 5386913View attachment 5386917View attachment 5386919View attachment 5386921

I don't think there's much to test in Nokia 2.2

It's funny how absolutely no daily driver OS I tried booted successfully. Only this was successful which had 0 expectations and mattered the least...
Thanks to everyone on this thread for ebery bit of help. I guess I'll be going back to stock for while.

One more thing - I didn't flashed vbmeta after I flashed system. After which I did fastboot erase userdata since fastboot -w did nothing.
You've done so much for this crappy device. I'm just thankful for the working TWRP man. 🤲🏼
Also, can you tell me one thing: If i'm installing a GSI, which is rooted (like those with 'su' in the name), can they cause system to not boot? I'm new to these things.
Also, I tried Installing Android 11 GSIs available at ci.android.com but those also didn't go as planned.
I'm thinking about modifying the system.img kind of how flashable zip ROMs were being made 3-4 years back. What do you say?
Would be hard but u can give it a go I’d tho if the about porting from same chip devices like Redmi 6A (same device that I used to update beasts twrp)
 

areallydumbperson

Senior Member
Would be hard but u can give it a go I’d tho if the about porting from same chip devices like Redmi 6A (same device that I used to update beasts twrp)
Also you can flash open gaps for 11 maybe but year like beast said it is for the emulators but with ur bravery and the sheer luck u had experimenting on the device you got android 12 booting I’ll try and find a daily driver 11 image
 

TheBeast941

Senior Member
Apr 6, 2021
59
5
Just tried flashing AndyYan's Lineage OS 18.1 GSIs (the Arm64 and Arm64 vndklite variant) but on both occasions my device just gets stuck on the Orange State warning. Anyone achieved better results with these GSIs?
 

areallydumbperson

Senior Member
Just tried flashing AndyYan's Lineage OS 18.1 GSIs (the Arm64 and Arm64 vndklite variant) but on both occasions my device just gets stuck on the Orange State warning. Anyone achieved better results with these GSIs?
I've not got any luck but I have gapps under android 12 by downloading Arm64+GMS which is for arm64 and includes gapps and I want to ask when will u release android 11 twrp I'm really curious
 

TheBeast941

Senior Member
Apr 6, 2021
59
5
I've not got any luck but I have gapps under android 12 by downloading Arm64+GMS which is for arm64 and includes gapps and I want to ask when will u release android 11 twrp I'm really curious
I tried to make a few but none seem to be working, tried moving over the ramdisk from my Android 9 image to the Android 11 one, tried following the guide I used again, both of them don't seem to work (bootloop on Orange State warning)

If I can find a TWRP image released for Android 11 I can try to give it another shot as I'm fairly sure the reason as to why it's not working is due to the differences between the ramdisk layout.

If I do manage to make a working version I'll try to use Magisk to patch it so that we can (maybe) have both TWRP and Magisk on one image (no promises though, this didn't work on Android 9) and then I'll upload both if successful
 
Last edited:

AAditya846

Member
May 16, 2016
26
0
ACHIEVEMENT UNLOCKED: AOSP 11 SUCCESSFULLY BOOTED 🏆

PLEASE READ AND SAVE YOUR HEADACHE!

Lets talk about the major problem though that's a serious turn off: THE HEADPHONE JACK DOESN'T WORKS!

Screenshot_20210817-211721.png
Screenshot_20210817-211724.png
Screenshot_20210817-211728.png
Screenshot_20210817-211744.png


Now the correct method to install a system image:


Flash the *vbmeta image as follow - fastboot flash vbmeta <path to the vbmeta.img>
Wipe system - fastboot erase system
Install **system - fastboot flash system <path to system.img>
wipe userdata - fastboot erase userdata
Reboot - fastboot reboot


* Now, the vbmeta image I used was one that comes inside the GSI packages google offers and it must not be flashed without any modifications (skip disabling any flags).
** AOSP img I used was Phusson's latest release 11.312 at the time of writing this.


Why I won't be using this system:
1. No headphone audio is a big problem for me! If anyone knows how to fix it, then please fix it. I'll be searching for possible libraries in stock ROM.
2. This is not even close to stock Firmware when it comes to smoothness and I haven't even installed any applications into it as of now! Annoying frame drops are a thing here.

(That AOSP music app wasn't a part of the system, I installed it. I also played a bit with the Icons. They are available in Phh's settings)


---------------------------------------SECOND PART---------------------------------

I tried booting lineage OS 18.1 the similar way. Coming from the days when people used to install zips into their ICS and Jellybean devices, you can say I'm quite patient. I gave it 20+5 minutes to do something. It never booted. I'll be trying a no-su type image tomorrow, and then go back to android 10 maybe if that no-su also didn't boot.

After aall this, why Android 10 one might wonder? Well that's because android 11 have really muffled and seriously low volume in headphones 😞
I can't live with that.

Uhhh... I really liked the speaker sound from Google's Android 12 and 11 GSI, maybe it's just an illusion but I think they were really good with speaker sound. I wasn't expecting anything from those and they are the only ones who booted right away, all of them.
Although lack of options and settings was something I could live with but not with stutters and no headphone support!

If anyone is going to try out Google's GSI they can find it in android own website. (Please go with GMS option. There's really not much you can do without Gapps and a working TWRP recovery)

Edit: One reminder - GSIs are meant to work on Treble compliant devices, if they are not booting, 6/10 times it's because of wrong installation methods.
And one tip - Don't try to make/modify a system.img like we used to make zip packages. It'll ruin your day. And maybe waste your computer from 2006 which doesn't have specs to make it work.
 
Last edited:

TheBeast941

Senior Member
Apr 6, 2021
59
5
I gave it 20+5 minutes to do something. It never booted
Same happened when I tried flashing AndyYan's GSI's but I didn't give it that much time as that stage is never supposed to last for minutes. I found that out trying to test out a TWRP image, looking at the screen closer it was actually bootlooping on the Orange State screen so the same must have happened while flashing the GSIs.

Also i still cant seem to make a working TWRP... RIP
 
Last edited:

areallydumbperson

Senior Member
ACHIEVEMENT UNLOCKED: AOSP 11 SUCCESSFULLY BOOTED 🏆

PLEASE READ AND SAVE YOUR HEADACHE!

Lets talk about the major problem though that's a serious turn off: THE HEADPHONE JACK DOESN'T WORKS!

View attachment 5388069View attachment 5388071View attachment 5388073View attachment 5388075

Now the correct method to install a system image:


Flash the *vbmeta image as follow - fastboot flash vbmeta <path to the vbmeta.img>
Wipe system - fastboot erase system
Install **system - fastboot flash system <path to system.img>
wipe userdata - fastboot erase userdata
Reboot - fastboot reboot


* Now, the vbmeta image I used was one that comes inside the GSI packages google offers and it must not be flashed without any modifications (skip disabling any flags).
** AOSP img I used was Phusson's latest release 11.312 at the time of writing this.


Why I won't be using this system:
1. No headphone audio is a big problem for me! If anyone knows how to fix it, then please fix it. I'll be searching for possible libraries in stock ROM.
2. This is not even close to stock Firmware when it comes to smoothness and I haven't even installed any applications into it as of now! Annoying frame drops are a thing here.

(That AOSP music app wasn't a part of the system, I installed it. I also played a bit with the Icons. They are available in Phh's settings)


---------------------------------------SECOND PART---------------------------------

I tried booting lineage OS 18.1 the similar way. Coming from the days when people used to install zips into their ICS and Jellybean devices, you can say I'm quite patient. I gave it 20+5 minutes to do something. It never booted. I'll be trying a no-su type image tomorrow, and then go back to android 10 maybe if that no-su also didn't boot.

After aall this, why Android 10 one might wonder? Well that's because android 11 have really muffled and seriously low volume in headphones 😞
I can't live with that.

Uhhh... I really liked the speaker sound from Google's Android 12 and 11 GSI, maybe it's just an illusion but I think they were really good with speaker sound. I wasn't expecting anything from those and they are the only ones who booted right away, all of them.
Although lack of options and settings was something I could live with but not with stutters and no headphone support!

If anyone is going to try out Google's GSI they can find it in android own website. (Please go with GMS option. There's really not much you can do without Gapps and a working TWRP recovery)

Edit: One reminder - GSIs are meant to work on Treble compliant devices, if they are not booting, 6/10 times it's because of wrong installation methods.
And one tip - Don't try to make/modify a system.img like we used to make zip packages. It'll ruin your day. And maybe waste your computer from 2006 which doesn't have specs to make it work.
Hey you should try dot os gsi from the forums I don't have a PC on me ;(
 

areallydumbperson

Senior Member
I tried to make a few but none seem to be working, tried moving over the ramdisk from my Android 9 image to the Android 11 one, tried following the guide I used again, both of them don't seem to work (bootloop on Orange State warning)

If I can find a TWRP image released for Android 11 I can try to give it another shot as I'm fairly sure the reason as to why it's not working is due to the differences between the ramdisk layout.

If I do manage to make a working version I'll try to use Magisk to patch it so that we can (maybe) have both TWRP and Magisk on one image (no promises though, this didn't work on Android 9) and then I'll upload both if successful
Yeah I unpacked the boot image and holy its just so confusing the new ramdisk layout and I tried to search the term recovery and nope not even there which has my head scratching so much
 

TheBeast941

Senior Member
Apr 6, 2021
59
5
Yeah I unpacked the boot image and holy its just so confusing the new ramdisk layout and I tried to search the term recovery and nope not even there which has my head scratching so much
All the files from sbin are now in system/bin and all files from etc in system/etc but that's about as far as I figured out. I tried comparing the two layouts and copying the folders over from the stock image to the twrp image and moving files but all that did was make the device return to fastboot when turned on
 

areallydumbperson

Senior Member
I
All the files from sbin are now in system/bin and all files from etc in system/etc but that's about as far as I figured out. I tried comparing the two layouts and copying the folders over from the stock image to the twrp image and moving files but all that did was make the device return to fastboot when turned on
I feel bad for you hassling yourself to port twrp
 

areallydumbperson

Senior Member
All the files from sbin are now in system/bin and all files from etc in system/etc but that's about as far as I figured out. I tried comparing the two layouts and copying the folders over from the stock image to the twrp image and moving files but all that did was make the device return to fastboot when turned on
beast i managed to unlock a hidden menu in the recovery!!!! its a rescue mode which seems cool and its detected by adb
1629289906890.png
(no that isnt my serial number i lost mine and i cant be bothered to find a tool to rewrite it)
 

areallydumbperson

Senior Member
beast i managed to unlock a hidden menu in the recovery!!!! its a rescue mode which seems cool and its detected by adb View attachment 5388689 (no that isnt my serial number i lost mine and i cant be bothered to find a tool to rewrite it)
i also want to try to remove zip verification

edit:

Recovery Release!!!

zip verification isnt removed but you can now install any zip file if its signed using
 

Attachments

  • PackageSigner_2.2.zip
    251.8 KB · Views: 3
  • near unlocked recovery i guess.img
    20.2 MB · Views: 16
Last edited:

areallydumbperson

Senior Member
ok so what really infuriated my about android gsis that wasnt compiled by phhusson that you cant set corner diameter so i have files extracted from android 9 vendor and out them in android 11/12 vendor (theres more steps to get it working)

copy everything in the overlay folder and put it into /vendor/overlay (replace everything)

now set the right permissions for folders: use octal 755 (you can do this in any root file manager)
the right permissions for the apk inside the folders: octal 644 ill provide screenshots if you cant set octal values
 

Attachments

  • FixedVendorOverlay.zip
    81.6 KB · Views: 12

areallydumbperson

Senior Member
ok so what really infuriated my about android gsis that wasnt compiled by phhusson that you cant set corner diameter so i have files extracted from android 9 vendor and out them in android 11/12 vendor (theres more steps to get it working)

copy everything in the overlay folder and put it into /vendor/overlay (replace everything)

now set the right permissions for folders: use octal 755 (you can do this in any root file manager)
the right permissions for the apk inside the folders: octal 644 ill provide screenshots if you cant set octal values
after setting your octal values reboot your device and then read the following steps carefully because if you dont you will have to erase your data

go to settings
go to developer options
make sure adb is enabled and authorized with your pc
set device cutout to tall
if your screen is just black
connect your phone to your pc and run the command:

adb shell cmd overlay enable-exclusive com.android.internal.display.cutout.emulation.double


you should see a double notch now and now you can set your device cutout to anything without softbricking

if you erase your device you dont have to put stuff into vendor again but select device cutout to tall and then type the command

even if you didnt fail and u erase your device you still have to put device cutout to tall and type the command
 

areallydumbperson

Senior Member
after setting your octal values reboot your device and then read the following steps carefully because if you dont you will have to erase your data

go to settings
go to developer options
make sure adb is enabled and authorized with your pc
set device cutout to tall
if your screen is just black
connect your phone to your pc and run the command:

adb shell cmd overlay enable-exclusive com.android.internal.display.cutout.emulation.double


you should see a double notch now and now you can set your device cutout to anything without softbricking

if you erase your device you dont have to put stuff into vendor again but select device cutout to tall and then type the command

even if you didnt fail and u erase your device you still have to put device cutout to tall and type the command
ok time for the permission values if you couldnt enter them using octal

Screenshot of GMS on ARM64.png
<----- APK Permission





Screenshot of GMS on ARM64 (1).png
<---- Folder permission
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Fastboot > flash system > flash vbmeta from stock OS (Android 9) > fastboot -w > reboot
    Right?
    yepp , thats right
  • 10
    To moderators: There's no Nokia 2.2 forum in XDA-Developers, please move this topic when available.
    To content farms: DO NOT COPY AND PASTE THE ENTIRE GUIDE!

    Now the last piece of puzzle of Nokia x.2 series bootloader unlock line has been completed, thanks to the help of a member called Woke_World.
    After I read his procedure, I decided to optimize the entire procedure and use my own firmware file to achieve it.

    Step 1: Do full backup
    (For this case please use SP Flash Tool 5.1924 or newer that can be found on spflashtool.com )

    The firmware for this procedure can be downloaded here: https://www.androidfilehost.com/?fid=2188818919693749336
    SHA256: D056631A8A795A06795B3A4E5F334DBF9B55C3C71269831F8E7926FA3ABA5637

    Please follow the procedure in this topic to do readback: https://forum.xda-developers.com/t/...-global-nokia-5-1-plus-unbrick-guide.3858253/
    For this case, you need to keep Download Agent file as the same came with SP Flash Tool, and altunlock-MT6761_Android_scatter.txt

    Once readback done, please extract these images inside your backup for later use:
    Code:
    nvcfg.img
    nvram.img
    proinfo.img
    protect1.img
    protect2.img

    DO NOT SKIP STEP 1, OR YOUR PHONE WILL NOT HAVE IMEI AND SN!

    Step 2: Format all + Download to flash the firmware with altunlock scatter file
    Switch to Download tab, and choose format all + download to flash the entire phone with this scatter file: "altunlock-MT6761_Android_scatter.txt"
    Once flash complete, disconnect the phone.

    Step 3: Bootloader unlock
    Press and hold volume down key and connect to PC - keep that condition for around 12 seconds then the phone will boot to Fastboot mode.
    Execute these 2 commands to perform bootloader unlock:
    Code:
    fastboot flashing lock_critical
    fastboot oem unlock

    Look at your phone and press volume up to confirm unlock. Once done, disconnect the phone and remove the battery, wait 5 seconds and place the battery back.

    Step 4: Do readback again
    Once readback done, please extract these images inside your backup for later use:
    Code:
    sec1.img
    seccfg.img

    Step 5: Format all + Download to flash the firmware with original scatter file
    Switch to Download tab, and choose format all + download to flash the entire phone with the original scatter file named as "MT6761_Android_scatter.txt" - note there's no altunlock at the beginning of filename.
    Once flash complete, disconnect the phone.

    Step 6: Power on the phone and enable USB debugging, root the phone with MTK Easy SU
    [NOTE: DO NOT INSERT ANY SIM CARDS AND YOU MUST SKIP INTERNET CONNECTION]

    You can download the MTK Easy SU apk from here : https://github.com/JunioJsv/mtk-easy-su/releases/latest
    And Magisk APK from here : https://github.com/topjohnwu/magisk/releases/latest

    When you have both MTK Easy Su and Magisk APK installed, please enable the "Run as 64 Bits" option, and tap the hash (#) button to enable root.
    Once root complete, we can now re-enable bootloader unlock and restore IMEI.

    Step 7: Re-enable bootloader unlock and restore IMEI
    Please copy the 7 img files to your phone's internal storage:
    Code:
    nvcfg.img
    nvram.img
    proinfo.img
    protect1.img
    protect2.img
    sec1.img
    seccfg.img
    We assume you copied them to root directory of internal storage (a.k.a. /storage/emulated/0/ )

    Then execute these commands on your PC:
    Code:
    adb shell
    su
    dd if=/storage/emulated/0/nvcfg.img of=/dev/block/bootdevice/by-name/nvcfg
    dd if=/storage/emulated/0/nvram.img of=/dev/block/bootdevice/by-name/nvram
    dd if=/storage/emulated/0/proinfo.img of=/dev/block/bootdevice/by-name/proinfo
    dd if=/storage/emulated/0/protect1.img of=/dev/block/bootdevice/by-name/protect1
    dd if=/storage/emulated/0/protect2.img of=/dev/block/bootdevice/by-name/protect2
    dd if=/storage/emulated/0/sec1.img of=/dev/block/bootdevice/by-name/sec1
    dd if=/storage/emulated/0/seccfg.img of=/dev/block/bootdevice/by-name/seccfg

    When it's done, please perform factory reset to apply the NVRAM restoration.

    Please watch this video for entire procedure demonstration:

    That wraps up the entire procedure of bootloader unlock, and have fun for modding this device!

    Credits:
    Woke_World from triple-color company product community
    diplomatic for his MTK-SU Exploit and simplified utility called JunioJsv
    topjohnwu for MagiskSU
    3
    @areallydumbperson @VR25

    You may notice that this thread now is located at its own Nokia 2.2 forum.

    Along with this change, several other threads have been moved to this forum as well.

    Please report any thread outside this forum needs to be moved. Thank you very much and hope you enjoy the new place for Nokia 2.2. :D
    2
    TWRP 11 Bugfix:

    Fixed system refusing to mount (finally) thanks lopestorm :) ur fstab flie really helped me out
    bootloops from twrp.me is soon gonna be fixed hopefully i have made a pull request in their git
    more partitions should be able to be backed up (again thanks to lopestorm)