[Redmi Note 9 Guides, News, & Discussion] VD171:
WARNINGS:

First of all you should

BACKUP IMEI

.

Remember to

NEVER

touch the NVRAM.

People who does NOT backup imei or touches the NVRAM, are susceptible to the loss of IMEI.

If you try to share NVDATA between different devices, it may cause bootloop due verification of IMEI (slot1).

If you already lost IMEI, you probably may need to write IMEI again.

Works with:

Xiaomi Redmi Note 9 and ALL other MediaTek devices which uses SECCFG for unlocking/locking bootloader.

How does it work ?

After you turn on the device, the booting procedures checks if the device is unlocked and if there is any modified partition.

If your device is locked and any partition is modified, the device will not boot.

If your device is unlocked, the device will boot perfectly.

On booting, the device verifies if the device is unlocked or not, inside the partition: SECCFG.

After booting procedures, the partition SECCFG can NOT be read.

Due this, some variable settings are written to the partition NVDATA, because the system can read the partition NVDATA.

These variable settings contain details about locked/unlocked bootlader as many other details about the developer settings and some sensitive data like IMEI, Wifi MAC and Bluetooth MAC.

So, we just need to mix an unlocked SECCFG together a locked NVDATA.

:cowboy:

How to do ? (Without formatting data)

1. Be sure to have UNLOCKED BOOTLOADER.

2. Backup the partition: SECCFG.

3. Format the partition: SECCFG. (Begin Address: 0x17800000 Format Length: 0x800000)

4. Format the partition NVDATA. (Begin Address: 0xc4a2000 Format Length: : 0x4000000)

5. Boot the device. It will write a new NVDATA.

6. Turn off the device.

7. Flash the partition SECCFG (with UNLOCKED BOOTLOADER).

Done !

How to do ? (Formatting data)

1. Be sure to have UNLOCKED BOOTLOADER.

2. Backup the partition: SECCFG.

3. Backup your files and data, if you want.

4. Now, RE-LOCK BOOTLOADER. Or just erase the partition: SECCFG.

5. Format user data. It will erase NVDATA too.

6. Boot the device once, you don't need to accept terms or enter in system. It will write a new NVDATA.

7. Turn off the device.

8. Flash the partition SECCFG (with UNLOCKED BOOTLOADER).

Done !

Useful links:

VD Infos: Capture device infos and details with an ULTRA root/magisk/riru/xposed DETECTOR

https://xdaforums.com/t/app-v1-10-vd-infos-package-com-vitaodoidao-vdinfos.4097379/

Scatter file for flashing using flash tool to MERLIN

https://xdaforums.com/t/scatter-fla...omi-redmi-note-9-xiaomi-redmi-10x-4g.4223097/

What should I backup before trying to customize my MERLIN device

https://xdaforums.com/t/guide-what-...lin-device-redmi-note-9-redmi-10x-4g.4229629/

How to restore the state of UNLOCKED BOOTLOADER in MERLIN

https://xdaforums.com/t/guide-unloc...omi-redmi-note-9-xiaomi-redmi-10x-4g.4220013/

How to properly solve the errors of the SP FLASH TOOL for MERLIN

https://xdaforums.com/t/guide-how-t...for-merlin-redmi-note-9-redmi-10x-4g.4238161/

Read Back file for backuping using flash tool from MERLIN

https://xdaforums.com/t/readback-fl...omi-redmi-note-9-xiaomi-redmi-10x-4g.4223109/

DA files for flashing to MERLIN using FLASH TOOL

https://xdaforums.com/t/da-flash-da...omi-redmi-note-9-xiaomi-redmi-10x-4g.4209765/

How to properly use the SP FLASH TOOL for MERLIN

https://xdaforums.com/t/guide-how-t...for-merlin-redmi-note-9-redmi-10x-4g.4229937/

Credits:​

VD171​