yashsingh1/xdaforums huggingface dataset:
[Lenovo P11] Ungeskriptet:
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

View attachment 5988975

Working:​

Userdata decryption

USB

Wipe/Format

Fastbootd

Touch

ADB Sideload

External storage (SD card/USB)

Broken:​

Fastbootd mode doesn't properly recognize the dynamic partitions. If you want to flash one of the dynamic partitions (system, vendor, product, system_ext, odm) revert back to stock recovery for fastbootd or use the partition flasher built into TWRP. Dynamic partitions have been fixed. The next TWRP build after 07.03.2024 should have the fix included

Download: https://twrp.me/lenovo/xiaoxinpadpro2021.html

Device tree: android_device_lenovo_p11_pro_plus

Kernel: Prebuilt, Lenovo doesn't want to release the source

How to flash to your current slot:

Unlock the bootloader

Reboot into bootloader:

Form powered-on state: adb reboot bootloader

Or from powered-off state: Hold Power + Volume Down

Flash recovery: fastboot flash recovery twrp-3.7.0_12-0-p11_pro_plus.img

Reboot to recovery: fastboot reboot recovery

Done!

NOTE: TWRP will not boot up if you flash it to an inactive slot!

If you encounter issues, make sure your on the latest firmware (ZUI 14.0.266 as of 19.08.2023). In case the issue still persists, let me know over at https://t.me/j716f on Telegram.

If you want to revert back to the stock recovery, download it from here and repeat the steps above with the stock recovery image.
[Lenovo P11] russy23:
Good work :)
[Lenovo P11] russy23:
Will you be working on any ROMS in the future..or do you use a GSI?
[Lenovo P11] Ungeskriptet:
For now I'm using the GSI, but I do want to eventually port LineageOS to it (I have only little experience so this could take a long time). I'd also like to get mainline Linux booting on this tablet, since SD865 is supported in Linux and SD870 is an overclocked SD865.

EDIT: I've been using the GSI for some time now and the performance is great. I'll try looking into the issues the GSI has because if the GSI works good there's no need to make a new and seperate LineageOS port. I would need to learn how to do that first though so it can take some time.
[Lenovo P11] mardon85:
Thanks for this! Great we're getting some custom development!!
[Lenovo P11] rosco_pc:
excellent :)
[Lenovo P11] gunalarix8:
Good work! Best of luck sir! :cowboy::cowboy::cowboy::cowboy:
[Lenovo P11] risant:
How about for Lenovo Tab p11 tb-j606f?
[Lenovo P11] Ungeskriptet:
No, only TB-J716F. That model uses an entirely diffrent SoC.
[Lenovo P11] miserable_De:
It cannot recognize the TF card. Can this problem be fixed later? In addition, system and system cannot be mounted when switching to partition B_ Ext and other partitions, which is a relatively perfect work(y)
[Lenovo P11] Ungeskriptet:
I have no problems mounting the partitions under slot B, although I kinda bricked my A-slot (Not related to TWRP) but before that both worked fine.

For the SD card, you should be able to mount it manually until I fix it.

EDIT: Now my slot A is fine but B is broken?
[Lenovo P11] miserable_De:
Thank you. I'm trying to refresh the official firmware to slot B, hoping to correct the error
[Lenovo P11] zxcv88:
Just flashed this without any issues.

Thanks for your contribution!
[Lenovo P11] NeonHD:
I don't have the Xiaoxin Pad Pro but thank you for getting TWRP on here so quick! Makes me wanna buy one now haha.
[Lenovo P11] tinybilbo:
Thanks... Installed nicely :-)
[Lenovo P11] russy23:
So now we can install gsi through twrp?
[Lenovo P11] Ungeskriptet:
Not so easy. Installing it through fastboot is easier.
[Lenovo P11] AhmadNaimHebat:
can I flash magisk thru this?
[Lenovo P11] Ungeskriptet:
Yes
[Lenovo P11] AhmadNaimHebat:
Thanks. Already flash this recovery and magisk. Great work.
[Lenovo P11] gunalarix8:
i managed to install twrp and root with magisk, however i broke my partition B when tried to install gsi from fastbootd. good work @Ungeskriptet
[Lenovo P11] Ungeskriptet:
That's weird cause one of my partitions is also broken. I haven't yet looked into it.
[Lenovo P11] gunalarix8:
@Ungeskriptet i had problem to restore my twrp backup, it shows slide restore only. Any idea on how to restore my backup?
[Lenovo P11] toystory2000:
May I know the details of install Magisk and should select slot a or b, thanks
[Lenovo P11] Tropaion:
@Ungeskriptet Which GSI do you use? Do you also have problems with Autobrightness and

