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

Search This thread

razabhatti

Member
Jan 12, 2019
6
0
Anyone can tell me whats this happend to all Gsi's . 🙄

I tried all Like corvus os, antiant os, etc
Vnkdlite or simple Both boot successfully.. But there's one problem i can't setup any lock screen 😐

Few months ago Phh gsi also Work well Setup lock screen everything working.
But now I flash latest or older version same issue cant setup lock screen 😐

Only aosp Android 12 gsi Work well with lock screen..

Please help and anyone have fix for this..

In my knowledge i think Theres some files missing of Android in latest phh source code...


😐😐
Must reply after read
 

Basil_23

New member
Dec 31, 2022
1
0
Hello Senior member i would like to know some tweaks or tricks regarding Updating android 9 to android 11 after that want to delete previous android left over such as android 9 and android 10

As the system storage is taking space upto 13GB the total internal storage capacity is 16GB
 

jipshhg

New member
Feb 19, 2023
1
0
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



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
Hi there, i get stuck at executing the codes since it tells me there are no such files in the directory of my phone. I copied all seven files with no errors but i can't understand why it won't work, please help.
Captur.PNG
 

csganja

Member
May 3, 2010
15
4
Roumania
Lemme see if i got this right. (i am kinda newb)

1. Do readback and unpack
Code:
nvcfg.img
nvram.img
proinfo.img
protect1.img
protect2.img

2. Flash altunlock scatter and unlock bootloader
Code:
fastboot flashing lock_critical
fastboot oem unlock

3. Do readback and unpack
Code:
sec1.img
seccfg.img

4. Flash the original altunlock scatter.

Now, to flash a gsi, i have to do flash the original scatter (point 4), or just flash the gsi after the altunlock scatter?
Code:
fastboot flash system lineage-16.0-20191017-UNOFFICIAL-treble_arm64_bvN.img
fastboot --disable-verity flash vbmeta vbmeta_a.img
fastboot erase userdata
fastboot reboot

Can you give a link to a gsi for this firmware? (the one flashed, without android updates)
 
Last edited:

Fransmart

New member
Feb 22, 2023
1
0
For me Magisk (tested 23.0, 22.1 and 23001 Canary) doesn't seems to work on Android 11 (it does bootloop), either by using this ROM or patching my own Android 11 stock boot image (that boots fine when flashing boot partition with `fastboot`). Moreover, by comparing MD5 checksums in both patched files (yours vs mine), they seems to be identical files. What could cause that and do I need to tweak something else?

Also, when trying to patch Android 9 boot image with Magisk everything seems to work alright...
Please help me,
I need Nokia 2.2 stock image
 

csganja

Member
May 3, 2010
15
4
Roumania
So i am at this point.
Bootloader is unlocked, boot.img is magisk patched, sn and imei recovered.
Code:
...
(bootloader) version: WSP_sprout-1680-0-00WW-
(bootloader) variant: MTK EMMC
(bootloader) productid: HZAL1670CAJ82xxxxxx
(bootloader) serialno: HZAL1670CAJ82xxxxxx
...
(bootloader) unlocked: yes
(bootloader) secure: no
(bootloader) kernel: lk
...
(bootloader) version-baseband: MOLY.LR12A.R3.MP.V50.3.P50
(bootloader) version-bootloader: wasp-7dd81ca--20191013003403
(bootloader) version-preloader:

For flashing GSI i tried with an "empty" vbmeta.img
Code:
fastboot flash system gsiImage.img
fastboot --disable-verity flash vbmeta vbmeta_a.img
fastboot erase userdata
fastboot reboot

The following GSI's are not working (bootloop)
Code:
lineage-16.0-20191017-UNOFFICIAL-treble_a64_avN.img
lineage-16.0-20191017-UNOFFICIAL-treble_arm64_avN.img
system-arm64-ab-gapps-su.img

What am i doing wrong?
The phone would boot only if i flash the system.img from HCTSW_WSP-1680-0-00WW-B01_600WW_9_20191005_huaqin_ZAL1670.full.lzma2.d056631a.7z

