[Lenovo Vibe K4 Note ROMs, Kernels, Recoveries, & O] TinySoul:
Hi All,

We all know that unlocking the bootloader resets the device to factory defaults which means you loose installed apps, their settings and user data. Reconfiguring the device(system apps), installing user apps and transferring the userdata back to the phone can be lengthy process. It will also result in unnecessary usage of your wi-fi and/or mobile data and which can be quite expensive (as updated versions of user and systems app, need to be installed again)

So in order to bypass the above issues, follow the following steps:-

Step 1 - Take a full dump of your ROM using SP Flashtool's readback method. Go to readback tab, create a new item and put the following start address and length values :-

Start address would be 0x0

length of the dump file would be 0x3A3E00000 (Lenovo K4 Note only)

Start the process, it will take around one hour to complete depending on the speed of your computer. The dump would be 15 GB file, so ensure you have space.

Step 2:- Unlock the bootloader now

Firtst enable the developer option menu if not already enabled by doing the following steps

a. go to "about phone"-->"Build number"

b. tap it 7 times, you will get a message that "your are a developer now"

c. Go back to about menu, click on newly visible "developer options" and enable "OEM unlocking", ignore the warning. Scroll down and enable "usb debugging"

Open command prompt and enter fastboot mode by issuing the command

"adb reboot bootloader"

Once in the fastboot mode, issue the command "fastboot oem unlock" and follow the on screen instructions to unlock the bootlaoder

3. Now reboot the phone and configure the initial steps. As of this step user data and apps are lost, system apps are reset to factory defaults, but don't worry we have a backup (created in step one). Once done power off your device.

4. Now comes the real part. Launch SP Flash tool and create the dump of the following partitions (You create the dump file in the same manner you have created the full ROM dump file in step 1. The difference would be the values of start address and the length of individual partitions, which you can get from the scatter file).

1. Boot

2. Secro

3. Seccfg

For safety purpose i suggest to also take the backup of the following partitions

1. preloader (you can also flash preloader from stock rom)

2. lk

3. recovery (this is stock recovery with unlocked bootloader)

4. nvram

5. tee1

6. tee2

Till date I haven't has a need to use the above mentioned 6 partitions, so it's your call

Once done, power off and disconnect your phone.

5. Now enter advanced write mode in SP Flashtool (ctrl+alt+v), then open write tab from windows menu item.

Select the ROM dump file you created in step 1, put the start address as 0x0.

Once the process is started, it will take roughly an hour to complete. Disconnect the phone and reboot. Power off the phone once again.

6. Your SP Flashtool write tab is still open, if you have closed the application then relaunch the flash tool and again enable advanced write mode. Now one by one write the partitions images(dump files only boot, secro and seccfg needed) created in step 4. Use scatter file for start address.

7. Reboot your phone.

Congratulations your phone is up and running with unlocked bootloader, rooted and/or twrp custom recovery (if you chose to install it in the first place itself) and all data preserved

You can verify whether your bootloader is indeed unlocked by entering in fastboot mode and executing the command "fastboot getvar all"). You should see the values of the variables

unlocked - yes

secure - no

The first boot might take a litter longer so be patient.

Once you have an unlocked bootloader you can install custom recovery and root your phone.

I think this method should be working on any mediatek chipset based smartphones.

Note:

1. Although till date I haven't had any issues with this method, but follow the tutorial at your own discretion. I am not responsible for any damage caused to your phone by following the above mentioned procedure.

2. Sometimes while trying to perform more than one operations at a time, like you will need to perform write memory operation 3 times since unlike readback operation you can only write one image at a time in sp flashtool, you may get the following error "ERROR: S_BROM_CMD_STARTCMD_FAIL", if that is the case then try the following steps

1. Simply pull out the usb cable at the phone end, close the dialog box and try again. If not resolved after trying 2-3 then step 2

2. Restart the application and repeat the write process. If the problem is still not resolved then step 3

3. Reboot the machine, relaunch the app and repeat the write process.

I don't know why this happens but my guess is it has something to do with cpu cycles allocation causing the delay in usb signalling since SP Flash tool is a single threaded application. So for the best results try to ensure sp flashtool is the only application opened on your machine.

If you use other applications, most of the time you will get through but you will notice significant slowdown during the read and write operations especially during reading and writing full ROM dumps.

Thanks :)