rotation orientation? Did you create a overlay?
[Lenovo P11] Ungeskriptet:
I use the Lineage OS GSI, with the issues everybody has.

And no, I didn't create an overlay. Might try tho
[Lenovo P11] russy23:
Is there no way to flash persist.img to sort these issues out or is this not related
[Lenovo P11] Ungeskriptet:
You should be able to just flash it in TWRP. If you haven't messed up your A/B partitions like me it doesn't matter which one you select as long as your system boots.
[Lenovo P11] russy23:
Has anybody tried using TWRP to flash a gsi yet?
[Lenovo P11] chococomaxim:
Random, but how does one learn porting/ROM dev? It is something that has been interesting me recently so I was wondering if you could point me in a general direction on how to get started/learn more about it?
[Lenovo P11] Ungeskriptet:
fastbootd works so flashing should work too, haven't tested it though.
[Lenovo P11] miserable_De:
https://maruos.com/ Hey, I found that this project may be more convenient for running Linux to Android
[Lenovo P11] Ungeskriptet:
MaruOS is a custom ROM for running Linux on top of Android. My goal is to ditch Android completly and run Linux natively by using a mainline Linux kernel. Someone already managed to run mainline Linux v5.15 on a Mi Pad 5 Pro with SD870 so we can (someday, when everything will work) use this tablet as a normal Linux PC.

https://github.com/lujianhua/xiaomi_elish_stable_kernel/
[Lenovo P11] imankhamse:
I have the same tablet and have the same wish as you

please look at the jingOS

JingOS | Future Mobile OS based on Linux - JingLing - JingOS

JingOS is a ‘convergent’ Linux-Based Open-Source OS for future tablets&laptops.It is a product of JingLing Tech. JingPad A1 is the World’s FIRST Consumer-level ARM-based Linux Tablet.

en.jingos.com

and efidroid project

Ithink its a UEFI for android and can load grub witch is start of linux

EFIDroid

EFIDroid has 39 repositories available. Follow their code on GitHub.

github.com

I may not be good like you but I would be happy to cooperate on this
[Lenovo P11] Ungeskriptet:
The kernel has to be mainlined first (sadly there are no downstream kernel sources which will make this a bit harder). Once the kernel has been mainlined you can use any distro which has an aarch64 (ARM64) version available. EFIDroid is no longer maintained and is also not needed. We can simply put the kernel in the boot partition and boot it that way.
[Lenovo P11] Ungeskriptet:
It could be possible that while flashing/updating/messing with the tablet, the super partition got corrupted:

╭─david@david-ryuzu ~/Downloads
╰─$ imjtool super.bin
liblp dynamic partition (super.img) - Blocksize 0x1000, 3 slots
LP MD Header @0x3000, version 10.2, with 10 logical partitions on block device of 4096 GB, at partition super, first sector: 0x800
Partitions @0x3100 in 3 groups:
Group 0: default
Group 1: qti_dynamic_partitions_a
Name: system_a (read-only, Linux Ext2/3/4/? Filesystem Image, @0x100000 spanning 1 extents and 3 GB)
Name: system_ext_a (read-only, Linux Ext2/3/4/? Filesystem Image, @0xc4f00000 spanning 1 extents and 255 MB)
Name: product_a (read-only, Linux Ext2/3/4/? Filesystem Image, @0xd4f00000 spanning 1 extents and 403 MB)
Name: vendor_a (read-only, Linux Ext2/3/4/? Filesystem Image, @0xee300000 spanning 1 extents and 689 MB)
Name: odm_a (read-only, Linux Ext2/3/4/? Filesystem Image, @0x119500000 spanning 1 extents and 1008 KB)
Group 2: qti_dynamic_partitions_b
Name: system_b (read-only, empty)
Name: system_ext_b (read-only, empty)
Name: product_b (read-only, empty)
Name: vendor_b (read-only, empty)
Name: odm_b (read-only, empty)

