yashsingh1/xdaforums huggingface dataset:
[Android General] pndwal:
Great news. :good::good:

Exactly! -

...

Yes, - I was thinking about unconsidered modifications to non-stock .img file, but as you say, SU mod may actually be necessary.

Also, I never considered what OS you were running when originally 'restoring' boot.emmc.win. Of course, a .win file akin to stock boot.img may work with stock ROM, but we had no dice with stock boot.img running LOS14.1, and with boot.img for TB3-850 LOS14.1 we had initial bootup, but then bootloops and instability on reboot.

We had stable bootup of LOS14.1 after [MENTION=8548258]wezroot2k[/MENTION] simply substituted kernel and ramdisk in TB3-850 LOS14.1 boot.img with stock 850F kernel and ramdisk, so I am now thinking it may be well worth using new LOS14.1 ROM and its modified boot.img as your starting point for custom kernel if this unpacks without problems. But then again, I guess kernel included here will likely be identical signed version...

Hope [MENTION=9720847]AeonFlux1603[/MENTION] [MENTION=8548258]wezroot2k[/MENTION] can give more technical help. PW
[Android General] limited_imagination:
After re-reading this post by [MENTION=8548258]wezroot2k[/MENTION], I downloaded and tried MTK Extractor ver. 2.6.3, but I had no better luck unpacking "boot-sign.img" from the stock ROM with that tool than I did with Android Image Kitchen.

Eventually, I stumbled on a tool called "Lenovo FbWinTools_v1.1", and that is the trick. I expect [MENTION=8548258]wezroot2k[/MENTION] must have used that tool, but didn't mention it that I noticed in this thread.

When you download FbWinTools and run it in a Windows command prompt, you can un-sign all the Lenovo signed partition images in the stock ROM, and then afterwards use Android Image Kitchen (or MTK Extractor, or whatever unpack tool you want to use) to unpack the unsigned image.

I just tested the unsigned stock ROM boot-sign.img file with AIK, and it unpacks fine now.:victory:

Here's a direct download link where I got my copy, posted by Hovatek Forum: https://mega.nz/#!wbx3XZzL!eYO2OqBve8wYSkL1DxE8YE4_fhy9KFXcY953nrscLfM

Here's a YouTube video where a guy shows how it's used: https://youtu.be/CV39vJsNjhY

FbWinTools_v1.1 apparently allows you to re-sign an image, too. That leads to the interesting possibility of re-signing a custom partition image, and then flashing it to the device with SPFT, just like any other factory stock partition image from that Lenovo ROM. That's probably a more dangerous idea than using TWRP to "install image", but an interesting possibility nonetheless.

I'm not sure whether TWRP requires each partition image to be signed, in order to install it successfully. I suspect not, given that [MENTION=9720847]AeonFlux1603[/MENTION] and [MENTION=8548258]wezroot2k[/MENTION] did not mention anything about that. And TWRP doesn't sign its own backups of the partitions.

Next step will be to experiment with unpacking and then repacking both the stock and TWRP boot image files in AIK, and then flashing the result with TWRP. I will not substitute my new kernel before repacking in AIK. I just want to see whether I get boot loops just by virtue of AIK unpack/repack process alone, using known-good boot image files.

If I get no boot loops doing that, then it narrows down the variables where the problem may lie.

If no boot loops, then the problem is either a bad kernel, or else I'm doing something wrong with substituting the kernel files before repacking in AIK.
[Android General] wezroot2k:
No L_I didn't use the lenovo fbwintool just the mtk extractor.
[Android General] limited_imagination:
Could you please tell us exactly which boot image file you used, that you unpacked with MTK Extractor?

I have been fooling around with unpacking, re-packing, and then flashing stock boot images today. This is just with the stock Android 6.0 OS, to keep the variables simple.

I finally found one combination that reliably and repeatedly worked.

I start with "boot-sign.img" as taken from the stock ROM downloaded from the Russian Lenovo forum, then I unsign it with Lenovo FbWinTools_v1.1.

I then take that newly unsigned image file, and run Android Image Kitchen ver. 3.4 on it. I unpacked the image, and then repacked it, without swapping kernels, because I just wanted to ensure I was going about the unpacking/repacking/flashing procedure correctly so that I could isolate the source of the problem.

