I recently started a project to build LineageOS for the Lenovo TB-8504X/F. Part of the journey typically involves building a custom recovery. TWRP is now the defacto so I started there.
Prerequisites:
- An Android build environment: https://source.android.com/setup/build/initializing or something like https://github.com/jfloff/docker-lineageos
- Repo Installed: https://source.android.com/setup/build/downloading
Steps:
- Create a working directory and cd into it
mkdir twrp && cd twrp
- Check out limited manifest for building TWRP
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-7.1
- Sync
repo sync
- Make a directory for the tb_8504x device inside the repository directory and cd into it
mkdir -p device/lenovo/tb_8504x && cd device/lenovo/tb_8504x
- Clone the recovery source into the tb_85004x directory
git clone git@github.com:Matshias/twrp_android_device_tb_8504x.git
- Go back to the top level directory and lets start to build
source build/envsetup.sh
lunch omni_tb_8504x-userdebug
mka recoveryimage
If everything goes well you should have a recovery image available in out/target/product/tb_8504x/
Big thanks to https://github.com/Matshias
You can find the final output and a continuing thread here: https://forum.xda-developers.com/thinkpad-tablet/general/twrp-root-tab-4-plus-tb-x704l-f-tb-t3664407