This is from my tablet when I still had ZUI 13. Maybe it would be possible to dump the working slot from the super partition and flash it in fastbootd mode?

EDIT: Seems like it's the same for the super partition from the EDL/QPST-Firmware. I did flash my tablet with EDL so it's most likely this issue.

Spoiler content hidden.

EDIT 2: Pulled the current super partition from my tablet and now the A partition is completely gone?

Spoiler content hidden.
[Lenovo P11] gunalarix8:
I managed to repartition and flash the images manually. However, I could not fix widevine status f3, if im not mistaken, it was affected by modem/persist/efs partition. I managed to backup using TWRP and restore function is ok. But i got bootloop after restore 😆.
[Lenovo P11] bobochacha:
Hi, i'm a newbie in configuring android devices. I've downloaded android filehost and the device tree from the link but what am i supposed to do in order to install TWRP? I've enabled OEM unlocking as well as USB debugging. When i go into bootloader i don't see anything that says "Flash recovery". Could anyone kindly guide or provide me steps into installing TWRP? Greatly appreciate the help if can! Thanks!
[Lenovo P11] rosco_pc:
you need to get ADB and fastboot tools installed on your computer. Then you can follow the commands as stated in the 1st post
[Lenovo P11] bobochacha:
Thank you very much for the guidance. I've downloaded the tools as you said and managed to send commands to the tablet but i'm stuck at the flash recovery command. It says waiting for device but on my device but i don't see any confirmation on my tablet. What am i supposed to do from here?
[Lenovo P11] rosco_pc:
That means you don't have the correct usb drivers installed

This post give a good overview: https://xdaforums.com/t/install-stock-rom-xiaoxin-pad-pro-2021-tb-j716f.4347951/post-85825625
[Lenovo P11] bobochacha:
I've followed the instructions there. I've downloaded android studio as well as manually installing google ADB driver but I still have the same problem. It still says waiting for device. Am i doing something wrong? For the Android FileHost & android_device_lenovo_J716F file i have already extracted them into my tablet. Am i missing something?
[Lenovo P11] tsoureki:
I am waiting for a gsi A12 ROM to use. Is there any good? But gsi flashing will be the first time for me so I need a tutorial 😁
[Lenovo P11] rosco_pc:
Don't know. This is what I used (quoting from the post I mentioned)

After that it worked for me.
[Lenovo P11] rosco_pc:
look in this thread for howto install GSI rom and for links to existing roms:

https://xdaforums.com/t/install-gsi-rom-xiaoxin-pad-pro-2021-tb-j716f.4348249/
[Lenovo P11] bobochacha:
Oh i'm supposed to use QPST? I'm quite confused. I thought i didn't need QPST to get this TWRP? I managed to connect to PC with QFIL but i cant select the TWRP disc image to proceed
[Lenovo P11] Ungeskriptet:
No, you're supposed to use fastboot to flash the recovery (Look up "SDK Platform Tools"). QFIL is used to unbrick the tablet or to revert back to stock ROM. Read through the first post thoroughly.

You don't need the device tree, it's the source code used to compile the image.

EDIT: I made a mistake on the first post for flashing recovery. I fixed it now, sorry for the confusion.
[Lenovo P11] miserable_De:
Check USB Fastboot drive。

input ：fastboot flash recovery recovery.img
[Lenovo P11] bobochacha:
I've done exactly what u guys said but for some reason the fastboot command is not working. After i reboot to bootloader and once i send the fastboot command, it's just stuck at waiting for device. I searched up USB fastboot drive and downloaded the drivers as well. This is what i've downloaded:-

Download ADB and Fastboot Drivers [15 Seconds ADB Installer] - GSM USB Drivers

Looking for ADB and Fastboot Drivers? Download here 15 Seconds ADB and Fastboot installer, which installs ADB and Fastboot drivers system-wide.

