yashsingh1/xdaforums huggingface dataset:
[Lenovo K5 Note Questions & Answers] hk.happy:
Ok, so I tried flashing the recovery file. This is what i did

Downloaded stock rom from here https://yadi.sk/d/AxEP_CSXu7niP, the a7020a48_s259_160721 version. I downloaded this to get the scatter file. Otherwise my phone was already on A7020a48_s312_161128 row version.

Using SP flash tool, loaded the scatter file from the stock rom folder, unchecked everything except recovery, chose the custom twrp recovery from above (renamed to "recovery") , chose download option, clicked on download button, and connected my switched off phone to the computer. It connected, loaded the recovery, flashed it, green tick and all. I was excited. Now i disconnected the phone and rebooted.

Problems started here. Phone was stuck in boot logo with some error message in bottom left corner (dl failed or something like that, dont remember exactly)

I did not panic and tried to reflash the stock recovery from the stock rom. However that started giving some error. (Something like BROM ERROR status sec imghdr type mismatch)

Then I somehow managed to flash the ENTIRE stock rom that i had downloaded, the 160721 one after several failed tries.

Rebooted the phone.

Now I didn't have the IMEI numbers and my sims won't register in the network.

Some research on google and xda led me to a software called mau meta, with which i managed to restore my IMEI numbers after several tries.

End result is that I'm now on 160721 version of the ROW, compared to earlier 161121, with no success in installing a custom recovery.

I read somewhere in k3 note forums that to install a custom recovery in marshmallow, we need patched boot images or something like that. Anyone can shed light on that ?
[Lenovo K5 Note Questions & Answers] anujmankotia:
Same here bro...

The whole cycle

Ending up with lost imei no. And then reflashing them....

Using Maui meta
[Lenovo K5 Note Questions & Answers] comprocks:
I think it's posted previously on one of the threads. Our boot image has some sort of image verification since Marshmallow. It verifies the recovery and possibly all other partitions before allowing it to start up. Since you had a different recovery than stock, it could not verify it and that's probably what stopped the boot process. I have no clue where we can find a modified boot image, though.
[Lenovo K5 Note Questions & Answers] anujmankotia:
But I recently unpacked the system.IMG and repacked it with certain alterations

It worked like a charm

Looks like only some images (recovery.IMG etc) have verification method of some kind...

---------- Post added at 10:34 AM ---------- Previous post was at 10:33 AM ----------

May the size issue...

Stock recovery is about 13 MB.....
[Lenovo K5 Note Questions & Answers] comprocks:
Sounds about right. Lenovo just doesn't want their users to root their phone! Can you help me out with my issue in the above thread or try the recovery that was posted in the Mediatek thread (Link) if that works for you?
[Lenovo K5 Note Questions & Answers] anujmankotia:
Already tried that both of them

An image mismatch error for me
[Lenovo K5 Note Questions & Answers] comprocks:
Back to square one.... I'm going to root it through the Lollipop+Kingoroot method.
[Lenovo K5 Note Questions & Answers] anujmankotia:
Can you please do me a favor

If you are able to install a custom recovery in lollipop

And then (if u wish) upgrade to mm then flash the firmware by unchecking the recovery image.......

Thanks in advance...
[Lenovo K5 Note Questions & Answers] hk.happy:
This is just sad. A device perfectly capable of running nougat is stuck on marshmallow probably because Lenovo wants us to buy their pricier moto models. (Or some other reason; the 10 reasons they give on their forums are not enough to convince me to not root my phone)

This sucks. This is MY device, i should be able to install whatever software I want on it, even root it.

I hope some kind developer here figures out how to do that soon.

*****End of rant*****

PS : I managed to restore my IMEI numbers but now there is a new wifi showing up in available networks as "NVRAM WARNING: ERR=0x10"