On executing the AIK repack script, I get the following error message, but it has no effect on the efficacy of the file that is produced: "Building image... Using format: AOSP Signing new image... Using signature: AVB boot Error!"

A new file named "unsigned-new.img" is produced by the AIK repack script.

I then prepared the TB3-850F by copying the unsigned-new.img file to the device, updating the Android OTA security patch to September 5, 2017, unlocking the boot loader, but leaving it with no root, and with stock recovery.

I then started a "tethered" TWRP session, and used the "install image" function, pointed the source to "unsigned-new.img", pointed the output to the boot partition, and flashed it.

This worked reliably and repeatedly, and the device booted up as normal.

Unfortunately, when I repeated these steps but swapped the kernel in the AIK unpack, using my newly compiled "Image.gz-dtb" file (renamed to "boot-sign.img-zImage"), then I got a boot loop when I flashed the device. It would freeze on the Lenovo logo, and I had to restore the whole ROM with SPFT, as described above.

Just for the hell of it, I tried the AIK unpack/swap/repack shuffle with the "Image.gz" file, too, just in case, but I got the same boot loop result.

So that pretty definitely suggests that it's the newly compiled kernel itself that's bad.

Sad trombone sound....

Back to the source code compiling drawing board.
[Android General] RBraverman:
A little OT at this moment but ...

I've a Tab3/850F that I have/had already rooted, I didn't put TWRP on it, just rooted. If I remember correctly, it took about 5 minutes.

The unit crashed and all I could do - at the time (I was sitting next to the wife in the hospital ... bloody 7 weeks ...) was to reset it and use Kingroot. I installed a firewall which has kept that at bay, but I'd like to remove it and do it right.

She's home now, my mind being elsewhere, I would like a bit of help.

Can I uninstall Kingroot, reset and then root?

Is the OP still valid as to the files and instructions, or have things been simplified?

Just reset? OH can someone tell me how to get the stock recovery to read in ENGLISH? I reset it purely by luck last time.

MANY MANY thanks for any answers. As there are other things on my mind, I kinda need to voice/bounce what I read and understand to make sure I've got it right.

This is my most important tablet as it's my reader - keeps me sane now.
[Android General] RBraverman:
Thanks for the reply and thoughts on the wife - it's been a VERY slow slog, but she's getting better, gonna take a long time though.

I just use this as a reader, so it never seemed important enough to put TWRP on it - although ALL of my other devices DO have it installed, oh well - live and learn ...

I looked at the thread for LOS - am interested - and it mentions the files (on Google Drive) to install root/TWRP, but I can't get them. Is there another location/link? - I went to your thread and got the files from those links.

BTW I totally agree that KR is not to be used - now - but I assumed (never assume anything) if it was posted on this site of all sites, it would have been cleaned up.

UPDATE:

Bootloop after fastboot oem unlock, held down power button to restart it, it loads 3.0.3 of TWRP by Jemmini - I didn't put it on - and it can't mount anything and boots again, which I can't seem to stop. FWIW, when TWRP loads it claims it's running OpenRecovery Script.

UPDATE 2: Finally got it to STOP and shut down to the battery symbol and time/date.
[Android General] pndwal:
OP there says:

That's this thread, good for guidance only as:

Sorry if this has got over complex, but it was decided to keep discussion going here where it started for now, and only make new thread for LOS14.1 as there are already too many threads for TB3-850F. I think my links in post #404 are the latest.

I think you must have flashed TWRP by Jemmini in past and forgotten. (Your XDA signature says you have Lenovo Tab3, Rooted, TWRP Recovery, Stock ROM, so perhaps your prayer was answered, and the Lord decided to 'Protect you from knowing that you decided not to know about the things that you decided not to know about.' As for me, I'm not able to 'Protect you from KNOWING that there are things to know that you didn't know', let alone 'Protect you from knowing what you don't need to know.' ;) )

Either way, seems something (probably KingRoot) is making your system act strangely.

Not sure if you meant you can enter TWRP, or that it only partly loads and reboots (loops).

If TWRP is inaccessible, you may still be able to load it from PC:

- Open cmd (command Window) in folder with ADB and FASTBOOT

- Type 'adb reboot bootloader', then type:

- 'fastboot boot recovery.img' (must be copied in the same folder as adb.exe and fastboot.exe)

Then use booted TWRP (or flashed TWRP if accessible) to:

1) Do a nandroid backup (especially of partitions with your unique numbers - SN, IMEI, BT Mac No, WiFi MAC No. etc, or do complete backup) as mentioned.