Even after just unpacking/repacking system.img, (and flashing the img) the phone won't boot.

Later Edit:
Working GSi's
Code:
Bliss-2019-04-11-arm64-ab-stock.img
And it's exactly what i needed.
 
Last edited:
So i am at this point.
Bootloader is unlocked, boot.img is magisk patched, sn and imei recovered.
Code:
...
(bootloader) version: WSP_sprout-1680-0-00WW-
(bootloader) variant: MTK EMMC
(bootloader) productid: HZAL1670CAJ82xxxxxx
(bootloader) serialno: HZAL1670CAJ82xxxxxx
...
(bootloader) unlocked: yes
(bootloader) secure: no
(bootloader) kernel: lk
...
(bootloader) version-baseband: MOLY.LR12A.R3.MP.V50.3.P50
(bootloader) version-bootloader: wasp-7dd81ca--20191013003403
(bootloader) version-preloader:

For flashing GSI i tried with an "empty" vbmeta.img
Code:
fastboot flash system gsiImage.img
fastboot --disable-verity flash vbmeta vbmeta_a.img
fastboot erase userdata
fastboot reboot

The following GSI's are not working (bootloop)
Code:
lineage-16.0-20191017-UNOFFICIAL-treble_a64_avN.img
lineage-16.0-20191017-UNOFFICIAL-treble_arm64_avN.img
system-arm64-ab-gapps-su.img

What am i doing wrong?
The phone would boot only if i flash the system.img from HCTSW_WSP-1680-0-00WW-B01_600WW_9_20191005_huaqin_ZAL1670.full.lzma2.d056631a.7z

Even after just unpacking/repacking system.img, (and flashing the img) the phone won't boot.

Later Edit:
Working GSi's
Code:
Bliss-2019-04-11-arm64-ab-stock.img
And it's exactly what i needed.
3 things wrong, you are targetting a specific slot for vbmeta, you may be on slot b (fastboot can handle slot related stuff u can just do fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img) , u are missing the
Code:
--disable-verification
flag in ur vbmeta flashing
 

Hipshot@2

New member
Mar 13, 2023
1
0
Hi guys, I did everything perfect but the last process won't work as the files cant be found in the specified directory, which is the phones internal storage, please help
 

J_029

New member
Mar 13, 2023
3
0
Why does SP Flash Tool always freezes when trying to do readback??? The couter for the time is still counting seconds but the copy rate freezes and also the amount of copied data.
 

David-538

Senior Member
Oct 28, 2020
67
17
sorry for late respond, i've unninstalled all adb driver and now i'm using non-minimal adb and it worked! Conclusion: don't ever use minimal adb.
Hi. Sorry for bothering, but i'm new to the nokia 2.2 development forums. And i'm still getting bootloops while trying to flash any gsi a9 rom. Yes i did use the android 9 firmware as base and did unlock the bootloader. I tried flashing using the exact stock vbmeta from the rom on the main post and also tried with a empty vbmeta. Also wether using minimal or non-minimal adb still gives the same bootloop issue. If anyone could help please and thank you. (Nokia 2.2 - TA-1191)

Edit: Seems i flashed vbmeta incorrectly. My bad...
 
Last edited:

CodeNameHelloWorld_

New member
Dec 3, 2022
4
0
GSI Installation Steps