Also, serial number in settings>about phone>status shows up as 00000000. I don't remember if it showed a number earlier same as the one on my box. Tried googling, but its a bit complicated,involving apdb files, which are not available for the s312 version of ROW, which I've already updated to, again. Anyone with the same issue ?
[Lenovo K5 Note Questions & Answers] comprocks:
So true!! I wanted to run Xposed on this. But it is not possible without rooting or some form of custom recovery. This is absolute crap. They should give us the freedom to root even if this phone is not highly priced.
[Lenovo K5 Note Questions & Answers] anujmankotia:
Me
[Lenovo K5 Note Questions & Answers] comprocks:
Sure bro, I will try this out. I have both stock ROMs so I will give it a shot. But I think the Marshmallow boot image will still stop the boot process once I upgrade by not flashing the stock recovery.
[Lenovo K5 Note Questions & Answers] Gibz97:
[MENTION=5858740]comprocks[/MENTION], [MENTION=5999290]hk.happy[/MENTION] Just chimed in the thread and I have realized that some people were able to downgrade their firmware to Lollipop, How did they do that? Was it done with SP Flash Tool or maybe there's a specific Lenovo flash tool?

About people losing there IMEI and Serial numbers, if this was due to SP Flash Tool then to avoid it you have to flash the firmware in "Firmware Upgrade" and not "Format All+download"

There is a thread here on how to recover IMEI,SN and Nvram wifi issues. it's for HTC Desire 820s but should work for any 64 bit mtk phone and you should use the database files found in your firmware folder

https://xdaforums.com/desire-820/help/desire-820s-how-to-root-invalid-t3281455
[Lenovo K5 Note Questions & Answers] Yahii2:
I cannot wait to root android 6 too, I think we will win
[Lenovo K5 Note Questions & Answers] hk.happy:
As far as I know, there is no official Lenovo flash tool. Whoever managed to downgrade, that was with SP flash tool most probably. I'm waiting for [MENTION=5858740]comprocks[/MENTION] to try what he mentioned in his last post, since I don't have the lollipop ROW and neither the bandwidth to download that file today

Yeah I was a bit hasty and used the flash all option instead of the firmware upgrade one, hence the imei and sn problem.

To rectify the serial number, I was trying to download the SN tool from your link, it asks for a decryption key, but didn't see one mentioned in the thread, maybe you added the key later on... What's the key mate ?
[Lenovo K5 Note Questions & Answers] anujmankotia:
No u can easily downgrade to lollipop using SP flash tool

U just need to perform format+download 2 times

---------- Post added at 01:17 PM ---------- Previous post was at 01:16 PM ----------

1st time u will get a pl vry fali error

But 2nd time it will flash succesfully

---------- Post added at 01:18 PM ---------- Previous post was at 01:17 PM ----------

And the imei can be re flashed using Maui meta

---------- Post added at 01:20 PM ---------- Previous post was at 01:18 PM ----------

U can do one more thing

Download CDs information.apk

Now unpack system.img

Now place that apk inside the app folder

And repack system.img

Flash it

And when done

Dial the code for engineering mode than cds information and all that
[Lenovo K5 Note Questions & Answers] Gibz97:
My bad! My mega account had changed the decryption key and I forgot to update the thread.

Here's the link to SN Write Tool https://mega.nz/#!lxcBWKIZ!1SZVDXoLhlswY24OFFBzowHUN-wHBYPOXOhgoSIshB4
[Lenovo K5 Note Questions & Answers] blanksh07:
Bump!

I tried downgrade to LL by 2 times (PL_VRFY_FAIL) No Luck!

Any idea to get root on 6.0?
[Lenovo K5 Note Questions & Answers] anujmankotia:
Bro do format all + download

And check if USB chksum and storage chksum is checked
[Lenovo K5 Note Questions & Answers] comprocks:
I'm backing up all my stuff. Particularly WhatsApp. Unfortunately, I have a significantly lower upload speed as compared to download speed.

I'm a bit worried about this since formatting the entire thing is involved. I do not want to brick this phone - it's my daily driver... Can [MENTION=8002203]anujmankotia[/MENTION] give me the exact steps to perform as it's confusing.