2) Reflash TWRP recovery .img file (Install, Install Image, then reboot to recovery) to be sure TWRP is good. - I'm not sure why you're getting message 'running OpenRecovery Script'. Seems it has been previously set to look for /cache/recovery/openrecoveryscript file with some commands inside. Hopefully that is fixed when do step 3).

3) Wipe everything ROM related (- data, cache, system, dalvik) in TWRP for a clean ROM flash, and to remove all traces of kingroot as mentioned.

4) Clean flash our new LOS14.1.

Alternnatvely (or in the event you have problems with the above), you could simply restore tablet to full stock by flashing all partitions you can using SP Flash Tool (SPFT), but do nandroid backup if you haven't already.

As I said, use latest full ROM in my 'Useful Stuff' post above (lenovo-tab3-a8-tb3-850f_s100030_161209_row. Can update to s100031 via OTA later). This contains all needed windows drivers and files too (vcom driver, SPFT etc), and I'd use this included SPFT even if you have a later version as some have had unexpected problems with later versions. Remember the volume down trick for a successful USB vcom connection.

Hope this helps you get it sorted, and that you don't lose sanity or sleep over it. Look after your wife - PW.
[Android General] RBraverman:
THANK YOU again for answering. I honestly do not remember putting TWRP on it but ...

The key in your answer (I was not clear) was that this is a loop. I can not get it to stay anywhere so that I could anything with it. It boots into this TWRP, then reboots, except for stopping it completely (holding power Vol +/-) - AHHHHHHHHH

SOMEHOW (been at this with key pushes and reboots for an hour now) I got to a seemingly stable screen of TWRP asking "Keep System Read/Only" I read something about that but can not remember where it was - I believe it was to LEAVE IT ALONE, but I'll wait. Hope an image is attached.

Make a long story short, got Jeminni TWRP (no matter what I do that is the one that shows up) to boot fine consistently, wiped data/Dalvik/System etc like you suggested and flashed LOS14. Formatted the data partition 4 times before it took, then flashed LOS14.

And then I decided it would be better if I started from scratch, I followed these instructions "https://xdaforums.com/android/general/rom-lenovo-tab-3-8-tb3-850f-android-6-0-t3593043" but could not get a system image that fastboot would see/use (the sucker's 3gb). So now nothing, just the logo and off, then the logo.

I'm really done. Going to contact the warrantee people and get my money back and just for get it. Left to my own devices, this is what I get and I've had it!

THANK YOU SO MUCH.
[Android General] limited_imagination:
FWIW, I would be strongly inclined to go this direction, if Kingroot has already got its greasy paws all through the device. God knows what detritus it has left in there.

If you use the Smart Phone Flash Tool ("SPFT"), you end up with your device re-flashed with all the important partitions like it was brand new out of the box again.

An even bigger benefit is that you use SPFT with the TB3-850F powered off, so if you have butchered your device to the point of infinite spastic boot loops, or freezing on the Lenovo logo, and you can't get into TWRP, or communicate with a PC using adb, then the SPFT is going to be your best friend.

Here's a direct link to the SPFT and stock ROM that I've been using, which PW posted elsewhere, just to save you some time & clicking. It's a huge file, and takes a really long time to download. Although it's said to be "Euro version", it worked just fine with my US market TB3-850F:

Note the password, when you come to unzipping the archive, and use the SPFT version included in the archive in a folder labelled "Tools". Setting up the VCOM driver is a little fussy, because it's unsigned, and Windows doesn't like that. When you are set up and start SPFT, click the "Download" tab. It wants you to point it to a Download Agent (included in the archive folder as "MTK_ALLINONE_DA.bin"), and a scatter file (included in the archive folder as "MT6735M_Android_scatter.txt"). Once all set up, hold the volume down button, click "Download", plug in the USB port.

About 5 minutes later, and Robert is Your Mother's Brother!

The OP's file link is dead now, but here is a link to a ZIP archive I just made with all the files in the OP's initial post:

https://drive.google.com/file/d/1YSSzBw_w8ao6StgbPylM6Gqqja3hU--Q/view?usp=sharing

I'm pretty sure those are all the files he initially originally posted in his download link. It's what I have been using recently, as I repeatedly softbricked my TB3-850F and restored it. Gotta say, I really miss MotoJunkie01's participation here, and the existence of this very thread was what convinced me to buy my TB3-850F.

I will leave that download link up for a week, but my Google drive is getting quite full, and I need to flush it soon. So grab it while you can, all.

PW, you are the most active XDA correspondent in respect of the TB3-850F, maybe you could set up an archive, and get a moderator to redirect the download link in the OP's post? I don't know what the politics of that would be, but I expect that people will periodically keep reading this thread, and want the OP's files in the future.

---------- Post added at 11:32 PM ---------- Previous post was at 11:28 PM ----------

Try the SPFT method. Believe me, I've been right where you are, spastic reboots every few seconds, freezes on the Lenovo logo, refusing to power down unless I hold all three buttons for 30 seconds, etc.

SPFT and the stock ROM will make it all seem like a bad dream.
[Android General] RBraverman:
It's alive ALIVE!!!!!!!!!!!!!!!

Man I can't thank you enough - and let me make this clear to all, both PW and Limited_Imagination (that's alie) are the best. They both took the time to help through something, that albeit I knew better, and got it to work.