gsmusbdrivers.com

Minimal ADB and Fastboot Tool [Download] - GSM USB Drivers

Minimal ADB and Fastboot Tool helps in installing ADB and Fastboot drivers on your windows machine. So, that you can use ADB or Fastboot commands to

gsmusbdrivers.com

ADB and Fastboot SDK Platform Tools [Download] - GSM USB Drivers

Google finally released the standalone version of ADB and Fastboot SDK Platform Tools for Windows, Linux, and Mac. Which can be extracted on your machine

gsmusbdrivers.com

Download Lenovo USB Drivers [Official] - GSM USB Drivers

Looking for Lenovo USB Drivers? You can Download here Official Android Lenovo USB Driver (LePhone2.0) for your Android Smartphone and Tablet.

gsmusbdrivers.com

I'm still stuck at fastboot flash recovery recovery.img command

No changes on my tablet.
[Lenovo P11] Ungeskriptet:
Maybe start with unlocking your bootloader…

Lock+Unlock Bootloader - Xiaoxin Pad Pro 2021 [TB-J716F]

How To Lock and Unlock Bootloader - Xioaxin Pad Pro 2021 - TB-J716F Since I found out that the Tablet supports Project Treble I'm trying to get a GSI-ROM running on it. Currently with many trial and error I got LiR-ROM to boot. The first step is...

xdaforums.com

