How to build TWRP for the TB-8504X/F

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:

  1. An Android build environment: https://source.android.com/setup/build/initializing or something like https://github.com/jfloff/docker-lineageos
  2. Repo Installed: https://source.android.com/setup/build/downloading

Steps:

  1. Create a working directory and cd into it
    • mkdir twrp && cd twrp
  2. 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
  3. Sync
    • repo sync
  4. 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
  5. Clone the recovery source into the tb_85004x directory
    • git clone git@github.com:Matshias/twrp_android_device_tb_8504x.git
  6. 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

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.