Dudes you are aces!

Okay, tomorrow morning when the lady sleeps, I'm going to root and TWRP it. Might you tell me whose instructions I should follow. I realize that my only mistake - from the beginning - was NOT hard resetting the unit before I started messing around. It's my belief (like yours) that KRoot REALLY had it's tentacles everywhere - I mean I didn't even uninstall it!
[Android General] pndwal:
LI's suggestion is exactly what I was going to strongly recommend next: TRY SPFT METHOD. He's saved me the trouble.

Really, that's why I said:

I anticipated you may continue to have problems with TWRP method as things are.

However, as LI says, SPFT is pretty foolproof. Its MediaTek's official flash method, its designed to overcome bootloop and partition corruption problems, even when ADB and Fastboot modes fail. Its also why I linked thread by [MENTION=8243079]r&xp[/MENTION] for unbricking, which uses SPFT method to unbrick and reinstall stock, and has saved TB3-850F for many.

I probably should have suggested you try this first, but I was thinking restoring stock may be unnecessary if you can access TWRP and want to move to LOS14.1.

So don't throw in the towel until you've tried your best option to unbrick - SPFT

Hope this helps you get it sorted, and that you don't lose MORE sanity or sleep over it, and that your wife is very tolerant - PW.

---------- Post added at 02:39 AM ---------- Previous post was at 02:13 AM ----------

HaHa - looks like my last post was a bit late.

Glad you stayed in the ring. Thought you were out for the count. Well done!

I posted best files and methods in my first reply to you, post #548.

You will need to follow steps in Useful Stuff post mentioned here closely to make TWRP stick if you're keeping Stock ROM as this will otherwise restore stock (Chinese) recovery on boot. (Alternative instructions for this are in OP of Unbricking thread by [MENTION=8243079]r&xp[/MENTION]).

You can simplify TWRP and root setup if moving to if moving to LOS14.1 as mentioned.

All best, PW.
[Android General] pndwal:
Many thanks for those. May be useful for some.

Thanks, and yes, I like to point others in the right direction, but really I already spend too much time between Lenovo TB3-850F and Huawei Ascend Y550 and associated Huawei CHE1 Cherry device threads doing this.

Sorry, don't really want to start maintaining file archives in addition. Need to consider my wife too!

Perhaps someone else would do the honours? [MENTION=9720847]AeonFlux1603[/MENTION], [MENTION=8548258]wezroot2k[/MENTION], [MENTION=6939319]Hemphiz[/MENTION]? PW
[Android General] limited_imagination:
No worries PW, I totally get that. But what the hell, people have to have hobbies, even if they seem bizarre or tedious to others. You and I happen to share this one. I don't get philately, but it's all part of life's rich pageant.

I know you are an enthusiast of Magisk to root this device, but I have no experience with Magisk whatsoever. As a creature of habit, when MotoJunkie01's method in this thread worked repeatedly for me, I just stuck with it.