Also, [MENTION=7962395]blanksh07[/MENTION] failed to downgrade even though he did it twice, just like anujmankotia mentioned in his post. I won't be able to perform this unless I have a clear set of instructions guys.

I cannot emphasize this enough: I do not want to brick this phone. It is my daily driver. I do not have a spare phone with me! I'm worried to perform this unless I have a clear set of instructions to follow. Thanks.
[Lenovo K5 Note Questions & Answers] anujmankotia:
Okay

First thing first

Download the firmware of mm

In case things go wrong

And the firmware of lollipop

Now open it go to SP flash tool

Run it load the scatter file

Than select format all + download (this will delete your imei's as well)

Now go to options than downloads in the SP tool

And check if USB checksum and storage chksum is selected

Now click on download

Connect your device ( switched off)

It will give a pl vry fail error after formatting

Now repeat these steps again...

To fix the imei's

Download Maui meta version 9

It will fix the imei's

---------- Post added at 02:59 PM ---------- Previous post was at 02:58 PM ----------

Let [MENTION=7962395]blanksh07[/MENTION] do it first...
[Lenovo K5 Note Questions & Answers] hk.happy:
Oh. Mate, I didn't know it's your only daily driver, I won't recommend doing this then.
[Lenovo K5 Note Questions & Answers] blanksh07:
Used : A7020a48_LL_S125_160419_ROW

its get stuck at Download DA 100% nd another time PL_FAIL !

Both IMEI gone, so flashed S312(MM), NVRAM Error.

i think its bcoz of FRP Lock.

Any other way to downgrade?
[Lenovo K5 Note Questions & Answers] comprocks:
When it got stuck the first time at 100%, did you disconnect it before it gave you an error?
[Lenovo K5 Note Questions & Answers] hk.happy:
Thanks mate . I tried using it, but there is no option to change the serial number only. Even with IMEI, it does not ask for the serial number along with asking for the IMEI numbers. I was wondering what's the barcode thing, is that the option for serial number ?

Also, I found this link, http://www.gizbeat.com/10511/umi-super-twrp-and-root-umi-super-mt6755-helio-p10/, which guides about flashing custom twrp for a phone called umi super which shares its SoC with our phone, the MTK6755. Although it's a very slim chance, but could this work on our phone too ?
[Lenovo K5 Note Questions & Answers] anujmankotia:
naa i have already tried that recovery

again a type mismatch error
[Lenovo K5 Note Questions & Answers] Gibz97:
Yes, the barcode is the serial number.

About the Umi Super TWRP, it's almost impossible for it to work on that phone due to differences in kernels between the two phones.

If I may ask, has anyone successfully flashed TWRP with SP Flash Tool on Marshmallow or Lollipop firmware?
[Lenovo K5 Note Questions & Answers] atf2m4:
Brother, there is a software called Android Kitchen and it can be used to create patched boot images. In the boot image we have to remove the line,

,verify

and it will be okay. If you want more info. search in the MIUI forum for Redmi Note 3.
[Lenovo K5 Note Questions & Answers] comprocks:
I will try it out later on in the day, but it does not mention our device in the supported list. Also, it is for MT65xx devices and our SoC is MT6755. I'll still try unpacking the boot image and post my findings. I will need help, of course, since I have never done this before. Thanks.
[Lenovo K5 Note Questions & Answers] atf2m4:
Brother what tool did you use to unpack/repack the system.img?.
[Lenovo K5 Note Questions & Answers] anujmankotia:
android unpack repack tool

u also need a file_context file

if u are doing it for k5 note mt6755 i can give u that file
[Lenovo K5 Note Questions & Answers] comprocks:
Unpacked boot.img attached. Need help!

Well guys, I have attached the unpacked boot.img zip to this post. Help me out by telling me what to edit as there are tons of files in there. I don't even know where to begin! Perhaps someone more experienced out there?

I used Android Kitchen on Ubuntu 16.04.1 64-bit Virtual Machine, by the way, because the Kitchen OP said Cygwin for Windows may have some issues. One more thing, this has been extracted from boot.img of 'S312' version of the stock ROM

Thanks.
[Lenovo K5 Note Questions & Answers] anujmankotia:
i don't think that we need to modify the boot.img

as in k4 note(mt6753)

the patch contains 2 files preloader.bin and uboot.bin=lk.bin...
[Lenovo K5 Note Questions & Answers] comprocks:
[MENTION=2962657]atf2m4[/MENTION] mentioned removing verify line from the boot image to patch it.

Also, I have a question: Can't we modify the system.img and place the required Superuser/SuperSU files directly into /system? Then, we can flash the modified system.img and we should have root.... Right? Never modified images in my life before, so please bear with me if this is a noob question.
[Lenovo K5 Note Questions & Answers] anujmankotia:
naa you can palce the apl in the sysytem.img

but just installing apk doesn't get u root acces

we need root binariea

---------- Post added at 10:08 AM ---------- Previous post was at 10:07 AM ----------

*binaries

---------- Post added at 10:50 AM ---------- Previous post was at 10:08 AM ----------

but if u get the right binaries

and place it in system/bin or Sustem/xbin......

(idk the best exact path)

that will do

maybe....
[Lenovo K5 Note Questions & Answers] hk.happy:
According to this tutorial here https://xdaforums.com/showthread.php?t=2684210, you have to place the su and busybox binaries in system/bin and the supersu apk in system/app, that should do it.

But something tells me it's not going to be that simple. Anyone wants to buy a one month old k5 note ? :crying:
[Lenovo K5 Note Questions & Answers] anujmankotia:
yo but the binaries are old

and not for mm

---------- Post added at 11:32 AM ---------- Previous post was at 11:31 AM ----------

file system is different for different os...
[Lenovo K5 Note Questions & Answers] hk.happy:
Yeah, it's an old thread.... And since we do not have anyone who has rooted a k5 note yet, that's all one can do, sweep through any and every thread, looking for some hope. Seriously, I'm cursing Lenovo like anything.

But then it's my mistake, should have bought a redmi note3 instead.

Has even the k4 note been rooted yet ? Didn't see any custom ROM threads in the k4 forum either
[Lenovo K5 Note Questions & Answers] anujmankotia:
k4 note is rooted and bootliader unlocked

using patched lk.bin and preloader.bin

---------- Post added at 12:08 PM ---------- Previous post was at 11:43 AM ----------

this phone just doesn't want to be rooteed :crying:
[Lenovo K5 Note Questions & Answers] comprocks:
Oh no. Don't trust that thread. If you read a few pages in, you'll find the method is utter BS. I have tried that one myself and everybody there confirms it did not work for them and the OP was of no help.

There's gotta be some way, we'll figure it out. Don't lose hope bro!
[Lenovo K5 Note Questions & Answers] anujmankotia:
yoooo....
[Lenovo K5 Note Questions & Answers] comprocks:
Can I have the file that you used please? I want to try out modifying the system image and flashing it. Also link me to the software download if you can.
[Lenovo K5 Note Questions & Answers] atf2m4:
Yes man, i need the tool and file. i am going to try for our lenovo k5 note. Thank you.
[Lenovo K5 Note Questions & Answers] anujmankotia:
[MENTION=5858740]comprocks[/MENTION] the file context is located at

boot/ramdisk

remember that boot.img you extracted

in that zip go to ramdisk folder
[Lenovo K5 Note Questions & Answers] atf2m4:
Brother ,

within boot.img you unpacked,in the file default.prop file

change ro.secure=0 (that is from 1 to 0) and report if it works or not.
[Lenovo K5 Note Questions & Answers] comprocks:
Should I also change ro.adb.secure=1 to =0? What about security.perf_harden=1 ? Just asking because these look like they are increasing the security level of the boot image making it more difficult to flash stuff.
[Lenovo K5 Note Questions & Answers] atf2m4:
Just ro.secure=1 to ro.secure=0

ro.adb.secure=1 to ro.adb.secure=0

and also

delete the line ro.secureboot.devicelock=1 if present
[Lenovo K5 Note Questions & Answers] blanksh07:
STATUS B)

