[Miscellaneous Android Development] Yahoo Mike:
This version of TWRP works on the Lenovo TB128FU: Tab M10 Plus (Gen 3) and Xiaoxin Pad 2022. It might also work on the TB128XU and Moto Tab G62 - to be confirmed.

Warning: this TWRP will

not

work for any of the Tab M10 Plus Gen 3 variants with Mediatek SoCs (TB125FU) or UniSoc SoCs (TB328FU,TB328FX).

#include <std_disclaimer.h>
/*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*/

Working:

Almost everything is working including:

data decryption

ADB/MTP

external SD card

OTG

Known issues:

vibration

when you unmount then remount the data partition, twrp forgets how to decrypt it

you tell me

This guide is not for noobs

There are two problems with the bootloader on these tablets:

Lenovo does not allow bootloader unlocking on some tablets

Lenovo has not enabled fastboot flash on some tablets

So it's not easy to install twrp on these devices. If you are a noob, don't ask for a step-by-step guide - you'll just have to learn more about Android before trying this guide. It's not my fault - blame Lenovo for making development on this tablet so difficult.

unlocked bootloader

You will need a tablet with an unlocked bootloader. Lenovo has not provided a method to unlock many of these tablets. The commands fastboot oem unlock-go, fastboot flashing unlock and fastboot flashing unlock_critical do not work.

You can check on the fastboot menu. The "DEVICE STATE" should be "unlocked".

Some Xiaoxin Pad 2022 models already come with an unlocked bootloader.

There is also a known method to unlock the bootloader. I have not tried it and can't provide any support for it. Use it at your own risk.

Hopefully Lenovo will provide a method in an upcoming OTA.

fastboot flash

If your tablet does not support fastboot flash, you will get an "unknown command" error like this:

C:\>fastboot flash recovery_a twrp_TB128FU_12.img
Sending 'recovery_a' (98304 KB) OKAY [ 2.288s]
Writing 'recovery_a' FAILED (remote: 'unknown command')
fastboot: error: Command failed

In this case you can use a tool like QFil or edl to EDL-flash twrp. Use the prog_firehose_ddr.elf program from the stock ROM.

Installation

With a stock ROM, it is recommended that you also install Magisk. This will ensure TWRP remains your default recovery. You can either use the boot image patch method, or flash the magisk apk in twrp.

ensure your bootloader is unlocked. On the fastboot menu, "DEVICE STATE" should be "unlocked".

download TWRP to your PC (see the Download section below)

flash the TWRP image:

adb reboot fastboot <== NOT "adb reboot bootloader"
fastboot flash recovery_a twrp_TB128FU_12.img
fastboot flash recovery_b twrp_TB128FU_12.img
fastboot reboot recovery

if fastboot flash does not work, then use Qfil or EDL to flash twrp to recovery_a and recovery_b

in TWRP: backup the boot, oem and persist partitions in TWRP, if you don't have backups already.

load Magisk by loading the patched boot image, or by installing the zip file. Instructions are linked above.

If you prefer to use button combos, rather than fastboot/ADB commands:

Vol Up + Power = fastboot mode

Vol Up + Vol Down + Power = recovery mode

Changelog

2023-02-13 - removed abl, bluetooth and modem partitions from twrp

2023-01-10 - fastbootd working

2023-01-06 - fixed "unable to locate parent partition" errors

2023-01-06 - TWRP 3.7.0_12-0: initial release (UNOFFICIAL)

Downloads

twrp-TB128FU_12.img

Source code

https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp/tree/twrp-12.1

https://github.com/Yahoo-Mike/recovery_device_lenovo_TB128FU

Credits

The guys at TeamWin Recovery Project.

Everyone whose device trees I plagiarised from GitHub.

Contributors

Yahoo Mike

Created: 2023-01-06

Last Updated: 2023-02-23 - removed abl, modem and bluetooth from fstab