The bootloader has to be unlocked for flashing.
[Lenovo P11] bobochacha:
Thanks alot i managed to install TWRP and rooted the tablet! But now i am stuck at bootloop cause i wanted to relock the bootloader. I didnt know i was not supposed to relock the bootloader after installing TWRP. I cant even go into recovery mode to restore the tablet. I did backup in TWRP but I cant access it now. Can you please provide me some guidance on what i can do now? I think the tablet is dead right now :(
[Lenovo P11] gunalarix8:
You need to unlock the bootloader using the script in unlock+lock post. Then reflash stock recovery in stock rom. Or reflash firmware from qfil.
[Lenovo P11] ASCVUOE:
it seems that this twrp can‘t be used to flash stock rom ，maybe it‘s because me ，i will report if it can’t be solved after 9008 flash
[Lenovo P11] AhmadNaimHebat:
Would able to make it to support lenovo ota update?
[Lenovo P11] mcdull:
do not lock the bootloader if you have tempered any of your rom from the official.
[Lenovo P11] mcdull:
stock rom is not made for recover to update. you have to use qpst to flash the stock rom and hopefully get the system to restore.
[Lenovo P11] melones22:
https://github.com/senolem/Lenovo-P11-Pro-TB-J706F-March-2022-bootloader-twrp-root-debloat wrote a complete guide if you want to get latest ota + root + twrp + debloat for J706F
[Lenovo P11] prozack1983:
Would these instructions apply generally to J716F as well? Assuming you had the correspondingly correct files?
[Lenovo P11] melones22:
Likely. you would need the right rom from lolinet, the right TWRP (I think it's on xda) and dump your own boot.img and patch it.
[Lenovo P11] amiruls:
Hi so I broke b_partition of the device need help/guide in getting the required files to flash to fix the issues. Using the fastboot --set-active b keep showing unknown option. Likewise flashing the stock rom using QFIL doesnt fix the issues . Not sure what i did wrong along the way.... Also tried flash fastboot method with the stock rom files doesnt help too.
[Lenovo P11] Ungeskriptet:
The correct command is fastboot set_active b.

QFIL would actually fix the issue easily as it reflashes the partition table.
[Lenovo P11] amiruls:
got this instead . Have the latest platform tools too
[Lenovo P11] amiruls:
not sure why but storage looking like this so i guess its working then?
[Lenovo P11] Ungeskriptet:
Are you sure it's the latest? What does fastboot --version say and did you it download from here?
[Lenovo P11] amiruls:
yes downloaded it from there still wouldnt work. In any case having issues now even with flashing via QFIL its showing system is rooted not sure why thats why most probably is the a/b issues of it.
[Lenovo P11] amiruls:
HI was wondering where did you get specific files to flash manually via fastboot since iam having issues with it.
[Lenovo P11] amiruls:
got it too work , gotta type using cmd instead of the windows powershell...
[Lenovo P11] amiruls:
HI so anyone really need help..
[Lenovo P11] amiruls:
Flashing via qfil doesnt help since when changing to b partition, it doesnt boot up stuck at lenovo logo..
[Lenovo P11] sevachcomunist4:
I've tried to flash an update zip by TWRP but I got an error message of slot A/B, so I've changed to slot B just for trying and rebooted it. now I can't even turn on the tablet, it doesn't give a sign even if I try to charge or pressing the power or volume buttons. any idea of how can I fix this and change it back to slot A?
[Lenovo P11] amiruls:
You seem to have related issues with the twrp like me which happens to have the same issues, the only to fix is through EDL hence via flashing stock rom, in the forum there's a way to flash back rom via QFIL EDL mode
[Lenovo P11] sevachcomunist4:
ty for the reply, I was able to flash by QFIL only after selecting Reset Machine on settings, now device is working fine. only thing that I wasn't able to do is lock the bootloader, every time I try I'm getting the corrupt message, but not a real problem to me. I've updated it yesterday to ZUI 13.1.555
[Lenovo P11] highvoltage12v:
Hello,

I bought the US version of the Lenovo P12 Pro From Costco.com, just want to add, US revisions do not need to go to "https://www.zui.com/iunlock" an enter you serial. After 3 days of trying, it never recognized my serial. instead I just started throwing Fastboot Unlock commands at it. The one that stuck was "fastboot flashing unlock" which brought me to the Prompt to Unlock the bootloader screen. Your second version of TWRP worked great with P12 Pro for Flashing Magisk. I'm on S212071_22022_ROW however its already telling me S212131_22040010_Q00243_ROW is available for update.
[Lenovo P11] Ungeskriptet:
Lenovo P12 Pro is a different device, this TWRP is made for TB-J716F.

There is a port for TB-Q706F here though if you have that model.
[Lenovo P11] highvoltage12v:
You're right it posted to the wrong thread. I used the wrong tab, this had the guide section.
[Lenovo P11] frilalo:
Are there any roms? I can't find one ...
[Lenovo P11] Ungeskriptet:
@frilalo You can follow this guide to install a GSI ROM. I used Andy Yan's LineageOS build. Note that all GSIs have the same bugs that you're going to notice right away…
[Lenovo P11] frilalo:
The thing is, that I don't have the 2021 Tablet. I think I have the previous one.
[Lenovo P11] AhmadNaimHebat:
is it possible to make it support ota update?
[Lenovo P11] Ungeskriptet:
No, once bootloader is unlocked you will no longer receive OTA updates from Lenovo. You should be able to install updates manually from settings though.
[Lenovo P11] MoraKont:
Hi everyone. Need help. After installing twrp does not load. Just a black screen. Can anyone give a kernel from version 13.1.560?
[Lenovo P11] Ungeskriptet:
Does the PC detect your tablet when you connect it over USB and how would a different kernel fix your issue?
[Lenovo P11] MoraKont:
Sorry.

Sorry. The tablet was restored using QFIL. The kernel is needed to install magisk.
[Lenovo P11] mitchzhe:
I encountered the same problem. No matter which version of zui13, zui12 can be displayed normally.
[Lenovo P11] salzzz:
could somebody share a dump of the stock recovery image of the latest zui 13 (.560)?
[Lenovo P11] SvssTelly:
Any custom rom for this device (TB-J716F)?

I bought this device over month ago but it come with global damn **** rom and bootloader locked...

i wanna install original stock rom but i m notgood with it...
[Lenovo P11] Ungeskriptet:
Here: https://androidfilehost.com/?fid=14871746926876824652

md5sum is ee48ddb22a27fe2d19724e04a801e806
[Lenovo P11] Ungeskriptet:
There is no custom ROM specific to our tablet. However, you can flash a GSI ROM like here with some minor drawbacks like broken auto rotate, wrong oriented camera and no proximity and hall effect. I've been using Andy Yan's LineageOS 19.1 builds and it works well enough for me.

By the way, in OneNote version 16.0.14729.20200 the camera is oriented correctly for some weird reason.
[Lenovo P11] salzzz:
thanks a lot OP!
[Lenovo P11] opurarafael24:
How's the widevine?
[Lenovo P11] Ungeskriptet:
Unlocking the bootloader will put you into Widevine L3, even if you use stock ROM.
[Lenovo P11] opurarafael24:
I'm on the latest stock rom zui but even with the lock bootloader I'm still getting L3. It used to be L1 i don't know which update broke it.
[Lenovo P11] gunalarix8:
@Ungeskriptet hey op, can you streamline the twrp recovery with latest built android 12 zui14. Thank you 😁.
[Lenovo P11] Ungeskriptet:
Does it not work on ZUI 14?
[Lenovo P11] TheNiceGuy11999:
Any chance that the TWRP file will be updated to 3.7 since it fully supports A12's encryption? (From what I saw from the person above, they had trouble with the TWRP we had now because of the whole encryption thing. ZUI 14 is updated to A12 after all.)
[Lenovo P11] redblood252:
After last command I get normal "Android Recovery" and not TWRP. Is that normal? What should I do with the device tree source code?
[Lenovo P11] Ungeskriptet:
Did you flash the file `twrp-3.6.0_11-0-J716F.img`? If yes you could try flashing to both slots with fastboot flash recovery_a twrp-3.6.0_11-0-J716F.img and fastboot flash recovery_b twrp-3.6.0_11-0-J716F.img.

You don't have to do anything with the device tree, it's just there to compile from source.
[Lenovo P11] redblood252:
doing that and booting to recovery_b instead of recovery_a just gave me a black screen. Not being detected by fastboot nor adb. Usb devices show it named as "QUSB_BULK_CID:0412_SN:93F5B64A"
[Lenovo P11] Ungeskriptet:
No, don't switch the slots, stay on the slot where Android is currently installed, it could mismatch the firmware. Your device crashed to EDL mode. Try holding the power button.

If you have the stock ROM installed it could also be possible that it reflashed the original recovery, so reboot directly to recovery after flashing.
[Lenovo P11] redblood252:
adb and fastboot both don'tv detect it I know I still have default android recovery how can I change this? If I keep holding the power button, nothing happens except my PC disconnecting usb then reconnecting it.

I installe qualcomm usb driver, nothing changed.
[Lenovo P11] redblood252:
Which zui version is this compatible with. I tried the stock version 12. Then upgraded gradually until 13.555. Now it boots into recovery but screen is black. I can use adb to go back to bootloader. Then recovery in black screen again. But I cannot get back to the system.
[Lenovo P11] Joao38:
Anyone help me? The tablet does not recognize fastboot commands. ADB only
[Lenovo P11] Joao38:
I've solved it
[Lenovo P11] Xssia:
Can anyone please help im on zui 14 with unlocked bootloader how can i root im a complete newbie and can't afford to brick the tablet where do i get the image to flash and is magisk and twrp provided in the post compatible with zui 14 please help
[Lenovo P11] KNkai:
How can you fix it? Can u make tutorial? Pls!
[Lenovo P11] Ungeskriptet:
Try updating the Google Fastboot driver and try out different USB cable/port
[Lenovo P11] adek89:
Work with LENOVO LEGION Y700 ??
[Lenovo P11] Ungeskriptet:
No, only TB-J716F
[Lenovo P11] evolance7:
@Ungeskriptet I would like to thank you since your post helped me unbrick my TB-J716F. The TWRP.img you provided worked well with ZUI 12 and ZUI 13. TWRP would be stuck if I flash the IMG to ZUI 14.0.127 though. Had to reflash with ZUI 14.0.127 stock recovery.img to fix it.
[Lenovo P11] hyunno:
How about for Lenovo Tab Pro 12.7(TB371FC, Chanies version)?

How about for Lenovo Pad Pro 12.7(TB371FC, Chines version, ZUI 15)?
[Lenovo P11] Ungeskriptet:
This is for J716F only.
[Lenovo P11] jaimbo:
Hey @Ungeskriptet, I've tried joining your Telegram group to discuss some issues I have found/am having with the new TWRP build - Please could you accept my joining? Thanks