Relock the Bootloader

Be warned!

As with all modifications this might brick your device. Your warranty is void from unlocking the Bootloader in the first place.
This has been tested on xda and by myself and SEEMS to work, be advised that there is a possibility to hard brick your device though.

1. Return to stock

Download a copy of your initial firmware. Make sure to download the OLDEST available firmware or the one that you were on when you made a backup of your partitions. Extract the firmware and open the included flashfile.xml. Copy and paste the contents into the formular on this website to get all necessary fastboot commands.

Boot your phone into fastboot and open a cmd window in the folder of the chinese / initial firmware. Copy the commands from the website UP TO and including "fastboot oem config unset cmdl" and paste them into your cmd prompt.

2. Change your software channel

Use the command "fastboot oem config carrier retcn" to set your update channel to retcn (Which is CN). If your initial model had a different update channel use that one instead. (eg. "retin", "retgb", "teleu" and so on...)

Then restart the phone with "fastboot reboot".

2. Flash your Backup

After going through the setup and enabling USB-Debugging and OEM Unlocking again you will now want to flash the backup that you created when you first unlocked the bootloader.
If you dont have a backup you MIGHT skip this step, keep in mind that the brick probability is higher though.

Open a cmd window in your backup folder and use the following commands. If some of them fail to flash take notes and flash these partitions in fastbootd mode afterwards. (To get into fastbootd just use "fastboot reboot fastboot" instead of "adb reboot bootloader").

adb reboot bootloader

fastboot flash abl_a abl_a.img
fastboot flash abl_b abl_b.img
fastboot flash aop_a aop_a.img
fastboot flash aop_b aop_b.img
fastboot flash aop_config_a aop_config_a.img
fastboot flash aop_config_b aop_config_b.img
fastboot flash apdp apdp.img
fastboot flash apdpb apdpb.img
fastboot flash bluetooth_a bluetooth_a.img
fastboot flash bluetooth_b bluetooth_b.img
fastboot flash boot_a boot_a.img
fastboot flash boot_b boot_b.img
fastboot flash carrier carrier.img
fastboot flash cid cid.img
fastboot flash connsec connsec.img
fastboot flash cpucp_a cpucp_a.img
fastboot flash cpucp_b cpucp_b.img
fastboot flash ddr ddr.img
fastboot flash devcfg_a devcfg_a.img
fastboot flash devcfg_b devcfg_b.img
fastboot flash devinfo devinfo.img
fastboot flash dsp_a dsp_a.img
fastboot flash dsp_b dsp_b.img
fastboot flash dtbo_a dtbo_a.img
fastboot flash dtbo_b dtbo_b.img
fastboot flash frp frp.img
fastboot flash fsc fsc.img
fastboot flash fsg_a fsg_a.img
fastboot flash fsg_b fsg_b.img
fastboot flash hw hw.img
fastboot flash hyp_a hyp_a.img
fastboot flash hyp_b hyp_b.img
fastboot flash keymaster_a keymaster_a.img
fastboot flash keymaster_b keymaster_b.img
fastboot flash kpan kpan.img
fastboot flash limits limits.img
fastboot flash limits-cdsp limits-cdsp.img
fastboot flash logfs logfs.img
fastboot flash logo_a logo_a.img
fastboot flash logo_b logo_b.img
fastboot flash metadata metadata.img
fastboot flash misc misc.img
fastboot flash modem_a modem_a.img
fastboot flash modem_b modem_b.img
fastboot flash modemst1 modemst1.img
fastboot flash modemst2 modemst2.img
fastboot flash pad3 pad3.img
fastboot flash pad4 pad4.img
fastboot flash persist persist.img
fastboot flash prodpersist prodpersist.img
fastboot flash prov_a prov_a.img
fastboot flash prov_b prov_b.img
fastboot flash qmcs qmcs.img
fastboot flash qupfw_a qupfw_a.img
fastboot flash qupfw_b qupfw_b.img
fastboot flash ramdump ramdump.img
fastboot flash recovery_a recovery_a.img
fastboot flash recovery_b recovery_b.img
fastboot flash rtice rtice.img
fastboot flash sda sda.img
fastboot flash sdb sdb.img
fastboot flash sdc sdc.img
fastboot flash sdd sdd.img
fastboot flash sdf sdf.img
fastboot flash secdata secdata.img
fastboot flash secdataBackup secdataBackup.img
fastboot flash shrm_a shrm_a.img
fastboot flash shrm_b shrm_b.img
fastboot flash spss_a spss_a.img
fastboot flash spss_b spss_b.img
fastboot flash spunvm spunvm.img
fastboot flash ssd ssd.img
fastboot flash storsec_a storsec_a.img
fastboot flash storsec_b storsec_b.img
fastboot flash super super.img
fastboot flash tz_a tz_a.img
fastboot flash tz_b tz_b.img
fastboot flash tzsc tzsc.img
fastboot flash uefi_a uefi_a.img
fastboot flash uefi_b uefi_b.img
fastboot flash uefisecapp_a uefisecapp_a.img
fastboot flash uefisecapp_b uefisecapp_b.img
fastboot flash uefivarstore uefivarstore.img
fastboot flash utags utags.img
fastboot flash utagsBackup utagsBackup.img
fastboot flash vbmeta_a vbmeta_a.img
fastboot flash vbmeta_b vbmeta_b.img
fastboot flash vbmeta_system_a vbmeta_system_a.img
fastboot flash vbmeta_system_b vbmeta_system_b.img
fastboot flash vendor_boot_a vendor_boot_a.img
fastboot flash vendor_boot_b vendor_boot_b.img
fastboot flash xbl_a xbl_a.img
fastboot flash xbl_b xbl_b.img
fastboot flash xbl_config_a xbl_config_a.img
fastboot flash xbl_config_b xbl_config_b.img
fastboot flash xbl_ramdump_a xbl_ramdump_a.img
fastboot flash xbl_ramdump_b xbl_ramdump_b.img
fastboot flash xbl_sc_logs xbl_sc_logs.img

If you can not boot after this step do not worry - your phone will bootloop a few times and then ask you to wipe. Do so and skip the magisk uninstall and factory reset from the next step.

3. Restore via the Rescue Tool

Once again use "fastboot reboot" to boot into the phone, skip the setup, enable USB-Debugging and OEM Unlocking. Magisk should be installed. Simply start it and use the uninstall function to remove all traces. Then do a factory reset from within the settings.
When the phone is done, connect it to a windows machine and use Lenovo's Smart and Rescue Assistant to automatically download and flash the latest software version. Flash the firmware according to the instructions.

4. Relock the Bootloader

Finally, boot into the phone and once again enable USB-Debugging and OEM Unlocking. Open a cmd window and use the following commands.

adb reboot bootloader

Wait until your phone is booted into fastboot. Then lock the bootloader with:

fastboot oem lock

Check the prompt on your phone and confirm it. I have personally successfully relocked my bootloader this way.
Good Luck!

Edit
Pub: 28 Oct 2022 17:44 UTC
Edit: 23 Nov 2022 20:47 UTC
Views: 820