Used : A7020a48_S259_160721_ROW

Flashed success! Still no IMEI & NVRAM 0x100(WIFI).

Trying a tool might help out for root, anyone know how to get it done busybox?
[Lenovo K5 Note Questions & Answers] anujmankotia:
keep us infomed
[Lenovo K5 Note Questions & Answers] comprocks:
Changed the first two lines.

'ro.secureboot.devicelock=1' was not present in default.prop.

I have attached the modified boot.img. Someone will have to help me out by flashing it as I don't have any time for a few days (Personal life stuff...). Keep in mind before flashing, that this is a boot.img from 'S312' version of the stock ROM. Do not flash this modified boot image on a different version. I have changed the lines as per [MENTION=2962657]atf2m4[/MENTION] instructed.

Thanks for understanding. Hope this helps.

Edit: Extract the boot.img from the zip. Had to do this because XDA .img file size limit is 8 MB and the boot.img was 9.6 MB, .zip file limit is 20 MB.
[Lenovo K5 Note Questions & Answers] comprocks:
Bad news, guys... [MENTION=7962395]blanksh07[/MENTION] PM'd me about trying to flash the modified boot image but he got a imghdr type mismatch error.

I guess we'll just have to try manually inserting the binaries into system.img if that's possible. If nobody else can, I'll give it a shot next week.