If you have a moment to comment on why Magisk is the superior method, I'd be interested to read that.
[Android General] RBraverman:
Thank you!

I have decided to put LOS on this - after all it's been through ... - can I use Magisk to root then wipe/flash?
[Android General] pndwal:
Use Magisk, but in this order:

(If moving to custom ROM you can ignore steps related to obtaining root for purpose of preventing stock ROM overwriting recovery.)

Simply flash TWRP as soon as you have unlocked bootloader then boot to recovery immediately (avoid booting stock ROM again as this will overwrite recovery), wipe everything ROM related (- data, cache, system, dalvik) for a clean ROM flash, flash LOS14.1, flash GApps, flash latest Magisk zip, wipe dalvik, boot to system, wait a while, and Bobs your uncle.

Alternatively, perform steps 1 thru 7 in my Useful Stuff post, in TWRP wipe everything ROM related (- data, cache, system, dalvik) for a clean ROM flash, flash TWRP recovery .img file and reboot to recovery (or reboot to bootloader, then type: fastboot flash recovery recovery.img in command window, then boot to recovery using 3 button combo - may just boot to recovery anyway after system wipe), flash LOS14.1, flash GApps, flash latest Magisk zip, wipe dalvik, boot to system, wait a while, and Robert's Your Mother's Brother.

All best, PW.
[Android General] RBraverman:
Remember this has just arisen from the dead, and I've done nothing to it.

AH Roberts mom's brother ...;)

I've done some reading - yes I really can and actually have, and am not clear on one thing; in regards to Magisk, one size fits all?

I'll collect all the files and just check with you that I've all the right ones.

::: I grabbed

1. LI's gracious upload of the original OP's files, which includes TWRP (wish people would put versions on the filenames)

2. Magisk V18.1 (latest stable)

3. I do not have gApps pico, but I believe (correct me if I'm wrong) that is contained with LOS14.1, which as I read this makes no sense, but a quick search does not find them.

FWIW, I might be able to host all the files - I've TONS of room on my server (in another life, I was a programmer - yeah hard to believe, and served all lot of them from there.

Do Over:

fastboot boot twrp.img, flash it, then reboot to it.

In my case I kept getting cannot format/wipe /data/ or /cache/ - reboot to recovery and all was well. The resource was busy.

Wiped all with a Mr. Clean Eraser and flashed LineageOS, and then V18 of Magisk.

It's now working on it's first boot a circle cruising back and forth across an upside down 1/2 circle.

When this is finished, I've a lot more to say.
[Android General] pndwal:
?? Yeah - I'm assuming you have unrooted stock ROM, stock recovery, unknown bootloader state, and are moving to custom ROM with Magisk root at this point. Hence the comment about simplifying steps intended for root on stock, which are only necessary because stock ROM tries to overwrite custom recovery.

Pretty much!

1. TWRP - my link (to original Russian source, including usage info - open in chrome to translate) is in Useful Stuff post referenced. (Post #404 this thread.)

2. Magisk - chose 'latest stable':

https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

3. Think one is included, bit it's minimal. For a fuller selection of Apps from Google, simply select another (description pops up) from Open GApps and flash as described. - chose ARM64, 7.1, then select one between nano and stock:

https://opengapps.org/

Great!

Not sure why you couldn't wipe / needed 3rd party cleaner. Anyone else have problems here?

All best, PW
[Android General] pndwal:
Things I like about / use with LOS14.1:

"cLock" widget with OpenWeatherMap as Weather Provider. (Replace original clock with this, install OpenWeatherMapWeatherProvider.apk from https://download.lineageos.org/extras, sign up and get free API key and enter in OpenWeatherMap settings, customise font, colours, screen position & size, location etc. Geolocation is default.)

Adopted SD storage with Force Allow Apps on External enabled in Developer Options.

[Some apps (especially those whose functions require root permission) may suffer reduced functionality if installed on SD, and should be moved after consideration, or moved back to internal. Eg. ES file Explorer - if you use it's 'root explorer'. - It will lose root permission (fails initial test) and won't allow root / system level access when on SD card.]

Smart Launcher (free, but I paid for Pro version) as I like homescreen layout, customisability (think I may have coined that one), and especially self sorting app draws (six basic categories, can add more, launcher checks database when installing any app for category) which makes apps simple to find when you have too many. PW