1. Install Android 11 firmware base. While 10 might work as well, I haven't tested it. Android 9 firmware did not work for me, but it's been a while since the last time I tested (might work with latest GSI's).

2. Flash an ARM64 A/B VNDKLITE GSI variant, with fastboot, TWRP or terminal (cat, dd, etc.).
fastboot flash system system-squeak-arm64-ab-vndklite-floss-secure.img

3. Factory reset with one of these three methods:
- Stock recovery (recommended);
- fastboot -w;
- TWRP's "format data" option.

Notes
- I assume everyone already knows how to unlock the bootloader, root, and flash vbmeta.
- Only secure VNDKLITE flavors are booting.
Hi i don't understand what you mean by "only secure vndklite are booting" does this means anything that's not vndklite-secure won't boot or if I wanted a vndklite build it has to be secure to boot **(and non vndklite builds are booting)**, I have tried a bunch of roms and it seems that vndklite only(non secure) builds some times boot and sometimes doesn't I haven't tried any non vndklite builds I can't find any good custom ROM that has vndklite-secure builds, if anyone can find a ROM that boots please send me a link

EDIT:
it seems that no vndklite builds are booting
 
Last edited:

CodeNameHelloWorld_

New member
Dec 3, 2022
4
0
Anyone can tell me whats this happend to all Gsi's . 🙄

I tried all Like corvus os, antiant os, etc
Vnkdlite or simple Both boot successfully.. But there's one problem i can't setup any lock screen 😐

Few months ago Phh gsi also Work well Setup lock screen everything working.
But now I flash latest or older version same issue cant setup lock screen 😐

Only aosp Android 12 gsi Work well with lock screen..

Please help and anyone have fix for this..

In my knowledge i think Theres some files missing of Android in latest phh source code...


😐😐
Must reply after read
I had a similar problem (I am now. Running phh treble gsi with lock screen) I don't know how I fixed it but I wiped (portect1, portect2,frp, private) partitions using mtk_clinet and then reflashed the ROM (did the fastboot -w after flash) and it worked (those get wiped on factory reset)
 

CodeNameHelloWorld_

New member
Dec 3, 2022
4
0
So i am at this point.
Bootloader is unlocked, boot.img is magisk patched, sn and imei recovered.
Code:
...
(bootloader) version: WSP_sprout-1680-0-00WW-
(bootloader) variant: MTK EMMC
(bootloader) productid: HZAL1670CAJ82xxxxxx
(bootloader) serialno: HZAL1670CAJ82xxxxxx
...
(bootloader) unlocked: yes
(bootloader) secure: no
(bootloader) kernel: lk
...
(bootloader) version-baseband: MOLY.LR12A.R3.MP.V50.3.P50
(bootloader) version-bootloader: wasp-7dd81ca--20191013003403
(bootloader) version-preloader:

For flashing GSI i tried with an "empty" vbmeta.img
Code:
fastboot flash system gsiImage.img
fastboot --disable-verity flash vbmeta vbmeta_a.img
fastboot erase userdata
fastboot reboot

The following GSI's are not working (bootloop)
Code:
lineage-16.0-20191017-UNOFFICIAL-treble_a64_avN.img
lineage-16.0-20191017-UNOFFICIAL-treble_arm64_avN.img
system-arm64-ab-gapps-su.img

What am i doing wrong?
The phone would boot only if i flash the system.img from HCTSW_WSP-1680-0-00WW-B01_600WW_9_20191005_huaqin_ZAL1670.full.lzma2.d056631a.7z

Even after just unpacking/repacking system.img, (and flashing the img) the phone won't boot.

Later Edit:
Working GSi's
Code:
Bliss-2019-04-11-arm64-ab-stock.img
And it's exactly what i needed.
The first Image you are flashing is a64 and this phone is arm64 and the second one is "avn" (a = a partition only, v = no Google apps, n = no root) and the problem is this phone has A/B partitions so you had to get a "bvn" (b = A/B the rest is the same) image or a "bgn" (g = Google apps) and for the third you used a "su" image which means it has root (this phone cannot boot with built-in root roms for some reason) (in case someone else needs this)
 

kevriveroc

Member
Jun 30, 2022
18
2
Moto G
Nokia 2.2
The firmware for this procedure can be downloaded here: https://www.androidfilehost.com/?fid=2188818919693749336
SHA256: D056631A8A795A06795B3A4E5F334DBF9B55C3C71269831F8E7926FA3ABA5637
I keep getting 'No mirrors found' on Android File Host site whenever I try to download the firmware for the procedure.

Capture.jpg


I tried downloading from several browsers and using VPN, but I haven't been able to get to the file so far.

Can someone please provide the file or an alternative link for download?
 

hikari_calyx

Senior Member
I keep getting 'No mirrors found' on Android File Host site whenever I try to download the firmware for the procedure.

View attachment 5921057

I tried downloading from several browsers and using VPN, but I haven't been able to get to the file so far.

Can someone please provide the file or an alternative link for download?
Acknowledged. Link has been updated.
 
  • Like
Reactions: kevriveroc

nissun93

New member
Jun 11, 2023
1
0
Hey!

First of all I'd like to thank you for creating and attending to this thread. It helped me a lot, even though it's kinda messy, bringing back to life my new second hand Nokia 2.2 bought especially for playing with custom ROMs and eventually switching to it. I think it's a nice, small smartphone with poor hardware and replacable battery, but I believe every hardware with a solid software can run smooth enough for daily usage.

I was managed to unlock the bootloader and I played with three different versions of AOSP 12.1 v416 from Phh Treble and all I can say every each of them sucks.
- system-squeak-arm64-ab-vndklite-floss-secure.img.xz - dedicated for linux / open source enthusiasts loving to spend hours on setting up basic functionality. I had a problem with reading location on Google Maps etc. Dealt with it by installing 3rd NLP party software from Aurora and digging inside settings. The next problem that forced me to give it up was integrating Google Calendar widget. It simply showed no entries for events or tasks.
- system-squeak-arm64-ab-vndklite-gapps-secure.img.xz - spent the most time with it, also used the device for daily usage. From the beginning it worked acceptable, but with time it was getting slower and slower. One day, when I needed Google Maps navigation urgently, it took me around 3 minutes to set the route which simply crashed after a while... Not to mention it was failing on searching options in settings.
- system-squeak-arm64-ab-vndklite-gogapps-secure.img.xz - similar issues with location. Maybe Google Maps works fine, but car rental apps couldn't read location with permissions set.

Today I gave it one last chance, but on different rules. I flashed it to the serial Android 9, unlocked the bootloader and flashed AOSP 9.0 v123 from Phh Treble (system-arm64-ab-gapps-su.img). It's my trusted source. :) By now everything is more or less fine. Some heavy applications need time to think, but I'm a patient user.

What important I observed is memory average usage differences between two mention versions (Developer options > Memory use). AOSP 9.0 consumes 1.3GB whilst AOSP 12.1 was on 1.5GB at the beginning but increased up to 1.6GB.

Hope I will come back to you in some period of time and tell how stable it's been.

Btw. Have any of you any idea if it's possible to mod the serial Android 9 system files in a way that will block OTA updates? I tried locking automatic software updates from the developer options and deleting otacerts.zip file, but it recovers itself. In my opinion the very first version of the Nokia 2.2 OS was optimal.
 

python1320

New member
Jan 15, 2011
1
0
After trying a few android 13 gsis I finally managed to boot "lineage-20.0-20230621-UNOFFICIAL-gsi_arm64_vN.img" from https://sourceforge.net/projects/andyyan-gsi/files/lineage-20-light/
It has not rebooted for a day and lock screen worked and even camera appears to initially work. What doesn't work is internet unfortunately. The stock browser says name not resolvable no matter if I use private dns or not. There are likely many other bugs, such as calling, so don't try it, but it's a start. Without gapps the phone is surprisingly, even extremely snappy, but that won't last, of course.
Also getting a constant spam in logcat of:
PHP:
McDaemon.ENIN: type=1400 audit(0.0:1062): avc: denied { read } for name="00000000.authtokcont" dev="mmcblk0p44" ino=243870 scontext=u:r:mobicore:s0 tcontext=u:object_r:mobicore_data_file:s0 tclass=lnk_file permissive=0

Also, on adb shell I can resolve and ping google.com but on android side no such luck. Will keep on investigating.

Found the same issue from trebledroid side (in my testing the nokia 2.2 only boots the light variant, which might actually be a good thing): https://forum.xda-developers.com/t/...ebledroid-based.4517345/page-19#post-88337731
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    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://sourceforge.net/projects/fi...uaqin_ZAL1670.full.lzma2.d056631a.7z/download
    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)