Thanks.
[Lenovo K5 Note Questions & Answers] anujmankotia:
u have to write it manually using advance mode in sp tool

---------- Post added at 07:31 AM ---------- Previous post was at 06:37 AM ----------

and i'm gonna modify preloader.bin and lk.bin

---------- Post added at 07:31 AM ---------- Previous post was at 07:31 AM ----------

but flashing a modified preloader is a bad ... very bad ideaaa
[Lenovo K5 Note Questions & Answers] Gibz97:
To root marshmallow you have to modify both the boot and system.

In your case it seems the phone cannot enter META mode where it can be flashed.

Has anyone tried holding any volume button or in combinations while convecting the phone to the PC during flashing? This might trigger the phone to enter META mode

Yes but that seems possible, the preloader.bin and lk.bin can be modified to make the phone accept the volume up click to unlock the bootloader.

An example where this method was used is in the rooting of the infinix hot 2 where they had to flash a modified preloader.bin and lk.bin in order to enable the phone to boot into the recovery mode by holding power and volume up buttons.

I have no knowhow on how to do that though and I wouldn't advise anyone to try that unless they know what they are doing because if it backfires, especially with the preloader, then the phone could be permanently bricked
[Lenovo K5 Note Questions & Answers] anujmankotia:
lenovo k4 note another example

---------- Post added at 12:32 PM ---------- Previous post was at 11:47 AM ----------

guyzz if anyone waana try midifying system.img

use ststemless roots binaries...
[Lenovo K5 Note Questions & Answers] Ashwinrg:
I don't think systemless root method modifies system.img. As I know it only modify boot.img and install SuperSU apk.
[Lenovo K5 Note Questions & Answers] anujmankotia:
no ..

we will take the binaries and other files and put it in the firmwareee...
[Lenovo K5 Note Questions & Answers] Ashwinrg:
You are right. But it is not systemless root method. Systemless root is no modifications to system.
[Lenovo K5 Note Questions & Answers] hk.happy:
Ok, so our progress is stalled here. Anyone has any new ideas ?

Can we flash the custom recovery manually in advanced mode(ctrl + alt + V, if I remember correctly) in SP flash tools maybe, using the same begin and end locations as in the scatter file maybe ? It could make the phone go in bootloop yeah. Only if we knew how to make it stop verifying the recovery. . . .
[Lenovo K5 Note Questions & Answers] anujmankotia:
I tried that once with old images

