[Thinkpad Tablet Android Development] Yahoo Mike:
This version of TWRP works on the Lenovo TB-X505F (wifi).

For the TB-X505X, see this thread. For the TB-X605F/L, see this thread.

For the TB-X606F/L, see this thread. The X606F/L is the second gen M10 and it uses a Mediatek SOC.

#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:

AFAIK, everything is working including:

data decryption

MTP

Known issues:

time not adjusting for Daylight Saving

OTA (for a workaround see this post)

Before installing TWRP

Before you install TWRP, upgrade your tablet to the Android 9 (Pie) or Android 10 (Q) stock ROM.

This tablet shipped with Android 8 (Oreo), in which the bootloader did not allow unlocking. When you tried to unlock the bootloader, it gave this error message:

fastboot oem unlock-go
FAILED (remote: 'unknown command')
fastboot: error: Command failed

Installation

It is recommended that you also install Magisk. This will ensure TWRP remains your default recovery.

Step-by-step guide

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

download magisk.apk to your MicroSD or OTG device. Get the latest Magisk apk file here. Rename the filetype from apk to zip (for example Magisk-v22.0.zip)

if your bootloader is already unlocked, go to step 4. To unlock bootloader:

on tablet: go to Settings->System->About and press "Build number" 7 times to enable Developer Options.

on tablet: go to Settings->System->DeveloperOptions. Turn on: "OEM unlocking" and "USB debugging".

connect tablet to your computer. Tablet will ask for permission to "Allow USB debugging". Tick "always allow" and select "OK".

backup any files you want to keep to an external device (MicroSD/OTG/computer), because the next step will wipe all your photos, files, google account etc on the tablet.

Now unlock the bootloader:

adb reboot bootloader
fastboot oem unlock-go
fastboot reboot

flash the twrp image:

adb reboot bootloader
fastboot flash recovery twrp.img

if you haven't loaded Magisk yet, go to step 6. If you have already loaded Magisk, you can just reboot and you're finished:

fastboot reboot
adb reboot recovery

load Magisk (step one): reboot to recovery. Do not reboot into the system, because it will over-write TWRP with stock recovery. If that happens, go back to step 4 and start again. When you issue the reboot command (below), you have to immediately press the button combination to reboot to recovery (TWRP). Here are the steps:

issue the reboot command:

fastboot reboot

immediately press and hold all three buttons (Pwr+VolUp+VolDown). The tablet might reboot twice. Release all the buttons when you see the TWRP screen, or hear your PC acknowledge that ADB is connected.

load Magisk (step two): flash Magisk. In TWRP:

select "Install"

use "select storage" to locate device you stored magisk.zip on.

press the OK button

select the Magisk zip file

swipe to confirm Flash

when Magisk is finished, hit the "Reboot System" button

finished!

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

Vol Down + Power = fastboot mode

Vol Up + Vol Down + Power = recovery mode

Changelog

01/03/2023 - bug fix: data partition again backs up and restores correctly

20/01/2023 - add TW_EXTRA_LANGUAGES and TB_X505F_S001149_221115_ROW kernel (credit to @Tonyha7 )

30/12/2022 - add system partition to AdvancedWipe (TB_X505F_S001147_220830_ROW firmware only)

15/11/2022 - TWRP 3.7.0-0 update
- support for TB_X505F_S001147_220830_ROW

18/12/2021 - TWRP 3.6.0-0 update
- support for A12 decryption (keymaster)

27/03/2021 - TWRP 3.5.1-0 update
- change to landscape mode for tablets

01/01/2021 - TWRP 3.5.0-0: initial release

Downloads

TWRP 3.7.0-0 for X505F: twrp-X505F_11.img (for TB_X505F_S001147_220830_ROW and above)

TWRP 3.6.0-0 for X505F: twrp-X505F_11_2021.img (for earlier stock ROMs)

Source code

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

https://github.com/Yahoo-Mike/recovery_device_lenovo_X505F/tree/android-11.0

Credits

The guys at TeamWin Recovery Project.

Everyone whose device trees I plagiarised from GitHub.

Contributors

Yahoo Mike

Tonyha7

Last Updated 2023-03-01 (fix /data backup/restore)

Created 2021-01-01