Got writed succesfully but no effect on the stock recovery partition...

Still the old recovery

Never tried them with new images(recoveries of this thread)
[Lenovo K5 Note Questions & Answers] hk.happy:
MTK Droid tools has to say this about it phone. Maybe that's the reason it loads stick recovery everytime ? Someone here had changed the system.img file and flashed it successfully. If anyone knows hiw to change the system.img to prevent it from using stock recovery everytime, maybe that could work ?
[Lenovo K5 Note Questions & Answers] anujmankotia:
Got the point

The recovery from boot is a mechnism used to replace any custom images on every boot..

---------- Post added at 02:43 PM ---------- Previous post was at 02:40 PM ----------

We need to delete it

And write the recovery.img using advance mode

Will try it in few dayz

and will share the result..
[Lenovo K5 Note Questions & Answers] atf2m4:
We are waiting for your result man. Thank you.
[Lenovo K5 Note Questions & Answers] anujmankotia:
Hey guy

Tried that advance writing method

Still no luck

The new recovery got flashed

But when booting in recovery mode

There is a message/warning

"Your device failed verification will boot in 5 sec"
[Lenovo K5 Note Questions & Answers] hk.happy:
Did you modify the system.img ?
[Lenovo K5 Note Questions & Answers] hk.happy:
Don't know what else we can try. This sucks.
[Lenovo K5 Note Questions & Answers] anujmankotia:
Off topic

But google assistant in k5 note
[Lenovo K5 Note Questions & Answers] Pratikpathare:
Google assistant

Wow... How did u do it ??
[Lenovo K5 Note Questions & Answers] anujmankotia:
https://xdaforums.com/android/software/guide-google-assistant-marshmallow-t3478450

---------- Post added at 06:11 PM ---------- Previous post was at 06:09 PM ----------

To be honest

I only wanted k5 note rooted just for thiss.....
[Lenovo K5 Note Questions & Answers] ananthuthilakan:
Hey friend

I will give the recovery img of k5 note

Will u make twrp for it, there is something tricky i think

The flashtoolis now enabled with signature verification of recovery
[Lenovo K5 Note Questions & Answers] Romeotamizh:
If u r already rooted then u can flash using flashify also
[Lenovo K5 Note Questions & Answers] hk.happy:
Can you upload the modified app here ? Also, did you install it via adb or directly on the phone ?
[Lenovo K5 Note Questions & Answers] anujmankotia:
I replaced stock velvet.apk with the modified apk in the firmware than repacked the system.img and flashed it

---------- Post added at 05:51 AM ---------- Previous post was at 05:46 AM ----------

https://drive.google.com/open?id=0BxHHNu8mGUCxanBjLV9nN3Z4MDg
[Lenovo K5 Note Questions & Answers] hk.happy:
Thanks mate ! Tried installing it directly and with adb as well. Both failed, as expected. Will try your method when time permits. And hopefully by then some genius developer figures out how to root this thing and get nougat on it. Lenovo is not giving us nougat for sure officially. They have a line written in bold above the Android update matrix...."There is no upgrade plan available for products that are not listed in this page."
[Lenovo K5 Note Questions & Answers] anujmankotia:
the update matrix is outdated

---------- Post added at 11:19 AM ---------- Previous post was at 11:19 AM ----------

Nougat might come in q1(end of march)
[Lenovo K5 Note Questions & Answers] hk.happy:
Yeah it is, but none of the admins in lenovo forums acknowledge that. If an update was coming out, they would have said the same. Yeah but I'm still hoping against hope that a Nougat update comes our way. Fingers crossed.
[Lenovo K5 Note Questions & Answers] anujmankotia:
:laugh:
[Lenovo K5 Note Questions & Answers] atf2m4:
Brother,

Here I attach the script for your reference.